From report at bugs.python.org Tue Jul 1 00:00:38 2014 From: report at bugs.python.org (Karl Richter) Date: Mon, 30 Jun 2014 22:00:38 +0000 Subject: [issue21889] https://docs.python.org/2/library/multiprocessing.html#process-and-exceptions doesn't explain exception Message-ID: <1404165638.91.0.279596288902.issue21889@psf.upfronthosting.co.za> New submission from Karl Richter: Although the section https://docs.python.org/2/library/multiprocessing.html#process-and-exceptions (of the multiprocessing module documentation) is titled "... and exceptions" it doesn't say anything about exceptions. I assume that it behaves like the thread API (as stated and referenced in the introduction of the module doc). This implies though that either the reference is limited to that statement (-> remove "and exceptions" from the header as there's no special section on them because everything can be found in thread API) or add an explicit reference to the thread API. If this assumption is wrong the section is badly organized or doesn't make any sense at all. I'm not yet sure about exception handling in the multiprocessing module in case it's different from threads, but that shouldn't matter for this doc issue report. I'd also like to suggest a more detailed section on exceptions with usage of queues to pass them as objects to the parent or another process. ---------- assignee: docs at python components: Documentation messages: 221987 nosy: docs at python, krichter priority: normal severity: normal status: open title: https://docs.python.org/2/library/multiprocessing.html#process-and-exceptions doesn't explain exception type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 00:11:35 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 30 Jun 2014 22:11:35 +0000 Subject: [issue21882] turtledemo modules imported by test___all__ cause side effects or failures In-Reply-To: <1404086161.6.0.896977354321.issue21882@psf.upfronthosting.co.za> Message-ID: <1404166295.88.0.608671626373.issue21882@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The __all__ test now passes on Snow Leapard. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 00:16:28 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 30 Jun 2014 22:16:28 +0000 Subject: [issue16763] test_ssl with connect_ex don't handle unreachable server correctly In-Reply-To: <1356349308.1.0.276929202525.issue16763@psf.upfronthosting.co.za> Message-ID: <1404166588.21.0.390615711083.issue16763@psf.upfronthosting.co.za> Mark Lawrence added the comment: Does the backport mentioned in msg178404 still need doing, can this be closed as "out of date" or "won't fix" or what? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 01:07:49 2014 From: report at bugs.python.org (Claudiu Popa) Date: Mon, 30 Jun 2014 23:07:49 +0000 Subject: [issue21861] io class name are hardcoded in reprs In-Reply-To: <1403631418.74.0.109096243494.issue21861@psf.upfronthosting.co.za> Message-ID: <1404169669.96.0.444651612617.issue21861@psf.upfronthosting.co.za> Claudiu Popa added the comment: The same should be done for _pyio? ---------- nosy: +Claudiu.Popa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 01:20:44 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 30 Jun 2014 23:20:44 +0000 Subject: [issue18906] Create a way to always run tests in subprocesses within regrtest In-Reply-To: <1378142237.02.0.163660197957.issue18906@psf.upfronthosting.co.za> Message-ID: <1404170444.74.0.47773915684.issue18906@psf.upfronthosting.co.za> Mark Lawrence added the comment: I believe that #9517 may be relevant if we decide to take the subprocess route. ---------- nosy: +BreamoreBoy type: -> enhancement versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 01:26:19 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 30 Jun 2014 23:26:19 +0000 Subject: [issue1674555] sys.path in tests contains system directories Message-ID: <1404170779.79.0.506461614921.issue1674555@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Arfrever will you create updated patches as stated in msg136552 ? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 01:31:01 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 30 Jun 2014 23:31:01 +0000 Subject: [issue21861] io class name are hardcoded in reprs In-Reply-To: <1403631418.74.0.109096243494.issue21861@psf.upfronthosting.co.za> Message-ID: <1404171061.47.0.312057415339.issue21861@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Is it common for C implementations to introspect to figure out their "real" name? I do this manually for reprs of my user defined classes, but I haven't noticed many built-ins that consider extensibility for the repr. Maybe I'm just not using the classes that do it or I'm overriding the repr without checking? I just tested, and it looks like frozenset has a subclass friendly repr, while bytearray does not as of 3.4.0. Seems like it might make sense to first determine if introspection should be the default; it would mean a little code bloat every time it's done. ---------- nosy: +josh.rosenberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 01:33:08 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 30 Jun 2014 23:33:08 +0000 Subject: [issue21886] asyncio: Future.set_result() called on cancelled Future raises asyncio.futures.InvalidStateError In-Reply-To: <1404137118.99.0.781732644161.issue21886@psf.upfronthosting.co.za> Message-ID: <1404171188.46.0.273164476929.issue21886@psf.upfronthosting.co.za> STINNER Victor added the comment: I see two options to fix this issue: - add an optional parameter to set_result() to do nothing if the future is cancelled - add a method (public or private) to set a result or do nothing if the future is cancelled Patch "Add ignore_cancelled and ignore_done to Future.set_result()" (for Tulip): http://codereview.appspot.com/109340043 Patch "Add Future._maybe_set_result()": http://codereview.appspot.com/108300043 I prefer the second patch because it doesn't touch the public API and it is shorter. Note: the first patch contains unrelated changes, like checking fut.cancelled() instead of fut.done(). "_maybe_set_result()" is not a good name. Other suggestions: "_set_result_except_cancelled", ""_set_result_ignore_cancelled". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 01:34:59 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 30 Jun 2014 23:34:59 +0000 Subject: [issue21886] asyncio: Future.set_result() called on cancelled Future raises asyncio.futures.InvalidStateError In-Reply-To: <1404137118.99.0.781732644161.issue21886@psf.upfronthosting.co.za> Message-ID: <1404171299.93.0.773975111348.issue21886@psf.upfronthosting.co.za> STINNER Victor added the comment: In https://codereview.appspot.com/69870048/ Guido proposed to test to replace: self._loop.call_soon(waiter.set_result, None) with: if not waiter.cancelled(): waiter.set_result(None) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 01:45:39 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 30 Jun 2014 23:45:39 +0000 Subject: [issue21886] asyncio: Future.set_result() called on cancelled Future raises asyncio.futures.InvalidStateError In-Reply-To: <1404137118.99.0.781732644161.issue21886@psf.upfronthosting.co.za> Message-ID: <1404171939.61.0.398868309613.issue21886@psf.upfronthosting.co.za> STINNER Victor added the comment: > "_maybe_set_result()" is not a good name. Other suggestions: "_set_result_except_cancelled", ""_set_result_ignore_cancelled". I read again the mail thread and Guido proposed the nice name _set_result_unless_cancelled() which is very explicit. I updated my patch: http://codereview.appspot.com/108300043 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 02:05:11 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Jul 2014 00:05:11 +0000 Subject: [issue18592] Idle: test SearchDialogBase.py In-Reply-To: <1375146770.41.0.774627283078.issue18592@psf.upfronthosting.co.za> Message-ID: <3h2Qn23KfYz7Ljf@mail.python.org> Roundup Robot added the comment: New changeset 2b7a4cbed2a0 by Terry Jan Reedy in branch '2.7': Issue #18592: Add unittests for SearchDialogBase. Patch by Phil Webster. http://hg.python.org/cpython/rev/2b7a4cbed2a0 New changeset a0e8f2d882a3 by Terry Jan Reedy in branch '3.4': Issue #18592: Add unittests for SearchDialogBase. Patch by Phil Webster. http://hg.python.org/cpython/rev/a0e8f2d882a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 02:08:11 2014 From: report at bugs.python.org (Berker Peksag) Date: Tue, 01 Jul 2014 00:08:11 +0000 Subject: [issue20554] Use specific asserts in optparse test In-Reply-To: <1391808859.25.0.0531028969207.issue20554@psf.upfronthosting.co.za> Message-ID: <1404173291.31.0.429821015621.issue20554@psf.upfronthosting.co.za> Berker Peksag added the comment: diff -r 3b94a4ef244e Lib/test/test_argparse.py --- a/Lib/test/test_argparse.py Fri Feb 07 17:53:13 2014 +0100 +++ b/Lib/test/test_argparse.py Fri Feb 07 22:34:13 2014 +0200 @@ -4219,7 +4219,7 @@ e = sys.exc_info()[1] expected = 'unknown action' msg = 'expected %r, found %r' % (expected, e) - self.assertTrue(expected in str(e), msg) + self.assertIn(expected, str(e), msg) The patch in issue 9554 replaces this code with assertRaises and assertRegex (I will change the code to use assertRaisesRegex). ---------- nosy: +berker.peksag stage: -> patch review title: Use specific asserts in argparse and optparse tests -> Use specific asserts in optparse test _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 02:14:34 2014 From: report at bugs.python.org (paul j3) Date: Tue, 01 Jul 2014 00:14:34 +0000 Subject: [issue15112] argparse: nargs='*' positional argument doesn't accept any items if preceded by an option and another positional In-Reply-To: <1340165747.87.0.563099760163.issue15112@psf.upfronthosting.co.za> Message-ID: <1404173674.71.0.830766126174.issue15112@psf.upfronthosting.co.za> paul j3 added the comment: I believe http://bugs.python.org/issue14174 with REMAINDER has its roots in the same issue - parse_args tries to process as many positionals as it can at a time, regardless of what's left in the argument strings. The fix proposed here depends on the 2nd argument taking 0 strings. REMAINDER, on the other hand, grabs everything that's left, leaving none for the optionals. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 02:50:15 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Tue, 01 Jul 2014 00:50:15 +0000 Subject: [issue21800] Implement RFC 6855 (IMAP Support for UTF-8) in imaplib. Message-ID: <1404175815.98.0.684783714649.issue21800@psf.upfronthosting.co.za> New submission from Milan Oberkirch: I made a patch implementing the following changes to the IMAP4 class: - add a method 'enable_UTF8_accept()' sending "ENABLE UTF8=ACCEPT" to the server and setting internal encoding to UTF-8 - use the UTF8 extencion in the 'append()' method if the internal encoding is UTF-8 - add a keyword argument 'enable_UTF8=False' to the init method to trigger 'enable_UTF8_accept()' as soon as the authentication is done - always use UTF-8 for encoding credentials in authentication (before encoding it to base64) Does this look like a good idea to you? (I'll make a patch including docs when we agree on the API.) ---------- keywords: +patch Added file: http://bugs.python.org/file35808/imaplib_utf8_no_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 03:38:37 2014 From: report at bugs.python.org (paul j3) Date: Tue, 01 Jul 2014 01:38:37 +0000 Subject: [issue20554] Use specific asserts in optparse test In-Reply-To: <1391808859.25.0.0531028969207.issue20554@psf.upfronthosting.co.za> Message-ID: <1404178717.25.0.815957842728.issue20554@psf.upfronthosting.co.za> Changes by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 04:09:36 2014 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 01 Jul 2014 02:09:36 +0000 Subject: [issue15358] Test pkgutil.walk_packages in test_pkgutil instead of test_runpy In-Reply-To: <1404162969.27.0.204340997538.issue15358@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Dropped down my priority list (it's a nice to have to make the code base a bit easier to work on, rather than something essential). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 04:34:29 2014 From: report at bugs.python.org (Berker Peksag) Date: Tue, 01 Jul 2014 02:34:29 +0000 Subject: [issue9554] test_argparse.py: use new unittest features In-Reply-To: <1281408827.47.0.183260667114.issue9554@psf.upfronthosting.co.za> Message-ID: <1404182069.48.0.423321036484.issue9554@psf.upfronthosting.co.za> Berker Peksag added the comment: Updated patch to use assertRaisesRegex in test_invalid_action, test_multiple_dest ---------- Added file: http://bugs.python.org/file35809/issue9554_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 05:03:08 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Jul 2014 03:03:08 +0000 Subject: [issue13689] fix CGI Web Applications with Python link in howto/urllib2 In-Reply-To: <1325344588.81.0.466504825204.issue13689@psf.upfronthosting.co.za> Message-ID: <3h2VkM1Bc8z7LjX@mail.python.org> Roundup Robot added the comment: New changeset e0561df131aa by Berker Peksag in branch '3.4': Issue #13689: Remove a dead link from howto/urllib. http://hg.python.org/cpython/rev/e0561df131aa New changeset 4617c0e1f6c4 by Berker Peksag in branch 'default': Issue #13689: Merge from 3.4. http://hg.python.org/cpython/rev/4617c0e1f6c4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 05:04:31 2014 From: report at bugs.python.org (Berker Peksag) Date: Tue, 01 Jul 2014 03:04:31 +0000 Subject: [issue13689] fix CGI Web Applications with Python link in howto/urllib2 In-Reply-To: <1325344588.81.0.466504825204.issue13689@psf.upfronthosting.co.za> Message-ID: <1404183871.58.0.276590150074.issue13689@psf.upfronthosting.co.za> Berker Peksag added the comment: I've just removed the link. ---------- assignee: michael.foord -> berker.peksag nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.4, Python 3.5 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 05:15:07 2014 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 01 Jul 2014 03:15:07 +0000 Subject: [issue21202] Naming a file` io.py` causes cryptic error message In-Reply-To: <1397239551.94.0.578791540537.issue21202@psf.upfronthosting.co.za> Message-ID: <1404184507.22.0.934432296044.issue21202@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 05:15:10 2014 From: report at bugs.python.org (Robin Schoonover) Date: Tue, 01 Jul 2014 03:15:10 +0000 Subject: [issue21890] wsgiref.simple_server doesn't accept empty bytes before start_response is called Message-ID: <1404184510.5.0.84615415722.issue21890@psf.upfronthosting.co.za> New submission from Robin Schoonover: Consider this paragraph of PEP3333, referring to headers obtained via start_response, emphasis mine: Instead, it must store them for the server or gateway to transmit only after the first iteration of the application return value that yields a *non-empty bytestring*, or upon the application's first invocation of the write() callable. This means that an WSGI app such as this should be valid, because the yielded bytes pre-start_response are empty: def application(environ, start_response): yield b'' start_response("200 OK", [("Content-Type", "text/plain")]) yield b'Hello, World.\n' However, in wsgiref's simple server, this fails: Traceback (most recent call last): File "/usr/local/lib/python3.4/wsgiref/handlers.py", line 180, in finish_response self.write(data) File "/usr/local/lib/python3.4/wsgiref/handlers.py", line 269, in write raise AssertionError("write() before start_response()") AssertionError: write() before start_response() ---------- components: Library (Lib) messages: 222005 nosy: pje, rschoon priority: normal severity: normal status: open title: wsgiref.simple_server doesn't accept empty bytes before start_response is called type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 05:15:44 2014 From: report at bugs.python.org (Robin Schoonover) Date: Tue, 01 Jul 2014 03:15:44 +0000 Subject: [issue21890] wsgiref.simple_server doesn't accept empty bytes before start_response is called In-Reply-To: <1404184510.5.0.84615415722.issue21890@psf.upfronthosting.co.za> Message-ID: <1404184544.93.0.481484043749.issue21890@psf.upfronthosting.co.za> Changes by Robin Schoonover : ---------- keywords: +patch Added file: http://bugs.python.org/file35810/wsgiref-empty-byte.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 05:17:03 2014 From: report at bugs.python.org (Robin Schoonover) Date: Tue, 01 Jul 2014 03:17:03 +0000 Subject: [issue18610] wsgiref.validate expects wsgi.input read to give exactly one arg In-Reply-To: <1375310901.82.0.276465395742.issue18610@psf.upfronthosting.co.za> Message-ID: <1404184623.19.0.930166918879.issue18610@psf.upfronthosting.co.za> Changes by Robin Schoonover : ---------- nosy: +pje _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 05:53:01 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Jul 2014 03:53:01 +0000 Subject: [issue18592] Idle: test SearchDialogBase.py In-Reply-To: <1375146770.41.0.774627283078.issue18592@psf.upfronthosting.co.za> Message-ID: <3h2Wqw3wKDz7LjT@mail.python.org> Roundup Robot added the comment: New changeset a7f943a13f7f by Terry Jan Reedy in branch '2.7': Issue #18592: Refactor 2 SearchDialogBase.create_(option/other)_buttons methods http://hg.python.org/cpython/rev/a7f943a13f7f New changeset 86c26ff25207 by Terry Jan Reedy in branch '3.4': Issue #18592: Refactor 2 SearchDialogBase.create_(option/other)_buttons methods http://hg.python.org/cpython/rev/86c26ff25207 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 05:54:03 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 Jul 2014 03:54:03 +0000 Subject: [issue18592] Idle: test SearchDialogBase.py In-Reply-To: <1375146770.41.0.774627283078.issue18592@psf.upfronthosting.co.za> Message-ID: <1404186843.84.0.536807795771.issue18592@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 06:40:46 2014 From: report at bugs.python.org (John Malmberg) Date: Tue, 01 Jul 2014 04:40:46 +0000 Subject: [issue21891] sysmodule.c, #define terminated with semicolon. Message-ID: <1404189646.68.0.928359332954.issue21891@psf.upfronthosting.co.za> New submission from John Malmberg: Minor issue, the #define TAG line incorrectly is terminated with a semicolon. This results in a double semicolon on the following line where the macro is expanded. As this is an informational message, this is just cosmetic. Listing fragment: ???????? 25861 #define MAJOR STRIFY(PY_MAJOR_VERSION) ???????? 25862 #define MINOR STRIFY(PY_MINOR_VERSION) ???????? 25863 #define TAG NAME "-" MAJOR MINOR; ???????? 25864 const char *_PySys_ImplCacheTag = TAG; ????????????????.....................................1 %CC-I-EXTRASEMI, (1) Extraneous semicolon. E???????? "cpython" "-" "3" "5" ; ---------- messages: 222007 nosy: John.Malmberg priority: normal severity: normal status: open title: sysmodule.c, #define terminated with semicolon. versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 06:59:13 2014 From: report at bugs.python.org (John Malmberg) Date: Tue, 01 Jul 2014 04:59:13 +0000 Subject: [issue21892] hashtable.c not using PY_FORMAT_SIZE_T Message-ID: <1404190753.13.0.221533788986.issue21892@psf.upfronthosting.co.za> New submission from John Malmberg: hashtable.c is using %zd instead of the PY_FORMAT_SIZE_T as set by configure. Comments in pymacconfig.h state that this will cause problems on OS-X 10.4 with binaries build on OS-X 10.5. The attached patch hashtable.giff changes hashtable.c to be like the other modules that use PY_FORMAT_SIZE_T. ---------- files: hashtable.gdiff messages: 222008 nosy: John.Malmberg priority: normal severity: normal status: open title: hashtable.c not using PY_FORMAT_SIZE_T versions: Python 3.5 Added file: http://bugs.python.org/file35811/hashtable.gdiff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 06:59:17 2014 From: report at bugs.python.org (John Malmberg) Date: Tue, 01 Jul 2014 04:59:17 +0000 Subject: [issue21893] unicodeobject.c not using PY_FORMAT_SIZE_T Message-ID: <1404190757.21.0.550855654281.issue21893@psf.upfronthosting.co.za> New submission from John Malmberg: unicodeobject.c is using %zd instead of the PY_FORMAT_SIZE_T as set by configure. Comments in pymacconfig.h state that this will cause problems on OS-X 10.4 with binaries build on OS-X 10.5. The attached patch unicodeobject.giff changes unicodeobject.c to be like the other modules that use PY_FORMAT_SIZE_T. ---------- files: unicodeobject.gdiff messages: 222009 nosy: John.Malmberg priority: normal severity: normal status: open title: unicodeobject.c not using PY_FORMAT_SIZE_T versions: Python 3.5 Added file: http://bugs.python.org/file35812/unicodeobject.gdiff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 07:32:29 2014 From: report at bugs.python.org (dipen) Date: Tue, 01 Jul 2014 05:32:29 +0000 Subject: [issue21894] ImportError: cannot import name jit Message-ID: <1404192749.19.0.810563514436.issue21894@psf.upfronthosting.co.za> New submission from dipen: i want to used parakeet module. and i install all dependency related to all. when i run attached file code then i get error like ImportError: cannot import name jit So i dont know how to solve this error. ---------- components: Library (Lib) files: parakeet.py messages: 222010 nosy: dipen priority: normal severity: normal status: open title: ImportError: cannot import name jit versions: Python 2.7 Added file: http://bugs.python.org/file35813/parakeet.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 07:34:31 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 01 Jul 2014 05:34:31 +0000 Subject: [issue21861] io class name are hardcoded in reprs In-Reply-To: <1403631418.74.0.109096243494.issue21861@psf.upfronthosting.co.za> Message-ID: <1404192871.35.0.472259210232.issue21861@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Usually reprs of subclass instances substitute actual module > and class names. This is a sensible idea that makes life easier for people writing subclasses. +1 for your suggestion. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 07:35:24 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 01 Jul 2014 05:35:24 +0000 Subject: [issue9051] Improve pickle format for timezone aware datetime instances In-Reply-To: <1277151308.95.0.331220838487.issue9051@psf.upfronthosting.co.za> Message-ID: <1404192924.71.0.858566931333.issue9051@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- title: Improve pickle format for aware datetime instances -> Improve pickle format for timezone aware datetime instances _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 07:59:27 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 01 Jul 2014 05:59:27 +0000 Subject: [issue1674555] sys.path in tests contains system directories Message-ID: <1404194367.68.0.495076123826.issue1674555@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: I update my patches every time they stop applying, but I do not feel that it is necessary to frequently attach new patches here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 08:00:29 2014 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Jul 2014 06:00:29 +0000 Subject: [issue21894] ImportError: cannot import name jit In-Reply-To: <1404192749.19.0.810563514436.issue21894@psf.upfronthosting.co.za> Message-ID: <1404194429.64.0.317071238012.issue21894@psf.upfronthosting.co.za> Ned Deily added the comment: This issue tracker is for reporting problems in Python itself. For help in how to how to use Python, there are lots of forums to ask for help. See https://www.python.org/about/help/ for suggestions. That said, if you have named your example file "parakeet.py", there's a good chance that it will shadow (or block) the "parakeet" module you installed. Try renaming your file to something else. ---------- nosy: +ned.deily resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 08:10:51 2014 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Jul 2014 06:10:51 +0000 Subject: [issue21889] https://docs.python.org/2/library/multiprocessing.html#process-and-exceptions doesn't explain exception In-Reply-To: <1404165638.91.0.279596288902.issue21889@psf.upfronthosting.co.za> Message-ID: <1404195051.98.0.0896743531997.issue21889@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 08:31:57 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Jul 2014 06:31:57 +0000 Subject: [issue21891] sysmodule.c, #define terminated with semicolon. In-Reply-To: <1404189646.68.0.928359332954.issue21891@psf.upfronthosting.co.za> Message-ID: <3h2bMJ2nVYz7LjP@mail.python.org> Roundup Robot added the comment: New changeset 50e924d26ba6 by Ned Deily in branch '3.4': Issue #21891: remove extraneous semicolon. http://hg.python.org/cpython/rev/50e924d26ba6 New changeset fc527ecb4487 by Ned Deily in branch 'default': Issue #21891: remove extraneous semicolon. http://hg.python.org/cpython/rev/fc527ecb4487 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 08:32:38 2014 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Jul 2014 06:32:38 +0000 Subject: [issue21891] sysmodule.c, #define terminated with semicolon. In-Reply-To: <1404189646.68.0.928359332954.issue21891@psf.upfronthosting.co.za> Message-ID: <1404196358.15.0.489194187334.issue21891@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report! ---------- nosy: +ned.deily resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 08:35:34 2014 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Jul 2014 06:35:34 +0000 Subject: [issue21892] hashtable.c not using PY_FORMAT_SIZE_T In-Reply-To: <1404190753.13.0.221533788986.issue21892@psf.upfronthosting.co.za> Message-ID: <1404196534.84.0.973874129399.issue21892@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 08:38:04 2014 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Jul 2014 06:38:04 +0000 Subject: [issue21893] unicodeobject.c not using PY_FORMAT_SIZE_T In-Reply-To: <1404190757.21.0.550855654281.issue21893@psf.upfronthosting.co.za> Message-ID: <1404196684.69.0.554581015893.issue21893@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 08:58:05 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Jul 2014 06:58:05 +0000 Subject: [issue21893] unicodeobject.c not using PY_FORMAT_SIZE_T In-Reply-To: <1404190757.21.0.550855654281.issue21893@psf.upfronthosting.co.za> Message-ID: <3h2bxS6Qsgz7Ljh@mail.python.org> Roundup Robot added the comment: New changeset 4f55e802baf0 by Victor Stinner in branch '3.4': Closes #21892, #21893: Use PY_FORMAT_SIZE_T instead of %zi or %zu to format C http://hg.python.org/cpython/rev/4f55e802baf0 New changeset 669b43bffd87 by Victor Stinner in branch 'default': (Merge 3.4) Closes #21892, #21893: Use PY_FORMAT_SIZE_T instead of %zi or %zu http://hg.python.org/cpython/rev/669b43bffd87 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 08:58:06 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Jul 2014 06:58:06 +0000 Subject: [issue21892] hashtable.c not using PY_FORMAT_SIZE_T In-Reply-To: <1404190753.13.0.221533788986.issue21892@psf.upfronthosting.co.za> Message-ID: <3h2bxT4g5rz7Ljh@mail.python.org> Roundup Robot added the comment: New changeset 4f55e802baf0 by Victor Stinner in branch '3.4': Closes #21892, #21893: Use PY_FORMAT_SIZE_T instead of %zi or %zu to format C http://hg.python.org/cpython/rev/4f55e802baf0 New changeset 669b43bffd87 by Victor Stinner in branch 'default': (Merge 3.4) Closes #21892, #21893: Use PY_FORMAT_SIZE_T instead of %zi or %zu http://hg.python.org/cpython/rev/669b43bffd87 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 08:58:44 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Jul 2014 06:58:44 +0000 Subject: [issue21892] hashtable.c not using PY_FORMAT_SIZE_T In-Reply-To: <1404190753.13.0.221533788986.issue21892@psf.upfronthosting.co.za> Message-ID: <1404197924.8.0.257904913315.issue21892@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I forgot the mention John Malmberg in the changelog, sorry :-( Thanks for your fix John. ---------- stage: resolved -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 08:58:53 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Jul 2014 06:58:53 +0000 Subject: [issue21893] unicodeobject.c not using PY_FORMAT_SIZE_T In-Reply-To: <1404190757.21.0.550855654281.issue21893@psf.upfronthosting.co.za> Message-ID: <1404197933.94.0.156902331391.issue21893@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I forgot the mention John Malmberg in the changelog, sorry :-( Thanks for your fix John. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 11:13:13 2014 From: report at bugs.python.org (Berker Peksag) Date: Tue, 01 Jul 2014 09:13:13 +0000 Subject: [issue5800] make wsgiref.headers.Headers accept empty constructor In-Reply-To: <1240243265.38.0.0946630520568.issue5800@psf.upfronthosting.co.za> Message-ID: <1404205993.57.0.061089178137.issue5800@psf.upfronthosting.co.za> Berker Peksag added the comment: Patch updated. If there's no objections, I'll commit this patch in the next couple of days. ---------- assignee: pje -> berker.peksag stage: patch review -> commit review Added file: http://bugs.python.org/file35814/issue5800_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 11:43:53 2014 From: report at bugs.python.org (Berker Peksag) Date: Tue, 01 Jul 2014 09:43:53 +0000 Subject: [issue21892] hashtable.c not using PY_FORMAT_SIZE_T In-Reply-To: <1404190753.13.0.221533788986.issue21892@psf.upfronthosting.co.za> Message-ID: <1404207833.67.0.856745073901.issue21892@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 12:01:35 2014 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Tue, 01 Jul 2014 10:01:35 +0000 Subject: [issue21895] signal.pause() doesn't wake up on SIGCHLD in non-main thread Message-ID: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> New submission from Bohuslav "Slavek" Kabrda: Reproducer attached. To describe the problem in words, one needs to do this to reproduce this issue: - Create a signal handler and register it using signal.signal to SIGCHLD. - Create a thread that invokes a subprocess, e.g. "sleep 1" and then continues to do something for time period longer than the subprocess is running. - Run this thread from main thread and call signal.pause() in the main thread. - The pause() call is never interrupted and the signal handler is never run. This happens because: - Python adds signal_handler as a handler to the specified signal and stores the passed Python function in structure Handlers. - When signal.pause() is run, the main thread releases the GIL, so that other threads can run. - The non-main thread gets to lease and actually invokes the subprocess and then continues to do something. - When subprocess finishes, it sends the signal *to the thread that invoked it* (assuming this thread is still running). This means that the signal.pause() call is not interrupted and main thread continues to sleep. - The non-main thread adds handler call to the list of pending calls using Py_AddPendingCall. - Pending calls are checked in Py_MakePendingCalls, which is called in every iteration of the bytecode evaluation loop in PyEval_EvalFrameEx. - The problem is that since pause() isn't un-paused and hangs forever, the evaluation loop never gets to another iteration, hence can't do any pending call. This happens on all Python versions I've tried, using pthread threading. I think this could *possibly* be solved by issuing a pthread_kill from the non-main thread to the main thread to wake it up, but I'm not sure what all the implications of such a change would be. ---------- components: Interpreter Core files: signal_pause_doesnt_wake_up.py messages: 222021 nosy: bkabrda priority: normal severity: normal status: open title: signal.pause() doesn't wake up on SIGCHLD in non-main thread versions: Python 2.7, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file35815/signal_pause_doesnt_wake_up.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 12:15:35 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Jul 2014 10:15:35 +0000 Subject: [issue21895] signal.pause() doesn't wake up on SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1404209735.93.0.388071204265.issue21895@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 12:31:10 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Jul 2014 10:31:10 +0000 Subject: [issue21895] signal.pause() doesn't wake up on SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1404210670.35.0.464201719885.issue21895@psf.upfronthosting.co.za> STINNER Victor added the comment: First of all, signals and threads usually don't play together. Most signal functions are *not* thread safe. The behaviour of signal functions are not well defined for threads. Example with pause: "pause() causes the calling process (or thread) to sleep until a signal is delivered that either terminates the process or causes the invocation of a signal-catching function." What does it mean "or thread"? Sometimes the function waits for a signal from any thread, something only from the caller thread? :-p I understood that pause() only waits for signals received in the caller thread, main thread in your case. Depending on the platform, a signal may be delivered to a different thread :-/ Especially when a signal is send to the process, ex: "kill -USR1 pid" command on UNIX. This issue is more a documentation issue: we should mention that pause() is limited to a thread. Python signal handlers are only called from the main thread, even if signals can be received from any thread. For your example, you can workaround pause() issue by calling "signal.pthread_sigmask(signal.SIG_BLOCK, [signal.SIGCHLD])" in your thread. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 12:31:16 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Jul 2014 10:31:16 +0000 Subject: [issue21895] signal.pause() doesn't wake up on SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1404210676.35.0.816078946052.issue21895@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 12:54:58 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Jul 2014 10:54:58 +0000 Subject: [issue21599] Argument transport in attach and detach method in Server class in base_events file is not used In-Reply-To: <1401333377.1.0.573803029837.issue21599@psf.upfronthosting.co.za> Message-ID: <1404212098.51.0.542437752378.issue21599@psf.upfronthosting.co.za> STINNER Victor added the comment: I proposed a deeper change to make most attributes and methods private: https://code.google.com/p/tulip/issues/detail?id=180 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 14:18:25 2014 From: report at bugs.python.org (Tymoteusz Paul) Date: Tue, 01 Jul 2014 12:18:25 +0000 Subject: [issue21896] Unexpected ConnectionResetError in urllib.request against a valid website Message-ID: <1404217105.77.0.742047143649.issue21896@psf.upfronthosting.co.za> New submission from Tymoteusz Paul: I've recently ran into a problem with urellib.request.urlopen that it fails against one website (that I've found so far). The website itself is working fine, I can access its content with other libraries like requests, curl and outside of python with telnet, links and so on. But with urllib it fails: Python 3.4.1 (default, Jul 1 2014, 14:08:25) [GCC 4.7.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import urllib.request >>> urllib.request.urlopen("http://www.thomsonlocal.com/") Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.4/urllib/request.py", line 153, in urlopen return opener.open(url, data, timeout) File "/usr/lib64/python3.4/urllib/request.py", line 455, in open response = self._open(req, data) File "/usr/lib64/python3.4/urllib/request.py", line 473, in _open '_open', req) File "/usr/lib64/python3.4/urllib/request.py", line 433, in _call_chain result = func(*args) File "/usr/lib64/python3.4/urllib/request.py", line 1215, in http_open return self.do_open(http.client.HTTPConnection, req) File "/usr/lib64/python3.4/urllib/request.py", line 1194, in do_open r = h.getresponse() File "/usr/lib64/python3.4/http/client.py", line 1172, in getresponse response.begin() File "/usr/lib64/python3.4/http/client.py", line 351, in begin version, status, reason = self._read_status() File "/usr/lib64/python3.4/http/client.py", line 313, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib64/python3.4/socket.py", line 371, in readinto return self._sock.recv_into(b) ConnectionResetError: [Errno 104] Connection reset by peer I've tested it on about 6 different servers, in different parts of the world and all of them seem to be affected. I've tested with with 3.2.5, 3.3.3, 3.4.1 and they are all failed with the same trace. ---------- components: Library (Lib) messages: 222024 nosy: Tymoteusz.Paul priority: normal severity: normal status: open title: Unexpected ConnectionResetError in urllib.request against a valid website type: crash versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 14:20:17 2014 From: report at bugs.python.org (Andy Maier) Date: Tue, 01 Jul 2014 12:20:17 +0000 Subject: [issue17904] bytes should be listed as built-in function for 2.7 In-Reply-To: <1367663679.93.0.0164308850832.issue17904@psf.upfronthosting.co.za> Message-ID: <1404217217.3.0.0862870548271.issue17904@psf.upfronthosting.co.za> Andy Maier added the comment: Ezio, what do you mean with "string signature"? For me, the patch looks fine as it is. ---------- nosy: +andymaier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 14:25:35 2014 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 01 Jul 2014 12:25:35 +0000 Subject: [issue17904] bytes should be listed as built-in function for 2.7 In-Reply-To: <1367663679.93.0.0164308850832.issue17904@psf.upfronthosting.co.za> Message-ID: <1404217535.11.0.997489213928.issue17904@psf.upfronthosting.co.za> Ezio Melotti added the comment: I mean here: https://docs.python.org/2/library/functions.html#str ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 15:30:01 2014 From: report at bugs.python.org (Rodrigue Alcazar) Date: Tue, 01 Jul 2014 13:30:01 +0000 Subject: [issue9517] Make test.script_helper more comprehensive, and use it in the test suite In-Reply-To: <1280962247.74.0.724550733964.issue9517@psf.upfronthosting.co.za> Message-ID: <1404221401.81.0.442982022852.issue9517@psf.upfronthosting.co.za> Rodrigue Alcazar added the comment: @Mark, I had a look at the time I commented on the ticket but didn't get a chance to progress much in the end. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 15:33:01 2014 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Tue, 01 Jul 2014 13:33:01 +0000 Subject: [issue21895] signal.pause() doesn't wake up on SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1404221581.15.0.864321828918.issue21895@psf.upfronthosting.co.za> Bohuslav "Slavek" Kabrda added the comment: I think that the problem here is that the documentation sets an expectation that's not met, at least from my POV. Running the reproducer, I was expecting the main thread to unpause and execute the signal handler (citing: "Python signal handlers are always executed in the main Python thread"). I understand that this may be insanely hard to fix in code, so documentation should explicitly point out that there are some (perhaps unfixable) problems with Python's approach to threading+signals. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 15:40:08 2014 From: report at bugs.python.org (Masami HIRATA) Date: Tue, 01 Jul 2014 13:40:08 +0000 Subject: [issue21897] frame.f_locals causes segfault on Python >=3.4.1 Message-ID: <1404222008.61.0.644156666753.issue21897@psf.upfronthosting.co.za> New submission from Masami HIRATA: It seems that frame.f_locals causes segfault on Python >=3.4.1 $ uname -a Linux ashrose 3.2.0-61-generic #93-Ubuntu SMP Fri May 2 21:31:50 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux $ ls test1.py $ cat test1.py import unittest class TestCallable(unittest.TestCase): def test_callable(self): try: with self.assertRaises(IndexError): def raise_error(): raise TypeError (lambda: raise_error())() except TypeError as exception: exception.__traceback__.tb_next.tb_frame.f_locals $ python3.4.1 -m unittest Segmentation fault $ python3.4.0 -m unittest . ---------------------------------------------------------------------- Ran 1 test in 0.001s OK $ python3.3.5 -m unittest . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK $ gdb /home/python/local/3.4.1mgs/bin/python3.4.1 ... (gdb) run -m unittest Starting program: /home/python/local/3.4.1mgs/bin/python3.4.1 -m unittest [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. map_to_dict (deref=1, values=0x7ffff5e97510, dict=0x7ffff5e8f588, nmap=, map=0x7ffff60e0278) at Objects/frameobject.c:791 791 value = PyCell_GET(value); (gdb) bt #0 map_to_dict (deref=1, values=0x7ffff5e97510, dict=0x7ffff5e8f588, nmap=, map=0x7ffff60e0278) at Objects/frameobject.c:791 #1 PyFrame_FastToLocalsWithError (f=0x7ffff5e97398) at Objects/frameobject.c:915 #2 0x00007ffff79beaa9 in frame_getlocals (f=0x7ffff5e97398, closure=) at Objects/frameobject.c:24 #3 0x00007ffff79deff3 in _PyObject_GenericGetAttrWithDict (obj=0x7ffff5e97398, name=0x7ffff7fcdbb0, dict=0x0) at Objects/object.c:1043 #4 0x00007ffff7a57891 in PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2411 #5 0x00007ffff7a5df3c in PyEval_EvalCodeEx (_co=, globals=, locals=, args=, argcount=1, kws=0x790f48, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3578 #6 0x00007ffff7a5ca61 in fast_function (nk=, na=, n=, pp_stack=0x7fffffffbbf0, func=0x7ffff6115158) at Python/ceval.c:4334 #7 call_function (oparg=, pp_stack=0x7fffffffbbf0) at Python/ceval.c:4252 #8 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2829 #9 0x00007ffff7a5df3c in PyEval_EvalCodeEx (_co=, globals=, locals=, args=, argcount=2, kws=0x7ffff7fad060, kwcount=0, defs=0x7ffff617cd48, defcount=1, kwdefs=0x0, closure=0x0) at Python/ceval.c:3578 #10 0x00007ffff79bf28c in function_call (func=0x7ffff6192400, arg=0x7ffff6101c08, kw=0x7ffff5e8f248) at Objects/funcobject.c:632 #11 0x00007ffff799300e in PyObject_Call (func=0x7ffff6192400, arg=, kw=) at Objects/abstract.c:2067 #12 0x00007ffff7a56871 in ext_do_call (nk=0, na=1, flags=, pp_stack=0x7fffffffbec0, func=0x7ffff6192400) at Python/ceval.c:4551 #13 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2869 ---Type to continue, or q to quit--- ---------- components: Interpreter Core messages: 222029 nosy: msmhrt priority: normal severity: normal status: open title: frame.f_locals causes segfault on Python >=3.4.1 type: crash versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 15:45:23 2014 From: report at bugs.python.org (=?utf-8?b?TcO8bWluIMOWenTDvHJr?=) Date: Tue, 01 Jul 2014 13:45:23 +0000 Subject: [issue12750] datetime.strftime('%s') should respect tzinfo In-Reply-To: <1313375473.21.0.352014190788.issue12750@psf.upfronthosting.co.za> Message-ID: <1404222323.44.0.985415897742.issue12750@psf.upfronthosting.co.za> M?min ?zt?rk added the comment: more tests and some documentation added. ---------- Added file: http://bugs.python.org/file35816/strftime3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 16:04:40 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 01 Jul 2014 14:04:40 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1404223480.09.0.598274875829.issue9566@psf.upfronthosting.co.za> Mark Lawrence added the comment: Are there any more warnings that need silencing or can this be closed as fixed? How do I check for these warnings as I don't have a 64 bit machine? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 16:08:15 2014 From: report at bugs.python.org (Andy Maier) Date: Tue, 01 Jul 2014 14:08:15 +0000 Subject: [issue21898] .hgignore: Missing ignores for Eclipse/pydev Message-ID: <1404223695.39.0.861504959592.issue21898@psf.upfronthosting.co.za> New submission from Andy Maier: The .hgignore file misses some entries for directories and files created by Eclipse with pydev. The additional lines for .hgignore would be: ^.project ^.pydevproject ^.settings/ This change applies to 2.7 and 3.x. ---------- messages: 222032 nosy: andymaier priority: normal severity: normal status: open title: .hgignore: Missing ignores for Eclipse/pydev type: enhancement 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 Jul 1 16:10:01 2014 From: report at bugs.python.org (Andy Maier) Date: Tue, 01 Jul 2014 14:10:01 +0000 Subject: [issue21898] .hgignore: Missing ignores for Eclipse/pydev In-Reply-To: <1404223695.39.0.861504959592.issue21898@psf.upfronthosting.co.za> Message-ID: <1404223801.3.0.327767366499.issue21898@psf.upfronthosting.co.za> Changes by Andy Maier : ---------- keywords: +patch Added file: http://bugs.python.org/file35817/issue21898.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 16:18:22 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Jul 2014 14:18:22 +0000 Subject: [issue5800] make wsgiref.headers.Headers accept empty constructor In-Reply-To: <1240243265.38.0.0946630520568.issue5800@psf.upfronthosting.co.za> Message-ID: <1404224302.4.0.0691253102673.issue5800@psf.upfronthosting.co.za> R. David Murray added the comment: Since we don't need to avoid new language features, using the ternary would be better than using the or. This is exactly the sort of situation the ternary was introduced for: making sure the input really is None before applying the default. Otherwise the patch looks good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 16:26:56 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Jul 2014 14:26:56 +0000 Subject: [issue21896] Unexpected ConnectionResetError in urllib.request against a valid website In-Reply-To: <1404217105.77.0.742047143649.issue21896@psf.upfronthosting.co.za> Message-ID: <1404224816.95.0.680574153556.issue21896@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 16:29:27 2014 From: report at bugs.python.org (Sebastian Kreft) Date: Tue, 01 Jul 2014 14:29:27 +0000 Subject: [issue21899] Futures are not marked as completed Message-ID: <1404224967.0.0.623746440602.issue21899@psf.upfronthosting.co.za> New submission from Sebastian Kreft: With Python 3.4.1 compiled from source, I'm having an issue in which every now and then some Futures are not marked as completed even though the underlying workload is done. My workload is launching two subprocess in parallel, and whenever one is ready, launches another one. In one of the runs, the whole process got stuck after launching about 3K subprocess, and the underlying processes had in fact finished. To wait for the finished subprocesses, I'm using FIRST_COMPLETED. Below is the core of my workload: for element in element_generator: while len(running) >= max_tasks: done, pending = concurrent.futures.wait(running, timeout=15.0, return_when=concurrent.futures.FIRST_COMPLETED) process_results(done) running = pending running.add(executor.submit(exe_subprocess, element)) Replicating the issue takes time, but I've been able to successfully reproduce it with 2 and 3 processes in parallel. Note: this was already posted in comments to http://bugs.python.org/issue20319, however it did not receive the proper atention as that issue is already closed. As suggested there I printed the status of the never finished futures and this is the result: State: RUNNING, Result: None, Exception: None, Waiters: 0, Cancelled: False, Running: True, Done: False The information does not seem very relevant. However, I can attach a console and debug from there. ---------- messages: 222034 nosy: Sebastian.Kreft.Deezer priority: normal severity: normal status: open title: Futures are not marked as completed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 16:31:34 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Jul 2014 14:31:34 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1404225094.07.0.939991148263.issue9566@psf.upfronthosting.co.za> STINNER Victor added the comment: > How do I check for these warnings as I don't have a 64 bit machine? Check buildbots. Example: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/4744/steps/compile/logs/warnings%20%28108%29 There are still open issues related to this one: #18295 at least. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 16:31:59 2014 From: report at bugs.python.org (Klaus Wolf) Date: Tue, 01 Jul 2014 14:31:59 +0000 Subject: [issue11771] hashlib object cannot be pickled In-Reply-To: <1302004182.5.0.155912208324.issue11771@psf.upfronthosting.co.za> Message-ID: <1404225119.98.0.561492569841.issue11771@psf.upfronthosting.co.za> Klaus Wolf added the comment: Please reopen this bug. To answer the question: "Why on Earth would you want to serialize a hashlib object?" : multiprocessing.connection.ForkingPickler wants. I.e. if you want to parallelize your hash calculations, this will obstruct your efforts. ---------- nosy: +approximately _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 16:38:32 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Jul 2014 14:38:32 +0000 Subject: [issue21781] make _ssl module 64-bit clean In-Reply-To: <1402935536.94.0.808370256195.issue21781@psf.upfronthosting.co.za> Message-ID: <3h2p8l2F43z7LjP@mail.python.org> Roundup Robot added the comment: New changeset 36e884e65e45 by Victor Stinner in branch '3.4': Issue #21781: Make the ssl module "ssize_t clean" for parsing parameters. http://hg.python.org/cpython/rev/36e884e65e45 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 16:39:03 2014 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 01 Jul 2014 14:39:03 +0000 Subject: [issue21898] .hgignore: Missing ignores for Eclipse/pydev In-Reply-To: <1404223695.39.0.861504959592.issue21898@psf.upfronthosting.co.za> Message-ID: <1404225543.39.0.041985705242.issue21898@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, pitrou stage: -> patch review versions: -Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 16:39:33 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Jul 2014 14:39:33 +0000 Subject: [issue21781] make _ssl module 64-bit clean In-Reply-To: <1402935536.94.0.808370256195.issue21781@psf.upfronthosting.co.za> Message-ID: <3h2p9x17Lzz7LjP@mail.python.org> Roundup Robot added the comment: New changeset 26afcb8a87b9 by Victor Stinner in branch 'default': (Merge 3.4) Issue #21781: Make the ssl module "ssize_t clean" for parsing http://hg.python.org/cpython/rev/26afcb8a87b9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 16:39:56 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Jul 2014 14:39:56 +0000 Subject: [issue21781] make _ssl module 64-bit clean In-Reply-To: <1402935536.94.0.808370256195.issue21781@psf.upfronthosting.co.za> Message-ID: <1404225596.71.0.123639711911.issue21781@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 16:47:03 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Jul 2014 14:47:03 +0000 Subject: [issue21780] make unicodedata module 64-bit safe In-Reply-To: <1402935190.8.0.797585156018.issue21780@psf.upfronthosting.co.za> Message-ID: <3h2pLZ6wYyz7LjP@mail.python.org> Roundup Robot added the comment: New changeset b82ff2d7f5ef by Victor Stinner in branch '3.4': Closes #21780: make the unicodedata module "ssize_t clean" for parsing parameters http://hg.python.org/cpython/rev/b82ff2d7f5ef New changeset afd64e660628 by Victor Stinner in branch 'default': (Merge 3.4) Closes #21780: make the unicodedata module "ssize_t clean" for http://hg.python.org/cpython/rev/afd64e660628 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 16:49:02 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Jul 2014 14:49:02 +0000 Subject: [issue8677] Modules needing PY_SSIZE_T_CLEAN In-Reply-To: <1273521580.77.0.503810144474.issue8677@psf.upfronthosting.co.za> Message-ID: <3h2pNs4DX2z7LjP@mail.python.org> Roundup Robot added the comment: New changeset 691ca1694fe7 by Victor Stinner in branch '3.4': Issue #8677: make the zlib module "ssize_t clean" for parsing parameters http://hg.python.org/cpython/rev/691ca1694fe7 New changeset 45dcdd8f3211 by Victor Stinner in branch 'default': (Merge 3.4) Issue #8677: make the zlib module "ssize_t clean" for parsing http://hg.python.org/cpython/rev/45dcdd8f3211 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 16:55:30 2014 From: report at bugs.python.org (Andy Maier) Date: Tue, 01 Jul 2014 14:55:30 +0000 Subject: [issue21900] .hgignore: Missing ignores for downloaded doc build tools Message-ID: <1404226530.0.0.067292394888.issue21900@psf.upfronthosting.co.za> New submission from Andy Maier: In Python 2.7 and up to Python 3.3, the documentation build process downloads tools such as Sphinx etc. into the Doc/tools subtree. The .hgignore file misses entries to ignore those. The additional lines for .hgignore would be: ^Doc/tools/docutils/ ^Doc/tools/jinja2/ ^Doc/tools/pygments/ ^Doc/tools/sphinx/ This change applies to 2.7 only (assuming 3.1-3.3 are no longer patched). ---------- messages: 222041 nosy: andymaier priority: normal severity: normal status: open title: .hgignore: Missing ignores for downloaded doc build tools versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 16:56:30 2014 From: report at bugs.python.org (Andy Maier) Date: Tue, 01 Jul 2014 14:56:30 +0000 Subject: [issue21900] .hgignore: Missing ignores for downloaded doc build tools In-Reply-To: <1404226530.0.0.067292394888.issue21900@psf.upfronthosting.co.za> Message-ID: <1404226590.64.0.283477527849.issue21900@psf.upfronthosting.co.za> Changes by Andy Maier : ---------- keywords: +patch Added file: http://bugs.python.org/file35818/issue21900.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 17:00:29 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Tue, 01 Jul 2014 15:00:29 +0000 Subject: [issue21880] IDLE: Ability to run 3rd party code checkers In-Reply-To: <1404066447.3.0.940760126754.issue21880@psf.upfronthosting.co.za> Message-ID: <1404226829.51.0.622459231804.issue21880@psf.upfronthosting.co.za> Changes by Saimadhav Heblikar : Added file: http://bugs.python.org/file35819/3rdpartychecker-v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 17:04:06 2014 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 01 Jul 2014 15:04:06 +0000 Subject: [issue11771] hashlib object cannot be pickled In-Reply-To: <1404225119.98.0.561492569841.issue11771@psf.upfronthosting.co.za> Message-ID: Gregory P. Smith added the comment: Do you honestly have a situation where you need to share a computationally significant amount of hashing state only to want to finish the computation N different times with alternate computationally significant ending data that multiprocessing would actually help with where you cannot use threads? Hashlib releases the GIL during nontrivial hash computations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 17:07:14 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Jul 2014 15:07:14 +0000 Subject: [issue21090] File read silently stops after EIO I/O error In-Reply-To: <1396045786.33.0.781369785301.issue21090@psf.upfronthosting.co.za> Message-ID: <1404227234.07.0.649609415241.issue21090@psf.upfronthosting.co.za> STINNER Victor added the comment: Here is a patch for FileIO.readall() which should fix the issue. Currently, readall() returns read bytes at the first read() error if a least one call to read() succeed. ---------- keywords: +patch Added file: http://bugs.python.org/file35820/fileio_readall_eio.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 17:10:40 2014 From: report at bugs.python.org (Klaus Wolf) Date: Tue, 01 Jul 2014 15:10:40 +0000 Subject: [issue11771] hashlib object cannot be pickled In-Reply-To: <1302004182.5.0.155912208324.issue11771@psf.upfronthosting.co.za> Message-ID: <1404227440.71.0.689331906164.issue11771@psf.upfronthosting.co.za> Klaus Wolf added the comment: You want to say: It doesn't work, but it is somehow intentional because you never used id, correct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 17:16:35 2014 From: report at bugs.python.org (Stefan Krah) Date: Tue, 01 Jul 2014 15:16:35 +0000 Subject: [issue21897] frame.f_locals causes segfault on Python >=3.4.1 In-Reply-To: <1404222008.61.0.644156666753.issue21897@psf.upfronthosting.co.za> Message-ID: <1404227795.11.0.769004185801.issue21897@psf.upfronthosting.co.za> Stefan Krah added the comment: 6ab3193e890e exposes the issue. ---------- nosy: +pitrou, skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 17:17:36 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Jul 2014 15:17:36 +0000 Subject: [issue21857] assert that functions clearing the current exception are not called with an exception set In-Reply-To: <1403603371.13.0.654844548808.issue21857@psf.upfronthosting.co.za> Message-ID: <1404227856.64.0.219597778101.issue21857@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't think anymore that it's a good idea. Almost all C functions can replace the current Python exception. There is no reason to add assertions only in a few functions. ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 17:26:48 2014 From: report at bugs.python.org (akira) Date: Tue, 01 Jul 2014 15:26:48 +0000 Subject: [issue12750] datetime.strftime('%s') should respect tzinfo In-Reply-To: <1313375473.21.0.352014190788.issue12750@psf.upfronthosting.co.za> Message-ID: <1404228408.45.0.636037918489.issue12750@psf.upfronthosting.co.za> akira added the comment: > ``%s`` format code behaviour was undefined and incidental. strftime('%s') is not portable but it *is* supported on some platforms i.e., it is *not* undefined and it is *not* incidental on these platforms. datetime.strftime *delegates* to the platform strftime(3) and some platforms do support %s format code. See the quote from the datetime docs in msg221385. It would be preferable that datetime.strftime would reject format codes that it doesn't support explicitly (like datetime.strptime does) so that datetime.strftime were portable but that ship has sailed. This issue could be titled: add cross-platform support for %s strftime-format code (and fix its behavior (add support) for timezone-aware datetime objects). --- If the implementation uses floats to get an integer result; it should have tests for edge cases (datetime.min, datetime.max at least). I don't see such tests, please, correct me if I'm wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 17:30:48 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 Jul 2014 15:30:48 +0000 Subject: [issue21880] IDLE: Ability to run 3rd party code checkers In-Reply-To: <1404066447.3.0.940760126754.issue21880@psf.upfronthosting.co.za> Message-ID: <1404228648.33.0.633648212657.issue21880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I want to broaden this to 'external' programs. Will discuss. Both versions appear to be trying to access non-existent configuration parameters. Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'enabled' from section 'pyflakes'. returning default value: None Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'command' from section 'pyflakes'. returning default value: None v1. Trial on file with no warnings - need end of report summary like find in files so actually know program ran. Trial on file with warnings hangs Idle. v2. Trying to enable pyflakes gives this Traceback (most recent call last): File "F:\Python\dev\4\py34\lib\tkinter\__init__.py", line 1487, in __call__ return self.func(*args) File "F:\Python\dev\4\py34\lib\idlelib\Checker.py", line 290, in ok self.close() File "F:\Python\dev\4\py34\lib\idlelib\Checker.py", line 296, in close self._checker.update_listbox() AttributeError: 'function' object has no attribute 'update_listbox' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 18:00:46 2014 From: report at bugs.python.org (Andy Maier) Date: Tue, 01 Jul 2014 16:00:46 +0000 Subject: [issue17904] bytes should be listed as built-in function for 2.7 In-Reply-To: <1367663679.93.0.0164308850832.issue17904@psf.upfronthosting.co.za> Message-ID: <1404230446.6.0.987489447542.issue17904@psf.upfronthosting.co.za> Andy Maier added the comment: Your patch right now generates the line: New in version 2.6: bytes() has been added as an alias for str() at the end of the paragraph for str(). To me, that is sufficient for the description of str(). If anything, we could add a separate paragraph for bytes(), after the paragraph for bytearray(), e.g. like this: ---------------------------------- .. function:: bytes() Alias for :func:`str`. .. versionadded:: 2.6 ---------------------------------- If that is what you had in mind, I think it is a good idea to add it. Andy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 19:25:38 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Tue, 01 Jul 2014 17:25:38 +0000 Subject: [issue21880] IDLE: Ability to run 3rd party code checkers In-Reply-To: <1404066447.3.0.940760126754.issue21880@psf.upfronthosting.co.za> Message-ID: <1404235538.74.0.214023008371.issue21880@psf.upfronthosting.co.za> Changes by Saimadhav Heblikar : Removed file: http://bugs.python.org/file35819/3rdpartychecker-v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 19:26:00 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Tue, 01 Jul 2014 17:26:00 +0000 Subject: [issue21880] IDLE: Ability to run 3rd party code checkers In-Reply-To: <1404066447.3.0.940760126754.issue21880@psf.upfronthosting.co.za> Message-ID: <1404235560.95.0.415385856524.issue21880@psf.upfronthosting.co.za> Changes by Saimadhav Heblikar : Added file: http://bugs.python.org/file35821/3rdpartychecker-v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 19:29:48 2014 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 01 Jul 2014 17:29:48 +0000 Subject: [issue11771] hashlib object cannot be pickled In-Reply-To: <1302004182.5.0.155912208324.issue11771@psf.upfronthosting.co.za> Message-ID: <1404235788.45.0.249046812115.issue11771@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Please be constructive. There is no way to implement generic pickling for hash objects that would work across all implementations. The underlying code implementing each function is free to store its internal state however it wants and does not provide an API to get at it or any standard representation of it. Sure, you could hack things up and allow a specific version and build of openssl's EVP hashes to dump their state and restore it for use in another process running that same specific version and build of openssl (as would likely be the case for multiprocessing use) just as you could for any other implementation of a hash function such as the builtin libtomcrypt versions. But this is not portable between compilations using different implementations of the hash algorithm. That is not what someone using pickle would ever expect. Public APIs to access the internal state of hash functions do not exist because it is not a common thing for people to do. hashlib isn't going to support this unless someone contributes a very solid patch with tests that handles all of the compatibility issues in a friendly maintainable manner. ---------- stage: -> resolved type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 19:43:43 2014 From: report at bugs.python.org (Andy Maier) Date: Tue, 01 Jul 2014 17:43:43 +0000 Subject: [issue14097] Improve the "introduction" page of the tutorial In-Reply-To: <1329975473.84.0.795852636525.issue14097@psf.upfronthosting.co.za> Message-ID: <1404236623.28.0.189748022017.issue14097@psf.upfronthosting.co.za> Andy Maier added the comment: Zach, I reviewed your 2.7 backport, including a comparison with the latest 3.x patch. Comments on the 2.7 backport: 1. In "3.1.1 Numbers", on "If both operands are ints,": The "ints" is a link labeled "int" followed by a normal font "s". I think it would be better to avoid concatenating them, and to say something like: "If both operands are of type int,". Comments on both the 2.7 backport and on the latest 3.x patch: 2. In the last paragraph of "3.1.1 Numbers" ("In addition to int and float, Python supports..:": The long type could be mentioned here as well, only with a link and no explanation, consistent with how Decimal and Fraction are mentioned. Comments on just the latest 3.x patch: 3. In "3.1.2. Strings", I am missing a mentioning that the characters in strings are Unicode characters. I think quite a bit of the unicode subclause of the 2.x patch would be appropriate. I would also mention byte strings at this point, but only the fact that they exist and with a link. ---------- nosy: +andymaier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 20:17:55 2014 From: report at bugs.python.org (Ville Nummela) Date: Tue, 01 Jul 2014 18:17:55 +0000 Subject: [issue21872] LZMA library sometimes fails to decompress a file In-Reply-To: <1403720935.87.0.990494824612.issue21872@psf.upfronthosting.co.za> Message-ID: <1404238675.48.0.112525665028.issue21872@psf.upfronthosting.co.za> Ville Nummela added the comment: Uploading a few more 'bad' lzma files for testing. ---------- Added file: http://bugs.python.org/file35822/more_bad_lzma_files.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 20:32:12 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 Jul 2014 18:32:12 +0000 Subject: [issue8631] subprocess.Popen.communicate(...) hangs on Windows In-Reply-To: <1273095906.37.0.582736332431.issue8631@psf.upfronthosting.co.za> Message-ID: <1404239532.5.0.00907352540845.issue8631@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There are certainly some problems with subprocess on Windows. Note .../python34> pip pyflakes installs in a second or two. ...> pyflakes -h # Windows Command Propmpt WCP >>> import subprocess as s; s.check_output("pyflakes -h") console interpreter CI or Idle, all produce help output WCP> pyflakes c:\programs\python34\lib\turtle.py # or / instead of \ c:\programs\python34\lib\turtle.py:572: local variable 'rgb' is assigned to but never used ... 50+ lines (all < 1/2 second) c:\programs\python34\lib\turtle.py:4139: undefined name 'exitonclick' CI>>> s.check_output("pyflakes c:\programs\python34\lib\turtle.py") pause, so almost think is hanging, then c:\programs\python34\lib\lib2to3\tests\data\bom.py:2:17: invalid syntax print "BOM BOOM!" ...100 more error for various files. pyflakes ignores file name given and checks entire stdlib. ID>>> s.check_output("pyflakes c:\programs\python34\lib\turtle.py") hangs indefinitely, no output CI or ID >>> s.check_output("pyflakes c:/programs/python34/lib/turtle.py") # / instead of \ which was ok in WCP Traceback (most recent call last): File "", line 1, in File "F:\Python\dev\5\py35\lib\subprocess.py", line 627, in check_output raise CalledProcessError(retcode, process.args, output=output) subprocess.CalledProcessError: Command 'pyflakes c:/programs/python34/lib/turtle .py' returned non-zero exit status 1 Above is CI 3.5 and Idle 3.4. subprocess and pyflakes work fine on linux. We are trying to add a feature to Idle to do above on file in editor, and are stuck here. The actual provisional code is + proc = Popen(args, stdout=PIPE, stderr=PIPE) + proc.wait() + output, error = map(lambda b:b.decode('utf-8'), proc.communicate()) where args is list, which shows the same hang forever behavior. ---------- nosy: +steve.dower, terry.reedy, zach.ware resolution: rejected -> status: closed -> open versions: +Python 3.4, Python 3.5 -Python 2.5, Python 2.6, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 20:32:31 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 Jul 2014 18:32:31 +0000 Subject: [issue8631] subprocess.Popen.communicate(...) hangs on Windows In-Reply-To: <1273095906.37.0.582736332431.issue8631@psf.upfronthosting.co.za> Message-ID: <1404239551.12.0.116989444535.issue8631@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +sahutd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 20:34:40 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Jul 2014 18:34:40 +0000 Subject: [issue21900] .hgignore: Missing ignores for downloaded doc build tools In-Reply-To: <1404226530.0.0.067292394888.issue21900@psf.upfronthosting.co.za> Message-ID: <1404239680.95.0.349677236098.issue21900@psf.upfronthosting.co.za> R. David Murray added the comment: The entries are there for 2.7. And indeed for the 3.x versions to which they applied. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 20:36:25 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 01 Jul 2014 18:36:25 +0000 Subject: [issue15358] Test pkgutil.walk_packages in test_pkgutil instead of test_runpy In-Reply-To: <1342346071.33.0.869652246152.issue15358@psf.upfronthosting.co.za> Message-ID: <1404239785.4.0.859987020905.issue15358@psf.upfronthosting.co.za> Mark Lawrence added the comment: Hardly a good start :-( From the IDLE shell. Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> from pkgutil import walk_packages >>> packages = list(walk_packages()) Traceback (most recent call last): File "", line 1, in packages = list(walk_packages()) File "C:\Python34\lib\pkgutil.py", line 86, in walk_packages __import__(name) File "C:\Python34\lib\site-packages\pip\__init__.py", line 9, in from pip.log import logger File "C:\Python34\lib\site-packages\pip\log.py", line 8, in from pip import backwardcompat File "C:\Python34\lib\site-packages\pip\backwardcompat\__init__.py", line 27, in console_encoding = sys.__stdout__.encoding AttributeError: 'NoneType' object has no attribute 'encoding' Then from the command line. C:\Users\Mark\MyPython>type wptest.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- from pkgutil import walk_packages packages = list(walk_packages()) C:\Users\Mark\MyPython>wptest.py c:\python34\lib\site-packages\wx\core.py:22: UserWarning: wxPython/wxWidgets release number mismatch warnings.warn("wxPython/wxWidgets release number mismatch") --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) C:\Users\Mark\MyPython\wptest.py in () 4 from pkgutil import walk_packages 5 ----> 6 packages = list(walk_packages()) c:\python34\lib\pkgutil.py in walk_packages(path, prefix, onerror) 99 path = [p for p in path if not seen(p)] 100 --> 101 yield from walk_packages(path, name+'.', onerror) 102 103 c:\python34\lib\pkgutil.py in walk_packages(path, prefix, onerror) 99 path = [p for p in path if not seen(p)] 100 --> 101 yield from walk_packages(path, name+'.', onerror) 102 103 c:\python34\lib\pkgutil.py in walk_packages(path, prefix, onerror) 99 path = [p for p in path if not seen(p)] 100 --> 101 yield from walk_packages(path, name+'.', onerror) 102 103 c:\python34\lib\pkgutil.py in walk_packages(path, prefix, onerror) 99 path = [p for p in path if not seen(p)] 100 --> 101 yield from walk_packages(path, name+'.', onerror) 102 103 c:\python34\lib\pkgutil.py in walk_packages(path, prefix, onerror) 84 if ispkg: 85 try: ---> 86 __import__(name) 87 except ImportError: 88 if onerror is not None: c:\python34\lib\site-packages\wx\lib\pubsub\core\arg1\__init__.py in () 14 15 msg = 'Should not import this directly, used by pubsub.core if applicable' ---> 16 raise RuntimeError(msg) RuntimeError: Should not import this directly, used by pubsub.core if applicable But then. C:\Users\Mark\MyPython>cd c:\cpython\pcbuild c:\cpython\PCbuild>python_d.exe C:\Users\Mark\MyPython\wptest.py c:\cpython\PCbuild> No problems above!!! Given Brett's comment in msg165456 "But if we do this then I want to deprecate pkgutil in Python 3.4" I don't believe that this is worth pursuing, or have I missed something? ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 21:31:12 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Jul 2014 19:31:12 +0000 Subject: [issue14097] Improve the "introduction" page of the tutorial In-Reply-To: <1329975473.84.0.795852636525.issue14097@psf.upfronthosting.co.za> Message-ID: <3h2wfR5HWtz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 438da6ae38fa by Zachary Ware in branch '2.7': Issue #14097: Backport 796d1371605d and subsequent changes. http://hg.python.org/cpython/rev/438da6ae38fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 21:37:45 2014 From: report at bugs.python.org (Zachary Ware) Date: Tue, 01 Jul 2014 19:37:45 +0000 Subject: [issue14097] Improve the "introduction" page of the tutorial In-Reply-To: <1329975473.84.0.795852636525.issue14097@psf.upfronthosting.co.za> Message-ID: <1404243465.76.0.207150177786.issue14097@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the reviews, Ezio and Andy. Committed with most of your points addressed, though I did leave out the link to `long` since I could not come up with a good wording for adding it, and `long` is easily findable from `int`. Also, the link for 'complex numbers' also explains `long`, so it should be easy to find without burdening newbies with another name that they may not need for some time. Andy: in future, please use the 'review' link to post reviews, it makes it much easier for the patch author to keep track of where your comments are meant to apply, and you can leave comments on multiple versions of a patch if you like. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 21:43:36 2014 From: report at bugs.python.org (Zachary Ware) Date: Tue, 01 Jul 2014 19:43:36 +0000 Subject: [issue18604] Consolidate gui available checks in test.support In-Reply-To: <1375229615.82.0.560303267268.issue18604@psf.upfronthosting.co.za> Message-ID: <1404243816.81.0.797904557572.issue18604@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- assignee: zach.ware -> ned.deily resolution: fixed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 22:47:35 2014 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Jul 2014 20:47:35 +0000 Subject: [issue21899] Futures are not marked as completed In-Reply-To: <1404224967.0.0.623746440602.issue21899@psf.upfronthosting.co.za> Message-ID: <1404247655.48.0.18284913649.issue21899@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +bquinlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 1 23:12:42 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 01 Jul 2014 21:12:42 +0000 Subject: [issue16968] Fix test discovery for test_concurrent_futures.py In-Reply-To: <1358201974.23.0.0352259739582.issue16968@psf.upfronthosting.co.za> Message-ID: <1404249162.01.0.167506398789.issue16968@psf.upfronthosting.co.za> Mark Lawrence added the comment: I followed the link in msg194910 to python-dev but didn't find a single response so where does that leave us? I ask because I'd like to help out with the outstanding test issues, but there are so many of them and they seem so interlinked that I don't know where to start. Please advise. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 00:40:03 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Jul 2014 22:40:03 +0000 Subject: [issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize killed by shell Message-ID: <1404254403.84.0.153705596072.issue21901@psf.upfronthosting.co.za> New submission from R. David Murray: On one particular linux vserver virtual machine (which is unfortunately my development platform for python), test.test_selectors.PollSelectorTestCase.test_above_fd_setsize fails with the following message: zsh: killed and at that point the test suite stops running, regardless of whether or not I started it with -j. As far as I can tell, the configuration of this vserver is the same as the one my buildbots run on, but they are on different host machines, so there could be some differences I'm not remembering. On the buldbots, the test gets skipped with the message 'FD limit reached'. Anyone have any clues how to debug this? ---------- components: asyncio messages: 222059 nosy: gvanrossum, haypo, neologix, r.david.murray, yselivanov priority: normal severity: normal status: open title: test_selectors.PollSelectorTestCase.test_above_fd_setsize killed by shell type: crash versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 00:47:42 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 01 Jul 2014 22:47:42 +0000 Subject: [issue18258] Fix test discovery for test_codecmaps*.py In-Reply-To: <1371590163.56.0.716538742533.issue18258@psf.upfronthosting.co.za> Message-ID: <1404254862.07.0.842735647998.issue18258@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Zach just a reminder that you've committed #18492 in case you'd forgotten this. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 00:47:45 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Jul 2014 22:47:45 +0000 Subject: [issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell In-Reply-To: <1404254403.84.0.153705596072.issue21901@psf.upfronthosting.co.za> Message-ID: <1404254865.84.0.608746760915.issue21901@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: test_selectors.PollSelectorTestCase.test_above_fd_setsize killed by shell -> test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 02:16:16 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 02 Jul 2014 00:16:16 +0000 Subject: [issue21897] frame.f_locals causes segfault on Python >=3.4.1 In-Reply-To: <1404222008.61.0.644156666753.issue21897@psf.upfronthosting.co.za> Message-ID: <1404260176.73.0.491361998982.issue21897@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Following patch seems to fix it, but I have to cook a proper test: diff --git a/Objects/frameobject.c b/Objects/frameobject.c --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -786,7 +786,7 @@ map_to_dict(PyObject *map, Py_ssize_t nm PyObject *key = PyTuple_GET_ITEM(map, j); PyObject *value = values[j]; assert(PyUnicode_Check(key)); - if (deref) { + if (deref && value != NULL) { assert(PyCell_Check(value)); value = PyCell_GET(value); } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 02:20:54 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Jul 2014 00:20:54 +0000 Subject: [issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell In-Reply-To: <1404254403.84.0.153705596072.issue21901@psf.upfronthosting.co.za> Message-ID: <1404260454.1.0.374930516525.issue21901@psf.upfronthosting.co.za> STINNER Victor added the comment: The test changes the maximum number of open files. What is the limit in your shell? You can try to modify the test to add print(soft, hard) after getrlimit(). On Fedora 20: $ python -c 'import resource; print(resource.getrlimit(resource.RLIMIT_NOFILE))' (1024, 4096) The test tries to use the hard limit (4096) to set the soft limit (1024). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 03:25:09 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Jul 2014 01:25:09 +0000 Subject: [issue18258] Fix test discovery for test_codecmaps*.py In-Reply-To: <1371590163.56.0.716538742533.issue18258@psf.upfronthosting.co.za> Message-ID: <3h34Vq5gvtz7Ljk@mail.python.org> Roundup Robot added the comment: New changeset 27feb652d3ad by Zachary Ware in branch '3.4': Issue #18258: Fix test discovery for test_codecmaps_*. http://hg.python.org/cpython/rev/27feb652d3ad New changeset b08921c7d1ec by Zachary Ware in branch 'default': Issue #18258: Fix test discovery for test_codecmaps_*. http://hg.python.org/cpython/rev/b08921c7d1ec ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 03:25:30 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Wed, 02 Jul 2014 01:25:30 +0000 Subject: [issue21804] Implement thr UTF8 command (RFC 6856) in poplib. In-Reply-To: <1403133284.52.0.0735782261823.issue21804@psf.upfronthosting.co.za> Message-ID: <1404264330.92.0.409128568041.issue21804@psf.upfronthosting.co.za> Milan Oberkirch added the comment: I got the Exception policy of the POP3 class wrong (ignore my review comment on that) and needed to add 'UTF8' to the list of optional commands. ---------- Added file: http://bugs.python.org/file35823/poputf8-v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 03:26:12 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 02 Jul 2014 01:26:12 +0000 Subject: [issue18258] Fix test discovery for test_codecmaps*.py In-Reply-To: <1371590163.56.0.716538742533.issue18258@psf.upfronthosting.co.za> Message-ID: <1404264372.3.0.0921095035845.issue18258@psf.upfronthosting.co.za> Zachary Ware added the comment: Not forgotten, just hadn't gotten to on the list yet. ---------- assignee: -> zach.ware resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 05:49:21 2014 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 02 Jul 2014 03:49:21 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1404272961.3.0.232241255955.issue10224@psf.upfronthosting.co.za> Ezio Melotti added the comment: ?ric, I think you should open a separate issue for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 06:31:19 2014 From: report at bugs.python.org (Kevin Davies) Date: Wed, 02 Jul 2014 04:31:19 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh Message-ID: <1404275479.79.0.0199370909465.issue21902@psf.upfronthosting.co.za> New submission from Kevin Davies: The docstring of acosh should more accurately be "Return the area hyperbolic cosine of x." instead of "Return the hyperbolic arc cosine (measured in radians) of x." asinh and atanh should be changed similarly. The result of these functions is not an angle but a ratio of areas. See http://en.wikipedia.org/wiki/Inverse_hyperbolic_function. ---------- messages: 222067 nosy: kdavies4 priority: normal severity: normal status: open title: Docstring of math.acosh, asinh, and atanh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 06:47:39 2014 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 02 Jul 2014 04:47:39 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404275479.79.0.0199370909465.issue21902@psf.upfronthosting.co.za> Message-ID: <1404276459.78.0.867535267485.issue21902@psf.upfronthosting.co.za> Ezio Melotti added the comment: Do you want to propose a patch? https://docs.python.org/3/library/math.html#hyperbolic-functions should be updated as well. ---------- assignee: -> docs at python components: +Documentation keywords: +easy nosy: +docs at python, ezio.melotti, mark.dickinson, rhettinger, stutzbach stage: -> needs patch type: -> enhancement versions: +Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 07:37:28 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Jul 2014 05:37:28 +0000 Subject: [issue5800] make wsgiref.headers.Headers accept empty constructor In-Reply-To: <1240243265.38.0.0946630520568.issue5800@psf.upfronthosting.co.za> Message-ID: <3h3B5z6H7Hz7Lk0@mail.python.org> Roundup Robot added the comment: New changeset a91f0d4a2381 by Berker Peksag in branch 'default': Issue #5800: headers parameter of wsgiref.headers.Headers is now optional. http://hg.python.org/cpython/rev/a91f0d4a2381 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 07:38:54 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 02 Jul 2014 05:38:54 +0000 Subject: [issue5800] make wsgiref.headers.Headers accept empty constructor In-Reply-To: <1240243265.38.0.0946630520568.issue5800@psf.upfronthosting.co.za> Message-ID: <1404279534.06.0.979889939629.issue5800@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch and review. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 07:40:36 2014 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 02 Jul 2014 05:40:36 +0000 Subject: [issue14097] Improve the "introduction" page of the tutorial In-Reply-To: <1329975473.84.0.795852636525.issue14097@psf.upfronthosting.co.za> Message-ID: <1404279636.12.0.999986273387.issue14097@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks for backporting this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 08:24:38 2014 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 02 Jul 2014 06:24:38 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404275479.79.0.0199370909465.issue21902@psf.upfronthosting.co.za> Message-ID: <1404282278.27.0.899426290501.issue21902@psf.upfronthosting.co.za> Mark Dickinson added the comment: How about simply 'inverse hyperbolic cosine', etc. I think that's more likely to be immediately obvious to readers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 08:26:14 2014 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 02 Jul 2014 06:26:14 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404275479.79.0.0199370909465.issue21902@psf.upfronthosting.co.za> Message-ID: <1404282374.35.0.318208741469.issue21902@psf.upfronthosting.co.za> Mark Dickinson added the comment: and the 'radians' bit is obviously nonsense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 08:40:46 2014 From: report at bugs.python.org (paul j3) Date: Wed, 02 Jul 2014 06:40:46 +0000 Subject: [issue14174] argparse.REMAINDER fails to parse remainder correctly In-Reply-To: <1330690090.15.0.511487898244.issue14174@psf.upfronthosting.co.za> Message-ID: <1404283246.32.0.734277943178.issue14174@psf.upfronthosting.co.za> paul j3 added the comment: Here's a possible solution to the problem (assuming there really is one): - redefine REMAINDER so it matches a '((?:A[AO]*)?)' pattern (where O is a string that looks like an optional flag, A an argument string). I've added the condition that the first match (if any) must be an A. It ends up being closer to the pattern for PARSER. I included a patch from issue 15112, which delays the consumption of a positional that matches with 0 strings. In the sample case for this issue, results with this patch are: args = parser.parse_args(['app', '--config', 'bar']) # Namespace(app='app', app_args=[], config='bar') args = parser.parse_args(['--config', 'bar', 'app']) # Namespace(app='app', app_args=[], config='bar') args = parser.parse_args(['app', 'args', '--config', 'bar']) # Namespace(app='app', app_args=['args', '--config', 'bar'], config=None) In the last case, 'app_args' gets the rest of the strings because the first is a plain 'args'. I believe this is consistent with the intuition expressed in this issue. I've added one test case to test_argparse.TestNargsRemainder. This is a TestCase that is similar to the above example. argument_signatures = [Sig('x'), Sig('y', nargs='...'), Sig('-z')] failures = ['', '-z', '-z Z'] successes = [ ('X', NS(x='X', y=[], z=None)), ('-z Z X', NS(x='X', y=[], z='Z')), ('X A B -z Z', NS(x='X', y=['A', 'B', '-z', 'Z'], z=None)), ('X Y --foo', NS(x='X', y=['Y', '--foo'], z=None)), ('X -z Z A B', NS(x='X', y=['A', 'B'], z='Z')), # new case ] This patch runs test_argparse fine. But there is a slight possibility that this patch will cause backward compatibility problems. Some user might expect y=['-z','Z',...]. But that expectation has not been enshrined the test_argparse. It may require a slight change to the documentation as well. ---------- keywords: +patch Added file: http://bugs.python.org/file35824/issue14174_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 08:50:57 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 02 Jul 2014 06:50:57 +0000 Subject: [issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell In-Reply-To: <1404260454.1.0.374930516525.issue21901@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: There's probably a special mechanism due to vserver which makes the kernel kill the process instead of failing with EPERM, but it's really surprising. What happens if you try the following: $ python -c "from resource import *; _, hard = getrlimit(RLIMIT_NOFILE); setrlimit(RLIMIT_NOFILE, (hard, hard))" You could run the process under strace to see what's going on: you'll likely just see the reception of a signal though. Maybe "dmesg" would show interesting logs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 09:10:47 2014 From: report at bugs.python.org (Kevin Davies) Date: Wed, 02 Jul 2014 07:10:47 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404276459.78.0.867535267485.issue21902@psf.upfronthosting.co.za> Message-ID: <53B3B072.40704@yahoo.com> Kevin Davies added the comment: Unfortunately I'm not currently set up with Mercurial and I'm not sure that it makes sense to get that going just for this. On 07/01/2014 06:47 PM, Ezio Melotti wrote: > Ezio Melotti added the comment: > > Do you want to propose a patch? > https://docs.python.org/3/library/math.html#hyperbolic-functions should be updated as well. > > ---------- > assignee: -> docs at python > components: +Documentation > keywords: +easy > nosy: +docs at python, ezio.melotti, mark.dickinson, rhettinger, stutzbach > stage: -> needs patch > type: -> enhancement > versions: +Python 2.7, Python 3.4, Python 3.5 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 09:12:22 2014 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 02 Jul 2014 07:12:22 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404275479.79.0.0199370909465.issue21902@psf.upfronthosting.co.za> Message-ID: <1404285142.14.0.766490665283.issue21902@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file35825/acosh_docstring.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 09:13:09 2014 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 02 Jul 2014 07:13:09 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404275479.79.0.0199370909465.issue21902@psf.upfronthosting.co.za> Message-ID: <1404285189.92.0.297422770998.issue21902@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ezio: > https://docs.python.org/3/library/math.html#hyperbolic-functions should be updated as well. It looks fine to me. What do you think should be changed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 09:14:23 2014 From: report at bugs.python.org (Kevin Davies) Date: Wed, 02 Jul 2014 07:14:23 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404282278.27.0.899426290501.issue21902@psf.upfronthosting.co.za> Message-ID: <53B3B10E.7090007@yahoo.com> Kevin Davies added the comment: Yes, 'inverse' is probably more obvious to understand than 'area', although it doesn't tie into the 'a' of 'acosh', etc. On 07/01/2014 08:24 PM, Mark Dickinson wrote: > Mark Dickinson added the comment: > > How about simply 'inverse hyperbolic cosine', etc. I think that's more likely to be immediately obvious to readers. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 09:16:13 2014 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 02 Jul 2014 07:16:13 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404275479.79.0.0199370909465.issue21902@psf.upfronthosting.co.za> Message-ID: <1404285373.98.0.291209451966.issue21902@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: docs at python -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 09:21:11 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 07:21:11 +0000 Subject: [issue8585] zipimporter.find_module is untested In-Reply-To: <1272676536.77.0.29287206537.issue8585@psf.upfronthosting.co.za> Message-ID: <1404285671.14.0.642277723984.issue8585@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've just reworked Berker's patch as it no longer applied. On Windows 7 before and after applying the patch both test runs gave me 49 tests, 2 skipped. Can we have a commit review please. ---------- nosy: +BreamoreBoy Added file: http://bugs.python.org/file35826/Issue8585.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 09:25:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 07:25:15 +0000 Subject: [issue16474] More code coverage for imp module In-Reply-To: <1352938470.43.0.179582544246.issue16474@psf.upfronthosting.co.za> Message-ID: <1404285915.77.0.443204699977.issue16474@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is it worth applying the patch as the imp module is deprecated since version 3.4? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 09:44:24 2014 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 02 Jul 2014 07:44:24 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404275479.79.0.0199370909465.issue21902@psf.upfronthosting.co.za> Message-ID: <1404287064.6.0.334391627122.issue21902@psf.upfronthosting.co.za> Mark Dickinson added the comment: Kevin: does the attached patch look okay to you? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 09:46:40 2014 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 02 Jul 2014 07:46:40 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404275479.79.0.0199370909465.issue21902@psf.upfronthosting.co.za> Message-ID: <1404287200.71.0.376977804449.issue21902@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch, fixing an accidental double space in the previous one. ---------- Added file: http://bugs.python.org/file35827/acosh_docstring_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 09:48:40 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Jul 2014 07:48:40 +0000 Subject: [issue19870] Backport Cookie fix to 2.7 (httponly / secure flag) In-Reply-To: <1386055628.27.0.222770059818.issue19870@psf.upfronthosting.co.za> Message-ID: <3h3F1N01s8z7LjR@mail.python.org> Roundup Robot added the comment: New changeset 0ba6ebd90b9d by Berker Peksag in branch '2.7': Issue #19870: BaseCookie now parses 'secure' and 'httponly' flags. http://hg.python.org/cpython/rev/0ba6ebd90b9d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 09:48:41 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Jul 2014 07:48:41 +0000 Subject: [issue16611] Cookie.py does not parse httponly or secure cookie flags In-Reply-To: <1354654224.49.0.677339520856.issue16611@psf.upfronthosting.co.za> Message-ID: <3h3F1N52TNz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 0ba6ebd90b9d by Berker Peksag in branch '2.7': Issue #19870: BaseCookie now parses 'secure' and 'httponly' flags. http://hg.python.org/cpython/rev/0ba6ebd90b9d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 09:50:04 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 02 Jul 2014 07:50:04 +0000 Subject: [issue19870] Backport Cookie fix to 2.7 (httponly / secure flag) In-Reply-To: <1386055628.27.0.222770059818.issue19870@psf.upfronthosting.co.za> Message-ID: <1404287404.71.0.446263771687.issue19870@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 09:53:33 2014 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 02 Jul 2014 07:53:33 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404275479.79.0.0199370909465.issue21902@psf.upfronthosting.co.za> Message-ID: <1404287613.02.0.419942081222.issue21902@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- stage: needs patch -> patch review type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 09:56:26 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 07:56:26 +0000 Subject: [issue12600] Add example of using load_tests to parameterise Test Cases In-Reply-To: <1311226769.48.0.369455670372.issue12600@psf.upfronthosting.co.za> Message-ID: <1404287786.33.0.121942355121.issue12600@psf.upfronthosting.co.za> Mark Lawrence added the comment: Any volunteers to do this? I'd do it myself but by the time somebody explains the detail, it'd probably be easier just to write a patch. @Robert just FTR do you know the issue number for "the use of __str__ by the stdlib [which isn't easily overridable - there is a separate issue on that]" which you mention in msg177328? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 10:01:35 2014 From: report at bugs.python.org (Tymoteusz Paul) Date: Wed, 02 Jul 2014 08:01:35 +0000 Subject: [issue21896] Unexpected ConnectionResetError in urllib.request against a valid website In-Reply-To: <1404217105.77.0.742047143649.issue21896@psf.upfronthosting.co.za> Message-ID: <1404288095.73.0.516681785875.issue21896@psf.upfronthosting.co.za> Changes by Tymoteusz Paul : ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 10:10:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 08:10:27 +0000 Subject: [issue12876] Make Test Error : ImportError: No module named _sha256 In-Reply-To: <1314873741.02.0.732192179897.issue12876@psf.upfronthosting.co.za> Message-ID: <1404288627.76.0.930081740839.issue12876@psf.upfronthosting.co.za> Mark Lawrence added the comment: Are we still interested in a 2.7.1 build issue? Note that regrtest is aimed at core developers only. ---------- components: +Build -Tests nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 10:12:39 2014 From: report at bugs.python.org (Encolpe DEGOUTE) Date: Wed, 02 Jul 2014 08:12:39 +0000 Subject: [issue12876] Make Test Error : ImportError: No module named _sha256 In-Reply-To: <1314873741.02.0.732192179897.issue12876@psf.upfronthosting.co.za> Message-ID: <1404288759.56.0.205491911004.issue12876@psf.upfronthosting.co.za> Changes by Encolpe DEGOUTE : ---------- nosy: -encolpe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 11:04:07 2014 From: report at bugs.python.org (Claudiu Popa) Date: Wed, 02 Jul 2014 09:04:07 +0000 Subject: [issue8585] zipimporter.find_module is untested In-Reply-To: <1272676536.77.0.29287206537.issue8585@psf.upfronthosting.co.za> Message-ID: <1404291847.39.0.652096788961.issue8585@psf.upfronthosting.co.za> Changes by Claudiu Popa : ---------- stage: needs patch -> commit review versions: +Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 11:14:49 2014 From: report at bugs.python.org (Dan O'Donovan) Date: Wed, 02 Jul 2014 09:14:49 +0000 Subject: [issue21903] ctypes documentation MessageBoxA example produces error Message-ID: <1404292489.9.0.647841786316.issue21903@psf.upfronthosting.co.za> New submission from Dan O'Donovan: There is an example in the ctypes python3 documentation for producing a native Windows MessageBoxA https://docs.python.org/3.3/library/ctypes.html#ctypes.PYFUNCTYPE Try as I might, I cannot get this example to run under python 3 (it is in the python3 documentation) - it always produces an error Traceback (most recent call last): File "", line 1, in ctypes.ArgumentError: argument 2: : wrong type I apologise for not attaching a fix, I have tried and cannot find one. ---------- assignee: docs at python components: Documentation messages: 222088 nosy: Dan.O'Donovan, docs at python priority: normal severity: normal status: open title: ctypes documentation MessageBoxA example produces error type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 11:18:25 2014 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 02 Jul 2014 09:18:25 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404275479.79.0.0199370909465.issue21902@psf.upfronthosting.co.za> Message-ID: <1404292705.03.0.113136530863.issue21902@psf.upfronthosting.co.za> Ezio Melotti added the comment: >> https://docs.python.org/3/library/math.html#hyperbolic-functions should be updated as well. > > It looks fine to me. What do you think should be changed? I just meant to say that the docs and the docstrings should be kept in sync (especially if they are short like in this case). If the definition in the docs is better it could be used for the docstrings; if something gets improved in the docstring that is not already in the docs it should be added to the docs as well. If either one is fine there's no need to update it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 11:18:39 2014 From: report at bugs.python.org (Dan O'Donovan) Date: Wed, 02 Jul 2014 09:18:39 +0000 Subject: [issue21903] ctypes documentation MessageBoxA example produces error In-Reply-To: <1404292489.9.0.647841786316.issue21903@psf.upfronthosting.co.za> Message-ID: <1404292719.77.0.745404195609.issue21903@psf.upfronthosting.co.za> Dan O'Donovan added the comment: Additional note, this code snippet does work in python 2. There is a note that all snippets are tested with 'doctest' so I have added the 'tests' tag to this ticket. ---------- components: +Tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 11:41:28 2014 From: report at bugs.python.org (Kevin Davies) Date: Wed, 02 Jul 2014 09:41:28 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404287064.6.0.334391627122.issue21902@psf.upfronthosting.co.za> Message-ID: <53B3D3C4.8010403@yahoo.com> Kevin Davies added the comment: Mark: The patch looks good. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 11:50:43 2014 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 02 Jul 2014 09:50:43 +0000 Subject: [issue16474] More code coverage for imp module In-Reply-To: <1352938470.43.0.179582544246.issue16474@psf.upfronthosting.co.za> Message-ID: <1404294643.77.0.27152889857.issue16474@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Well, I've closed it as out-of-date. ---------- resolution: -> out of date stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 11:55:54 2014 From: report at bugs.python.org (Jean-Paul Calderone) Date: Wed, 02 Jul 2014 09:55:54 +0000 Subject: [issue12600] Add example of using load_tests to parameterise Test Cases In-Reply-To: <1311226769.48.0.369455670372.issue12600@psf.upfronthosting.co.za> Message-ID: <1404294954.74.0.00773611888328.issue12600@psf.upfronthosting.co.za> Changes by Jean-Paul Calderone : ---------- nosy: -exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 12:50:32 2014 From: report at bugs.python.org (Dan O'Donovan) Date: Wed, 02 Jul 2014 10:50:32 +0000 Subject: [issue21903] ctypes documentation MessageBoxA example produces error In-Reply-To: <1404292489.9.0.647841786316.issue21903@psf.upfronthosting.co.za> Message-ID: <1404298232.12.0.75770869801.issue21903@psf.upfronthosting.co.za> Dan O'Donovan added the comment: Ok, this fail is happening because we're using python3 unicode strings to call the ANSI MessageBoxA function. A possible fix; Encode strings before passing the MessageBoxA (ctypes.txt.diff attached) Alternatively, calls could be made to the unicode MessageBoxW function, but someone who knows about ctypes / Win32 magic numbers would have to look at that. (Inspiration take from this stack overflow question http://stackoverflow.com/questions/18164994/the-ctypes-wraps-messageboxa-example-didnt-work-in-python33) ---------- keywords: +patch Added file: http://bugs.python.org/file35828/ctypes.txt.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 13:32:04 2014 From: report at bugs.python.org (Martin Dengler) Date: Wed, 02 Jul 2014 11:32:04 +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: <1404300724.4.0.730728550632.issue2943@psf.upfronthosting.co.za> Changes by Martin Dengler : ---------- nosy: +mdengler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 13:54:10 2014 From: report at bugs.python.org (Steve Holden) Date: Wed, 02 Jul 2014 11:54:10 +0000 Subject: [issue21904] Multiple closures accessing the same non-local variable always see the same value Message-ID: <1404302050.04.0.0402916465626.issue21904@psf.upfronthosting.co.za> New submission from Steve Holden: When repeated use of a nonlocal variable is made (e.g. to define multiple functions in a loop) ideally the closure should reflect the value of the local variable at the time of use. This should at least be explicitly documented if the behavior is considered not to be a bug. The code sample attached shows that the closures produced operate differently inside and outside the enclosing function. Without an explicit nonlocal declaration the closure should not be able to affect the nonlocal variable's value (which anyway hardly makes sense once the enclosing namespace has been destroyed), so I think it's possible to argue that this behavior is a bug, but I'd value comments from experienced developers. ---------- files: bugreport.py keywords: needs review messages: 222094 nosy: holdenweb priority: normal severity: normal status: open title: Multiple closures accessing the same non-local variable always see the same value type: behavior versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file35829/bugreport.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 14:06:21 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Jul 2014 12:06:21 +0000 Subject: [issue21904] Multiple closures accessing the same non-local variable always see the same value In-Reply-To: <1404302050.04.0.0402916465626.issue21904@psf.upfronthosting.co.za> Message-ID: <1404302781.63.0.588123901269.issue21904@psf.upfronthosting.co.za> R. David Murray added the comment: Yeah, closures can be a bit counter-intuitive. Assuming *I'm* understanding this correctly, the closure captures a pointer to the local variable, not the value of the local variable, and thus keeps it alive. (That is, the namespace is not destroyed until all closures referencing it have gone away.) https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 14:32:27 2014 From: report at bugs.python.org (Joram Agten) Date: Wed, 02 Jul 2014 12:32:27 +0000 Subject: [issue1425127] os.remove OSError: [Errno 13] Permission denied Message-ID: <1404304347.81.0.965622950541.issue1425127@psf.upfronthosting.co.za> Joram Agten added the comment: I think this c win32 issue describes a similar problem http://stackoverflow.com/questions/3764072/c-win32-how-to-wait-for-a-pending-delete-to-complete ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 14:43:37 2014 From: report at bugs.python.org (Steve Holden) Date: Wed, 02 Jul 2014 12:43:37 +0000 Subject: [issue21904] Multiple closures accessing the same non-local variable always see the same value In-Reply-To: <1404302050.04.0.0402916465626.issue21904@psf.upfronthosting.co.za> Message-ID: <1404305017.63.0.39253308228.issue21904@psf.upfronthosting.co.za> Steve Holden added the comment: Indeed the issue is that the pointer is to the local variable rather than its value at time of closure defnition. Not being familiar with the way cells are used, I am unsure as to how the closure keeps the whole namespace alive (that would seem to require a frame rather than just a simple cell). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 14:48:41 2014 From: report at bugs.python.org (Stefan Krah) Date: Wed, 02 Jul 2014 12:48:41 +0000 Subject: [issue15722] PEP 3121, 384 Refactoring applied to decimal module In-Reply-To: <1345293070.72.0.383930872934.issue15722@psf.upfronthosting.co.za> Message-ID: <1404305321.29.0.710474758571.issue15722@psf.upfronthosting.co.za> Stefan Krah added the comment: In order to avoid the significant slowdown: Could we create a new kind of method (METH_STATE) and change ceval to pass a state struct that contains the thread and the module state as the first parameter if the METH_STATE flag is present? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 15:03:12 2014 From: report at bugs.python.org (Olivier Grisel) Date: Wed, 02 Jul 2014 13:03:12 +0000 Subject: [issue21905] RuntimeError in pickle.whichmodule when sys.modules if mutated Message-ID: <1404306192.8.0.184744206475.issue21905@psf.upfronthosting.co.za> New submission from Olivier Grisel: `pickle.whichmodule` performs an iteration over `sys.modules` and tries to perform `getattr` calls on those modules. Unfortunately some modules such as those from the `six.moves` dynamic module can trigger imports when calling `getattr` on them, hence mutating the `sys.modules` dict and causing a `RuntimeError: dictionary changed size during iteration`. This would also render `pickle.whichmodule` more thread-safe and cause concurrent thread perform new module imports and `whichmodule` calls. The attach patch protect the iterator by copying the dict items into a fixed list. I could write a tests involving dynamic module definitions as done in `six.moves` but it sounds very complicated for such a trivial fix. ---------- components: Library (Lib) files: pickle_whichmodule.patch keywords: patch messages: 222099 nosy: Olivier.Grisel priority: normal severity: normal status: open title: RuntimeError in pickle.whichmodule when sys.modules if mutated type: crash versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file35830/pickle_whichmodule.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 15:13:04 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Jul 2014 13:13:04 +0000 Subject: [issue21904] Multiple closures accessing the same non-local variable always see the same value In-Reply-To: <1404302050.04.0.0402916465626.issue21904@psf.upfronthosting.co.za> Message-ID: <1404306784.4.0.740408600478.issue21904@psf.upfronthosting.co.za> R. David Murray added the comment: I forgot that cells were independent objects. You are probably right about it just keeping the cell alive, but I never did finish looking through how that code worked when I did look at it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 15:15:03 2014 From: report at bugs.python.org (Andy Maier) Date: Wed, 02 Jul 2014 13:15:03 +0000 Subject: [issue21900] .hgignore: Missing ignores for downloaded doc build tools In-Reply-To: <1404226530.0.0.067292394888.issue21900@psf.upfronthosting.co.za> Message-ID: <1404306903.98.0.267888700508.issue21900@psf.upfronthosting.co.za> Andy Maier added the comment: That is indeed true; i just verified that by creating a new clone repository. Sorry for the extra work. When I created the bug yesterday, I had my repository clone updated to "2.7" and the .hgignore definitely did not have the entries. I even saw all the downloaded doc tools in the status window of my hg client (which is what caused me to attempt to fix this in the first place). I did do a commit to my local repository clone but did not push that (I would not have the rights anyway). If anyone has an explanation on whyt I saw, I'd be grateful. Andy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 15:25:06 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 13:25:06 +0000 Subject: [issue16599] unittest: Access test result from tearDown In-Reply-To: <1354527723.36.0.769611290906.issue16599@psf.upfronthosting.co.za> Message-ID: <1404307506.92.0.230077732312.issue16599@psf.upfronthosting.co.za> Mark Lawrence added the comment: The solution suggested in msg176909 seems accepted all around so can we please close this. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 15:27:22 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 13:27:22 +0000 Subject: [issue16784] Int tests enhancement and refactoring In-Reply-To: <1356518001.26.0.44673058371.issue16784@psf.upfronthosting.co.za> Message-ID: <1404307642.94.0.780212947168.issue16784@psf.upfronthosting.co.za> Mark Lawrence added the comment: is there anything left to do here? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 15:41:12 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Jul 2014 13:41:12 +0000 Subject: [issue21900] .hgignore: Missing ignores for downloaded doc build tools In-Reply-To: <1404226530.0.0.067292394888.issue21900@psf.upfronthosting.co.za> Message-ID: <1404308472.08.0.458100557068.issue21900@psf.upfronthosting.co.za> R. David Murray added the comment: Are you sure your checkout was updated to 2.7? If you had checked out 2.7, built the docs, then checked out 3.4 and done an hg status, you would see the Doc files as untracked. If you were really checked out to 2.7 you shouldn't have. I doubt there's any way to figure out what went wrong unless you can reproduce it. Regardless, though, you are having a Mercurial issue here, not a Python one :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 15:54:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 13:54:59 +0000 Subject: [issue12018] No tests for ntpath.samefile, ntpath.sameopenfile In-Reply-To: <1304694770.94.0.722245311346.issue12018@psf.upfronthosting.co.za> Message-ID: <1404309299.07.0.0677233758053.issue12018@psf.upfronthosting.co.za> Mark Lawrence added the comment: Presumably the changes made in the default branch referred to in msg179037 will have automatically been carried forward to 3.4 and 3.5. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 16:03:37 2014 From: report at bugs.python.org (Steve Holden) Date: Wed, 02 Jul 2014 14:03:37 +0000 Subject: [issue21904] Multiple closures accessing the same non-local variable always see the same value In-Reply-To: <1404302050.04.0.0402916465626.issue21904@psf.upfronthosting.co.za> Message-ID: <1404309817.05.0.988434131653.issue21904@psf.upfronthosting.co.za> Steve Holden added the comment: I believe (though my belief is untrammeled by anything as useful as knowledge of the code: my diagnostic skills are largely psychic) that the cell essentially takes over the reference from the local namespace of the about-to-terminate lexically surrounding function. This would appear to be a logical time to create closure cells, as there is effectively no need to create them for functions that will be destroyed. So I imagine any remaining function objects accessible from the return expression will be fixed up at that point. This has the rather unpleasant side effect of capturing the value on surrounding function return rather than closure function creation. The behavior exhibited, in my opinion, shows that there would be strong advantages to creating the closures dynamically, even though I can understand that pathological cases might require much work. It might have to be benchmarked before a decision, I suppose. I couldn't say off-hand how many people are dynamically trying to create multiple closures from a single namespace. It seems to me that the principle of least surprise would suggest a change be adopted, but I may be the only one who's surprised. I have documented this issue in more detail on my blog at http://holdenweb.blogspot.co.uk/2014/07/closures-arent-easy.html and will report back if anything of substance emerges. Otherwise I'll just leave this closed. Thanks for your comment and consideration. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 16:23:26 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 02 Jul 2014 14:23:26 +0000 Subject: [issue16968] Fix test discovery for test_concurrent_futures.py In-Reply-To: <1358201974.23.0.0352259739582.issue16968@psf.upfronthosting.co.za> Message-ID: <1404311006.33.0.654337693846.issue16968@psf.upfronthosting.co.za> Zachary Ware added the comment: Since then, Senthil Kumaran converted test_urllib2_localnet (and another urllib test or two) to unittest.main, using this: """ threads_key = None def setUpModule(): # Store the threading_setup in a key and ensure that it is cleaned up # in the tearDown global threads_key threads_key = support.threading_setup() def tearDownModule(): if threads_key: support.threading_cleanup(threads_key) if __name__ == "__main__": unittest.main() """ Since nobody has said anything against that in the two months since it was done, that's what I was going to go with when I got back to this; support.reap_children() can just be called in tearDownModule. If you'd like to provide a patch, Mark, please do so! ---------- versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 16:47:31 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Jul 2014 14:47:31 +0000 Subject: [issue21904] Multiple closures accessing the same non-local variable always see the same value In-Reply-To: <1404302050.04.0.0402916465626.issue21904@psf.upfronthosting.co.za> Message-ID: <1404312451.63.0.459617738553.issue21904@psf.upfronthosting.co.za> R. David Murray added the comment: This is a specific instance of the general principle that a python variable is a 'named' location that holds a pointer to an arbitrary python object. The 'name' in this case is the variable name that appears in multiple scopes (which is what triggers the creation of the cell object...I have no idea at what point in the process it is created). To create a *new* cell object at closure creation time (which is essentially what you are advocating if I understand correctly) would, I think, change the semantics of Python's scoping rules. It would mean that the behavior would be different depending on whether or not 'nonlocal' was specified...if it is nonlocal, the behavior *has* to be the current behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 17:28:01 2014 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 02 Jul 2014 15:28:01 +0000 Subject: [issue12876] Make Test Error : ImportError: No module named _sha256 In-Reply-To: <1314873741.02.0.732192179897.issue12876@psf.upfronthosting.co.za> Message-ID: <1404314881.54.0.284478142905.issue12876@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 17:30:47 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 02 Jul 2014 15:30:47 +0000 Subject: [issue16474] More code coverage for imp module In-Reply-To: <1352938470.43.0.179582544246.issue16474@psf.upfronthosting.co.za> Message-ID: <1404315047.2.0.835052529064.issue16474@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 17:38:52 2014 From: report at bugs.python.org (Torrin) Date: Wed, 02 Jul 2014 15:38:52 +0000 Subject: [issue21906] Tools\Scripts\md5sum.py doesn't work in Python 3.4.1 on Windows 7 64bit. Message-ID: <1404315532.22.0.153511853972.issue21906@psf.upfronthosting.co.za> New submission from Torrin: md5sum.py uses at least 1 undefined object in Python 3.4.1. I only tried this on Windows. I have no idea if it is a problem on any other OS. C:\>C:\Python27\python.exe --version Python 2.7.6 C:\>C:\Python34\python.exe --version Python 3.4.1 C:\>C:\Python34\python.exe C:\Python34\Tools\Scripts\md5sum.py C:\Python34\python.exe Traceback (most recent call last): File "C:\Python34\Tools\Scripts\md5sum.py", line 90, in sys.exit(main(sys.argv[1:], sys.stdout)) File "C:\Python34\Tools\Scripts\md5sum.py", line 87, in main return sum(args, out) File "C:\Python34\Tools\Scripts\md5sum.py", line 27, in sum if files and isinstance(files[-1], file): NameError: name 'file' is not defined Here is why . . . C:\>C:\Python27\python.exe -c "print(file)" C:\>C:\Python34\python.exe -c "print(file)" Traceback (most recent call last): File "", line 1, in NameError: name 'file' is not defined So "file" is defined in 2.7.6 but not in 3.4.1. ---------- components: Demos and Tools messages: 222109 nosy: torrin priority: normal severity: normal status: open title: Tools\Scripts\md5sum.py doesn't work in Python 3.4.1 on Windows 7 64bit. versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 18:01:32 2014 From: report at bugs.python.org (SilentGhost) Date: Wed, 02 Jul 2014 16:01:32 +0000 Subject: [issue21906] Tools\Scripts\md5sum.py doesn't work in Python 3.x In-Reply-To: <1404315532.22.0.153511853972.issue21906@psf.upfronthosting.co.za> Message-ID: <1404316892.44.0.788173950697.issue21906@psf.upfronthosting.co.za> SilentGhost added the comment: I guess it's only the evidence that it isn't being used. ---------- nosy: +SilentGhost title: Tools\Scripts\md5sum.py doesn't work in Python 3.4.1 on Windows 7 64bit. -> Tools\Scripts\md5sum.py doesn't work in Python 3.x versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 18:13:46 2014 From: report at bugs.python.org (Andy Maier) Date: Wed, 02 Jul 2014 16:13:46 +0000 Subject: [issue21900] .hgignore: Missing ignores for downloaded doc build tools In-Reply-To: <1404226530.0.0.067292394888.issue21900@psf.upfronthosting.co.za> Message-ID: <1404317626.16.0.454371589131.issue21900@psf.upfronthosting.co.za> Andy Maier added the comment: > Regardless, though, you are having a Mercurial issue here, not a Python one :) That seems to be the case ... I don't think I can reproduce it. All fine then. Thanks, David! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 18:19:00 2014 From: report at bugs.python.org (Andy Maier) Date: Wed, 02 Jul 2014 16:19:00 +0000 Subject: [issue14097] Improve the "introduction" page of the tutorial In-Reply-To: <1329975473.84.0.795852636525.issue14097@psf.upfronthosting.co.za> Message-ID: <1404317940.54.0.961530833429.issue14097@psf.upfronthosting.co.za> Andy Maier added the comment: > Andy: in future, please use the 'review' link to post reviews,... Will do ... I just now discovered the "Start Review" link (I'm new here, so thanks for telling me...) Andy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 18:27:46 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 02 Jul 2014 16:27:46 +0000 Subject: [issue14097] Improve the "introduction" page of the tutorial In-Reply-To: <1404317940.54.0.961530833429.issue14097@psf.upfronthosting.co.za> Message-ID: Zachary Ware added the comment: You're both welcome :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 19:25:04 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 02 Jul 2014 17:25:04 +0000 Subject: [issue21090] File read silently stops after EIO I/O error In-Reply-To: <1404227234.07.0.649609415241.issue21090@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 20:29:07 2014 From: report at bugs.python.org (Brett Cannon) Date: Wed, 02 Jul 2014 18:29:07 +0000 Subject: [issue15358] Test pkgutil.walk_packages in test_pkgutil instead of test_runpy In-Reply-To: <1342346071.33.0.869652246152.issue15358@psf.upfronthosting.co.za> Message-ID: <1404325747.18.0.162464766671.issue15358@psf.upfronthosting.co.za> Brett Cannon added the comment: I got overruled on the deprecation idea due to utility code like walk_packages that pkgutil contains. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 20:30:08 2014 From: report at bugs.python.org (Brett Cannon) Date: Wed, 02 Jul 2014 18:30:08 +0000 Subject: [issue8585] zipimporter.find_module is untested In-Reply-To: <1272676536.77.0.29287206537.issue8585@psf.upfronthosting.co.za> Message-ID: <1404325808.13.0.73018957302.issue8585@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 20:37:55 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Jul 2014 18:37:55 +0000 Subject: [issue21906] Tools\Scripts\md5sum.py doesn't work in Python 3.x In-Reply-To: <1404315532.22.0.153511853972.issue21906@psf.upfronthosting.co.za> Message-ID: <1404326275.3.0.234349005272.issue21906@psf.upfronthosting.co.za> R. David Murray added the comment: Well, at least one person *tried* to use it :) This is not a windows only problem, I can reproduce it on linux. Obviously we don't have tests for this tool. ---------- keywords: +easy nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 20:57:06 2014 From: report at bugs.python.org (PJ Eby) Date: Wed, 02 Jul 2014 18:57:06 +0000 Subject: [issue21890] wsgiref.simple_server doesn't accept empty bytes before start_response is called In-Reply-To: <1404184510.5.0.84615415722.issue21890@psf.upfronthosting.co.za> Message-ID: <1404327426.43.0.268398656559.issue21890@psf.upfronthosting.co.za> PJ Eby added the comment: Please see this paragraph of the spec (my emphasis added): (Note: the application must invoke the start_response() callable **before the iterable yields its first body string**, so that the server can send the headers before any body content. However, this invocation may be performed by the iterable's first iteration, so servers must not assume that start_response() has been called before they begin iterating over the iterable.) The paragraph you quoted says that start_response() has to buffer headers until a non-empty string is yielded. It does *not* say that strings can be yielded prior to calling start_response(). Indeed, the paragraph I quote above states the opposite: you can't call start_response() before yielding your first body string (whether empty or not). This is a known issue with the spec, but it's an issue with the *spec*, not the implementation. WSGI 1.0 is known to be unusable as a truly async API, for this and other reasons. ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 21:16:42 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 02 Jul 2014 19:16:42 +0000 Subject: [issue21907] Update Windows build batch scripts Message-ID: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> New submission from Zachary Ware: I am aware of a few open issues with the build scripts provided for Windows (both the Tools/buildbot scripts and the .bat files provided in PCbuild), such as #9973 and #9822, and there are some other issues that bother me but that I haven't opened issues for. Here's a patch which takes care of all of the issues I'm aware of, by almost completely rewriting most of the scripts. An overview of the changes: - Tools/buildbot/external*.bat are dead, replaced by PCbuild/get_externals.bat. Since those scripts have been suggested for use by normal users by PCbuild/readme.txt and the devguide, stubs for Tools/buildbot/external.bat and external-amd64.bat still exist, which display a message suggesting PCbuild/get_externals.bat and then pass all arguments on to that script. - PCbuild/get_externals.bat is a complete rewrite of Tools/buildbot/external-common.bat, and is written for users rather than buildbots. It takes '-c/--clean' or '--clean-only' options, which will gently remove^W^W nuke from orbit all existing external library sources. - PCbuild/build.bat has been updated to set up the environment itself, and to allow arguments to be passed to MSbuild, such as "/m" (though anything containing [ =,] (and possibly other characters) will require quotes to pass through properly, due to batch's wonderful argument handling abilities). It has also grown an '-e' option, to pull in external libs using get_externals.bat. - Tools/buildbot/build.bat has been updated to use PCbuild/build.bat, and Tool/buildbot/build-amd64.bat has been updated to use Tools/buildbot/build.bat. - PCbuild/env.bat has been updated to allow for non-standard VS install locations, but really, it's obsolete with build.bat setting the environment itself. I would prefer to eliminate PCbuild/build_env.bat and PCbuild/env.bat, but I don't know whether they're an integral part of other people's workflow and don't want to mess that up if they are. There doesn't seem to be any harm from running the build with the environment set up twice. - Tools/buildbot/clean.bat has been updated as I suggested in #9973, it has a set list of kill_python exes to try if they exist, then uses `hg purge` to clean *everything* out. Tools/buildbot/clean-amd64.bat is now just a stub calling Tools/buildbot/clean.bat. - Tools/buildbot/buildmsi.bat has a few updates, but I can't properly test them (having not yet managed to get an MSI built at all). The script is currently unused anyway, as far as I know. - Tools/buildbot/test[-amd64].bat have been updated to use Tools/scripts/run_tests.py, just like the UNIX buildbots. run_tests.py has been updated to use subprocess.call instead of os.execv on Windows. - All scripts have been made cwd-agnostic, by which I mean they should run the same way no matter where they are called from. Also, every effort is made to not pollute the environment (even with VS setup). They should also be a bit more robust against paths with spaces, but I make no guarantees about that. - PCbuild/readme.txt has been updated to suggest PCbuild/get_externals.bat instead of Tools/buildbot/external*.bat, and has an added "Quick Start Guide" at the top. A patch for the devguide will follow. I think these changes make things simpler, with fewer places to update when options are changed, compilers upgraded, libraries updated, etc. With this change, the simplest way to build on Windows becomes "PCbuild\build.bat -e" (or add "-d" for debug). This is still not exactly what I want eventually (see #16895, which is now long out of date :), but is a solid step in that direction. Most of these changes could be backported to 3.4, and at least a good portion of those to 2.7. I'm not exactly sure how worth it that would be, though. Thoughts? ---------- assignee: zach.ware components: Build, Windows files: better_bats.diff keywords: buildbot, patch messages: 222118 nosy: loewis, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: patch review status: open title: Update Windows build batch scripts type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file35831/better_bats.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 21:22:56 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 02 Jul 2014 19:22:56 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <1404328976.66.0.555359514388.issue21907@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's the devguide patch. ---------- Added file: http://bugs.python.org/file35832/devguide_update.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 21:32:52 2014 From: report at bugs.python.org (Jeremy Fusco) Date: Wed, 02 Jul 2014 19:32:52 +0000 Subject: [issue21908] Grammatical error in 3.4 tutorial Message-ID: <1404329572.95.0.36748102404.issue21908@psf.upfronthosting.co.za> New submission from Jeremy Fusco: https://docs.python.org/3/tutorial/controlflow.html Sentence states 'most such' where either would suffice. current: In most such cases, however, it is convenient to use the enumerate() function, see Looping Techniques Proposed: In most cases ---------- assignee: docs at python components: Documentation messages: 222120 nosy: Jeremy.Fusco, docs at python priority: normal severity: normal status: open title: Grammatical error in 3.4 tutorial type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 22:11:58 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 20:11:58 +0000 Subject: [issue16473] quopri module minor difference in decoding quoted-printable text In-Reply-To: <1352928126.09.0.115783436578.issue16473@psf.upfronthosting.co.za> Message-ID: <1404331918.11.0.504315712507.issue16473@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'll take this on if I can. Is binascii available on all platforms, as if it is the quopri code could be simplified slightly along with the test code? ---------- nosy: +BreamoreBoy title: Minor difference in decoding quoted-printable text -> quopri module minor difference in decoding quoted-printable text _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 22:26:57 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Jul 2014 20:26:57 +0000 Subject: [issue16473] quopri module minor difference in decoding quoted-printable text In-Reply-To: <1352928126.09.0.115783436578.issue16473@psf.upfronthosting.co.za> Message-ID: <1404332817.22.0.908801350908.issue16473@psf.upfronthosting.co.za> R. David Murray added the comment: The first problem is determining the "best" error recovery algorithms by reading through the RFCs and considering use cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 22:53:09 2014 From: report at bugs.python.org (Steve Dower) Date: Wed, 02 Jul 2014 20:53:09 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <1404334389.6.0.965885311258.issue21907@psf.upfronthosting.co.za> Steve Dower added the comment: Looks pretty good. I'm happy to see more move into PCBuild - ideally, people building a Python release should never have to look anywhere else. buildmsi.bat can probably go away completely if the buildbots aren't using it. 3.5 will eventually have a .wixproj to build the MSI and there'll be a buildrelease.bat or similar under tools/ to keep the single entry point. As part of the VC14 change there'll be changes to the batch files, but as far as entry points go they'll still be there. I want to move most of the functionality into an MSBuild script (currently pcbuild.proj in my sandbox) since that is generally more flexible than cmd.exe, but until then this looks like a great improvement. Not quite the 'make' equivalent you have in #16895, but that will be easy to write when "make (\w+)" translates into "msbuild pcbuild.proj /t:\1". I don't see any value in backporting to 2.7. I've got my own scripts for that which make doing a release very straightforward, and I'm happy to keep it that way. That said, the easier we make it for people to build from source, the sooner we can stop doing binary releases for 2.7. Consider me +0.5 on taking this change, but it's only less than +1 because I'm already working on the next major iteration and so *I* don't need them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 23:01:35 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Jul 2014 21:01:35 +0000 Subject: [issue21090] File read silently stops after EIO I/O error In-Reply-To: <1396045786.33.0.781369785301.issue21090@psf.upfronthosting.co.za> Message-ID: <3h3ZcF734xz7LjW@mail.python.org> Roundup Robot added the comment: New changeset 652b62213072 by Victor Stinner in branch '3.4': Issue #21090: io.FileIO.readall() does not ignore I/O errors anymore. Before, http://hg.python.org/cpython/rev/652b62213072 New changeset 440279cec378 by Victor Stinner in branch 'default': (Merge 3.4) Issue #21090: io.FileIO.readall() does not ignore I/O errors http://hg.python.org/cpython/rev/440279cec378 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 23:11:44 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Jul 2014 21:11:44 +0000 Subject: [issue21908] Grammatical error in 3.4 tutorial In-Reply-To: <1404329572.95.0.36748102404.issue21908@psf.upfronthosting.co.za> Message-ID: <1404335504.04.0.210821000401.issue21908@psf.upfronthosting.co.za> R. David Murray added the comment: It is correct English as written. If you said just 'most cases', it would be ambiguous (most cases of using...something not quite clear from context, it could be range, or looping, or...), whereas if you said 'such cases', that would be wrong, since not all cases where you could use range and an index are served by using enumerate. 'most such' correctly refers specifically to the preceding example, and qualifies it that not all such cases can use enumerate. (See what I did there? :) ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 23:14:19 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Jul 2014 21:14:19 +0000 Subject: [issue21090] File read silently stops after EIO I/O error In-Reply-To: <1396045786.33.0.781369785301.issue21090@psf.upfronthosting.co.za> Message-ID: <3h3Zty3s8FzRND@mail.python.org> Roundup Robot added the comment: New changeset 1492a42b8308 by Victor Stinner in branch '2.7': Issue #21090: io.FileIO.readall() does not ignore I/O errors anymore. Before, http://hg.python.org/cpython/rev/1492a42b8308 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 23:18:29 2014 From: report at bugs.python.org (Jeremy Fusco) Date: Wed, 02 Jul 2014 21:18:29 +0000 Subject: [issue21908] Grammatical error in 3.4 tutorial In-Reply-To: <1404329572.95.0.36748102404.issue21908@psf.upfronthosting.co.za> Message-ID: <1404335909.43.0.779638633399.issue21908@psf.upfronthosting.co.za> Jeremy Fusco added the comment: I do, however I feel I'm not the only one that would be thrown by this wording. Perhaps wording such as 'In cases like the above it is more convenient to utilize the enumerate()'. Thanks for the quick response! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 23:23:11 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 21:23:11 +0000 Subject: [issue13985] Menu.tk_popup : menu doesn't disapear when main window is iconified. In-Reply-To: <1328871022.99.0.882272597763.issue13985@psf.upfronthosting.co.za> Message-ID: <1404336191.95.0.730521514635.issue13985@psf.upfronthosting.co.za> Mark Lawrence added the comment: @marc please accept our apologies for having missed this. Can someone comment on this please. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 23:25:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 21:25:27 +0000 Subject: [issue14069] In extensions (?...) the lookbehind assertion cannot choose between the beginning of string and a letter In-Reply-To: <1329792959.02.0.649716496368.issue14069@psf.upfronthosting.co.za> Message-ID: <1404336327.6.0.442394448516.issue14069@psf.upfronthosting.co.za> Mark Lawrence added the comment: @py.user please accept our apologies for having missed this. @Ezio can you comment on this please. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 23:29:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 21:29:15 +0000 Subject: [issue13938] 2to3 fails to convert types.StringTypes appropriately In-Reply-To: <1328333493.54.0.112859472866.issue13938@psf.upfronthosting.co.za> Message-ID: <1404336555.88.0.578177672062.issue13938@psf.upfronthosting.co.za> Mark Lawrence added the comment: A short patch LGTM. Can we have a commit review please. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 23:31:06 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 21:31:06 +0000 Subject: [issue13554] Tkinter doesn't use higher resolution app icon In-Reply-To: <1323308666.66.0.322569696678.issue13554@psf.upfronthosting.co.za> Message-ID: <1404336666.6.0.308549800302.issue13554@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we have a comment on this please. ---------- nosy: +BreamoreBoy, gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 23:35:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 21:35:15 +0000 Subject: [issue16095] urllib2 failing with squid proxy and digest authentication In-Reply-To: <1349023291.71.0.297566179231.issue16095@psf.upfronthosting.co.za> Message-ID: <1404336915.79.0.803792516831.issue16095@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we have an update on this please. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 23:37:07 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 21:37:07 +0000 Subject: [issue15134] urllib.request.thishost() fails on OSX 10.7 In-Reply-To: <1340357685.54.0.913486027358.issue15134@psf.upfronthosting.co.za> Message-ID: <1404337027.34.0.301223190848.issue15134@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +orsenthil type: -> behavior versions: +Python 3.4, Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 23:40:05 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 21:40:05 +0000 Subject: [issue14953] Reimplement subset of multiprocessing.sharedctypes using memoryview In-Reply-To: <1338303583.56.0.322806581737.issue14953@psf.upfronthosting.co.za> Message-ID: <1404337205.78.0.861595248038.issue14953@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Richard I assume that you'll be following this up. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 23:41:50 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 21:41:50 +0000 Subject: [issue14734] Use binascii.b2a_qp/a2b_qp in email package header handling? In-Reply-To: <1336249062.57.0.661119787724.issue14734@psf.upfronthosting.co.za> Message-ID: <1404337310.62.0.115366234315.issue14734@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 23:52:44 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 02 Jul 2014 21:52:44 +0000 Subject: [issue15549] openssl version in windows builds does not support renegotiation In-Reply-To: <1344006576.37.0.61147044371.issue15549@psf.upfronthosting.co.za> Message-ID: <1404337964.23.0.340842819667.issue15549@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Cory the latest version of openssl is 1.0.1g for Python 2.7.7. Please see PEP 466 and issue 21462 ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 2 23:54:21 2014 From: report at bugs.python.org (Robin Schoonover) Date: Wed, 02 Jul 2014 21:54:21 +0000 Subject: [issue21890] wsgiref.simple_server doesn't accept empty bytes before start_response is called In-Reply-To: <1404184510.5.0.84615415722.issue21890@psf.upfronthosting.co.za> Message-ID: <1404338061.72.0.461986368187.issue21890@psf.upfronthosting.co.za> Robin Schoonover added the comment: Fair enough, I misled myself. However, and I feel like I'm getting really picky here, but it still doesn't fulfill the paragraph I quoted: def application(environ, start_response): start_response('200 OK', [('Content-type', 'text/plain')]) yield b'' try: # produce an exception tuple, so we can re-call s_r raise RuntimeError except RuntimeError: # Headers shouldn't have been sent, but they were # so this will throw: start_response('200 OK', [('Content-type', 'text/plain')], sys.exc_info()) yield b'error data or whatever' But if async support a foregone conclusion anyway, is it worth bothering complying with that odd requirement? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 00:09:33 2014 From: report at bugs.python.org (akira) Date: Wed, 02 Jul 2014 22:09:33 +0000 Subject: [issue8631] subprocess.Popen.communicate(...) hangs on Windows In-Reply-To: <1273095906.37.0.582736332431.issue8631@psf.upfronthosting.co.za> Message-ID: <1404338973.3.0.641518498357.issue8631@psf.upfronthosting.co.za> akira added the comment: > ID>>> s.check_output("pyflakes c:\programs\python34\lib\turtle.py") > hangs indefinitely, no output It might be unrelated to the issue but "\t" is a tab; a raw-string literal should be used instead: >>> from subprocess import check_output >>> check_output(r"pyflakes c:\programs\python34\lib\turtle.py") ---------- nosy: +akira _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 00:12:28 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 02 Jul 2014 22:12:28 +0000 Subject: [issue11776] Constructor signatures missing in types module documentation In-Reply-To: <1302036805.33.0.506634428921.issue11776@psf.upfronthosting.co.za> Message-ID: <1404339148.83.0.872846341702.issue11776@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: -techtonik versions: +Python 3.4, Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 00:16:12 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 02 Jul 2014 22:16:12 +0000 Subject: [issue16566] Structure._anonymous_ should not allow strings In-Reply-To: <1354051789.98.0.293941478089.issue16566@psf.upfronthosting.co.za> Message-ID: <1404339372.78.0.357872116479.issue16566@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 00:20:09 2014 From: report at bugs.python.org (Pietro Battiston) Date: Wed, 02 Jul 2014 22:20:09 +0000 Subject: [issue16095] urllib2 failing with squid proxy and digest authentication In-Reply-To: <1349023291.71.0.297566179231.issue16095@psf.upfronthosting.co.za> Message-ID: <1404339609.12.0.0457732932183.issue16095@psf.upfronthosting.co.za> Pietro Battiston added the comment: The bug is still present in 2.7.7 and 3.4.1. By the way, under python 3 the workaround takes the form class MyHTTPPasswordMgr(urllib.request.HTTPPasswordMgr): def find_user_password(self, realm, authuri): return "a", "b" Finally, notice the wrong behaviour of "is_suburi()" mentioned in http://bugs.python.org/msg14444 is still present (and I still suspect it has something to do with this). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 00:26:30 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 02 Jul 2014 22:26:30 +0000 Subject: [issue19066] os.execv fails with spaced names on Windows In-Reply-To: <1379816488.54.0.686917374017.issue19066@psf.upfronthosting.co.za> Message-ID: <1404339990.05.0.679677832955.issue19066@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 00:26:54 2014 From: report at bugs.python.org (PJ Eby) Date: Wed, 02 Jul 2014 22:26:54 +0000 Subject: [issue21890] wsgiref.simple_server doesn't accept empty bytes before start_response is called In-Reply-To: <1404338061.72.0.461986368187.issue21890@psf.upfronthosting.co.za> Message-ID: PJ Eby added the comment: You're right, it shouldn't send the headers until a non-empty string occurs. I don't see any problem with treating it as a bug, and fixing it. Your patch will also allow non-compliant behavior, though. It seems to me it would be better to fix the logic in write() to not call send_headers() if len(data)==0. That way, it will still error with "write() before start_response()" in the non-compliant case, but fix the compliance error. Feel free to reopen/retitle this issue for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 00:30:14 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 02 Jul 2014 22:30:14 +0000 Subject: [issue19024] Document asterisk (*), splat or star operator In-Reply-To: <1379251118.66.0.684713404389.issue19024@psf.upfronthosting.co.za> Message-ID: <1404340214.52.0.653745263154.issue19024@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have started indexing symbol uses on other issue and will continue after GSOC. I am closing this as there is nothing specific to do. ---------- resolution: -> wont fix stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 00:38:34 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Jul 2014 22:38:34 +0000 Subject: [issue21090] File read silently stops after EIO I/O error In-Reply-To: <1396045786.33.0.781369785301.issue21090@psf.upfronthosting.co.za> Message-ID: <1404340713.99.0.241452930899.issue21090@psf.upfronthosting.co.za> STINNER Victor added the comment: For Python 2, file.read() looks wrong: if only checks ferror() if fread() returns 0, whereas Py_UniversalNewlineFread() can call fread() more than once, and according to fread() manual page, fread() result can be different than 0 on error. "If an error occurs, or the end of the file is reached, the return value is a short item count (or zero)." http://linux.die.net/man/3/fread Attached fileobject.c rewrites error handling in fileobject.c. The main change if that ferror() is called even if fread() does not return 0. ---------- Added file: http://bugs.python.org/file35833/fileobject.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 00:41:57 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 02 Jul 2014 22:41:57 +0000 Subject: [issue11389] unittest: no way to control verbosity of doctests from cmd In-Reply-To: <1299182245.29.0.387603597674.issue11389@psf.upfronthosting.co.za> Message-ID: <1404340917.67.0.32644888511.issue11389@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> TextTestRunner methods are not documented _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 00:50:48 2014 From: report at bugs.python.org (Brian Curtin) Date: Wed, 02 Jul 2014 22:50:48 +0000 Subject: [issue8631] subprocess.Popen.communicate(...) hangs on Windows In-Reply-To: <1273095906.37.0.582736332431.issue8631@psf.upfronthosting.co.za> Message-ID: <1404341448.29.0.205005544056.issue8631@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 00:52:52 2014 From: report at bugs.python.org (Masami HIRATA) Date: Wed, 02 Jul 2014 22:52:52 +0000 Subject: [issue21897] frame.f_locals causes segfault on Python >=3.4.1 In-Reply-To: <1404222008.61.0.644156666753.issue21897@psf.upfronthosting.co.za> Message-ID: <1404341572.95.0.0801432901685.issue21897@psf.upfronthosting.co.za> Masami HIRATA added the comment: Thanks, pitrou. Your patch seems ok to me. $ python3.4.1_with_patch -m unittest . ---------------------------------------------------------------------- Ran 1 test in 0.001s It seems that this issue is same as https://bitbucket.org/hpk42/pytest/issue/528/test-causes-segfault . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 00:59:58 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 02 Jul 2014 22:59:58 +0000 Subject: [issue21897] frame.f_locals causes segfault on Python >=3.4.1 In-Reply-To: <1404222008.61.0.644156666753.issue21897@psf.upfronthosting.co.za> Message-ID: <1404341998.61.0.621494871162.issue21897@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch with tests. ---------- keywords: +patch nosy: +benjamin.peterson stage: -> patch review versions: +Python 3.5 Added file: http://bugs.python.org/file35834/f_locals_clear.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 01:00:36 2014 From: report at bugs.python.org (Robin Schoonover) Date: Wed, 02 Jul 2014 23:00:36 +0000 Subject: [issue21890] wsgiref.simple_server sends headers on empty bytes In-Reply-To: <1404184510.5.0.84615415722.issue21890@psf.upfronthosting.co.za> Message-ID: <1404342036.49.0.0815264542505.issue21890@psf.upfronthosting.co.za> Robin Schoonover added the comment: I agree, the current patch is too permissive. Both a server I wrote a while ago, and most other "complaint" servers deal with the problem the exact same way as that patch, and that extra permissiveness led to my misinterpretation when analyzing why I had made that original change. In any case, I've attached an updated patch. ---------- resolution: not a bug -> status: closed -> open title: wsgiref.simple_server doesn't accept empty bytes before start_response is called -> wsgiref.simple_server sends headers on empty bytes Added file: http://bugs.python.org/file35835/wsgiref-empty-byte-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 01:03:02 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 02 Jul 2014 23:03:02 +0000 Subject: [issue2057] difflib: add patch capability In-Reply-To: <1202628772.22.0.236434867196.issue2057@psf.upfronthosting.co.za> Message-ID: <1404342182.58.0.927670864733.issue2057@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I would like a simple patcher for three reasons. 1. hg, at least as I see it exposed through tortoisehg workbenck, will not apply a patch if there is already an uncommitted change. (But perhaps someone will tell me that there is a 'do it anyway' option.) Sometimes when working on a patch, I want to quickly try out ant then revert another patch that I know does not conflict with the current one. 2. The hg patcher does not give error messages (other than 'chunk failed'). So to do a backport, for instance, I re-edit the file instead of correcting the diff.s 3. Not everything is in hg or equivalent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 01:05:33 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 02 Jul 2014 23:05:33 +0000 Subject: [issue8631] subprocess.Popen.communicate(...) hangs on Windows In-Reply-To: <1273095906.37.0.582736332431.issue8631@psf.upfronthosting.co.za> Message-ID: <1404342333.19.0.352857962819.issue8631@psf.upfronthosting.co.za> Terry J. Reedy added the comment: That has been pointed out to me. I need to repost with the results after correcting the commands (there is still a problem). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 01:12:09 2014 From: report at bugs.python.org (Florent Xicluna) Date: Wed, 02 Jul 2014 23:12:09 +0000 Subject: [issue18099] wsgiref sets Content-Length: 0 on 304 Not Modified In-Reply-To: <1369910008.93.0.397797975418.issue18099@psf.upfronthosting.co.za> Message-ID: <1404342729.66.0.617014797827.issue18099@psf.upfronthosting.co.za> Florent Xicluna added the comment: The patch proposed by Christian addresses the issue. Good to merge. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 01:37:26 2014 From: report at bugs.python.org (Steve Holden) Date: Wed, 02 Jul 2014 23:37:26 +0000 Subject: [issue7423] nested generator expression produces strange results In-Reply-To: <1259717665.75.0.392103948854.issue7423@psf.upfronthosting.co.za> Message-ID: <1404344246.58.0.300742832354.issue7423@psf.upfronthosting.co.za> Steve Holden added the comment: In my experience the devs are pretty well in touch with the user base (though they don't always acknowledge its input). If you leave a programming language at the first sign of wart I fear yo may eventually run out of languages. ---------- nosy: +holdenweb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 01:53:11 2014 From: report at bugs.python.org (Robin Schoonover) Date: Wed, 02 Jul 2014 23:53:11 +0000 Subject: [issue21890] wsgiref.simple_server sends headers on empty bytes In-Reply-To: <1404184510.5.0.84615415722.issue21890@psf.upfronthosting.co.za> Message-ID: <1404345191.46.0.230222211249.issue21890@psf.upfronthosting.co.za> Changes by Robin Schoonover : Added file: http://bugs.python.org/file35836/wsgiref-empty-byte-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 02:27:24 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 03 Jul 2014 00:27:24 +0000 Subject: [issue21755] test_importlib.test_locks fails --without-threads In-Reply-To: <1402734149.6.0.706440396249.issue21755@psf.upfronthosting.co.za> Message-ID: <1404347244.79.0.635636227802.issue21755@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- assignee: -> berker.peksag versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 05:25:13 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 03 Jul 2014 03:25:13 +0000 Subject: [issue21755] test_importlib.test_locks fails --without-threads In-Reply-To: <1402734149.6.0.706440396249.issue21755@psf.upfronthosting.co.za> Message-ID: <3h3l6w0sCWz7Lmv@mail.python.org> Roundup Robot added the comment: New changeset b88525a8c01d by Berker Peksag in branch 'default': Issue #21755: Skip {Frozen,Source}_DeadlockAvoidanceTests tests when http://hg.python.org/cpython/rev/b88525a8c01d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 05:26:23 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 03 Jul 2014 03:26:23 +0000 Subject: [issue21755] test_importlib.test_locks fails --without-threads In-Reply-To: <1402734149.6.0.706440396249.issue21755@psf.upfronthosting.co.za> Message-ID: <1404357983.17.0.903319252895.issue21755@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 05:27:05 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 03 Jul 2014 03:27:05 +0000 Subject: [issue21755] test_importlib.test_locks fails --without-threads In-Reply-To: <1402734149.6.0.706440396249.issue21755@psf.upfronthosting.co.za> Message-ID: <1404358025.03.0.620905529449.issue21755@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 07:12:42 2014 From: report at bugs.python.org (Som Veettil) Date: Thu, 03 Jul 2014 05:12:42 +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: <1404364362.75.0.626732403366.issue5712@psf.upfronthosting.co.za> Som Veettil added the comment: i had similar issue with python 2.7.. works fine with fix provided by vijay (luckycusp) msg107935 - (view) - http://bugs.python.org/msg107935 thanks a lot. ---------- nosy: +som_veettil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 07:49:16 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 03 Jul 2014 05:49:16 +0000 Subject: [issue21906] Tools\Scripts\md5sum.py doesn't work in Python 3.x In-Reply-To: <1404315532.22.0.153511853972.issue21906@psf.upfronthosting.co.za> Message-ID: <1404366556.34.0.363529887882.issue21906@psf.upfronthosting.co.za> Berker Peksag added the comment: Here's a path with tests. ---------- keywords: +patch nosy: +berker.peksag stage: -> patch review type: -> behavior Added file: http://bugs.python.org/file35837/md5sum.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 07:57:55 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 03 Jul 2014 05:57:55 +0000 Subject: [issue7162] 2to3 does not convert __builtins__.file In-Reply-To: <1255814979.41.0.0993610579435.issue7162@psf.upfronthosting.co.za> Message-ID: <1404367075.82.0.229276165379.issue7162@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 07:58:01 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 03 Jul 2014 05:58:01 +0000 Subject: [issue7162] 2to3 does not convert __builtins__.file In-Reply-To: <1255814979.41.0.0993610579435.issue7162@psf.upfronthosting.co.za> Message-ID: <1404367081.48.0.845204565918.issue7162@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 08:12:56 2014 From: report at bugs.python.org (Ned Deily) Date: Thu, 03 Jul 2014 06:12:56 +0000 Subject: [issue21896] Unexpected ConnectionResetError in urllib.request against a valid website In-Reply-To: <1404217105.77.0.742047143649.issue21896@psf.upfronthosting.co.za> Message-ID: <1404367976.16.0.93304764047.issue21896@psf.upfronthosting.co.za> Ned Deily added the comment: It fails with Python 2's urllib2.urlopen as well. ---------- nosy: +ned.deily, orsenthil versions: +Python 2.7, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 09:09:19 2014 From: report at bugs.python.org (Hristo Venev) Date: Thu, 03 Jul 2014 07:09:19 +0000 Subject: [issue21909] PyLong_FromString drops const Message-ID: <1404371359.19.0.197887236946.issue21909@psf.upfronthosting.co.za> New submission from Hristo Venev: PyObject* PyLong_FromString(const char *str, char **pend, int base) pend should be const char** I think casting const away when not required should be a crime punishable by imprisonment. ---------- messages: 222152 nosy: h.venev priority: normal severity: normal status: open title: PyLong_FromString drops const _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 09:10:57 2014 From: report at bugs.python.org (Hristo Venev) Date: Thu, 03 Jul 2014 07:10:57 +0000 Subject: [issue21909] PyLong_FromString drops const In-Reply-To: <1404371359.19.0.197887236946.issue21909@psf.upfronthosting.co.za> Message-ID: <1404371457.85.0.328123708022.issue21909@psf.upfronthosting.co.za> Changes by Hristo Venev : ---------- components: +Interpreter Core type: -> security versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 09:58:21 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 07:58:21 +0000 Subject: [issue16117] python2.7.3 struct misaligned when returned In-Reply-To: <1349256639.78.0.287581020931.issue16117@psf.upfronthosting.co.za> Message-ID: <1404374301.29.0.248410554863.issue16117@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Roland please accept our apologies for the delay in getting back to you. Can someone else take a look please as I know nothing about ctypes, thanks. ---------- nosy: +BreamoreBoy, amaury.forgeotdarc, belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 10:04:55 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 08:04:55 +0000 Subject: [issue16132] ctypes incorrectly encodes .format attribute of memory views In-Reply-To: <1349364906.03.0.586114989306.issue16132@psf.upfronthosting.co.za> Message-ID: <1404374695.82.0.58614527084.issue16132@psf.upfronthosting.co.za> Mark Lawrence added the comment: @David please accept our apologies for the delay in getting back to you. Can someone else take a look please as I know nothing about ctypes, thanks. ---------- nosy: +BreamoreBoy, amaury.forgeotdarc, belopolsky versions: +Python 3.4, Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 10:05:25 2014 From: report at bugs.python.org (Ned Deily) Date: Thu, 03 Jul 2014 08:05:25 +0000 Subject: [issue13985] Menu.tk_popup : menu doesn't disapear when main window is iconified. In-Reply-To: <1328871022.99.0.882272597763.issue13985@psf.upfronthosting.co.za> Message-ID: <1404374725.05.0.184019569592.issue13985@psf.upfronthosting.co.za> Ned Deily added the comment: As far as I can tell, the problem you are seeing with the menu not disappearing when iconifying is caused by the use of grab_release() in do_popup(). If I remove it, using an X11-based Tk 8.6, the focus stays on the menu and clicking on the iconify button causes the menu to be dismissed. With grab_release(), the focus is released from the menu and clicking on the iconify button causes the menu to stay. Unfortunately, there are differences among the various Tk releases and, with the same release, among platform implementations (Windows Tk, X11 Tk, OS X Cocoa Tk, etc). Another issue was the use of the 0 "entry" argument on the call on tk_popup call. With the X11 Tk I tested with, that caused the menu to flash and disappear when clicking the window; removing the 0 argument caused the menu to stay as expected. With an OS X Cocoa Tk, your original test case worked fine without modification. A good modern resource for using Tk is the TkDocs website, which covers use of Tk from Tcl, Python, Ruby, and Perl. The menus sections describes some of the platform differences you may encounter and need to deal with: http://www.tkdocs.com/tutorial/menus.html ---------- nosy: +ned.deily resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 10:11:37 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 08:11:37 +0000 Subject: [issue13745] configuring --with-dbmliborder=bdb doesn't build the gdbm extension In-Reply-To: <1326123610.21.0.125848045882.issue13745@psf.upfronthosting.co.za> Message-ID: <1404375097.41.0.842122281529.issue13745@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- components: +Build type: -> behavior versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 10:17:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 08:17:01 +0000 Subject: [issue13784] Documentation of xml.sax.xmlreader: Locator.getLineNumber() and Locator.getColumnNumber() In-Reply-To: <1326542534.95.0.205057982858.issue13784@psf.upfronthosting.co.za> Message-ID: <1404375421.87.0.369253002141.issue13784@psf.upfronthosting.co.za> Mark Lawrence added the comment: @patrick please accept our apologies for the delay in getting back to you. ---------- nosy: +BreamoreBoy, christian.heimes versions: +Python 3.4, Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 10:22:58 2014 From: report at bugs.python.org (Vitaly Isaev) Date: Thu, 03 Jul 2014 08:22:58 +0000 Subject: [issue20337] bdist_rpm should support %config(noreplace) In-Reply-To: <1390343812.97.0.521102464448.issue20337@psf.upfronthosting.co.za> Message-ID: <1404375778.84.0.661504482809.issue20337@psf.upfronthosting.co.za> Vitaly Isaev added the comment: I confirm the urgent need in this feature. ---------- nosy: +vitalyisaev2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 10:27:35 2014 From: report at bugs.python.org (Ned Deily) Date: Thu, 03 Jul 2014 08:27:35 +0000 Subject: [issue15549] openssl version in windows builds does not support renegotiation In-Reply-To: <1344006576.37.0.61147044371.issue15549@psf.upfronthosting.co.za> Message-ID: <1404376055.6.0.236647810209.issue15549@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> out of date stage: -> resolved status: open -> closed versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 10:28:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 08:28:15 +0000 Subject: [issue12857] Expose called function on frame object In-Reply-To: <1314683667.85.0.876885324202.issue12857@psf.upfronthosting.co.za> Message-ID: <1404376095.83.0.976973405712.issue12857@psf.upfronthosting.co.za> Mark Lawrence added the comment: Note that #13672 referred to in msg156962 refers to #13855. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 10:30:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 08:30:15 +0000 Subject: [issue13855] Add qualname support to types.FunctionType In-Reply-To: <1327436087.83.0.0965982153281.issue13855@psf.upfronthosting.co.za> Message-ID: <1404376215.91.0.161662760626.issue13855@psf.upfronthosting.co.za> Mark Lawrence added the comment: Note that #13672 refers to #12857. ---------- nosy: +BreamoreBoy type: behavior -> enhancement versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 10:36:34 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 03 Jul 2014 08:36:34 +0000 Subject: [issue13672] Add co_qualname attribute in code objects In-Reply-To: <1325100000.16.0.854542819355.issue13672@psf.upfronthosting.co.za> Message-ID: <1404376594.58.0.864927864867.issue13672@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 10:38:29 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 08:38:29 +0000 Subject: [issue13940] imaplib: Mailbox names are not quoted In-Reply-To: <1328357098.01.0.78801274991.issue13940@psf.upfronthosting.co.za> Message-ID: <1404376709.72.0.591447762506.issue13940@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Joe sorry for the delay in getting back to you. @David is this within your remit? ---------- nosy: +BreamoreBoy, r.david.murray versions: +Python 3.4, Python 3.5 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 10:41:32 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 08:41:32 +0000 Subject: [issue13946] readline completer could return an iterable In-Reply-To: <1328471281.77.0.152059916947.issue13946@psf.upfronthosting.co.za> Message-ID: <1404376892.74.0.553149613657.issue13946@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is this a good, bad or indifferent idea? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 10:43:06 2014 From: report at bugs.python.org (Andy Maier) Date: Thu, 03 Jul 2014 08:43:06 +0000 Subject: [issue10031] Withdraw anti-recommendation of relative imports from documentation In-Reply-To: <1286309891.2.0.339569302596.issue10031@psf.upfronthosting.co.za> Message-ID: <1404376986.51.0.383746527582.issue10031@psf.upfronthosting.co.za> Andy Maier added the comment: Hi, I would like to revive this issue, and have a few comments: 1. In Darren's original proposal, I suggest to say "implicit (old-style) relative imports" instead of "old-style relative imports", because that is the term used in the Python Tutorial (the description of the ?import? statement in 2.7 does not mention implicit relative imports at all). 2. It seems to me that David's suggestion is already reflected in the original proposal. Or maybe I don't understand it right... 3. I agree with ?ric's comment that implicit relative imports should still be explained. However, I'm not sure that needs to be done in the FAQ. After all, the FAQ does not explain absolute or explicit relative imports either, and spending more words on the discouraged approach than on the recommended approaches does not seem appropriate to me. 4. I have to say that I'm generally unhappy if I see PEPs mentioned as a specification ("See PEP 328 for details"). I have sympathy for referencing PEPs as background information and for the rationales they usually contain. Could we reference the description of the ?import? statement for details, instead of referencing the PEP (in both FAQs)? Andy ---------- nosy: +andymaier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 10:47:21 2014 From: report at bugs.python.org (Jan Kanis) Date: Thu, 03 Jul 2014 08:47:21 +0000 Subject: [issue21571] Python build should check CPATH, C_INCLUDE_PATH for module dependencies In-Reply-To: <1400966978.12.0.900228617975.issue21571@psf.upfronthosting.co.za> Message-ID: <1404377241.45.0.332537661269.issue21571@psf.upfronthosting.co.za> Jan Kanis added the comment: I can write a patch. I haven't signed a contributor agreement but I have no problem doing so. I am not sure when I will have time to write a patch though, so it could take some time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 11:06:58 2014 From: report at bugs.python.org (Andy Maier) Date: Thu, 03 Jul 2014 09:06:58 +0000 Subject: [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1404378418.43.0.227485594136.issue10225@psf.upfronthosting.co.za> Andy Maier added the comment: Hi, I would like to revive this issue and have added a review comment to issue10225-py3k.diff. Otherwise, I have reviewed the changes in both diffs and think they are good to go. Andy ---------- nosy: +andymaier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 11:29:04 2014 From: report at bugs.python.org (Claudiu Popa) Date: Thu, 03 Jul 2014 09:29:04 +0000 Subject: [issue20069] Add unit test for os.chown In-Reply-To: <1388053703.09.0.645818054692.issue20069@psf.upfronthosting.co.za> Message-ID: <1404379744.09.0.85518966053.issue20069@psf.upfronthosting.co.za> Changes by Claudiu Popa : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 11:38:29 2014 From: report at bugs.python.org (Jan Kanis) Date: Thu, 03 Jul 2014 09:38:29 +0000 Subject: [issue21910] File protocol should document if writelines must handle generators sensibly Message-ID: <1404380309.75.0.473808735546.issue21910@psf.upfronthosting.co.za> New submission from Jan Kanis: The resolution of issue 5445 should be documented somewhere properly, so people can depend on it or not. IOBase.writelines handles generator arguments without problems, i.e. without first draining the entire generator and then writing the result in one go. That would require large amounts of memory if the generator is large, and fail entirely if the generator is infinite. codecs.StreamWriter.writelines uses self.write(''.join(argument)) as implementation, which fails on very large or infinite arguments. According to issue 5445 it is not part of the file protocol that .writelines must handle (large/infinite) generators, only list-like iterables. However as far as I know this is not documented anywhere, and sometimes people assume that writelines is meant for this case. E.g. jinja (https://github.com/mitsuhiko/jinja2/blob/master/jinja2/environment.py#L1153, the dump method is explicitly documented to stream). The guarantees that .writelines makes or does not make in this regard should be documented somewhere, so that either .writeline implementations that don't handle large generators can be pointed out as bugs, or code that makes assumptions on .writeline handling large generators can be. I personally think .writelines should handle large generators, since in the python 3 world a lot of apis were iterator-ified and it is wat a lot of people would probably expect. But having a clear and documented decision on this is more important. (note: I've copied most of the nosy list from #5445) ---------- assignee: docs at python components: Documentation, IO messages: 222165 nosy: JanKanis, benjamin.peterson, dlesco, docs at python, hynek, lemburg, pitrou, stutzbach, terry.reedy priority: normal severity: normal status: open title: File protocol should document if writelines must handle generators sensibly 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 Thu Jul 3 11:38:33 2014 From: report at bugs.python.org (Claudiu Popa) Date: Thu, 03 Jul 2014 09:38:33 +0000 Subject: [issue21151] winreg.SetValueEx causes crash if value = None In-Reply-To: <1396581421.46.0.554143633373.issue21151@psf.upfronthosting.co.za> Message-ID: <1404380313.08.0.835636463503.issue21151@psf.upfronthosting.co.za> Changes by Claudiu Popa : ---------- nosy: +steve.dower, zach.ware priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 11:51:54 2014 From: report at bugs.python.org (Andy Maier) Date: Thu, 03 Jul 2014 09:51:54 +0000 Subject: [issue10536] Enhancements to gettext docs In-Reply-To: <1290730924.88.0.289473332428.issue10536@psf.upfronthosting.co.za> Message-ID: <1404381114.83.0.578120424573.issue10536@psf.upfronthosting.co.za> Andy Maier added the comment: ?ric, I have reviewed the patch, and have one minor comment on it (see review page). Otherwise, I think it is good to go into v3 (The version list for this issue also shows 2.7, and the 2.7 version of this file is quite different from the v3 tip version, so a backport is still needed). Barry's review I think is also still needed :-) My 2 cents on your questions to Barry: On 3): I like your proposal. On a): Can you be more specific on where it is POSIX specific, and what the issue is with that? On b): After understanding that your comment is about the v3 version, I agree with the comment in general. However, the set of functions changes between 2.7 and 3.x tip (for example, ugettext() from v2 is no longer in v3 because gettext() now returns Unicode strings), and if people try to understand what changed, I think it would be helpful to be more explicit, particularly because the v2 text is also explicit. So I would leave the "Unicode string" verbiage unchanged. But I don't have a strong opinion on this and can go either way. Andy ---------- nosy: +andymaier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 12:19:33 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 03 Jul 2014 10:19:33 +0000 Subject: [issue21906] Tools\Scripts\md5sum.py doesn't work in Python 3.x In-Reply-To: <1404315532.22.0.153511853972.issue21906@psf.upfronthosting.co.za> Message-ID: <1404382773.04.0.334236717522.issue21906@psf.upfronthosting.co.za> Changes by Josh Rosenberg : ---------- nosy: +josh.rosenberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 12:25:35 2014 From: report at bugs.python.org (Claudiu Popa) Date: Thu, 03 Jul 2014 10:25:35 +0000 Subject: [issue21740] doctest doesn't allow duck-typing callables In-Reply-To: <1402606753.04.0.326464066676.issue21740@psf.upfronthosting.co.za> Message-ID: <1404383135.69.0.285574575803.issue21740@psf.upfronthosting.co.za> Claudiu Popa added the comment: Here's a test patch which uses inspect.unwrap. Unfortunately, I can't test with numba, so I don't know if it works for that, but any decorated function which uses `functools.update_wrapper` or `wraps` should be detected by doctest. ---------- keywords: +patch Added file: http://bugs.python.org/file35838/issue21740.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 14:33:14 2014 From: report at bugs.python.org (Ram Rachum) Date: Thu, 03 Jul 2014 12:33:14 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length Message-ID: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> New submission from Ram Rachum: Ditto for lists and any other place this could be applicable. ---------- components: Interpreter Core messages: 222168 nosy: cool-RR priority: normal severity: normal status: open title: "IndexError: tuple index out of range" should include the requested index and tuple length type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 14:36:52 2014 From: report at bugs.python.org (Ram Rachum) Date: Thu, 03 Jul 2014 12:36:52 +0000 Subject: [issue20218] Add methods to `pathlib.Path`: `write_text`, `read_text`, `write_bytes`, `read_bytes` In-Reply-To: <1389380693.53.0.752641621162.issue20218@psf.upfronthosting.co.za> Message-ID: <1404391012.36.0.225910583591.issue20218@psf.upfronthosting.co.za> Changes by Ram Rachum : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 14:37:24 2014 From: report at bugs.python.org (Ram Rachum) Date: Thu, 03 Jul 2014 12:37:24 +0000 Subject: [issue20663] Introduce exception argument to iter In-Reply-To: <1392659027.56.0.320916972318.issue20663@psf.upfronthosting.co.za> Message-ID: <1404391044.36.0.565775240086.issue20663@psf.upfronthosting.co.za> Ram Rachum added the comment: Hey-ho... Anyone feels like implementing this? (I don't program in C so I can't.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 14:38:03 2014 From: report at bugs.python.org (Ram Rachum) Date: Thu, 03 Jul 2014 12:38:03 +0000 Subject: [issue18212] No way to check whether Future is finished? In-Reply-To: <1371216345.77.0.119966223843.issue18212@psf.upfronthosting.co.za> Message-ID: <1404391083.34.0.512014704212.issue18212@psf.upfronthosting.co.za> Ram Rachum added the comment: What do you think about exposing this directly? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 14:44:01 2014 From: report at bugs.python.org (Jonas Diemer) Date: Thu, 03 Jul 2014 12:44:01 +0000 Subject: [issue21912] Deferred logging may use outdated references Message-ID: <1404391441.7.0.556517344659.issue21912@psf.upfronthosting.co.za> New submission from Jonas Diemer: I was having trouble with the logging module under Jython: I was getting seemingly sporadic wierd null pointer exceptions in the logging code. The problem seemed to be related to references that were passed to the logger, e.g. logger.debug("My object: %s", myObject) It seems that logging defers the actual string formatting (maybe only when logging to files). By the time the string is formatted, the reference to the object may no longer be valid. In my case, myObject was a reference to a Java-class that had been invalidated. Initially, I thought this was only a Java issue. But it seems like this could be an issue with pure Python scripts as well. E.g., what happens if the object behind myObject is changed after the call to debug(), but before the actual log message is formatted? ---------- components: Library (Lib) messages: 222171 nosy: Jonas.Diemer priority: normal severity: normal status: open title: Deferred logging may use outdated references type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 14:55:28 2014 From: report at bugs.python.org (Jonas Diemer) Date: Thu, 03 Jul 2014 12:55:28 +0000 Subject: [issue21912] Deferred logging may use outdated references In-Reply-To: <1404391441.7.0.556517344659.issue21912@psf.upfronthosting.co.za> Message-ID: <1404392128.3.0.630623256779.issue21912@psf.upfronthosting.co.za> Jonas Diemer added the comment: Find attached a demo script that causes the erratic behavior in regular Python (2.7.5 on Windows). The log file contains two lines, both show the new name of the object, although the first debug() was called befor the name change. I think this problem could be avoided if the message was formatted earlier (i.e. synchronous to the debug() call). ---------- Added file: http://bugs.python.org/file35839/testlogging.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 15:09:29 2014 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 03 Jul 2014 13:09:29 +0000 Subject: [issue12842] Docs: first parameter of tp_richcompare() always has the correct type In-Reply-To: <1314304285.47.0.471516118599.issue12842@psf.upfronthosting.co.za> Message-ID: <1404392969.24.0.992267137346.issue12842@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed in 71a0743f36db and 06bdd7e8fffd ---------- nosy: +asvetlov resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.4, Python 3.5 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 15:12:09 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jul 2014 13:12:09 +0000 Subject: [issue21755] test_importlib.test_locks fails --without-threads In-Reply-To: <1402734149.6.0.706440396249.issue21755@psf.upfronthosting.co.za> Message-ID: <1404393129.5.0.337715790008.issue21755@psf.upfronthosting.co.za> R. David Murray added the comment: What is the reason for using the conditional approach rather than a skip decorator? Does it not work in this context, or is it just that you copied the existing approach? It's fine either way, but I'm curious. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 15:14:34 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 03 Jul 2014 13:14:34 +0000 Subject: [issue21912] Deferred logging may use outdated references In-Reply-To: <1404391441.7.0.556517344659.issue21912@psf.upfronthosting.co.za> Message-ID: <1404393274.86.0.432423238994.issue21912@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 15:14:45 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jul 2014 13:14:45 +0000 Subject: [issue13940] imaplib: Mailbox names are not quoted In-Reply-To: <1328357098.01.0.78801274991.issue13940@psf.upfronthosting.co.za> Message-ID: <1404393285.72.0.526605002653.issue13940@psf.upfronthosting.co.za> R. David Murray added the comment: Yes. It will be necessary to check the RFC to figure out what should be done here. ---------- components: +email nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 15:21:47 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jul 2014 13:21:47 +0000 Subject: [issue21912] Deferred logging may use outdated references In-Reply-To: <1404391441.7.0.556517344659.issue21912@psf.upfronthosting.co.za> Message-ID: <1404393707.71.0.352443320648.issue21912@psf.upfronthosting.co.za> R. David Murray added the comment: The whole point of the logging API is that the message is *not* formatted unless the message is actually emitted. So this is just how logging works, not something that can be fixed, as far as I can see. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 15:26:11 2014 From: report at bugs.python.org (Jonas Diemer) Date: Thu, 03 Jul 2014 13:26:11 +0000 Subject: [issue21912] Deferred logging may use outdated references In-Reply-To: <1404391441.7.0.556517344659.issue21912@psf.upfronthosting.co.za> Message-ID: <1404393971.73.0.971852119784.issue21912@psf.upfronthosting.co.za> Jonas Diemer added the comment: I see your point. The decision whether to log or not is actually made synchronously to the actual logging call, as far as I can tell (i.e. "if self.isEnabledFor..." is checked directly in debug()). So at this place, the formatting could already happen. I don't see a reason to defer the formatting to the actual output of the messages (other than the current implementation of logging). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 15:50:56 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 13:50:56 +0000 Subject: [issue14014] codecs.StreamWriter.reset contract not fulfilled In-Reply-To: <1329242513.77.0.581823861095.issue14014@psf.upfronthosting.co.za> Message-ID: <1404395456.02.0.9949387906.issue14014@psf.upfronthosting.co.za> Mark Lawrence added the comment: On Windows 7 206 codecs tests passed and 4 skipped with the patch included. ---------- keywords: +patch nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 Added file: http://bugs.python.org/file35840/Issue14014.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 15:59:23 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 13:59:23 +0000 Subject: [issue14076] sqlite3 module ignores placeholders in CREATE TRIGGER code In-Reply-To: <1329853172.58.0.728674289337.issue14076@psf.upfronthosting.co.za> Message-ID: <1404395963.0.0.192235603455.issue14076@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we have a reply to this please as I don't understand enough about sqlite3 to comment. ---------- nosy: +BreamoreBoy title: sqlite3 module ignores placeholers in CREATE TRIGGER code -> sqlite3 module ignores placeholders in CREATE TRIGGER code _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 16:01:35 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 14:01:35 +0000 Subject: [issue14121] add a convenience C-API function for unpacking iterables In-Reply-To: <1330161121.09.0.794717935446.issue14121@psf.upfronthosting.co.za> Message-ID: <1404396095.84.0.590997566691.issue14121@psf.upfronthosting.co.za> Mark Lawrence added the comment: Apparently not :) ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 16:02:54 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 14:02:54 +0000 Subject: [issue14124] _pickle.c comment/documentation improvement In-Reply-To: <1330203362.98.0.289163571674.issue14124@psf.upfronthosting.co.za> Message-ID: <1404396174.81.0.667503001607.issue14124@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we have a patch review on this please ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 16:05:47 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 14:05:47 +0000 Subject: [issue14189] Documentation for some C APIs is missing clear specification of the type of reference they return In-Reply-To: <1330834739.26.0.103894619612.issue14189@psf.upfronthosting.co.za> Message-ID: <1404396347.1.0.55672705717.issue14189@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can someone comment please as I'm not brave enough to touch the C code or docs. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 16:09:05 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jul 2014 14:09:05 +0000 Subject: [issue21912] Deferred logging may use outdated references In-Reply-To: <1404391441.7.0.556517344659.issue21912@psf.upfronthosting.co.za> Message-ID: <1404396545.73.0.697178748963.issue21912@psf.upfronthosting.co.za> R. David Murray added the comment: The decision as to whether or not to pass the message along to the next stage is made at numerous points in the pipeline. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 16:13:19 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 14:13:19 +0000 Subject: [issue14287] sys.stdin.readline and KeyboardInterrupt on windows In-Reply-To: <1331647625.41.0.2361094593.issue14287@psf.upfronthosting.co.za> Message-ID: <1404396799.55.0.213980885222.issue14287@psf.upfronthosting.co.za> Mark Lawrence added the comment: FWIW the same occurs on Windows 7 with 3.5.0 but given there are known differences between Windows and *nix is this really an issue? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 16:20:52 2014 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 03 Jul 2014 14:20:52 +0000 Subject: [issue21912] Deferred logging may use outdated references In-Reply-To: <1404391441.7.0.556517344659.issue21912@psf.upfronthosting.co.za> Message-ID: <1404397252.62.0.369065170931.issue21912@psf.upfronthosting.co.za> Vinay Sajip added the comment: > I don't see a reason to defer the formatting to the actual output of the messages (other than the current implementation of logging). The current implementation of logging is like that for a reason, even though you may not see it - it defers doing work until it is needed (which improves throughput). This idiom is hardly uncommon. If you don't want to delay formatting until output, you can always do logger.debug("My object: %s" % myObject) ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 16:26:10 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 14:26:10 +0000 Subject: [issue14293] Message methods delegated via __getattr__ inaccessible using super(). In-Reply-To: <1331676773.49.0.0306891177672.issue14293@psf.upfronthosting.co.za> Message-ID: <1404397570.7.0.269695223614.issue14293@psf.upfronthosting.co.za> Mark Lawrence added the comment: @David I believe this is one for your TODO list. ---------- components: +email -Library (Lib) nosy: +BreamoreBoy, barry type: -> behavior versions: +Python 3.4, Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 16:33:38 2014 From: report at bugs.python.org (Jonas Diemer) Date: Thu, 03 Jul 2014 14:33:38 +0000 Subject: [issue21912] Deferred logging may use outdated references In-Reply-To: <1404391441.7.0.556517344659.issue21912@psf.upfronthosting.co.za> Message-ID: <1404398018.67.0.593587206493.issue21912@psf.upfronthosting.co.za> Jonas Diemer added the comment: Thanks for the explanation. Throughput is a valid reason. Your workaround does of course work, but it means that the string formatting is always done, even if the message is filtered out. Is this delayed logging behavior documented in any way (maybe I have overread it)? I am just trying to help people who may stumble upon this, as it cost me quite some time to figure out the resulting weird errors (especially in conjunction with Jython, which doesn't make debugging easier). By the way, my workaround is a little different: I "forked" logging and am catching exceptions during the string formatting. This way, I can at least print out the affected logging calls for me to fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 16:39:30 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Jul 2014 14:39:30 +0000 Subject: [issue21905] RuntimeError in pickle.whichmodule when sys.modules if mutated In-Reply-To: <1404306192.8.0.184744206475.issue21905@psf.upfronthosting.co.za> Message-ID: <1404398370.85.0.31663098202.issue21905@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sounds fine, but you should at least add a comment explaining the list() call. ---------- nosy: +alexandre.vassalotti, pitrou stage: -> patch review type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 16:42:31 2014 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 03 Jul 2014 14:42:31 +0000 Subject: [issue21912] Deferred logging may use outdated references In-Reply-To: <1404391441.7.0.556517344659.issue21912@psf.upfronthosting.co.za> Message-ID: <1404398551.95.0.18554639658.issue21912@psf.upfronthosting.co.za> Vinay Sajip added the comment: > but it means that the string formatting is always done Not if you use logger.isEnabledFor(level) as a guard to avoid unnecessary work :-) > I "forked" logging and am catching exceptions during the string formatting That might work with Jython and invalidated objects, but in the case of e.g. CPython (where the objects can't be invalidated/garbage collected as there is a reference to them in the LogRecord for the logged event) I don't see how that approach is generally applicable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 16:56:20 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 14:56:20 +0000 Subject: [issue14301] xmlrpc client transport and threading problem In-Reply-To: <1331735658.17.0.761953257498.issue14301@psf.upfronthosting.co.za> Message-ID: <1404399380.59.0.963612469453.issue14301@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Kees sorry for the delay in getting back to you. @Martin can you comment on this please. ---------- components: +Library (Lib) -None nosy: +BreamoreBoy, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 16:59:44 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 14:59:44 +0000 Subject: [issue10485] http.server fails when query string contains addition '?' characters In-Reply-To: <1290325094.43.0.114667735532.issue10485@psf.upfronthosting.co.za> Message-ID: <1404399584.01.0.907321583696.issue10485@psf.upfronthosting.co.za> Mark Lawrence added the comment: Slipped under the radar? ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 2.6, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 16:54:53 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 03 Jul 2014 14:54:53 +0000 Subject: [issue21755] test_importlib.test_locks fails --without-threads In-Reply-To: <1402734149.6.0.706440396249.issue21755@psf.upfronthosting.co.za> Message-ID: <1404399293.17.0.777568308551.issue21755@psf.upfronthosting.co.za> Berker Peksag added the comment: > Does it not work in this context Yes, it doesn't work after 34d65746d5ca because LOCK_TYPES is an empty dict (test_util.test_both() can't find the 'Frozen' and 'Source' keys in it) when Python is built without threads. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 17:04:30 2014 From: report at bugs.python.org (Olivier Grisel) Date: Thu, 03 Jul 2014 15:04:30 +0000 Subject: [issue21905] RuntimeError in pickle.whichmodule when sys.modules if mutated In-Reply-To: <1404306192.8.0.184744206475.issue21905@psf.upfronthosting.co.za> Message-ID: <1404399870.82.0.0921514873132.issue21905@psf.upfronthosting.co.za> Olivier Grisel added the comment: New version of the patch to add an inline comment. ---------- Added file: http://bugs.python.org/file35841/pickle_whichmodule_20140703.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 17:21:52 2014 From: report at bugs.python.org (Jonas Diemer) Date: Thu, 03 Jul 2014 15:21:52 +0000 Subject: [issue21912] Deferred logging may use outdated references In-Reply-To: <1404398551.95.0.18554639658.issue21912@psf.upfronthosting.co.za> Message-ID: Jonas Diemer added the comment: 2014-07-03 16:42 GMT+02:00 Vinay Sajip : > > I "forked" logging and am catching exceptions during the string > formatting > > That might work with Jython and invalidated objects, but in the case of > e.g. CPython (where the objects can't be invalidated/garbage collected as > there is a reference to them in the LogRecord for the logged event) I don't > see how that approach is generally applicable. True, it only helps for Jython. Still, I suggest adding this behavior to the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 17:23:10 2014 From: report at bugs.python.org (Andy Maier) Date: Thu, 03 Jul 2014 15:23:10 +0000 Subject: [issue14050] Tutorial, list.sort() and items comparability In-Reply-To: <1329584329.12.0.545057513034.issue14050@psf.upfronthosting.co.za> Message-ID: <1404400990.98.0.603566496709.issue14050@psf.upfronthosting.co.za> Andy Maier added the comment: Just out of curiosity: Why do the patches attached to this issue not have a "review" link? Also, both (2.7 and 3.2) patches do not line up with the current 2.7 and 3.x tip, both hunks get rejected. Comments on both patches: 1. It would be helpful if the text "Each item needs to define an ordering relationship." was followed by a statement about what happens when that is not the case (that is what Ezio also suggested), and where to look for details on how to define an ordering relationship. The problem with that is that there is no good place that is devoted to exactly that. The relatively best place for defining comparison I found so far is: https://docs.python.org/2.7/tutorial/datastructures.html#comparing-sequences-and-other-types and its 3.x equivalent. 2. The example that raises the TypeError is not needed, IMHO. This puts too much focus on the case that does not work. If we mention in the description that a TypeError is raised, that should be sufficient. Andy ---------- nosy: +andymaier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 18:04:14 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 03 Jul 2014 16:04:14 +0000 Subject: [issue21151] winreg.SetValueEx causes crash if value = None In-Reply-To: <1396581421.46.0.554143633373.issue21151@psf.upfronthosting.co.za> Message-ID: <3h43yk0fdxz7LlP@mail.python.org> Roundup Robot added the comment: New changeset f2e6c33ce3e9 by Zachary Ware in branch '2.7': Issue #21151: Fixed a segfault in the _winreg module. http://hg.python.org/cpython/rev/f2e6c33ce3e9 New changeset 0c5a1835af91 by Zachary Ware in branch '3.4': Issue #21151: Fixed a segfault in the winreg module. http://hg.python.org/cpython/rev/0c5a1835af91 New changeset 21cfbcacf0d8 by Zachary Ware in branch 'default': Closes #21151: Merge with 3.4 http://hg.python.org/cpython/rev/21cfbcacf0d8 ---------- nosy: +python-dev resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 18:07:44 2014 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 03 Jul 2014 16:07:44 +0000 Subject: [issue14050] Tutorial, list.sort() and items comparability In-Reply-To: <1329584329.12.0.545057513034.issue14050@psf.upfronthosting.co.za> Message-ID: <1404403664.17.0.124113444108.issue14050@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Why do the patches attached to this issue not have a "review" link? because > both (2.7 and 3.2) patches do not line up with the current > 2.7 and 3.x tip, both hunks get rejected. The "review" link only appears if the patch applies cleanly on the "default" branch. Preparing a new patch against "default" should make the link appear. ---------- type: -> enhancement versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 18:08:31 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 03 Jul 2014 16:08:31 +0000 Subject: [issue21151] winreg.SetValueEx causes crash if value = None In-Reply-To: <1396581421.46.0.554143633373.issue21151@psf.upfronthosting.co.za> Message-ID: <1404403711.78.0.494422914567.issue21151@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks to Dave for the report, eryksun for the suggestion, and John for the patch! I'm not sure why the test case doesn't fail on a regular test run on Python 3; it looks like BYTE *data starts out as NULL when Python is not in interactive mode, which makes no sense to me. The test case does crash on unpatched 2.7, though, so it's a legitimate test in my view. ---------- assignee: -> zach.ware components: +Extension Modules -Library (Lib) priority: high -> normal versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 18:47:35 2014 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 03 Jul 2014 16:47:35 +0000 Subject: [issue14069] In extensions (?...) the lookbehind assertion cannot choose between the beginning of string and a letter In-Reply-To: <1329792959.02.0.649716496368.issue14069@psf.upfronthosting.co.za> Message-ID: <1404406055.45.0.226435660011.issue14069@psf.upfronthosting.co.za> Ezio Melotti added the comment: I believe this is not a bug. As the error says a look-behind requires the pattern to have a fixed length. In re.search(r'(?<=(a|b))(\w+)', 'abc').groups() the two possible patterns in the look behind are "a" and "b", both with length 1. In re.search(r'(?<=(^|$))(\w+)', 'abc').groups() the two possible patterns in the look behind are "^" and "$", both with length 0. In re.search(r'(?<=(^|a))(\w+)', 'abc').groups() the two possible patterns in the look behind are "^" and "a", one with length 0 and the other with length 1. This is not allowed and raises an error. Similarly, in re.search(r'(?<=(ab|a))(\w+)', 'abc').groups() the two patterns have length 2 and 1, and the same error is raised. Closing as not a bug. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 18:52:51 2014 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 03 Jul 2014 16:52:51 +0000 Subject: [issue15722] PEP 3121, 384 Refactoring applied to decimal module In-Reply-To: <1345293070.72.0.383930872934.issue15722@psf.upfronthosting.co.za> Message-ID: <1404406371.13.0.604822628467.issue15722@psf.upfronthosting.co.za> Ezio Melotti added the comment: This sounds like a question for python-dev (or perhaps python-ideas). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 19:09:47 2014 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 03 Jul 2014 17:09:47 +0000 Subject: [issue21912] Deferred logging may use outdated references In-Reply-To: <1404391441.7.0.556517344659.issue21912@psf.upfronthosting.co.za> Message-ID: <1404407387.53.0.492040355496.issue21912@psf.upfronthosting.co.za> Vinay Sajip added the comment: > Still, I suggest adding this behavior to the documentation. It is already in the documentation. For example, https://docs.python.org/2/library/logging.html#logging.Formatter.format https://docs.python.org/2/howto/logging.html#optimization This behaviour has been in logging from the beginning. Generally, people have regarded it as desirable (when an opinion has been expressed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 19:21:31 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 03 Jul 2014 17:21:31 +0000 Subject: [issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows In-Reply-To: <1277827107.42.0.0793977492373.issue9116@psf.upfronthosting.co.za> Message-ID: <1404408091.43.0.431321734773.issue9116@psf.upfronthosting.co.za> Zachary Ware added the comment: With the popup-supression context manager from #11732 in use and the buildbots using the regrtest '-n' option, I think we're at the point of being "fixed enough" and vote to close this issue. I'll leave the final decision to someone with a deeper understanding of the issue, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 19:22:23 2014 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 03 Jul 2014 17:22:23 +0000 Subject: [issue21185] heapq fails to print in sorted order for certain inputs In-Reply-To: <1397030793.41.0.486579475537.issue21185@psf.upfronthosting.co.za> Message-ID: <1404408143.85.0.72252318071.issue21185@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 19:43:22 2014 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 03 Jul 2014 17:43:22 +0000 Subject: [issue21051] incorrect utf-8 conversion with c api In-Reply-To: <1395677822.9.0.352855585113.issue21051@psf.upfronthosting.co.za> Message-ID: <1404409402.13.0.233712243755.issue21051@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 19:51:26 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 17:51:26 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1404409886.14.0.736050047801.issue19279@psf.upfronthosting.co.za> Mark Lawrence added the comment: To repeat the question do we or don't we fix this in 3.2? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 20:19:36 2014 From: report at bugs.python.org (Andy Maier) Date: Thu, 03 Jul 2014 18:19:36 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1404411576.15.0.195397865568.issue12067@psf.upfronthosting.co.za> Andy Maier added the comment: Hi, I'd like to revive this issue. IMHO, the changes in issue12067-expressions_v2.diff go too far. I don't think that deleting the entire section about the details of comparing objects of the same type makes sense. I agree with Terry's statement in msg170936 that the chapter is about the operators and not about the ways to customize them, so some of what the patch introduces in that area should not be introduced. So far, that means that I'm pretty much against that patch entirely... Having said that, I do believe that there are still issues: 1. both the 2.7 and 3.x sections about the comparison operators are sufficiently convoluted and could be organized better by grouping the various statements that are made, into categories like this: - comparisons involving objects of user-defined types - comparing objects of same built-in type - comparing objects of differing built-in type 2. There are still some errors, ambiguities and omissions that need to be fixed. For example, in the 3.x version: a) omission about treatment of NaN for numbers of different type (could in theory be implied from the statement "are converted to same type", but that statement is problematic as was pointed out in Mark's comment on this issue). b) Amgiguous statement "Most numeric types [of same type] can be compared with one another.". I think what is true is that all built-in numeric types (including Fraction and Decimal) compare mathematically correct in 3.x, and that the only non-support is that complex numbers are not considered orderable and an attempt to use an ordering operator raises TypeError. c) Ambiguous statement "When cross-type comparison is not supported, the comparison method returns NotImplemented.". If this is about the customization methods, it should not be here, but there. Here, it is relevant that a TypeError is raised when using the operator. d) Terminology in "Bytes objects are compared lexicographically using the numeric values of their elements.": Chapter [4.8.1. Bytes] defines bytes objects as immutable sequences of single bytes (not elements). e) Terminology in "Tuples and lists are compared lexicographically using comparison of corresponding elements.": lists and tuples contain "items" not "elements", and an item-wise comparison should not be called "lexicographically" because that makes sense only when the items are characters. f) Ambiguity in "If not equal, the sequences are ordered the same as their first differing elements.": "Are ordered" could be interpreted (e.g. by non-native speakers) to mean that the sequence is changed to achieve that ordering, which is not the case of course. g) Editorial: In the list item about sets and froze sets, the example set {2,3} is not in example font. h) Omission: Range types are not covered. i) Omission: The section "Comparison of objects of differing types..." is silent about which built-in types support comparison across types (except for numeric types where that is covered). I think that should be explicitly listed for those built-in types that are also listed explicitly in the section about comparing objects of same type. I'll try to come up with a patch for 3.x, and once that is agreed, with one for 2.x. Andy ---------- nosy: +andymaier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 20:48:49 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 03 Jul 2014 18:48:49 +0000 Subject: [issue15014] smtplib: add support for arbitrary auth methods In-Reply-To: <1338970281.71.0.834699818603.issue15014@psf.upfronthosting.co.za> Message-ID: <3h47cc1vLXz7LjT@mail.python.org> Roundup Robot added the comment: New changeset 42917d774476 by R David Murray in branch 'default': #15014: Add 'auth' command to implement auth mechanisms and use it in login. http://hg.python.org/cpython/rev/42917d774476 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 20:55:30 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jul 2014 18:55:30 +0000 Subject: [issue15014] smtplib: add support for arbitrary auth methods In-Reply-To: <1338970281.71.0.834699818603.issue15014@psf.upfronthosting.co.za> Message-ID: <1404413730.22.0.124604706716.issue15014@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Milan. I made some tweaks...mostly documentation and code style (your code style wasn't wrong, I just have some slightly different preferences with regards to line folding). I also eliminated the authobjects test method, since I didn't see that it added anything to duplicate the code from the login method to test them...they get tested via the login methods. Instead I added the loop to the test for the auth method, so that we test that calling the public API with the auth objects that are documented as part of the public API work. That is, if someone were to change login such that the method names changed but login still worked, the auth test method will throw an error because the documented method names changed. I'm attaching the final patch here so you can look at the differences via the reitveld patch-diff function, if you want to. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed Added file: http://bugs.python.org/file35842/smtplib_auth.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 20:57:47 2014 From: report at bugs.python.org (Andy Maier) Date: Thu, 03 Jul 2014 18:57:47 +0000 Subject: [issue14050] Tutorial, list.sort() and items comparability In-Reply-To: <1329584329.12.0.545057513034.issue14050@psf.upfronthosting.co.za> Message-ID: <1404413867.66.0.66584426421.issue14050@psf.upfronthosting.co.za> Andy Maier added the comment: Ah! I was somehow suspecting that. Thanks for clarifying! I'll prepare a patch. To correct my earlier message, the best place to link for comparisons is probably the Conparisons subchapter of the Expressions chapter in the reference. See also issue12067. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 21:04:44 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jul 2014 19:04:44 +0000 Subject: [issue14050] Tutorial, list.sort() and items comparability In-Reply-To: <1329584329.12.0.545057513034.issue14050@psf.upfronthosting.co.za> Message-ID: <1404414284.2.0.506723574363.issue14050@psf.upfronthosting.co.za> R. David Murray added the comment: The review link will also appear if the patch is generated via hg diff with diff.git turned *off*. You will note that both existing patches use --git, which omits parent changeset information, so our system can't figure out what to apply them against in order to generate the review link. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 21:34:32 2014 From: report at bugs.python.org (Andy Maier) Date: Thu, 03 Jul 2014 19:34:32 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1404416072.24.0.312460514079.issue12067@psf.upfronthosting.co.za> Changes by Andy Maier : ---------- versions: +Python 3.5 -Python 3.2, Python 3.3 Added file: http://bugs.python.org/file35843/issue12067-expressions_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 21:35:35 2014 From: report at bugs.python.org (Andy Maier) Date: Thu, 03 Jul 2014 19:35:35 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1404416135.02.0.483351588901.issue12067@psf.upfronthosting.co.za> Andy Maier added the comment: Uploaded issue12067-expressions_v3.diff for the 3.5 tip. Please review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 22:19:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 20:19:01 +0000 Subject: [issue16037] httplib: header parsing is unlimited In-Reply-To: <1348568722.91.0.654032066819.issue16037@psf.upfronthosting.co.za> Message-ID: <1404418741.36.0.87321881985.issue16037@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is any further work needed on this and similar issues #16038, #16040, #16041, #16042 and #16043 ? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 22:23:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 20:23:01 +0000 Subject: [issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix In-Reply-To: <1368799493.86.0.504478450601.issue17997@psf.upfronthosting.co.za> Message-ID: <1404418981.61.0.409238078865.issue17997@psf.upfronthosting.co.za> Mark Lawrence added the comment: For future reference how do I find out if this has been applied to 3.2? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 22:33:05 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 20:33:05 +0000 Subject: [issue18747] Re-seed OpenSSL's PRNG after fork In-Reply-To: <1376570101.71.0.249202475923.issue18747@psf.upfronthosting.co.za> Message-ID: <1404419585.88.0.937840015021.issue18747@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is this really an enhancement request or should it be a security issue? Which versions if any actually need work doing on them? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 22:47:52 2014 From: report at bugs.python.org (Stefan Krah) Date: Thu, 03 Jul 2014 20:47:52 +0000 Subject: [issue15722] PEP 3121, 384 Refactoring applied to decimal module In-Reply-To: <1345293070.72.0.383930872934.issue15722@psf.upfronthosting.co.za> Message-ID: <1404420472.7.0.801101633726.issue15722@psf.upfronthosting.co.za> Stefan Krah added the comment: Yes, python-ideas is probably better. -- I just noticed that the total slowdown is even 40% if the global variable "cached_context" is also placed into the module state (as it should). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 23:03:22 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 21:03:22 +0000 Subject: [issue16188] Windows C Runtime Library Mismatch In-Reply-To: <1349881591.31.0.873714475408.issue16188@psf.upfronthosting.co.za> Message-ID: <1404421402.67.0.29799736374.issue16188@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm not aware of any similar problems being reported with any Python version so can this be closed "not a bug" as was #14608 ? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 23:09:36 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 03 Jul 2014 21:09:36 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1404421776.25.0.596581459662.issue12067@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 23:11:09 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 03 Jul 2014 21:11:09 +0000 Subject: [issue14050] Tutorial, list.sort() and items comparability In-Reply-To: <1329584329.12.0.545057513034.issue14050@psf.upfronthosting.co.za> Message-ID: <1404421869.92.0.351967882062.issue14050@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 23:16:55 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 03 Jul 2014 21:16:55 +0000 Subject: [issue20663] Introduce exception argument to iter In-Reply-To: <1392659027.56.0.320916972318.issue20663@psf.upfronthosting.co.za> Message-ID: <1404422215.94.0.502745480396.issue20663@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Your suggestion and an example appears to have been taken directly from the itertools recipes: def iter_except(func, exception, first=None): """ Call a function repeatedly until an exception is raised. Converts a call-until-exception interface to an iterator interface. Like __builtin__.iter(func, sentinel) but uses an exception instead of a sentinel to end the loop. Examples: bsddbiter = iter_except(db.next, bsddb.error, db.first) heapiter = iter_except(functools.partial(heappop, h), IndexError) dictiter = iter_except(d.popitem, KeyError) dequeiter = iter_except(d.popleft, IndexError) queueiter = iter_except(q.get_nowait, Queue.Empty) setiter = iter_except(s.pop, KeyError) """ try: if first is not None: yield first() while 1: yield func() except exception: pass FWIW, this idea was explored before an aside from the examples given in the docstring above, it seems to have very limited application. Accordingly, it was left as a recipe and not added to itertools or the the iter() function. ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 23:21:54 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 03 Jul 2014 21:21:54 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404422513.99.0.425686604755.issue21911@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Why? Is there any known use case? The IndexError exception is commonly used for control flow. Slowing down the instantiation to add an index that no one really needs would be a waste. This exception has been around for 20+ years -- if they were an actual need, we would have known by now. To my eyes, this appears to be gratuitous feature creep. ---------- assignee: -> rhettinger nosy: +rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 23:25:35 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 03 Jul 2014 21:25:35 +0000 Subject: [issue21906] Tools\Scripts\md5sum.py doesn't work in Python 3.x In-Reply-To: <1404315532.22.0.153511853972.issue21906@psf.upfronthosting.co.za> Message-ID: <1404422735.01.0.0501898257039.issue21906@psf.upfronthosting.co.za> Zachary Ware added the comment: Hmmm, I was just reloading the page to post a patch I'd worked up, and lo and behold there's already one here! Here's mine anyway; you can use any parts of it that you like, Berker. There are a couple of not-quite-related changes in test_tools that might be better split into a separate issue, but there in there anyway. ---------- assignee: -> berker.peksag nosy: +zach.ware Added file: http://bugs.python.org/file35844/issue21906.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 23:27:38 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 03 Jul 2014 21:27:38 +0000 Subject: [issue21906] Tools\Scripts\md5sum.py doesn't work in Python 3.x In-Reply-To: <1404315532.22.0.153511853972.issue21906@psf.upfronthosting.co.za> Message-ID: <1404422858.15.0.894485592693.issue21906@psf.upfronthosting.co.za> Zachary Ware added the comment: Hmmm, I was just reloading the page to post a patch I'd worked up, and lo and behold there's already one here! Here's mine anyway; you can use any parts of it that you like, Berker. There are a couple of not-quite-related changes in test_tools that might be better split into a separate issue, but they're in there anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 23:27:48 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 03 Jul 2014 21:27:48 +0000 Subject: [issue21906] Tools\Scripts\md5sum.py doesn't work in Python 3.x In-Reply-To: <1404315532.22.0.153511853972.issue21906@psf.upfronthosting.co.za> Message-ID: <1404422868.82.0.732276380302.issue21906@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- Removed message: http://bugs.python.org/msg222217 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 23:30:26 2014 From: report at bugs.python.org (rlinscheer) Date: Thu, 03 Jul 2014 21:30:26 +0000 Subject: [issue16188] Windows C Runtime Library Mismatch In-Reply-To: <1349881591.31.0.873714475408.issue16188@psf.upfronthosting.co.za> Message-ID: <1404423026.81.0.0916312709782.issue16188@psf.upfronthosting.co.za> rlinscheer added the comment: Quite frankly, I'm beyond caring now. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 23:30:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 21:30:59 +0000 Subject: [issue11924] Pickle and copyreg modules don't document the interface In-Reply-To: <1303766863.75.0.154822649898.issue11924@psf.upfronthosting.co.za> Message-ID: <1404423059.35.0.100307362621.issue11924@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Jes?s can you provide a patch for this? ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 23:32:28 2014 From: report at bugs.python.org (Ram Rachum) Date: Thu, 03 Jul 2014 21:32:28 +0000 Subject: [issue20663] Introduce exception argument to iter In-Reply-To: <1392659027.56.0.320916972318.issue20663@psf.upfronthosting.co.za> Message-ID: <1404423148.1.0.111863030648.issue20663@psf.upfronthosting.co.za> Ram Rachum added the comment: I understand. Personally I think it'll be useful enough (and more useful to me than the builtin `sentinel`), but maybe that's just me. And I guess Terry liked it too. I don't know whether other people would like it as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 23:39:19 2014 From: report at bugs.python.org (Ram Rachum) Date: Thu, 03 Jul 2014 21:39:19 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404423559.04.0.717101059.issue21911@psf.upfronthosting.co.za> Ram Rachum added the comment: Raymond: I do take your point about performance, and I understand that if this results in a performance problem, then that's a good argument to not include this feature. But I'm baffled as to why you're asking me regarding this feature "Why? Is there any known use case?" Why do we have an exception text like "TypeError: f() takes 1 positional argument but 3 were given" instead of "TypeError: f() takes a different number of arguments than you tried to give it"? Why do we have "ImportError: No module named 'foobas'" instead of "ImportError: No such module"? Do I need to spell out the reason and all the different scenario in which these exception text are super useful? Why does an operation like `{}[42]` result in `KeyError: 42` instead of `KeyError: Key doesn't exist"? And now that I think about it, KeyError is used for control flow too, so why is it okay for it to contain the value, but on `IndexError` it's a no-no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 23:41:45 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Jul 2014 21:41:45 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1404423705.04.0.613864903589.issue19279@psf.upfronthosting.co.za> STINNER Victor added the comment: I suggest to close the issue. It's "just" another way to crash Python 3.2, like any other bug fix. Python 3.2 does not accept bug fixes anymore. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 3 23:43:48 2014 From: report at bugs.python.org (Lita Cho) Date: Thu, 03 Jul 2014 21:43:48 +0000 Subject: [issue21868] Tbuffer in turtle allows negative size In-Reply-To: <1403680225.27.0.922926576552.issue21868@psf.upfronthosting.co.za> Message-ID: <1404423828.37.0.439241516574.issue21868@psf.upfronthosting.co.za> Lita Cho added the comment: Hey Raymond, just wanted to ping you to see if you had a chance to review this patch yet. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 00:00:45 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 22:00:45 +0000 Subject: [issue12513] codec.StreamReaderWriter: issues with interlaced read-write In-Reply-To: <1310044367.3.0.915426685652.issue12513@psf.upfronthosting.co.za> Message-ID: <1404424845.38.0.532200243933.issue12513@psf.upfronthosting.co.za> Mark Lawrence added the comment: Codecs gurus FYI. ---------- nosy: +BreamoreBoy, doerwalter, lemburg type: -> behavior versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 00:02:12 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 03 Jul 2014 22:02:12 +0000 Subject: [issue14121] add a convenience C-API function for unpacking iterables In-Reply-To: <1330161121.09.0.794717935446.issue14121@psf.upfronthosting.co.za> Message-ID: <1404424932.91.0.365830834188.issue14121@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Regarding the redundancy, I don't think the C API should be expanded unnecessarily. Also, PyTuple_GET_ITEM() and its kin are very old, widely used, and very fast. I don't see a need to upset that apple cart. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 00:02:32 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 03 Jul 2014 22:02:32 +0000 Subject: [issue20663] Introduce exception argument to iter In-Reply-To: <1392659027.56.0.320916972318.issue20663@psf.upfronthosting.co.za> Message-ID: <1404424952.06.0.0149359311256.issue20663@psf.upfronthosting.co.za> Josh Rosenberg added the comment: +1; I've had several cases where I'd have used something like this (for the exact purpose mentioned, to destructively consume an input iterable). I don't think it's more or less useful than the sentinel version, which is convenient for iterating a file by blocks instead of by line, e.g.: from functools import partial with open('...', 'rb') as f: for block in iter(partial(f.read, 4096), b''): ... But it would still nice to be able to destructively iterate sequences, particularly in CPython, where doing it at the C level can get you atomicity without relying on anything beyond the GIL (and without wrapping infinite while loops in try/except: pass blocks, which is pointlessly verbose). One issue: You can't just make the second argument allow exception types as well, since it's possible (however unlikely) for an exception type to be a legitimate return type from a function. Making it keyword only would solve that problem though. ---------- nosy: +josh.rosenberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 00:09:49 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 03 Jul 2014 22:09:49 +0000 Subject: [issue2057] difflib: add patch capability In-Reply-To: <1202628772.22.0.236434867196.issue2057@psf.upfronthosting.co.za> Message-ID: <1404425389.86.0.804390285.issue2057@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't think this should be done. Python is primarily a language with a standard library, not a command-line development toolkit. We should avoid "mission creep". There are plenty of mature, robust, full-featured solutions already available. For example, when I was developing Python on Windows, I used the GNU Win32 toolkit. If anything, this ought to be an offering on PyPI. There is could live freely outside our rather slow release cycle which is too lethargic to respond the challenges that would inevitably arise with a new command-line tool (i.e. it won't handle input from some diff utility, or isn't robust against minor spacing issues or encoding issues, or it can't handle slightly offset hunks etc). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 00:12:23 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 22:12:23 +0000 Subject: [issue12854] PyOS_Readline usage in tokenizer ignores sys.stdin/sys.stdout In-Reply-To: <1314640965.12.0.413941920183.issue12854@psf.upfronthosting.co.za> Message-ID: <1404425543.43.0.109098996336.issue12854@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Albert sorry about the delay in responding to this. ---------- nosy: +BreamoreBoy type: -> behavior versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 00:19:44 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 03 Jul 2014 22:19:44 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404425984.27.0.593424628142.issue21911@psf.upfronthosting.co.za> Josh Rosenberg added the comment: TypeError also should be more specific because it can occur for a multitude of reasons; along with stuff like AttributeError, it's one of those exceptions that could arise from multiple causes on a single line of code, none of them obvious. For the specific case of passing the wrong number of arguments, that's usually a result of programmer error, not input errors to a valid program, so it's not a case worth optimizing. For control flow uses of TypeError (e.g. using duck typing to choose code paths), performance loss is a valid point. ImportError requires disambiguation for similar reasons (since a single import statement could error because the target module is missing, or because one of its dependencies fails to import; you need to be able to tell the difference, and a line number doesn't help). Beyond that, there is little cost to making fully detailed ImportErrors; if you're risking ImportErrors in your program's hot paths, something is wrong with your design. As for needing a use case: Every feature starts at minus 100 points (ref: http://blogs.msdn.com/b/ericgu/archive/2004/01/12/57985.aspx ). There is a limited amount of development and testing resources, more code means more opportunity for errors and increased disk and memory usage, etc. I agree that KeyError is a relevant comparison, though you'd be surprised how much cheaper indexing a sequence is relative to dictionary access; hashing and collision chaining are usually tripling or quadrupling the work relative to a simple integer lookup in a sequence. The more expensive the non-exceptional operation, the less you need to worry about the expense of the exceptional case, simply because the code was never going to run that quickly anyway. ---------- nosy: +josh.rosenberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 00:24:14 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 03 Jul 2014 22:24:14 +0000 Subject: [issue21868] Tbuffer in turtle allows negative size In-Reply-To: <1403680225.27.0.922926576552.issue21868@psf.upfronthosting.co.za> Message-ID: <1404426254.58.0.465823911483.issue21868@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I looked at this and marked it as high priority (crashes are an unacceptable outcome). The patch looks fine but I haven't had a chance to test it yet. If it passes muster, I'll apply it shortly (I'm overseas traveling this week). In the meantime, can you mark the "versions" in the tracker so I'll know in advance whether this applies to 2.7, 3.4 and 3.5? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 00:30:47 2014 From: report at bugs.python.org (Ram Rachum) Date: Thu, 03 Jul 2014 22:30:47 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404426647.81.0.620919899401.issue21911@psf.upfronthosting.co.za> Ram Rachum added the comment: Josh... The reason I gave all these examples of where Python gives detailed error messages, is not so you'd explain the obvious reason, which is that it makes it easier to debug, figure out what's wrong with your program, and fix it. The reason I gave these examples is that I'm baffled by this attitude that I see all the time on python-dev, where people are asking me questions when the answers are obvious to all of us. I suggested adding more information to the "IndexError: tuple index out of range", like "IndexError: tuple only has 4 elements, can't access element number 7." It should be obvious to any programming novice why this is helpful: Because it makes it much easier to figure out what your program is doing wrong, so you could fix it. (I feel silly having to spell it out in company of so many experienced developers who all understand this basic fact.) I'm very frustrated that a core Python developer would ask me "Why? Is there any known use case?" on such a no-brainer suggestion. Now, if you want to make the performance argument, that's acceptable. But it's very, very frustrating that people on python-dev, who are very experienced developers, need to be explained the virtue of very simple and obvious features. (This happens many times, not just on this ticket.) I'm baffled as to why they do this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 00:32:19 2014 From: report at bugs.python.org (Michael Foord) Date: Thu, 03 Jul 2014 22:32:19 +0000 Subject: [issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function In-Reply-To: <1289739891.46.0.690681439003.issue10417@psf.upfronthosting.co.za> Message-ID: <1404426739.79.0.343769271687.issue10417@psf.upfronthosting.co.za> Michael Foord added the comment: So the proposed fix does the backslashreplace for errors and then re-decodes, allowing the encode in the stream to work. That seems like a good fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 00:35:47 2014 From: report at bugs.python.org (Lita Cho) Date: Thu, 03 Jul 2014 22:35:47 +0000 Subject: [issue21868] Tbuffer in turtle allows negative size In-Reply-To: <1403680225.27.0.922926576552.issue21868@psf.upfronthosting.co.za> Message-ID: <1404426947.86.0.212819367935.issue21868@psf.upfronthosting.co.za> Changes by Lita Cho : ---------- versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 00:35:59 2014 From: report at bugs.python.org (Lita Cho) Date: Thu, 03 Jul 2014 22:35:59 +0000 Subject: [issue21868] Tbuffer in turtle allows negative size In-Reply-To: <1403680225.27.0.922926576552.issue21868@psf.upfronthosting.co.za> Message-ID: <1404426959.51.0.644647859723.issue21868@psf.upfronthosting.co.za> Changes by Lita Cho : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 00:38:51 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 22:38:51 +0000 Subject: [issue14336] Difference between pickle implementations for function objects In-Reply-To: <1331924619.34.0.890923032137.issue14336@psf.upfronthosting.co.za> Message-ID: <1404427131.85.0.784844979448.issue14336@psf.upfronthosting.co.za> Mark Lawrence added the comment: I couldn't find the code referenced in the changeset in the new _pickle.c. However I did find the comment that I've pasted below so I believe this issue only applies to 2.7. /* The old cPickle had an optimization that used switch-case statement dispatching on the first letter of the type name. This has was removed since benchmarks shown that this optimization was actually slowing things down. */ ---------- nosy: +BreamoreBoy versions: -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 00:47:29 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 22:47:29 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404427649.15.0.933606661076.issue21911@psf.upfronthosting.co.za> Mark Lawrence added the comment: If a programmer can't work out from "IndexError: tuple index out of range" what is going on they should give up programming. Personally I'd close this now with resolution "complete waste of core dev time". ---------- nosy: +BreamoreBoy type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 00:51:13 2014 From: report at bugs.python.org (Ram Rachum) Date: Thu, 03 Jul 2014 22:51:13 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404427873.76.0.979709960668.issue21911@psf.upfronthosting.co.za> Ram Rachum added the comment: Mark, again I'm finding myself saying things that are obvious to all of us: You can figure out that "tuple index out of range" means you asked for an item bigger than the size of the tuple, but it might be very helpful for debugging to say the number of item that you asked for and the size of the tuple. For example, maybe it'll say "IndexError: tuple only has 0 elements, can't access element number 1" and you'd be like, "hey, this tuple is empty, it's supposed to have stuff, so the bug is that it's empty", or alternatively it might say "IndexError: tuple only has 10 elements, can't access element number 732426563" and then you'd say "oh, there's a bug in the code that says which number of item I want, this number is very likely wrong for my use case". Was the above paragraph not quite obvious? Can't we all think of many different examples where you'd want to have that information? Why do I really have to go over these things? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 00:55:38 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 22:55:38 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404428138.84.0.364846018669.issue21911@psf.upfronthosting.co.za> Mark Lawrence added the comment: Ram I won't be making any more comments as it's quite clear to me that you have no empathy at all with the core devs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 00:58:27 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 03 Jul 2014 22:58:27 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404428307.06.0.257334410371.issue21911@psf.upfronthosting.co.za> Josh Rosenberg added the comment: As I said, the main reason is that every feature has to start at minus 100 points. It's not that your idea is bad, it's that it has to be sufficiently good to warrant the risks that come with any code churn, no matter how small. "Simple and obvious" does not mean "easy and risk free". I'll admit, aside from the performance concerns, this would be a relatively easy change; but "relatively easy" and "relatively safe" still means "using resources that could go towards other features" and "potentially dangerous". For debugging, you always have the option of wrapping the broken code in try/except and logging the values you're interested in (with or without reraising). If you believe that's insufficient, please, submit a patch (with tests), or find someone who is willing to do so. Otherwise, you have to accept that other people don't always share your beliefs about what is worth their time to improve; telling them they're wrong for disagreeing doesn't help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 01:08:08 2014 From: report at bugs.python.org (Ram Rachum) Date: Thu, 03 Jul 2014 23:08:08 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404428888.5.0.0458998911514.issue21911@psf.upfronthosting.co.za> Ram Rachum added the comment: Josh, I agree with most of what you're saying. (Except the tips about debugging are not helpful, the point is to get the information as quickly as possible without having to make code modifications if possible.) I can totally understand a reaction of "Your idea is helpful because it makes it easier to debug problems in your code quickly, which is a very important thing, but we prefer not to implement it because it'll introduce a considerable performance penalty." (Or use the -100 points argument which is depressing but valid.) But when people (like Raymond and Mark here) are not even acknowledging the obvious advantages of the suggestion before shooting it down, that is really frustrating, and next time someone on python-dev writes a blog post "why don't more people contribute to CPython", they should be looking at behavior like this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 01:09:40 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jul 2014 23:09:40 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404428980.34.0.293430727257.issue21911@psf.upfronthosting.co.za> R. David Murray added the comment: The development team is not monolithic, and we are all people, with differing opinions (and Mark is Mark). As has been pointed out, there is people-load for development and maintenance associated with any change, so a mature project has a natural tendency toward conservatism. That said, we do improve error messages. The important point is the one Raymond made originally. Perhaps someone will be interested enough to develop a patch and produce some benchmarks. As a low priority item it is unlikely any of the core team will do so. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 01:13:29 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 03 Jul 2014 23:13:29 +0000 Subject: [issue14345] Document socket.SOL_SOCKET In-Reply-To: <1331962982.1.0.381278454339.issue14345@psf.upfronthosting.co.za> Message-ID: <1404429209.06.0.255857063951.issue14345@psf.upfronthosting.co.za> Mark Lawrence added the comment: I think this would be worth doing. All I could find out about SOL_SOCKET is that it's an int and has a value of 65535, at least on 3.4.1, Windows 7 32 bit. ---------- nosy: +BreamoreBoy type: -> behavior versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 01:13:33 2014 From: report at bugs.python.org (Ram Rachum) Date: Thu, 03 Jul 2014 23:13:33 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404429213.86.0.877626949038.issue21911@psf.upfronthosting.co.za> Ram Rachum added the comment: David, as a more generalized solution: Do you think it's possible to make some kind of mechanism in Python that would change the way that an exception is constructed based on whether it's used for control flow or not? I know that it's a bit far-fetched, but if we could figure out a way to do that, it'll free us from having to serve two masters at the same time (one of them being clear error messages, the other being fast times to create an exception.) That way we could make the exceptions have very helpful messages when a person will see them, but keep them fast when a person won't. It's a shot in the dark but if someone has an idea for how to do it, that'd be cool. Another possibility is to make the -O flag do this switch, though there are problems with that too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 02:01:52 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 00:01:52 +0000 Subject: [issue14418] Document differences in SocketServer between Python 2.6 and 2.7 In-Reply-To: <1332795225.64.0.202093290254.issue14418@psf.upfronthosting.co.za> Message-ID: <1404432112.31.0.234693545799.issue14418@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Geoffrey sorry about the delay in getting back to you. ---------- nosy: +BreamoreBoy, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 02:05:33 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 00:05:33 +0000 Subject: [issue14453] profile.Profile.calibrate can produce incorrect numbers in some circumstances In-Reply-To: <1333125926.46.0.263686437427.issue14453@psf.upfronthosting.co.za> Message-ID: <1404432333.1.0.831557236616.issue14453@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Adam sorry about the delay in getting back to you. @Georg can you comment on the patch please. ---------- nosy: +BreamoreBoy, georg.brandl versions: +Python 3.5 -Python 2.6, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 02:15:16 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 00:15:16 +0000 Subject: [issue14483] inspect.getsource fails to read a file of only comments In-Reply-To: <1333461114.24.0.345526771392.issue14483@psf.upfronthosting.co.za> Message-ID: <1404432915.84.0.0262491215509.issue14483@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Sean we're sorry for the delay in getting back to you. ---------- nosy: +BreamoreBoy, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 02:29:58 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 04 Jul 2014 00:29:58 +0000 Subject: [issue18212] No way to check whether Future is finished? In-Reply-To: <1371216345.77.0.119966223843.issue18212@psf.upfronthosting.co.za> Message-ID: <1404433798.23.0.018575577269.issue18212@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Have an idea for a name? It already has a done method, which happens to cover the case of a Future having completed successfully, completed due to an exception or having been cancelled. Simply calling it "finished()", "completed()" etc. isn't markedly different from "done()". Exposing it as a property would be a bad idea largely because it would be inconsistent with the rest of the Future interface that is purely method based (I suspect largely because some of the behaviors must be method based to allow arguments related to timeout and they just kept up the pattern). The main argument I can see *against* making this easier than Richard's 2-3 part check (beyond the naming issue) is that it tends to encourage misuse of the library. Polling your Futures is a bad design 99% of the time (the same way loops over range(len(someseq)) are a bad idea most of the time; it's not that it doesn't work, it's that it's a backwards way to do it). In general: 1. If you need a single result now, you use future.result() directly 2. If you need to wait for a set of things to complete, you use: a. concurrent.futures.wait if you need all of them to finish before continuing b. concurrent.futures.as_completed if you can process them as they become available 3. If you don't have a loop processing worker results, but want the values to be used as they become available, you use future.add_done_callback() and let the result get processed asynchronously without your main thread becoming involved at all Note: None of these cases really benefit from the existing status check methods. Instantaneous state checks are generally frowned upon in concurrent code, since program behavior can hinge on a microsecond race between the task and the checking thread, so polling is almost always worse than one of the more "event driven" approaches. I'm open to argument (I'm not omniscient), but I see this as making it even easier to do threading, rather than a legitimate improvement. ---------- nosy: +josh.rosenberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 02:32:12 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 04 Jul 2014 00:32:12 +0000 Subject: [issue18212] No way to check whether Future is finished? In-Reply-To: <1371216345.77.0.119966223843.issue18212@psf.upfronthosting.co.za> Message-ID: <1404433932.69.0.568862099601.issue18212@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Ugh. Left out a key word: "I see this as making it even easier to do threading *badly*, rather than a legitimate improvement." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 02:39:31 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 04 Jul 2014 00:39:31 +0000 Subject: [issue14189] Documentation for some C APIs is missing clear specification of the type of reference they return In-Reply-To: <1330834739.26.0.103894619612.issue14189@psf.upfronthosting.co.za> Message-ID: <1404434371.56.0.586553012778.issue14189@psf.upfronthosting.co.za> Josh Rosenberg added the comment: If any of these actually return borrowed references, I'd consider it a serious documentation bug to not mention it. New reference semantics are the default, and while it's best to call them out, it can be assumed in most cases. Returning borrowed references without a big honking "not a normal function" flag in the docs causes a big problem. Heck, the lack of such a big warning flag on PyDict_Next (which doesn't return a PyObject, but populates via a double pointer) caused me a major headache recently when I DECREF-ed the resulting objects. Totally my fault (the description says they're borrowed), but I rely on that "Returns: Borrowed Reference" header so much that I made a dumb mistake. ---------- nosy: +josh.rosenberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 02:39:46 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 00:39:46 +0000 Subject: [issue14566] run_cgi reverts to using unnormalized path In-Reply-To: <1334257271.24.0.449019497726.issue14566@psf.upfronthosting.co.za> Message-ID: <1404434386.71.0.782395739992.issue14566@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we have a response to this security issue please. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 02:40:19 2014 From: report at bugs.python.org (Sangeeth Saravanaraj) Date: Fri, 04 Jul 2014 00:40:19 +0000 Subject: [issue21913] Possible deadlock in threading.Condition.wait() in Python 2.7.7 Message-ID: <1404434419.41.0.802359833018.issue21913@psf.upfronthosting.co.za> New submission from Sangeeth Saravanaraj: Python version 2.7.7 Mac OS Darwin Kernel Version 13.2.0 I have the following code which when executed waits to be interrupted by SIGINT, SIGTERM or SIGQUIT. When an object is initialized, it creates a threading.Condition() and acquires() it! The program then registers the signal handlers where notify() and release() is called when the above mentioned signals are received. After registering the signal handlers, it calls wait() on the condition variable and block. When I tried to stop the program with Ctrl-C, its did not respond. IOW, the _signal_handler() method did not get called. # start from signal import signal, SIGINT, SIGTERM, SIGQUIT from threading import Condition class A: def __init__(self): self._termination_signal = Condition() self._termination_signal.acquire(blocking=0) def _signal_handler(self, signum, frame): print "Received terminate request - signal = {0}".format(signum) del frame self._termination_signal.notify() self._termination_signal.release() return def register_and_wait(self): signal(SIGINT, self._signal_handler) signal(SIGTERM, self._signal_handler) signal(SIGQUIT, self._signal_handler) print "Waiting to be interrupted!" self._termination_signal.wait() # control blocks here! print "Notified!!" def main(): a = A() a.register_and_wait() if __name__ == "__main__": main() # end When the same code was tried in Python 3.4, it threw a "RuntimeError: cannot notify on un-acquired lock". More information is available in this conversation in python-list mailer - https://mail.python.org/pipermail/python-list/2014-July/674350.html ---------- components: Library (Lib) messages: 222250 nosy: pitrou, sangeeth priority: normal severity: normal status: open title: Possible deadlock in threading.Condition.wait() in Python 2.7.7 type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 02:41:22 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 00:41:22 +0000 Subject: [issue14709] http.client fails sending read()able Object In-Reply-To: <1336041098.08.0.116585068152.issue14709@psf.upfronthosting.co.za> Message-ID: <1404434482.21.0.310906111142.issue14709@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we have a response to this please. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 02:45:12 2014 From: report at bugs.python.org (Ned Deily) Date: Fri, 04 Jul 2014 00:45:12 +0000 Subject: [issue14709] http.client fails sending read()able Object In-Reply-To: <1336041098.08.0.116585068152.issue14709@psf.upfronthosting.co.za> Message-ID: <1404434712.4.0.0762509482508.issue14709@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Missing "return" in HTTPConnection.send() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 02:48:40 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 04 Jul 2014 00:48:40 +0000 Subject: [issue21910] File protocol should document if writelines must handle generators sensibly In-Reply-To: <1404380309.75.0.473808735546.issue21910@psf.upfronthosting.co.za> Message-ID: <1404434920.04.0.948257323929.issue21910@psf.upfronthosting.co.za> Josh Rosenberg added the comment: +1. I've been assuming writelines handled arbitrary generators without an issue; guess I've gotten lucky and only used the ones that do. I've fed stuff populated by enormous (though not infinite) generators created from stuff like itertools.product and the like into it on the assumption that it would safely write it without generating len(seq) ** repeat values in memory. I'd definitely appreciate a documented guarantee of this. I don't need it to explicitly guarantee that each item is written before the next item is pulled off the iterator or anything; if it wants to buffer a reasonable amount of data in memory before triggering a real I/O that's fine (generators returning mutable objects and mutating them when the next object comes along are evil anyway, and forcing one-by-one output can prevent some useful optimizations). But anything that uses argument unpacking, collection as a list, ''.join (or at the C level, PySequence_Fast and the like), forcing the whole generator to exhaust before writing byte one, is a bad idea. ---------- nosy: +josh.rosenberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 03:08:09 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 04 Jul 2014 01:08:09 +0000 Subject: [issue13946] readline completer could return an iterable In-Reply-To: <1328471281.77.0.152059916947.issue13946@psf.upfronthosting.co.za> Message-ID: <1404436089.49.0.292746803232.issue13946@psf.upfronthosting.co.za> Josh Rosenberg added the comment: I agree the design requiring it to pass the same information over and over is a bit odd (I've occasionally had cause to "borrow" some of ipython's niftyness for a plain Python terminal, and making custom completers work is one of the more awkward parts of the whole process). I'm guessing this is a product of conforming overzealously to the C API for readline functions like rl_filename_completion_function (see: http://cnswww.cns.cwru.edu/php/chet/readline/readline.html#SEC47 ). It doesn't seem possible to do this nicely; __next__() on a generic iterator won't accept arguments (and practically, one of these arguments is state, the other is just "get next"), and trying to catch a TypeError due to the wrong number of arguments or using a generator as a string so you switch modes is ugly. Either the existing interface spawns additional arguments (also ugly; boolean flags that completely change behavior are the last refuge of a scoundrel), or a new function is created (possibly deprecating the old one over time. Any suggestions? ---------- nosy: +josh.rosenberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 03:15:11 2014 From: report at bugs.python.org (Andy Maier) Date: Fri, 04 Jul 2014 01:15:11 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1404436511.69.0.488312619896.issue12067@psf.upfronthosting.co.za> Andy Maier added the comment: Uploaded issue12067-expressions_v4.diff to improve the unicode footnote 3, and to revert to using the term "lexicographical" for sequences (after learning that it applies there as well). Also, this version was produced using "hg diff" to make it properly reviewable. Please review. ---------- Added file: http://bugs.python.org/file35845/issue12067-expressions_v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 03:18:15 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Jul 2014 01:18:15 +0000 Subject: [issue2057] difflib: add patch capability In-Reply-To: <1202628772.22.0.236434867196.issue2057@psf.upfronthosting.co.za> Message-ID: <1404436695.09.0.0280529658249.issue2057@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am going to agree with starting on PyPI if indeed there is not something there now. ---------- resolution: -> rejected stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 03:32:58 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 04 Jul 2014 01:32:58 +0000 Subject: [issue21913] Possible deadlock in threading.Condition.wait() in Python 2.7.7 In-Reply-To: <1404434419.41.0.802359833018.issue21913@psf.upfronthosting.co.za> Message-ID: <1404437578.11.0.959006473409.issue21913@psf.upfronthosting.co.za> Josh Rosenberg added the comment: So you want it to raise the same exception that is raised in Python 3.4? Either way, I don't think this is a deadlock (to get a deadlock, you'd have to have contested locks; this lock is being acquired only once). You're explicitly violating the rules of using Conditions. To be precise, you: 1. Acquire the Condition's lock in the main thread (legal, if odd to do in the constructor) 2. Call the Condition's wait method (legal; you acquired the lock so you can wait) 3. (Implicit) By wait-ing, you implicitly release the lock 4. At some point, you hit Ctrl-C. If the signal handler is called as expected, it will try to call Condition.notify(), which is illegal, because the lock was released as a side-effect of calling Condition.wait() earlier. So best case scenario, this code is wrong. The fact that it doesn't work correctly in Python 2.7 is an issue, but the possible reasons go well beyond deadlocks; you've written code that is guaranteed to be wrong (throw RuntimeExceptions) even if all goes according to plan. Do you get more reasonable behavior if you write the class as: class A: def __init__(self): self._termination_signal = Condition() def _signal_handler(self, signum, frame): print "Received terminate request - signal = {0}".format(signum) del frame with self._termination_signal: self._termination_signal.notify() def register_and_wait(self): with self._termination_signal: signal(SIGINT, self._signal_handler) signal(SIGTERM, self._signal_handler) signal(SIGQUIT, self._signal_handler) print "Waiting to be interrupted!" self._termination_signal.wait() # control blocks here! print "Notified!!" ---------- nosy: +josh.rosenberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 03:46:07 2014 From: report at bugs.python.org (Andy Maier) Date: Fri, 04 Jul 2014 01:46:07 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1404438367.26.0.087996442184.issue12067@psf.upfronthosting.co.za> Andy Maier added the comment: PS: The v4 patch does not address comments f) and h) from msg222204, and it seems to me they do not need to be addressed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 04:38:55 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 04 Jul 2014 02:38:55 +0000 Subject: [issue1425127] os.remove OSError: [Errno 13] Permission denied Message-ID: <1404441535.9.0.612567396217.issue1425127@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Similar reference regarding the same basic behavior: http://blogs.msdn.com/b/oldnewthing/archive/2012/09/07/10347136.aspx Short version: Indexing and anti-virus tools prevent deletion from occurring. Longer version: DeleteFile (and all the stuff that ultimately devolves to DeleteFile) operate in a funny way on Windows. Internally, it opens a HANDLE to the file, marks it as pending deletion, and closes the HANDLE. If no one snuck in and grabbed another HANDLE to the file during that time, then the file is deleted when DeleteFile's hidden HANDLE is closed. Well designed anti-virus/indexing tools use oplocks ( http://blogs.msdn.com/b/oldnewthing/archive/2013/04/15/10410965.aspx ) so they can open a file, but seamlessly get out of the way if a normal process needs to take exclusive control of a file or delete it. Sadly "well-designed" is not a term usually associated with anti-virus tools, so errors like this are relatively commonplace. Workarounds like using GetTempFileName() and MoveFile() to move the file out of the way will work, though I believe they introduce their own race conditions (the temp file itself is created but the HANDLE is closed immediately, which could mean a race to open the empty file by the bad anti-virus that would block MoveFile()). Basically, if you're running on Windows, and you're using unfriendly anti-virus/indexing tools, there is no clean workaround that maintains the same behavior. You can't keep creating and deleting a file of the same name over and over without risking access denied errors. That said, you could probably get the same results by opening and closing the file only once. Change from the original pseudocode: while 1: with open(myfilename, ...) as myfile: myfile.write(...) do_stuff_with(myfilename) os.remove(myfilename) to (assuming the default file sharing permissions are amenable): with open(myfilename, ...) as myfile: while 1: myfile.write(...) myfile.flush() myfile.seek(0) do_stuff_with(myfilename) myfile.truncate() Same basic pattern, except this time, you're rebuilding the same file over and over without ever leaving it unowned long enough for anti-virus/indexing to swoop in and steal it from you. ---------- nosy: +josh.rosenberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 04:47:17 2014 From: report at bugs.python.org (Lita Cho) Date: Fri, 04 Jul 2014 02:47:17 +0000 Subject: [issue21914] Create unit tests for Turtle guionly Message-ID: <1404442037.11.0.611165319303.issue21914@psf.upfronthosting.co.za> New submission from Lita Cho: Create unit tests for the Turtle library, specifically on their gui commands. ---------- components: Library (Lib), Tkinter messages: 222259 nosy: Lita.Cho, jesstess priority: normal severity: normal status: open title: Create unit tests for Turtle guionly versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 04:48:17 2014 From: report at bugs.python.org (Lita Cho) Date: Fri, 04 Jul 2014 02:48:17 +0000 Subject: [issue21914] Create unit tests for Turtle guionly In-Reply-To: <1404442037.11.0.611165319303.issue21914@psf.upfronthosting.co.za> Message-ID: <1404442097.09.0.696225010446.issue21914@psf.upfronthosting.co.za> Lita Cho added the comment: I created tests for the gui portion of Turtle. This file combines both me and Ingrid's work that is specifically the gui tests. ---------- Added file: http://bugs.python.org/file35846/test_turtle_guionly.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 04:50:21 2014 From: report at bugs.python.org (Lita Cho) Date: Fri, 04 Jul 2014 02:50:21 +0000 Subject: [issue21914] Create unit tests for Turtle guionly In-Reply-To: <1404442037.11.0.611165319303.issue21914@psf.upfronthosting.co.za> Message-ID: <1404442221.84.0.214900799401.issue21914@psf.upfronthosting.co.za> Lita Cho added the comment: I forgot to make it a patch. Created it as a patch for convenience. ---------- keywords: +patch Added file: http://bugs.python.org/file35847/test_turtle_guionly.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 04:55:59 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 04 Jul 2014 02:55:59 +0000 Subject: [issue1425127] os.remove OSError: [Errno 13] Permission denied Message-ID: <1404442559.2.0.0842457181684.issue1425127@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Please pretend I didn't leave off the actual os.remove call at the end of my second example that bypasses the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 05:02:55 2014 From: report at bugs.python.org (Garrett Cooper) Date: Fri, 04 Jul 2014 03:02:55 +0000 Subject: [issue21915] telnetlib.Telnet constructor does not match telnetlib.Telnet.__init__ docstring Message-ID: <1404442975.51.0.177790858493.issue21915@psf.upfronthosting.co.za> New submission from Garrett Cooper: telnetlib.Telnet.__init__ supports keyword arguments, but the documentation for 2.7.8 ( https://docs.python.org/2/library/telnetlib.html ) claims they're non-keyword arguments. The py3k docs are much better ( https://docs.python.org/3/library/telnetlib.html ), but unfortunately they still claim that timeout is a non-keyword argument. ---------- assignee: docs at python components: Documentation messages: 222263 nosy: docs at python, yaneurabeya priority: normal severity: normal status: open title: telnetlib.Telnet constructor does not match telnetlib.Telnet.__init__ docstring _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 05:03:01 2014 From: report at bugs.python.org (Garrett Cooper) Date: Fri, 04 Jul 2014 03:03:01 +0000 Subject: [issue21915] telnetlib.Telnet constructor does not match telnetlib.Telnet.__init__ docstring In-Reply-To: <1404442975.51.0.177790858493.issue21915@psf.upfronthosting.co.za> Message-ID: <1404442981.48.0.875566480162.issue21915@psf.upfronthosting.co.za> Changes by Garrett Cooper : ---------- versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 07:00:50 2014 From: report at bugs.python.org (irdb) Date: Fri, 04 Jul 2014 05:00: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: <1404450050.01.0.0102138083098.issue16296@psf.upfronthosting.co.za> Changes by irdb : ---------- nosy: +irdb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 07:23:51 2014 From: report at bugs.python.org (Sangeeth Saravanaraj) Date: Fri, 04 Jul 2014 05:23:51 +0000 Subject: [issue21913] Possible deadlock in threading.Condition.wait() in Python 2.7.7 In-Reply-To: <1404434419.41.0.802359833018.issue21913@psf.upfronthosting.co.za> Message-ID: <1404451431.92.0.128768850012.issue21913@psf.upfronthosting.co.za> Sangeeth Saravanaraj added the comment: I am convinced that the code is wrong. It was written with wrong assumptions. But Python 2.7 behaves differently compare to Python 3.4. I am not expecting the same behavior in Python 2.7 as in Python 3.4 but I am expecting that some form of exception is raised justifying why Condition.notify() is illegal (as per #4) in this scenario and not block. In 3.4, I could see that the signal handler is being called (when hitting Ctrl-c) and then Condition.notify() is raising a RuntimeError. But in 2.7, I am not able to prove that the signal handler is called at all. That makes me think why the signal is not caught when control is in Condition.wait(). Your updated code snippet behaves the same as my original code. It blocks at Condition.wait() and does not respond to Ctrl-C and no signal handler is called and also not raising any exceptions. Thanks for the beautiful explanation! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 07:30:34 2014 From: report at bugs.python.org (Berker Peksag) Date: Fri, 04 Jul 2014 05:30:34 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1402493325.12.0.160112781213.issue21720@psf.upfronthosting.co.za> Message-ID: <1404451834.98.0.442428833247.issue21720@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 08:11:12 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 04 Jul 2014 06:11:12 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1402493325.12.0.160112781213.issue21720@psf.upfronthosting.co.za> Message-ID: <1404454272.24.0.994744862429.issue21720@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 09:17:06 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 07:17:06 +0000 Subject: [issue14784] Re-importing _warnings changes warnings.filters In-Reply-To: <1336765216.03.0.0611996113989.issue14784@psf.upfronthosting.co.za> Message-ID: <1404458225.99.0.727804180207.issue14784@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've just tried this and didn't see anything about warnings.filters changed. Full test run output in attached file. ---------- nosy: +BreamoreBoy Added file: http://bugs.python.org/file35848/Issue14784.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 09:28:52 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 07:28:52 +0000 Subject: [issue14841] os.get_terminal_size() should check stdin as a fallback In-Reply-To: <1337275274.3.0.172049776796.issue14841@psf.upfronthosting.co.za> Message-ID: <1404458932.46.0.716514774382.issue14841@psf.upfronthosting.co.za> Mark Lawrence added the comment: #13609 is closed fixed so can this also be closed? I've tried to reproduce this on Windows with the help of unxutils but it didn't want to know, sorry :( ---------- nosy: +BreamoreBoy type: -> behavior versions: +Python 3.4, Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 09:35:49 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 07:35:49 +0000 Subject: [issue14788] Pdb debugs itself after ^C and a breakpoint is set anywhere In-Reply-To: <1336817257.9.0.505200749782.issue14788@psf.upfronthosting.co.za> Message-ID: <1404459349.4.0.0847677692329.issue14788@psf.upfronthosting.co.za> Mark Lawrence added the comment: A quick glance tells me the patch is okay, apart from the name "test_issue_XXX", so can we have a formal patch review please. See also #14743. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 09:39:08 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 07:39:08 +0000 Subject: [issue14743] on terminating, Pdb debugs itself In-Reply-To: <1336420111.44.0.550150061213.issue14743@psf.upfronthosting.co.za> Message-ID: <1404459548.96.0.00527818932628.issue14743@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we have a formal patch review please, but note the similar patch on #14788. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 09:50:31 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 07:50:31 +0000 Subject: [issue14934] generator objects can clear their weakrefs before being resurrected In-Reply-To: <1338211208.4.0.755454859587.issue14934@psf.upfronthosting.co.za> Message-ID: <1404460231.89.0.00709093829754.issue14934@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm still not brave enough to take on C code, but could this be handled by someone from the core-mentorship list? ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 10:08:11 2014 From: report at bugs.python.org (Andy Maier) Date: Fri, 04 Jul 2014 08:08:11 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1404461291.9.0.407027483922.issue12067@psf.upfronthosting.co.za> Andy Maier added the comment: Terry, I'd like to comment on your statement: > 3. By default, == and /= compare identities. in msg148774. What experiment lead you to that conclusion? Here is one that contradicts it (using cpython 3.4.1): >>> i1 = 42 >>> f1 = 42.0 >>> i1 == f1 True >>> i1 is f1 False Is it possible, that your experiment got influenced by the optimization that attempts to reuse existing objects of immutable types? Like in this: >>> i1 = 42 >>> i2 = 40 + 2 >>> i1 == i2 True >>> i1 is i2 True Andy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 10:13:39 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 04 Jul 2014 08:13:39 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404275479.79.0.0199370909465.issue21902@psf.upfronthosting.co.za> Message-ID: <1404461619.2.0.160061864693.issue21902@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > inverse' is probably more obvious to understand than 'area', > although it doesn't tie into the 'a' of 'acosh', etc. Please don't make this gratuitous change. The decision about whether to use "inverse" or "arc" was cast in stone when the functions were named "acosh" etc. The documentation for C's math.h uses "arc". The docs for my hand calculators all use the term "arc" in the description of what the keys do. Why create unnecessary divergence? If you truly think users of acosh can't cope with "arc", then add a clarifying parenthetical for "inverse". But don't make the function name "acosh" more opaque by not showing what it actually stands for. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 10:16:18 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 04 Jul 2014 08:16:18 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1402493325.12.0.160112781213.issue21720@psf.upfronthosting.co.za> Message-ID: <1404461778.48.0.111370885065.issue21720@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 11:02:17 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 04 Jul 2014 09:02:17 +0000 Subject: [issue14841] os.get_terminal_size() should check stdin as a fallback In-Reply-To: <1337275274.3.0.172049776796.issue14841@psf.upfronthosting.co.za> Message-ID: <1404464537.39.0.135138812243.issue14841@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: This bug is still reproducible in Python 3.4 and 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 11:32:39 2014 From: report at bugs.python.org (Berker Peksag) Date: Fri, 04 Jul 2014 09:32:39 +0000 Subject: [issue21906] Tools\Scripts\md5sum.py doesn't work in Python 3.x In-Reply-To: <1404315532.22.0.153511853972.issue21906@psf.upfronthosting.co.za> Message-ID: <1404466359.23.0.783243617971.issue21906@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks Zachary! Here's a combined patch. ---------- Added file: http://bugs.python.org/file35849/issue21906_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 12:33:25 2014 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 04 Jul 2014 10:33:25 +0000 Subject: [issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception In-Reply-To: <1309830930.03.0.793190602228.issue12498@psf.upfronthosting.co.za> Message-ID: <1404470005.76.0.18918643244.issue12498@psf.upfronthosting.co.za> Xavier de Gaye added the comment: > Sorry Xavier for your patches, but it's time to focus our efforts on a single module and asyncio has a much better design to handle such use cases. No problem. Thanks for taking your time to review patches made on this old module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 12:47:59 2014 From: report at bugs.python.org (Andy Maier) Date: Fri, 04 Jul 2014 10:47:59 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1404470879.25.0.692813696053.issue12067@psf.upfronthosting.co.za> Andy Maier added the comment: Uploaded v5 of the patch. Changes: 1. The statement that comparison of different built-in types (always) raises TypeError, was too general. Changed to distinguish equal and order operators, as summarized by Ezio in items 3) and 4) of msg148760. 2. Ensured max line length of 80, in text areas affected by the patch. Andy ---------- versions: +Python 3.4 Added file: http://bugs.python.org/file35850/issue12067-expressions-py34_v5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 12:57:28 2014 From: report at bugs.python.org (Andy Maier) Date: Fri, 04 Jul 2014 10:57:28 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1404471448.44.0.117494045895.issue12067@psf.upfronthosting.co.za> Andy Maier added the comment: It seems I still need to practice creating patches ... uploading v6 which should create a review link. No other changes. Sorry for that. Andy ---------- Added file: http://bugs.python.org/file35851/issue12067-expressions-py34_v6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 13:05:15 2014 From: report at bugs.python.org (Berker Peksag) Date: Fri, 04 Jul 2014 11:05:15 +0000 Subject: [issue9554] test_argparse.py: use new unittest features In-Reply-To: <1281408827.47.0.183260667114.issue9554@psf.upfronthosting.co.za> Message-ID: <1404471915.48.0.88850393406.issue9554@psf.upfronthosting.co.za> Berker Peksag added the comment: Updated patch. ---------- type: behavior -> enhancement Added file: http://bugs.python.org/file35852/issue9554_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 13:27:29 2014 From: report at bugs.python.org (Andy Maier) Date: Fri, 04 Jul 2014 11:27:29 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1404473249.95.0.624775124857.issue12067@psf.upfronthosting.co.za> Andy Maier added the comment: Another attempt. Really sorry... ---------- Added file: http://bugs.python.org/file35853/issue12067-expressions-py34_v7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 13:53:28 2014 From: report at bugs.python.org (Arve Knudsen) Date: Fri, 04 Jul 2014 11:53:28 +0000 Subject: [issue21258] Add __iter__ support for mock_open In-Reply-To: <1397671005.18.0.0743040241878.issue21258@psf.upfronthosting.co.za> Message-ID: <1404474808.96.0.90012134295.issue21258@psf.upfronthosting.co.za> Changes by Arve Knudsen : ---------- nosy: +Arve.Knudsen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 13:58:25 2014 From: report at bugs.python.org (Arve Knudsen) Date: Fri, 04 Jul 2014 11:58:25 +0000 Subject: [issue21258] Add __iter__ support for mock_open In-Reply-To: <1397671005.18.0.0743040241878.issue21258@psf.upfronthosting.co.za> Message-ID: <1404475105.5.0.64689017444.issue21258@psf.upfronthosting.co.za> Arve Knudsen added the comment: I noticed this issue too, thanks for fixing it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 14:16:18 2014 From: report at bugs.python.org (Andy Maier) Date: Fri, 04 Jul 2014 12:16:18 +0000 Subject: [issue14050] Tutorial, list.sort() and items comparability In-Reply-To: <1329584329.12.0.545057513034.issue14050@psf.upfronthosting.co.za> Message-ID: <1404476178.28.0.967664116445.issue14050@psf.upfronthosting.co.za> Andy Maier added the comment: Uploaded patch version py34_v2, which contains the following changes relative to 3.4: 1. The changes in the description of list.sort() from "default" in list.sort(), by adding this text: (the arguments can be used for sort customization, see :func:`sorted` for their explanation) 2. The proposed extension of the description of list.sort() from patch version py32. 3. A statement that TypeError is raised if the ordering relationship is not established. 4. A reference where to look in order to establish ordering relationship for user-defined classes. (referencing the Basic customization section of the Language Reference). 5. A reference where the ordering relationships for built-in types are described (referencing the Comparison chapter of the Language Reference). -> Please review. Andy ---------- Added file: http://bugs.python.org/file35854/issue14050-list_sort-py34_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 14:38:26 2014 From: report at bugs.python.org (Andy Maier) Date: Fri, 04 Jul 2014 12:38:26 +0000 Subject: [issue14050] Tutorial, list.sort() and items comparability In-Reply-To: <1329584329.12.0.545057513034.issue14050@psf.upfronthosting.co.za> Message-ID: <1404477506.17.0.244276190435.issue14050@psf.upfronthosting.co.za> Andy Maier added the comment: uploaded patch version py27_v2, which contains the same changes as py34_v2, relative to 2.7, except for this differences: 1. The change from "default" was already in 2.7. 2. The reference to defining ordering methods for user-defined classes includes a reference to object.__cmp__(), in addition. -> Please review Andy ---------- Added file: http://bugs.python.org/file35855/issue14050-list_sort-py27_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 15:12:44 2014 From: report at bugs.python.org (ingrid) Date: Fri, 04 Jul 2014 13:12:44 +0000 Subject: [issue21916] Create unit tests for turtle textonly Message-ID: <1404479564.66.0.23163619156.issue21916@psf.upfronthosting.co.za> New submission from ingrid: Non-gui tests for turtle that Lita and I wrote. ---------- components: Tests files: test_turtle_textonly.patch keywords: patch messages: 222282 nosy: ingrid, jesstess priority: normal severity: normal status: open title: Create unit tests for turtle textonly versions: Python 3.5 Added file: http://bugs.python.org/file35856/test_turtle_textonly.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 15:42:19 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Jul 2014 13:42:19 +0000 Subject: [issue21915] telnetlib.Telnet constructor does not match telnetlib.Telnet.__init__ docstring In-Reply-To: <1404442975.51.0.177790858493.issue21915@psf.upfronthosting.co.za> Message-ID: <1404481339.15.0.202020123772.issue21915@psf.upfronthosting.co.za> R. David Murray added the comment: There are reasons for both of these things. In 2.7 we generally used the [] notation for keyword arguments. In both, the timeout doesn't have a default that it is possible to document using our standard notation, so we use the [] notation. If you can think of a better way to document this, there are several other places where we have similar timeout arguments that could also be improved (but we haven't thought of an acceptable way to improve it yet). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 16:00:30 2014 From: report at bugs.python.org (Andy Maier) Date: Fri, 04 Jul 2014 14:00:30 +0000 Subject: [issue6953] readline documenation needs work In-Reply-To: <1253456012.32.0.661240289209.issue6953@psf.upfronthosting.co.za> Message-ID: <1404482430.24.0.0947960461898.issue6953@psf.upfronthosting.co.za> Andy Maier added the comment: I would like to revive this issue. >From the discussion, it seems to me that the following changes in the Python Library documentation would make sense: 1. Move add_history() higher up in the sequence of functions, for example to after write_history_file(). 2. Clarify that the pos arguments of remove_history_item() and replace_history_item() are 0-based. 3. Clarify that the index argument of get_history_item() is 1-based. I do understand Stefan's comment from msg100757 that it is actually 'history_base'-based. On the one hand, history_base is not exposed or implied or even described at the Python level. After searching the GNU readline documentation, it seems that a notion of history base is not described there, either (I may have missed it, though). So either we simply state it is 1-based, or we provide in addition the background story mentioning some notion of history_base that is publicly described. I have the following additional comments: 4. The current documentation is very abridged, probably because it intends to be "just" a description of the Python binding to GNU readline. I think it either needs to evolve into a standalone description (i.e. that does not depend on the description of GNU readline), or it needs to properly reference the description of GNU readline. If we go that route, a simple reference to the document is not sufficient, for one because it is not the only underlying implementation, and second, because it is large and not easy at all to map to the Python readline functions. 5. One needs to understand what the main entities are the module operates on, e.g. init file, history file(s), a (single, global?) history object, the line buffer. Regardless of what we do regarding comment 4., I think the Python docs should describe these main entities in the introduction text. 6. Some more information about the init file is needed. I suspect it is specific to the underlying implementation that is used. If so, add references to the format descriptions for each implementation (by Python OS platform). 7. parse_and_bind(): Change the description to state that it parses and binds the init statement provided in the string argument. That string may or may not come from an init file. The example at the end specifies a statement that is not from an init file. 8. get_line_buffer() talks about "line buffer" and insert_text() talks about "command line". I suspect that means to be the same. If so, use one term consistently. 9. read_init_file(): I suspect it returns a tuple of statements from the init file? In any case, describe how the init file content comes back. Are comments removed? Where is the last filename used remembered, does that survive restarts of the Python runtime? 10. read_history_file(): Add that the history file content is put into a (global?) history object, replacing its prior history. 11. write_history_file(): Add that the (global?) history object is where the information comes from. Is an existing history file replaced? Appended? Exception raised? 12. clear_history(): From the text, I read that if the underlying GNU readline does not support it, this Python function does not exist in the module. If this is not how it works (e.g. if the function exists and raises an exception in the unsupported case), that text should be clarified. Also, mention which version of GNU readline is minimally needed in order to support the function. 13. get_history_length(): It says "get the desired length of the history file", but I think it is really the desired number of lines in the history file (i.e. consistent with set_history_length(). 14. get_history_item() and remove_history_item() talk about "history item", while all other functions talk about "history line" or "line". Use one term consistently. 15. the completion related functions (from set_completer() to set_completion_display_matches_hook()) are really somewhat short: What is the role of a completer function? Which completion types are defined? What is the beginning index of tab-completion? What are word delimiters for tab-completion? 16. Last but not least, the libedit library is mentioned for MacOS. Has that been implemented yet, and is it part of standard Python? If so, mention that. Andy ---------- nosy: +andymaier versions: +Python 3.4, Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 16:12:07 2014 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 04 Jul 2014 14:12:07 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404275479.79.0.0199370909465.issue21902@psf.upfronthosting.co.za> Message-ID: <1404483127.05.0.193419821061.issue21902@psf.upfronthosting.co.za> Mark Dickinson added the comment: Raymond: I don't think it's gratuitous. I'd be happy to replace the 'inverse' by 'area' if that's what people prefer. But "hyperbolic arc cosine" is just plain incorrect. (And the "in radians" bit is utterly nonsensical.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 16:34:50 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 14:34:50 +0000 Subject: [issue19711] add test for changed portions after reloading a namespace package In-Reply-To: <1385138827.34.0.898717139288.issue19711@psf.upfronthosting.co.za> Message-ID: <1404484490.35.0.599120749613.issue19711@psf.upfronthosting.co.za> Mark Lawrence added the comment: Latest patch LGTM. Can we have a patch review please as #18864 is dependent on this. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 16:39:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 14:39:14 +0000 Subject: [issue19714] Add tests for importlib.machinery.WindowsRegistryFinder In-Reply-To: <1385139731.13.0.379714643713.issue19714@psf.upfronthosting.co.za> Message-ID: <1404484754.18.0.411323217708.issue19714@psf.upfronthosting.co.za> Mark Lawrence added the comment: Latest patch LGTM at a quick glance. Can we have a patch review please as #18864 is dependent on this. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 16:42:38 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 14:42:38 +0000 Subject: [issue21099] Switch applicable importlib tests to use PEP 451 API In-Reply-To: <1396128875.13.0.712473033591.issue21099@psf.upfronthosting.co.za> Message-ID: <1404484958.29.0.866123475853.issue21099@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we have a patch review please as #18864 is dependent on this. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 16:44:19 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 14:44:19 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1404485059.87.0.85604406095.issue18864@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've asked for patch reviewss on the three dependencies outstanding, #19711, #19714 and #21099. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 17:26:17 2014 From: report at bugs.python.org (Andy Maier) Date: Fri, 04 Jul 2014 15:26:17 +0000 Subject: [issue10289] Document magic methods called by built-in functions In-Reply-To: <1288655696.94.0.809001507215.issue10289@psf.upfronthosting.co.za> Message-ID: <1404487577.1.0.734188243061.issue10289@psf.upfronthosting.co.za> Andy Maier added the comment: I have reviewed the descriptions of the built-in functions in Python 3.4, and found only the following issues w.r.t. missing __special__functions: 1. getattr(), setattr(), delattr(): They only refer to object attributes and miss to mention the fallback to object.__getattr__(), etc. Because hasattr() calls getattr() to test for the presence, the __getattr__() is relevant for hasattr() as well. 2. len() misses to describe that it uses s.__len__(). 3. sorted() misses to describe how rich comparison methods can be used. I think we can integrate the changes to list.sort() proposed in issue14050. 4. str() delegates the description to stdtypes.html#str, which in turn does describe obj.__str__(). Not sure we need to do something for str(). I did not check 2.7 yet. Andy ---------- nosy: +andymaier versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 17:26:25 2014 From: report at bugs.python.org (repcsike) Date: Fri, 04 Jul 2014 15:26:25 +0000 Subject: [issue21917] Python 2.7.7 Tests fail, and math is faulty Message-ID: <1404487585.95.0.614197630054.issue21917@psf.upfronthosting.co.za> New submission from repcsike: Python is built with IBM XLC compiler, some tests fail and after installation mathematical executions are giving bad results. I corrected the _sysconfigdata.py bug (issue18235) with ld_so_aix , and found this out when tried to install some modules. Please see this other issue for the other tests: https://github.com/warner/python-ecdsa/issues/28 # ./configure --with-gcc="xlc_r -q64" AR="ar -X64" --prefix=/usr/local/Python-2.7.7_64_test # make # make test running build_scripts find ./Lib -name '*.py[co]' -print | xargs rm -f ./python -Wd -3 -E -tt ./Lib/test/regrtest.py -l Traceback (most recent call last): File "./Lib/test/regrtest.py", line 220, in TEMPDIR = os.path.abspath(tempfile.gettempdir()) File "/tmp/Python-2.7.7/Lib/tempfile.py", line 269, in gettempdir tempdir = _get_default_tempdir() File "/tmp/Python-2.7.7/Lib/tempfile.py", line 197, in _get_default_tempdir fd = _os.open(filename, flags, 0o600) OverflowError: signed integer is greater than maximum make: 1254-004 The error code from the last command is 1. make: 1254-005 Ignored error code 1 from last command. ./python -Wd -3 -E -tt ./Lib/test/regrtest.py -l Traceback (most recent call last): File "./Lib/test/regrtest.py", line 220, in TEMPDIR = os.path.abspath(tempfile.gettempdir()) File "/tmp/Python-2.7.7/Lib/tempfile.py", line 269, in gettempdir tempdir = _get_default_tempdir() File "/tmp/Python-2.7.7/Lib/tempfile.py", line 197, in _get_default_tempdir fd = _os.open(filename, flags, 0o600) OverflowError: signed integer is greater than maximum make: 1254-004 The error code from the last command is 1. Stop. ---------- components: Build messages: 222291 nosy: repcsike priority: normal severity: normal status: open title: Python 2.7.7 Tests fail, and math is faulty type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 17:34:48 2014 From: report at bugs.python.org (Berker Peksag) Date: Fri, 04 Jul 2014 15:34:48 +0000 Subject: [issue4972] context management support in imaplib, smtplib, ftplib In-Reply-To: <1232213338.37.0.108210239108.issue4972@psf.upfronthosting.co.za> Message-ID: <1404488088.69.0.696250691856.issue4972@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 17:52:17 2014 From: report at bugs.python.org (Jeremy Kloth) Date: Fri, 04 Jul 2014 15:52:17 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <1404489137.14.0.956422724795.issue21907@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 17:55:32 2014 From: report at bugs.python.org (Stefan Krah) Date: Fri, 04 Jul 2014 15:55:32 +0000 Subject: [issue21917] Python 2.7.7 Tests fail, and math is faulty In-Reply-To: <1404487585.95.0.614197630054.issue21917@psf.upfronthosting.co.za> Message-ID: <1404489332.75.0.631816417854.issue21917@psf.upfronthosting.co.za> Stefan Krah added the comment: I think you need to figure out the right build flags -- we had an xlc build slave for a while that did not have this behavior. The flags were quite complicated though. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 18:26:49 2014 From: report at bugs.python.org (Lita Cho) Date: Fri, 04 Jul 2014 16:26:49 +0000 Subject: [issue21743] Create tests for RawTurtleScreen In-Reply-To: <1402623478.68.0.125250729344.issue21743@psf.upfronthosting.co.za> Message-ID: <1404491209.48.0.955784905459.issue21743@psf.upfronthosting.co.za> Lita Cho added the comment: submitted a patch that tests all of this. Issue 21914 ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 18:59:12 2014 From: report at bugs.python.org (paul j3) Date: Fri, 04 Jul 2014 16:59:12 +0000 Subject: [issue12954] Multiprocessing logging under Windows In-Reply-To: <1315610809.5.0.0888786272542.issue12954@psf.upfronthosting.co.za> Message-ID: <1404493152.06.0.752172991335.issue12954@psf.upfronthosting.co.za> paul j3 added the comment: The documentation currently warns https://docs.python.org/2/library/multiprocessing.html#windows > Safe importing of main module > Make sure that the main module can be safely imported by a new Python interpreter without causing unintended side effects (such a starting a new process). The logging duplication that I mentioned here is one of those side effects. So there's probably no need for further warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 19:21:18 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Jul 2014 17:21:18 +0000 Subject: [issue21844] Fix HTMLParser in unicodeless build In-Reply-To: <1403594743.84.0.436263477794.issue21844@psf.upfronthosting.co.za> Message-ID: <1404494478.14.0.558209101806.issue21844@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Agree. ---------- resolution: -> wont fix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 19:30:42 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Jul 2014 17:30:42 +0000 Subject: [issue21715] Chaining exceptions at C level In-Reply-To: <1402467347.27.0.18744234848.issue21715@psf.upfronthosting.co.za> Message-ID: <1404495042.62.0.0473788272331.issue21715@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry. Here is it. ---------- keywords: +patch Added file: http://bugs.python.org/file35857/capi_chain_exceptions.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 19:35:46 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Jul 2014 17:35:46 +0000 Subject: [issue21881] python cannot parse tcl value In-Reply-To: <1404070726.81.0.038892791749.issue21881@psf.upfronthosting.co.za> Message-ID: <1404495346.18.0.492109004216.issue21881@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Interesting, what result of getdouble? >>> import _tkinter >>> tk = _tkinter.create() >>> nan = float('nan') >>> tk.getdouble(nan) nan What returns getdouble() (note that _tkinter is imported instead of tkinter!) for NaN value? ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 19:46:18 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 17:46:18 +0000 Subject: [issue19593] Use specific asserts in importlib tests In-Reply-To: <1384462583.85.0.490812724335.issue19593@psf.upfronthosting.co.za> Message-ID: <1404495978.02.0.577120909996.issue19593@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we have a commit review on this please. I've already asked for reviews on #18864 and its dependencies. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 20:06:10 2014 From: report at bugs.python.org (Andreas Schwab) Date: Fri, 04 Jul 2014 18:06:10 +0000 Subject: [issue21881] python cannot parse tcl value In-Reply-To: <1404070726.81.0.038892791749.issue21881@psf.upfronthosting.co.za> Message-ID: <1404497170.55.0.471934896557.issue21881@psf.upfronthosting.co.za> Andreas Schwab added the comment: >>> _tkinter.create().getdouble(float('nan')) nan ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 20:14:17 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 18:14:17 +0000 Subject: [issue20544] Use specific asserts in operator tests In-Reply-To: <1391804710.79.0.27308793582.issue20544@psf.upfronthosting.co.za> Message-ID: <1404497657.89.0.223039459128.issue20544@psf.upfronthosting.co.za> Mark Lawrence added the comment: There are 28 dependencies listed on #16510. 18 have already been closed, presumably with patches committed but I haven't checked them all. 10 are still open including this one. Can we have a decision now as to whether we move forward with committing all of these changes, subject of course to formal review, or simply close the outstanding ones as "won't fix". ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 20:25:33 2014 From: report at bugs.python.org (Lita Cho) Date: Fri, 04 Jul 2014 18:25:33 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404498333.74.0.0400234681141.issue21597@psf.upfronthosting.co.za> Lita Cho added the comment: Hi Terry, I started digging into this deeper and it looks like my tests doesn't tear in Python 2.7. I have tried on Python 3.5 and 3.4 and it tears on those versions. I also tried the ttk objects, and the widgets also teared when I added frames. Here is the code I tried. from tkinter import * from tkinter import ttk paned = ttk.Panedwindow(orient="horizontal") left = ttk.Frame(paned) left.pack(side='left', fill='both', expand=True) right = ttk.Frame(paned) right.pack(side='right', fill='both', expand=True) button = ttk.Button(left,text="lefgt pane") button.pack( fill='both', expand=True) button2 = ttk.Button(right, text="right pane") button2.pack( fill='both', expand=True) paned.add(left) paned.add(right) paned.pack(fill="both",expand=True, pady = (4,1), padx=4) mainloop() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 20:26:06 2014 From: report at bugs.python.org (Lita Cho) Date: Fri, 04 Jul 2014 18:26:06 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404498366.17.0.602164911011.issue21597@psf.upfronthosting.co.za> Lita Cho added the comment: Should I file a bug? I feel like this a bug specifically related to Python 3 and Tkinter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 20:33:47 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Jul 2014 18:33:47 +0000 Subject: [issue21859] Add Python implementation of FileIO In-Reply-To: <1403608013.94.0.257739188668.issue21859@psf.upfronthosting.co.za> Message-ID: <1404498827.58.0.328854284888.issue21859@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch has included recent changes from C implementation (issue21679 and issue21090). ---------- Added file: http://bugs.python.org/file35858/pyio_fileio_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 20:38:35 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Jul 2014 18:38:35 +0000 Subject: [issue19279] UTF-7 can produce inconsistent Unicode string In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1404499115.42.0.370439100548.issue19279@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: UTF-7 to UTF-8 decoding crash -> UTF-7 can produce inconsistent Unicode string versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 20:39:11 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Jul 2014 18:39:11 +0000 Subject: [issue19279] UTF-7 decoder can produce inconsistent Unicode string In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1404499151.39.0.589873291725.issue19279@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: UTF-7 can produce inconsistent Unicode string -> UTF-7 decoder can produce inconsistent Unicode string _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 20:40:28 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Jul 2014 18:40:28 +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: <1404499228.65.0.432871420774.issue5712@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Som, what is full version of your Python? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 20:48:13 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Jul 2014 18:48:13 +0000 Subject: [issue21918] Convert test_tools to directory Message-ID: <1404499693.28.0.512453806731.issue21918@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Lib/test/test_tools.py becomes too large. It includes tests of unrelated command-lines tools and scripts. It would be good to convert it to directory containing separate test files for different tools. ---------- components: Tests messages: 222305 nosy: berker.peksag, serhiy.storchaka, zach.ware priority: normal severity: normal stage: needs patch status: open title: Convert test_tools to directory type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 20:48:17 2014 From: report at bugs.python.org (Ned Deily) Date: Fri, 04 Jul 2014 18:48:17 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404499697.52.0.915549573889.issue21597@psf.upfronthosting.co.za> Ned Deily added the comment: If by tearing you mean leaving artifacts on the screen, differences in behavior are almost certainly due to different versions of Tk being used. Tkinter is really just a wrapper around calls to Tk; nearly all of the heavy-duty graphics work is done by Tk making calls to other, platform-specific graphics libraries. FWIW, I ran your last test with the current python.org 2.7.8 and 3.4.1 on OS X with the current ActiveTcl Tk 8.5.15 and they both performed identically: I expanded the frame to fill the screen and could cleanly move the slider to the left or right with no artifacts. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 21:04:47 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 19:04:47 +0000 Subject: [issue17652] Add skip_on_windows decorator to test.support In-Reply-To: <1365353236.0.0.311562843433.issue17652@psf.upfronthosting.co.za> Message-ID: <1404500687.99.0.00496026954312.issue17652@psf.upfronthosting.co.za> Mark Lawrence added the comment: I like the idea and the patch looks clean so can we have a commit review please. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 21:10:46 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 19:10:46 +0000 Subject: [issue17773] test_pydoc fails with the installed testsuite (2.7) In-Reply-To: <1366195138.79.0.33949510354.issue17773@psf.upfronthosting.co.za> Message-ID: <1404501046.19.0.355399134083.issue17773@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can this be closed as "out of date"? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 21:13:38 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 19:13:38 +0000 Subject: [issue17055] ftplib.ftpcp test In-Reply-To: <1359326908.35.0.973015877338.issue17055@psf.upfronthosting.co.za> Message-ID: <1404501218.48.0.137297957921.issue17055@psf.upfronthosting.co.za> Mark Lawrence added the comment: LGTM so can we have a commit review please. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 21:24:07 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Jul 2014 19:24:07 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1404501847.28.0.512469831564.issue12067@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In py3, *everything* is an instance of class object. This makes like simple than in 2.x. The default comparison rules are set by the rich comparison methods of object. 'By experiment' meant by experiments with instances of object, which use those default methods, rather than by inspection of the relevant .c source code. Instances of subclasses taht do not override the defaults would act the same. Here is what seem to be the default code, from object.c, do_compare. It verifies what I said (v, w are pointers, which represent identity): /* If neither object implements it, provide a sensible default for == and !=, but raise an exception for ordering. */ switch (op) { case Py_EQ: res = (v == w) ? Py_True : Py_False; break; case Py_NE: res = (v != w) ? Py_True : Py_False; break; default: /* XXX Special-case None so it doesn't show as NoneType() */ PyErr_Format(PyExc_TypeError, "unorderable types: %.100s() %s %.100s()", v->ob_type->tp_name, opstrings[op], w->ob_type->tp_name); return NULL; } Py_INCREF(res); return res; Subclasses can and ofter do override the default methods. In particular, the number subclasses compare by value, across number types. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 21:45:16 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Jul 2014 19:45:16 +0000 Subject: [issue21893] unicodeobject.c not using PY_FORMAT_SIZE_T In-Reply-To: <1404190757.21.0.550855654281.issue21893@psf.upfronthosting.co.za> Message-ID: <1404503116.11.0.654646451569.issue21893@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is incorrect. PY_FORMAT_SIZE_T shouldn't be used in format string of PyErr_Format. On one hand, PyErr_Format understand the "z" modifier. On other hand, it is not understand all platform-specific expansions of PY_FORMAT_SIZE_T (e.g. "I"). ---------- nosy: +serhiy.storchaka resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 22:45:25 2014 From: report at bugs.python.org (Eldar Abusalimov) Date: Fri, 04 Jul 2014 20:45:25 +0000 Subject: [issue21919] Changing cls.__bases__ must ensure proper metaclass inheritance Message-ID: <1404506725.35.0.943770437276.issue21919@psf.upfronthosting.co.za> New submission from Eldar Abusalimov: When a new class is constructed Python checks for possible metaclass conflicts within bases and an explicitly specified one, if any, choosing the best available (the most specialized) one. That is the following implication is expected: issubclass(B, A) => issubclass(type(B), type(A)) However, changing __bases__ attribute can break this invariant silently without an error. >>> class O(object): ... pass ... >>> class M(type): ... pass ... >>> class N(type): ... pass ... >>> class A(O, metaclass=M): ... pass ... >>> class B(O, metaclass=N): ... pass ... >>> B.__bases__ = (A,) >>> B.__mro__ (, , , ) >>> type(B) >>> type(A) >>> issubclass(B, A) True >>> issubclass(type(B), type(A)) False Trying to derive from B now makes things look pretty weird: >>> class C(A, metaclass=N): ... pass ... Traceback (most recent call last): File "", line 1, in TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases >>> class D(B, A): pass ... Traceback (most recent call last): File "", line 1, in TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases >>> class E(B, metaclass=N): ... pass ... >>> type(E) That is one can extend a class but not its base (and not a class along its base). This effectively allows to bypass metaclass checks (by introducing a dummy class with the default metaclass, deriving it from a desired class with an inappropriate metaclass by changing __bases__ and using it instead of the desired class). This behavior is observed in 2.7, 3.2 and 3.4. I would expect the same check for metaclass conflicts when changing __bases__ as upon creating a new class: >>> # EXPECTED: ... >>> B.__bases__ = (A,) Traceback (most recent call last): File "", line 1, in TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases ---------- components: Interpreter Core messages: 222312 nosy: Eldar.Abusalimov priority: normal severity: normal status: open title: Changing cls.__bases__ must ensure proper metaclass inheritance type: behavior versions: Python 2.7, Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 22:50:41 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 04 Jul 2014 20:50:41 +0000 Subject: [issue21893] unicodeobject.c not using PY_FORMAT_SIZE_T In-Reply-To: <1404190757.21.0.550855654281.issue21893@psf.upfronthosting.co.za> Message-ID: <3h4pGn0bPNz7Lnh@mail.python.org> Roundup Robot added the comment: New changeset 6fb1e2ce513a by Victor Stinner in branch '3.4': Issue #21892, #21893: Partial revert of changeset 4f55e802baf0, PyErr_Format() http://hg.python.org/cpython/rev/6fb1e2ce513a New changeset 58cd562e3ef9 by Victor Stinner in branch 'default': (Merge 3.4) Issue #21892, #21893: Partial revert of changeset 4f55e802baf0, http://hg.python.org/cpython/rev/58cd562e3ef9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 22:50:42 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 04 Jul 2014 20:50:42 +0000 Subject: [issue21892] hashtable.c not using PY_FORMAT_SIZE_T In-Reply-To: <1404190753.13.0.221533788986.issue21892@psf.upfronthosting.co.za> Message-ID: <3h4pGn5wRLz7Lnh@mail.python.org> Roundup Robot added the comment: New changeset 6fb1e2ce513a by Victor Stinner in branch '3.4': Issue #21892, #21893: Partial revert of changeset 4f55e802baf0, PyErr_Format() http://hg.python.org/cpython/rev/6fb1e2ce513a New changeset 58cd562e3ef9 by Victor Stinner in branch 'default': (Merge 3.4) Issue #21892, #21893: Partial revert of changeset 4f55e802baf0, http://hg.python.org/cpython/rev/58cd562e3ef9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 22:51:59 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Jul 2014 20:51:59 +0000 Subject: [issue21893] unicodeobject.c not using PY_FORMAT_SIZE_T In-Reply-To: <1404190757.21.0.550855654281.issue21893@psf.upfronthosting.co.za> Message-ID: <1404507119.97.0.222523429951.issue21893@psf.upfronthosting.co.za> STINNER Victor added the comment: > This is incorrect. PY_FORMAT_SIZE_T shouldn't be used in format string of PyErr_Format. Oh, I forgot that. Thanks for the careful review Serhiy! Thanks. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 23:00:02 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 04 Jul 2014 21:00:02 +0000 Subject: [issue15974] Optional compact and colored output for regrest In-Reply-To: <1348077938.27.0.260547344914.issue15974@psf.upfronthosting.co.za> Message-ID: <1404507602.56.0.918729783992.issue15974@psf.upfronthosting.co.za> Mark Lawrence added the comment: What's the difference between this and #17554? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 23:35:38 2014 From: report at bugs.python.org (Lita Cho) Date: Fri, 04 Jul 2014 21:35:38 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404509738.26.0.849997456245.issue21597@psf.upfronthosting.co.za> Lita Cho added the comment: Oh I had no idea! That makes sense. How do I know which version of Tk I'm working with? I'm testing on Mac OSX as well! Would there be anyway for you to test my patch for turtledemo to see if the sash causes artifacting for you? I see tearing but it snap back into place within less than a second, which doesn't seem that bad. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 4 23:37:40 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Jul 2014 21:37:40 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404509860.88.0.742776696796.issue21597@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Stuttering might be a better term. For the initial small window, I did not see much difference between 2.7 and 3.4. At full screen on a 25xx x 14xx screen, both stuttered. If the 2.7 looked better, it is because it redrew slower. If I zipped the mouse fast enough, the border temorarily disappeared instead of being repeatedly redrawn. But full-screen empty panes were not as bad as the quarter-screen demo with each pane full. From Ned's comments, Windows simply does not handle this operation as well as Mac. The left.pack and right.pack statements are not needed as left and right are 'add'ed to the PanedWindow. The easiest way to expose more text is to enlarge the Window with the text frame heavily weighted. This would allow people with big screen to grab the right edge, pull, and leave the window with both text and canvas fully exposed. With ttk (but apparently not tk), the panes can be weighted. paned.add(left, weight=10) paned.add(right, weight=1) (To 'compensate', showhandle seems to have been deleted for ttk.) The same can also be done with grid. The advantage of using the paned window is to give more flexibility to people with small screens, who cannot view both text and canvas simultaneously. However, I am not sure about the acceptibility of switching to ttk, especially before 3.5. Perhaps I should ask on pydev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 00:06:24 2014 From: report at bugs.python.org (Lita Cho) Date: Fri, 04 Jul 2014 22:06:24 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404511584.68.0.305203077099.issue21597@psf.upfronthosting.co.za> Lita Cho added the comment: I feel like the PaneWindow is nice. I could also see down the road making the code text bigger. However, if on Windows, the artifacting is really bad, I can totally switch this back to the grid view. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 00:21:18 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Jul 2014 22:21:18 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404512478.9.0.00685535388435.issue21597@psf.upfronthosting.co.za> Terry J. Reedy added the comment: >>> TkVersion 8.6 which is not helpful if you want to know which 8.5 version on Mac. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 00:28:40 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Jul 2014 22:28:40 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404512920.26.0.655443090121.issue21597@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If we can use the weighted ttk paned window, so sash movement is only used when really needed (small windows) then it would be ok. (I would add a note in one of the help texts -- "On some systems, there are visual artifacts when enlarging the window or moving the sash. We feel this is preferable to having to scroll a too narrow text window.") There is some stuttering when enlarging the window, but if only done once, it is not a big deal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 00:29:21 2014 From: report at bugs.python.org (Brian Curtin) Date: Fri, 04 Jul 2014 22:29:21 +0000 Subject: [issue17652] Add skip_on_windows decorator to test.support In-Reply-To: <1365353236.0.0.311562843433.issue17652@psf.upfronthosting.co.za> Message-ID: <1404512961.74.0.805972988979.issue17652@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 00:30:20 2014 From: report at bugs.python.org (Brian Curtin) Date: Fri, 04 Jul 2014 22:30:20 +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: <1404513020.47.0.607387165384.issue16296@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 00:38:04 2014 From: report at bugs.python.org (Ned Deily) Date: Fri, 04 Jul 2014 22:38:04 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404513484.16.0.303046687736.issue21597@psf.upfronthosting.co.za> Ned Deily added the comment: Lita, to find the detailed Tk version info (which is really important with 8.5 since it has changed considerably over its long life): >>> import tkinter >>> t = tk.Tk() >>> t.tk.call('info', 'patchlevel') '8.5.15' >>> t.tk.call('tk', 'windowingsystem') 'aqua' http://www.tcl.tk/man/tcl8.5/TclCmd/info.htm http://www.tcl.tk/man/tcl8.5/TkCmd/tk.htm Terry, I don't have a physical Windows machine but I fired up a Windows 7 virtual machine and, again, with the stock python.org 2.7.8 and 3.4.1, the test in msg222301 works just fine for me. I also tried it on a relatively current Ubuntu Linux VM and its fine there, too. All of these were using either Tk 8.5.15 or 8.6.1 and they all work the same. For any kind of Tk work, one needs to be using recent versions of Tk, ideally 8.5.15 or 8.6.1. But this is pretty basic stuff. I don't know why there why a current Tk would not be able to render this perfectly, unless it was being run on *really* old hardware/graphics, or possibly if one were trying to run this under IDLE rather than standalone. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 02:15:16 2014 From: report at bugs.python.org (Lita Cho) Date: Sat, 05 Jul 2014 00:15:16 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404519316.64.0.00649965222086.issue21597@psf.upfronthosting.co.za> Lita Cho added the comment: Oh man, I was running version '8.5.9' using 'aqua'. I am going to try and upgrade and see if the artifacting goes away. Lita ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 02:30:40 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 05 Jul 2014 00:30:40 +0000 Subject: [issue21897] frame.f_locals causes segfault on Python >=3.4.1 In-Reply-To: <1404222008.61.0.644156666753.issue21897@psf.upfronthosting.co.za> Message-ID: <3h4v8Y5w7Qz7LpX@mail.python.org> Roundup Robot added the comment: New changeset 758468cdf72c by Antoine Pitrou in branch '3.4': Issue #21897: Fix a crash with the f_locals attribute with closure variables when frame.clear() has been called. http://hg.python.org/cpython/rev/758468cdf72c New changeset bd6515070f9c by Antoine Pitrou in branch 'default': Issue #21897: Fix a crash with the f_locals attribute with closure variables when frame.clear() has been called. http://hg.python.org/cpython/rev/bd6515070f9c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 02:31:25 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 05 Jul 2014 00:31:25 +0000 Subject: [issue21897] frame.f_locals causes segfault on Python >=3.4.1 In-Reply-To: <1404222008.61.0.644156666753.issue21897@psf.upfronthosting.co.za> Message-ID: <1404520285.49.0.833614841778.issue21897@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patch committed. Thank you for reporting this issue! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 02:33:19 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 05 Jul 2014 00:33:19 +0000 Subject: [issue21715] Chaining exceptions at C level In-Reply-To: <1402467347.27.0.18744234848.issue21715@psf.upfronthosting.co.za> Message-ID: <1404520399.95.0.0444926340036.issue21715@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 02:34:05 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 05 Jul 2014 00:34:05 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404520445.95.0.0393650823078.issue21597@psf.upfronthosting.co.za> Ned Deily added the comment: Lita, testing the second turtledemo_pane.patch (2014-06-09) with a current default (pre-3.5) build and with OS X ActiveTcl 8.5.15: if an example is selected but not running, moving the slider to the left is fairly smooth but the scroll bar for the right frame tends to also move to the left while the slider is moving, then settles back to the right side of the window when the slider motion stops. When moving the slider to the right, the right side of the outline rectangle of the left frame tends to lag behind the slider and then catches up to the slider when motion stops. Both the left and right lags are slight (IMO) but noticeable. I tried moving the slider while running a couple of demos and, as could be expected, the overall response is a little jerky as the demo graphics get redrawn but it didn't look bad to me. The OS X Tk 8.4.20 was pretty similar. With the OS X X11-based Tk (8.6), there were more noticeable sections of a darker background that would briefly appear to the right in the right frame when moving the slider to the left. (I did not try the patch on virtual machines.) All in all, I think having the resizable frames is a usability improvement, even if the resizing is not 100% smooth on all platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 03:05:32 2014 From: report at bugs.python.org (Lita Cho) Date: Sat, 05 Jul 2014 01:05:32 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404522332.23.0.264674206486.issue21597@psf.upfronthosting.co.za> Lita Cho added the comment: Hm, when I upgrade to 8.6, I still get the tearing action on the very right of the window. Although, again, it doesn't seem that bad. I've attahed what I am seeing, just to confirm we are all talking about the same thing. ---------- Added file: http://bugs.python.org/file35859/tkinter_tear.mov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 03:13:23 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 05 Jul 2014 01:13:23 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404522803.88.0.0347905894123.issue21597@psf.upfronthosting.co.za> Ned Deily added the comment: Lita, the movie looks comparable to what I'm seeing but without the background colors and with thin-lined black border rectangles around each of the two frames. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 03:36:03 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 05 Jul 2014 01:36:03 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404275479.79.0.0199370909465.issue21902@psf.upfronthosting.co.za> Message-ID: <1404524163.02.0.192249553775.issue21902@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I'd be happy to replace the 'inverse' by 'arc' > if that's what people prefer. Yes, please. > And the "in radians" bit is utterly nonsensical Yes, again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 03:39:33 2014 From: report at bugs.python.org (Lita Cho) Date: Sat, 05 Jul 2014 01:39:33 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404524373.2.0.854996275362.issue21597@psf.upfronthosting.co.za> Lita Cho added the comment: Yes! This is the first version of the code without using ttk widgetd. Using Labels instead of buttons. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 03:55:44 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Jul 2014 01:55:44 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404525344.6.0.0298926572893.issue21597@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 'under Idle' here means in a separate process with its own tk loop. I tried from the cmd line and see the same. My 3-yr-old machine has what was then a top-of-the-line Pentium. Also, as I said, the test code works much better than the 6/09 patch with widgets in the frames. Perhaps the demo would work if the two scrollbars and main widget were in a 2x2 grid, with the lower left or right cell left empty, instead of packed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 04:02:15 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Jul 2014 02:02:15 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404525735.38.0.102521985526.issue21597@psf.upfronthosting.co.za> Terry J. Reedy added the comment: "Windows Media Player cannot play the file. The Player might not support the file type or might not support the codec that was used to compress the file." However, Ned's description matches what I see, including the detail about a frame being momentarily being pulled away from the outer edge. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 04:28:01 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Jul 2014 02:28:01 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404527281.4.0.679273908657.issue21911@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have several times found exception messages to be under-informative, and I am pretty sure this is one of them. The obvious use case is so I don't have to insert a print statement, which I can only do if the error is in Python code, to get the essential info that Python could have told me but didn't. For for loops, StopIteration has mostly taken over the flow control job that IndexError did and only occasionally still does. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 05:20:07 2014 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 05 Jul 2014 03:20:07 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404530407.58.0.430553764118.issue21911@psf.upfronthosting.co.za> ?ric Araujo added the comment: Mark, could you please not phrase your messages as if you were speaking for the whole core team, and be more friendly with other contributors (or reply less)? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 05:48:12 2014 From: report at bugs.python.org (Kevin Davies) Date: Sat, 05 Jul 2014 03:48:12 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404275479.79.0.0199370909465.issue21902@psf.upfronthosting.co.za> Message-ID: <1404532092.3.0.535264504052.issue21902@psf.upfronthosting.co.za> Changes by Kevin Davies : Added file: http://bugs.python.org/file35863/TI-89.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 06:47:54 2014 From: report at bugs.python.org (Kevin Davies) Date: Sat, 05 Jul 2014 04:47:54 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <53B774D7.4040303@yahoo.com> Message-ID: <53B78376.9050103@yahoo.com> Kevin Davies added the comment: I'm not sure what the resolution is (the patch was 'inverse', Mark said he'd be happy to use 'area', and Raymond quoted 'arc'). I didn't know this would be a big deal, and I'm sorry that I caused trouble. But since one of the concerns was divergence, I thought I'd send some info on how the tools I've used describe it -- universally as 'inverse' in those that I found: - Mathematica: ArcCosh[z] "gives the inverse hyperbolic cosine [...]" (http://reference.wolfram.com/mathematica/ref/ArcCosh.html) - Modelica Standard Library: acosh "Inverse of cosh (area hyperbolic cosine)" (http://reference.wolfram.com/system-modeler/libraries/Modelica/Modelica_Math_acosh.html) - Maple: arccosh, but unknown description (http://www.maplesoft.com/support/help/Maple/view.aspx?path=invtrig) - MATLAB: acosh " Inverse hyperbolic cosine" (http://www.mathworks.com/help/matlab/ref/acosh.html) - TI-89 calculator: cosh-1 "returns the inverse hyperbolic cosine [...]" (from manual) Respectfully, Kevin ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 08:12:27 2014 From: report at bugs.python.org (Tim Peters) Date: Sat, 05 Jul 2014 06:12:27 +0000 Subject: [issue21902] Docstring of math.acosh, asinh, and atanh In-Reply-To: <1404275479.79.0.0199370909465.issue21902@psf.upfronthosting.co.za> Message-ID: <1404540747.81.0.882210322053.issue21902@psf.upfronthosting.co.za> Tim Peters added the comment: One more useless ;-) data point, from Macsyma: ? acosh; -- Function: acosh () - Hyperbolic Arc Cosine. I don't like "area" - while accurate, nobody else uses it. Gratuitous novelty is no virtue ;-) I like "inverse" better than "arc", because it's all of accurate, common, and nearly self-evident. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 08:27:19 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Jul 2014 06:27:19 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404541639.52.0.121776023136.issue21911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ram, do you want to provide a patch and benchmarks? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 08:38:01 2014 From: report at bugs.python.org (Berker Peksag) Date: Sat, 05 Jul 2014 06:38:01 +0000 Subject: [issue17652] Add skip_on_windows decorator to test.support In-Reply-To: <1365353236.0.0.311562843433.issue17652@psf.upfronthosting.co.za> Message-ID: <1404542281.69.0.615110358246.issue17652@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 08:41:12 2014 From: report at bugs.python.org (Berker Peksag) Date: Sat, 05 Jul 2014 06:41:12 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404542472.69.0.614378008792.issue21911@psf.upfronthosting.co.za> Berker Peksag added the comment: See also issue 18162. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 08:49:23 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Jul 2014 06:49:23 +0000 Subject: [issue21715] Chaining exceptions at C level In-Reply-To: <1402467347.27.0.18744234848.issue21715@psf.upfronthosting.co.za> Message-ID: <1404542963.05.0.794517238109.issue21715@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I added 3.4 because this private function makes cleaner and more bug-free existing code (mostly recently added) and possible future bug fixes. Note a bug just fixed by Benjamin (changeset 888fd1cdec6f). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 09:42:15 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Jul 2014 07:42:15 +0000 Subject: [issue21881] python cannot parse tcl value In-Reply-To: <1404070726.81.0.038892791749.issue21881@psf.upfronthosting.co.za> Message-ID: <1404546135.01.0.547985491077.issue21881@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which omits using of float() to convert Tcl's NaN values. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file35864/test_tcl_nan.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 10:01:27 2014 From: report at bugs.python.org (Stefan Tatschner) Date: Sat, 05 Jul 2014 08:01:27 +0000 Subject: [issue21920] Fixed missing colon in the docs Message-ID: <1404547287.88.0.816542299349.issue21920@psf.upfronthosting.co.za> New submission from Stefan Tatschner: Hi, i just discovered a missing colon in the docs. I have created a patch for this. Stefan ---------- assignee: docs at python components: Documentation files: fixed-missing-colon.patch keywords: patch messages: 222341 nosy: docs at python, rumpelsepp priority: normal severity: normal status: open title: Fixed missing colon in the docs versions: Python 3.4 Added file: http://bugs.python.org/file35865/fixed-missing-colon.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 10:07:19 2014 From: report at bugs.python.org (Berker Peksag) Date: Sat, 05 Jul 2014 08:07:19 +0000 Subject: [issue21920] Fixed missing colon in the docs In-Reply-To: <1404547287.88.0.816542299349.issue21920@psf.upfronthosting.co.za> Message-ID: <1404547639.67.0.464485459605.issue21920@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- assignee: docs at python -> berker.peksag nosy: +berker.peksag versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 10:11:04 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 05 Jul 2014 08:11:04 +0000 Subject: [issue21920] Fixed missing colon in the docs In-Reply-To: <1404547287.88.0.816542299349.issue21920@psf.upfronthosting.co.za> Message-ID: <3h55Mq2WZpz7LqK@mail.python.org> Roundup Robot added the comment: New changeset 6094aa25b33c by Berker Peksag in branch '3.4': Issue #21920: Add a missing colon to the __main__ doc. http://hg.python.org/cpython/rev/6094aa25b33c New changeset e22d0ff286f9 by Berker Peksag in branch 'default': Issue #21920: Merge from 3.4. http://hg.python.org/cpython/rev/e22d0ff286f9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 10:12:11 2014 From: report at bugs.python.org (Berker Peksag) Date: Sat, 05 Jul 2014 08:12:11 +0000 Subject: [issue21920] Fixed missing colon in the docs In-Reply-To: <1404547287.88.0.816542299349.issue21920@psf.upfronthosting.co.za> Message-ID: <1404547931.67.0.479224765049.issue21920@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks Stefan! ---------- resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 10:45:13 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 05 Jul 2014 08:45:13 +0000 Subject: [issue21921] Example in asyncio event throws resource usage warning Message-ID: <1404549913.45.0.543657172277.issue21921@psf.upfronthosting.co.za> New submission from Vajrasky Kok: These examples coming from: https://docs.python.org/3/library/asyncio-eventloop.html#example-hello-world-callback and https://docs.python.org/3/library/asyncio-eventloop.html#example-set-signal-handlers-for-sigint-and-sigterm throw resource usage warning. One of them gives this output: Event loop running forever, press CTRL+c to interrupt. pid 3075: send SIGINT or SIGTERM to exit. ^Cgot signal SIGINT: exit sys:1: ResourceWarning: unclosed sys:1: ResourceWarning: unclosed The patch adds closing the loop code in the examples. ---------- assignee: docs at python components: Documentation, asyncio files: close_loop_on_example.patch keywords: patch messages: 222344 nosy: docs at python, gvanrossum, haypo, vajrasky, yselivanov priority: normal severity: normal status: open title: Example in asyncio event throws resource usage warning type: resource usage versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file35866/close_loop_on_example.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 12:11:38 2014 From: report at bugs.python.org (Andreas Schwab) Date: Sat, 05 Jul 2014 10:11:38 +0000 Subject: [issue21881] python cannot parse tcl value In-Reply-To: <1404070726.81.0.038892791749.issue21881@psf.upfronthosting.co.za> Message-ID: <1404555098.66.0.868101665534.issue21881@psf.upfronthosting.co.za> Andreas Schwab added the comment: Thanks, this is working now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 12:32:46 2014 From: report at bugs.python.org (Ram Rachum) Date: Sat, 05 Jul 2014 10:32:46 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404556366.4.0.0964542677236.issue21911@psf.upfronthosting.co.za> Ram Rachum added the comment: obably Serhiy: Unfortunately I don't program in C, so I can't implement this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 12:41:41 2014 From: report at bugs.python.org (Berker Peksag) Date: Sat, 05 Jul 2014 10:41:41 +0000 Subject: [issue15114] Deprecate strict mode of HTMLParser In-Reply-To: <1340185371.41.0.609283463083.issue15114@psf.upfronthosting.co.za> Message-ID: <1404556901.33.0.271948268835.issue15114@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 14:22:24 2014 From: report at bugs.python.org (Hristo Venev) Date: Sat, 05 Jul 2014 12:22:24 +0000 Subject: [issue21922] PyLong: use GMP Message-ID: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> New submission from Hristo Venev: I have implemented the PyLong interface using the GMP mpn functions. API/ABI compatibility is retained (except for longintrepr). It can be enabled by passing --enable-big-digits=gmp to ./configure. No large performance regressions have been observed for small numbers (a few operations are about 10% slower). For large numbers some operations are a lot faster. There is also int.__gcd__ which may be used by fractions.gcd. The GIL is sometimes released. Minimum number of digis for releasing GIL: - multiplication - 64 - division - 64, - modular exponentiation - 16, - base conversion - 64 (256 for binary bases) - GCD - 16 The tests for long, float, decimal, fractions, string, unicode, bytes, pickle, marshal and enum pass. The tests for int fail because the error messages are a bit different (when creating int from bytes or bytearray the value is not shown). I may have run other tests and they have not failed. I have not tested on anything but x86-64. The following testcases yield 42x performace improvement: - 16384-bit RSA on 8 threads on quad-core with HT # GIL released - Multiplying 5600000-bit ints - Dividing 6000000-bit ints - Converting 300000-character str to int(base=10) - Converting 1250000-bit int to str ---------- components: Interpreter Core messages: 222347 nosy: h.venev priority: normal severity: normal status: open title: PyLong: use GMP type: performance versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 14:30:21 2014 From: report at bugs.python.org (Stefan Krah) Date: Sat, 05 Jul 2014 12:30:21 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404563421.01.0.466690485154.issue21922@psf.upfronthosting.co.za> Stefan Krah added the comment: Did you mean to upload a patch? ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 14:30:54 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Jul 2014 12:30:54 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404563454.34.0.760655229707.issue21922@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +mark.dickinson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 14:36:46 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 05 Jul 2014 12:36:46 +0000 Subject: [issue21913] Possible deadlock in threading.Condition.wait() in Python 2.7.7 In-Reply-To: <1404434419.41.0.802359833018.issue21913@psf.upfronthosting.co.za> Message-ID: <1404563806.46.0.938548840701.issue21913@psf.upfronthosting.co.za> Antoine Pitrou added the comment: So the problem is mostly that 2.7 gives less diagnosis information than 3.x about an incorrect use of the API. I don't think that's very worthy of a bugfix, IMHO. Just use 3.x :-) ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 14:43:01 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 05 Jul 2014 12:43:01 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404564181.79.0.0590372120373.issue21922@psf.upfronthosting.co.za> STINNER Victor added the comment: Hi, I worked on a similar patch 6 years ago, while Python 3.0 was developped: https://mail.python.org/pipermail/python-dev/2008-November/083315.html http://bugs.python.org/issue1814 The summary is that using GMP makes Python slower because most numbers are small: fit in [-2^31; 2^31-1], and GMP allocation is expensive. There is also a license issue: GMP license is GPL which is not compatible with the Python license. If you want to work on large numbers, you can gmpy: https://code.google.com/p/gmpy/ """ The following testcases yield 42x performace improvement: - 16384-bit RSA on 8 threads on quad-core with HT # GIL released - Multiplying 5600000-bit ints - Dividing 6000000-bit ints - Converting 300000-character str to int(base=10) - Converting 1250000-bit int to str """ That's not a common use case. Run the Python benchmark suite with your patch to see if your patch has a similar overhead than my old patch. http://hg.python.org/benchmarks ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 14:50:55 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Jul 2014 12:50:55 +0000 Subject: [issue21879] str.format() gives poor diagnostic on placeholder mismatch In-Reply-To: <1404052648.46.0.81950938275.issue21879@psf.upfronthosting.co.za> Message-ID: <1404564655.17.0.089152009581.issue21879@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Library (Lib) keywords: +easy nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 14:51:54 2014 From: report at bugs.python.org (Hristo Venev) Date: Sat, 05 Jul 2014 12:51:54 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404564714.4.0.688145774009.issue21922@psf.upfronthosting.co.za> Hristo Venev added the comment: PyLongObject is a PyVarObject. It contains many mp_limb_t's. There is little overhead. For some operations if the result is in [-20;256] no memory will be allocated. There are special codepaths for 1-limb operations. And I just finished GDB support. Please test if it works for you. ---------- keywords: +patch Added file: http://bugs.python.org/file35867/pygmp.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 15:14:49 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Jul 2014 13:14:49 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404566089.65.0.631645415987.issue21911@psf.upfronthosting.co.za> Ezio Melotti added the comment: The feature request sounds reasonable to me, unless someone proves that there are major (performance) issues. However, since this has already been reported in #18162, I'm going to close it as a duplicate. @Raymond > The IndexError exception is commonly used for control flow. Can you provide an example? IME I rarely catch IndexErrors, and I usually use LBYL before accessing a random index. > Slowing down the instantiation to add an index that no one really needs > would be a waste. This exception has been around for 20+ years -- if > they were an actual need, we would have known by now. I'm not sure the cost of adding the index is comparable with the cost of the whole instantiation. Regarding the request itself see #1534607 and #18162. @Ram > Another possibility is to make the -O flag do this switch, > though there are problems with that too. -1 > Unfortunately I don't program in C, so I can't implement this. It might be easier than you think. You just need to find where the exception is defined and see what other exceptions like KeyError do. Then you copy the code and adjust it until it doesn't segfault anymore and the tests pass. ---------- nosy: +ezio.melotti resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add index attribute to IndexError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 15:17:26 2014 From: report at bugs.python.org (Ram Rachum) Date: Sat, 05 Jul 2014 13:17:26 +0000 Subject: [issue18162] Add index attribute to IndexError In-Reply-To: <1370638259.99.0.240698145167.issue18162@psf.upfronthosting.co.za> Message-ID: <1404566246.72.0.415451943789.issue18162@psf.upfronthosting.co.za> Ram Rachum added the comment: Since #21911 has been merged into this issue, I'd like to add: Please also include the length of the sequence in the exception message. It can help with debugging. ---------- nosy: +cool-RR _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 15:23:49 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Jul 2014 13:23:49 +0000 Subject: [issue18162] Add index attribute to IndexError In-Reply-To: <1370638259.99.0.240698145167.issue18162@psf.upfronthosting.co.za> Message-ID: <1404566629.27.0.0524245901858.issue18162@psf.upfronthosting.co.za> Ezio Melotti added the comment: Knowing the len of the sequence would also be useful. Brett, were you also planning to use these attributes in the error message (when they are available), or do you prefer to keep the two issues separate and reopen #21911? > Is there a meta-issue for these changes? FTR the other relevant issues are: #18156: Add an 'attr' attribute to AttributeError #18163: Add a 'key' attribute to KeyError #18165: Add 'unexpected_type' to TypeError #18166: 'value' attribute for ValueError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 15:27:41 2014 From: report at bugs.python.org (Brett Cannon) Date: Sat, 05 Jul 2014 13:27:41 +0000 Subject: [issue18162] Add index attribute to IndexError In-Reply-To: <1370638259.99.0.240698145167.issue18162@psf.upfronthosting.co.za> Message-ID: <1404566861.93.0.197218968701.issue18162@psf.upfronthosting.co.za> Brett Cannon added the comment: Part of the point of these various attributes I proposed was so that a good default message could be provided when only the new attributes are given. So I'm fine with that being part of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 15:28:56 2014 From: report at bugs.python.org (Brett Cannon) Date: Sat, 05 Jul 2014 13:28:56 +0000 Subject: [issue15974] Optional compact and colored output for regrest In-Reply-To: <1348077938.27.0.260547344914.issue15974@psf.upfronthosting.co.za> Message-ID: <1404566936.39.0.483084603557.issue15974@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- superseder: -> Optional compact and colored output for regrest _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 15:30:27 2014 From: report at bugs.python.org (Brett Cannon) Date: Sat, 05 Jul 2014 13:30:27 +0000 Subject: [issue19593] Use specific asserts in importlib tests In-Reply-To: <1384462583.85.0.490812724335.issue19593@psf.upfronthosting.co.za> Message-ID: <1404567027.76.0.560060941732.issue19593@psf.upfronthosting.co.za> Brett Cannon added the comment: Ezio already gave a commit review. Serhiy just needs to commit it himself. ---------- assignee: -> serhiy.storchaka stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 15:31:25 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 05 Jul 2014 13:31:25 +0000 Subject: [issue21886] asyncio: Future.set_result() called on cancelled Future raises asyncio.futures.InvalidStateError In-Reply-To: <1404137118.99.0.781732644161.issue21886@psf.upfronthosting.co.za> Message-ID: <3h5DTS4mkcz7Lnb@mail.python.org> Roundup Robot added the comment: New changeset d7e4efd5e279 by Victor Stinner in branch '3.4': Closes #21886, #21447: Fix a race condition in asyncio when setting the result http://hg.python.org/cpython/rev/d7e4efd5e279 New changeset 50c995bdc00a by Victor Stinner in branch 'default': (Merge 3.4) Closes #21886, #21447: Fix a race condition in asyncio when setting http://hg.python.org/cpython/rev/50c995bdc00a ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 15:31:25 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 05 Jul 2014 13:31:25 +0000 Subject: [issue21447] Intermittent asyncio.open_connection / futures.InvalidStateError In-Reply-To: <1399400899.35.0.6772968076.issue21447@psf.upfronthosting.co.za> Message-ID: <3h5DTT2zT8z7Lnb@mail.python.org> Roundup Robot added the comment: New changeset d7e4efd5e279 by Victor Stinner in branch '3.4': Closes #21886, #21447: Fix a race condition in asyncio when setting the result http://hg.python.org/cpython/rev/d7e4efd5e279 New changeset 50c995bdc00a by Victor Stinner in branch 'default': (Merge 3.4) Closes #21886, #21447: Fix a race condition in asyncio when setting http://hg.python.org/cpython/rev/50c995bdc00a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 15:32:06 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 05 Jul 2014 13:32:06 +0000 Subject: [issue21886] asyncio: Future.set_result() called on cancelled Future raises asyncio.futures.InvalidStateError In-Reply-To: <1404137118.99.0.781732644161.issue21886@psf.upfronthosting.co.za> Message-ID: <1404567126.15.0.163147661413.issue21886@psf.upfronthosting.co.za> STINNER Victor added the comment: Fix commited to Tulip (4655ef2d9f43), Python 3.4 and 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 15:32:30 2014 From: report at bugs.python.org (Brett Cannon) Date: Sat, 05 Jul 2014 13:32:30 +0000 Subject: [issue19714] Add tests for importlib.machinery.WindowsRegistryFinder In-Reply-To: <1385139731.13.0.379714643713.issue19714@psf.upfronthosting.co.za> Message-ID: <1404567150.13.0.754947221603.issue19714@psf.upfronthosting.co.za> Brett Cannon added the comment: I can do the review if no Windows people step forward. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 15:32:50 2014 From: report at bugs.python.org (Stefan Krah) Date: Sat, 05 Jul 2014 13:32:50 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404567170.67.0.259704640674.issue21922@psf.upfronthosting.co.za> Stefan Krah added the comment: Hmm, the license (LGPL) should only matter for the Windows binaries and we can just compile without --enable-big-digits=gmp. Even *if* the Windows binaries were built with gmp support, it would be sufficient for any redistributor to point to the external library sources for gmp that the build has actually used -- your own code does not automatically become LGPL licensed and you are under no obligation to reveal it. I haven't looked at the patch in detail, but I don't have any fundamental objection against adding a configure option, provided that the additional code is well isolated (which seems to be the case). Of course we'd have to set up buildbots for the option etc... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 15:41:28 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 05 Jul 2014 13:41:28 +0000 Subject: [issue21921] Example in asyncio event throws resource usage warning In-Reply-To: <1404549913.45.0.543657172277.issue21921@psf.upfronthosting.co.za> Message-ID: <3h5Dj33mmkz7Lp4@mail.python.org> Roundup Robot added the comment: New changeset f6827c6b1164 by Victor Stinner in branch '3.4': Closes #21921: Fix ResourceWarning in the asyncio examples: close the event http://hg.python.org/cpython/rev/f6827c6b1164 New changeset 0533f148fb49 by Victor Stinner in branch 'default': (Merge 3.4) Closes #21921: Fix ResourceWarning in the asyncio examples: close http://hg.python.org/cpython/rev/0533f148fb49 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 15:43:20 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 05 Jul 2014 13:43:20 +0000 Subject: [issue21921] Example in asyncio event throws resource usage warning In-Reply-To: <1404549913.45.0.543657172277.issue21921@psf.upfronthosting.co.za> Message-ID: <1404567800.39.0.355453144553.issue21921@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for the fix. I already suggested it to Guido van Rossum a few months ago, but he preferred the keep the example simple. I made the same fix in the 2 hello world examples of the Tulip project last Tuesday, so it's fair to apply the same fix to asyncio examples. Thanks for the fix Vajrasky. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 16:12:55 2014 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 05 Jul 2014 14:12:55 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404569575.32.0.0096518949613.issue21911@psf.upfronthosting.co.za> Stefan Behnel added the comment: "you'd be surprised how much cheaper indexing a sequence is relative to dictionary access" This is a bit off-topic (and I realise that this ticket is closed now), but the difference isn't really all that large: $ python3.4 -m timeit -s 'seq = list(range(1000)); d = {n:n for n in seq}' 'seq[100]' 10000000 loops, best of 3: 0.0263 usec per loop $ python3.4 -m timeit -s 'seq = list(range(1000)); d = {n:n for n in seq}' 'd[100]' 10000000 loops, best of 3: 0.0285 usec per Pool $ python3.4 -m timeit -s 'seq = list(range(1000)); d = {"test%d"%n:n for n in seq}' 'd["test34"]' 10000000 loops, best of 3: 0.0317 usec per loop Especially hashing strings is usually faster than you might expect, because the hash value is cached and strings that get hashed once tend to get hashed again later. Note that KeyError doesn't do any exception message formatting on creation. It only includes the bare key, which is pretty quick, especially if the key is already a string. In comparison, instantiating an exception takes almost three times as long: $ python3 -m timeit -s 'K=KeyError' 'K("test")' 10000000 loops, best of 3: 0.0779 usec per loop We once had the case in Cython where dropping the instantiation of StopIteration at the end of generator execution gave a serious performance boost (more than 40% faster for short running generator expressions in the nqueens benchmark), but the same is less likely to apply to IndexError, which normally indicates a bug and not control flow. I lean towards agreeing with Terry that usability beats performance here. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 16:13:56 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Sat, 05 Jul 2014 14:13:56 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404569636.16.0.52257339575.issue21922@psf.upfronthosting.co.za> Changes by Josh Rosenberg : ---------- nosy: +josh.rosenberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 16:15:28 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Sat, 05 Jul 2014 14:15:28 +0000 Subject: [issue21913] Possible deadlock in threading.Condition.wait() in Python 2.7.7 In-Reply-To: <1404434419.41.0.802359833018.issue21913@psf.upfronthosting.co.za> Message-ID: <1404569728.59.0.337607453642.issue21913@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Antoine: It's possible this is a legitimate failure in the signal handling code. The lack of a RuntimeError seems more likely to be due to the code never executing, not an issue with Condition.wait/Condition.notify. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 16:50:57 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Sat, 05 Jul 2014 14:50:57 +0000 Subject: [issue21880] IDLE: Ability to run 3rd party code checkers In-Reply-To: <1404066447.3.0.940760126754.issue21880@psf.upfronthosting.co.za> Message-ID: <1404571857.56.0.78065919825.issue21880@psf.upfronthosting.co.za> Saimadhav Heblikar added the comment: In v3, there is no subprocess usage. It imports the checker specific module,does its job and returns the result of processing. The checker specific files are to be installed from TestPyPI(atleast for now). It has to be installed via pip. It will be detected automatically in IDLE. There will be a feature to pass additional arguments onto the checker(though not yet implemented in this patch). This patch also supports the feature to modify the editor buffer. To test out this patch, kindly install two packages pip install -i https://testpypi.python.org/pypi IDLEPyflakes IDLEWhitespaceRemover (I used the reindent.py file in Tools/scripts in IDLEWhitespaceRemover) Again, this is more a proof of concept patch. I we are to go ahead in this direction, I will be writing it from scratch again and also with tests. Checker, is actually a misnomer if we do support the "modify buffer" feature. ---------- Added file: http://bugs.python.org/file35868/3rdpartychecker-v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 16:52:10 2014 From: report at bugs.python.org (Berker Peksag) Date: Sat, 05 Jul 2014 14:52:10 +0000 Subject: [issue9554] test_argparse.py: use new unittest features In-Reply-To: <1281408827.47.0.183260667114.issue9554@psf.upfronthosting.co.za> Message-ID: <1404571930.34.0.150287099425.issue9554@psf.upfronthosting.co.za> Changes by Berker Peksag : Added file: http://bugs.python.org/file35869/issue9554_v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 17:26:36 2014 From: report at bugs.python.org (SilentGhost) Date: Sat, 05 Jul 2014 15:26:36 +0000 Subject: [issue21880] IDLE: Ability to run 3rd party code checkers In-Reply-To: <1404066447.3.0.940760126754.issue21880@psf.upfronthosting.co.za> Message-ID: <1404573996.22.0.336954401291.issue21880@psf.upfronthosting.co.za> SilentGhost added the comment: This seem like a new feature for IDLE, so I'd imagine it would not be included in either 2.7 or 3.4. Correct me if I'm wrong. ---------- nosy: +SilentGhost versions: -Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 17:42:10 2014 From: report at bugs.python.org (Hristo Venev) Date: Sat, 05 Jul 2014 15:42:10 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404574930.22.0.229787869077.issue21922@psf.upfronthosting.co.za> Hristo Venev added the comment: After some minor optimizations my implementation is about 1.8% slower on pystone and about 4% slower on bm_nqueens. It's 4 times faster on bm_pidigits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 17:49:33 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 05 Jul 2014 15:49:33 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404574930.22.0.229787869077.issue21922@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Please try the Python benchmark suite. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 17:54:21 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 05 Jul 2014 15:54:21 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404575661.84.0.166314138523.issue21922@psf.upfronthosting.co.za> Mark Dickinson added the comment: I *do* have an objection to adding the configure option: from that point on, it means that maintaining the GMP-based long implementation is now the responsibility of the core developers, and I think that's an unnecessary maintenance burden, for an option that few users will care about. I think having two long integer implementations in the core is worse than having one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 17:54:31 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 05 Jul 2014 15:54:31 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404575671.0.0.377603952847.issue21922@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 18:00:19 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 05 Jul 2014 16:00:19 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404576019.85.0.935747488643.issue21922@psf.upfronthosting.co.za> STINNER Victor added the comment: > I think having two long integer implementations in the core is worse than having one. I agree. If the GMP implementation is accepted, the old implementation must be dropped and replaced by the GMP implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 18:06:06 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Jul 2014 16:06:06 +0000 Subject: [issue9554] test_argparse.py: use new unittest features In-Reply-To: <1281408827.47.0.183260667114.issue9554@psf.upfronthosting.co.za> Message-ID: <1404576366.97.0.0557233386559.issue9554@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 18:21:50 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 05 Jul 2014 16:21:50 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404577310.77.0.0832455396456.issue21922@psf.upfronthosting.co.za> Mark Dickinson added the comment: > If the GMP implementation is accepted, the old implementation must be > dropped and replaced by the GMP implementation. Agreed. I'm open to that, but it's critical that common use-cases (i.e., those *not* using 1000-digit integers!) aren't slowed down. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 18:44:12 2014 From: report at bugs.python.org (Berker Peksag) Date: Sat, 05 Jul 2014 16:44:12 +0000 Subject: [issue17554] Compact output for regrtest In-Reply-To: <1364331735.49.0.0652208703783.issue17554@psf.upfronthosting.co.za> Message-ID: <1404578652.77.0.142464792644.issue17554@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 18:44:20 2014 From: report at bugs.python.org (Alex Gaynor) Date: Sat, 05 Jul 2014 16:44:20 +0000 Subject: [issue21923] distutils.sysconfig.customize_compiler will try to read variable that has not been initialized Message-ID: <1404578660.09.0.628845153111.issue21923@psf.upfronthosting.co.za> New submission from Alex Gaynor: If one invokes some distutils code too early, this function will try to read ``_config_vars`` before it is initialized. http://bpaste.net/show/1DOGhL8sdnkPyLTL06AZ/ is an example traceback that results. The attached patch uses the public API which guarantees that it is defined. ---------- components: Distutils files: sysconfig.diff keywords: patch messages: 222373 nosy: alex, dstufft, eric.araujo priority: normal severity: normal status: open title: distutils.sysconfig.customize_compiler will try to read variable that has not been initialized versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file35870/sysconfig.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 18:52:48 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Sat, 05 Jul 2014 16:52:48 +0000 Subject: [issue21880] IDLE: Ability to run 3rd party code checkers In-Reply-To: <1404066447.3.0.940760126754.issue21880@psf.upfronthosting.co.za> Message-ID: <1404579168.34.0.892713630446.issue21880@psf.upfronthosting.co.za> Saimadhav Heblikar added the comment: >This seem like a new feature for IDLE, so I'd imagine it would not be >included in either 2.7 or 3.4. Correct me if I'm wrong. Hi, Yes, it is a new feature. I think it will be included in both 2.7 and 3.4(apart from the latest version 3.5), if my understanding of pep434 is correct. >From pep434 >The PEP would apply to changes in existing features and addition of >small features, such as would require a new menu entry, but not >necessarily to possible major re-writes such as switching to themed >widgets or tabbed windows Though, I cant say for sure into what category this feature would fall into, i.e. whether it is a "small feature" or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 19:15:01 2014 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 05 Jul 2014 17:15:01 +0000 Subject: [issue17554] Compact output for regrtest In-Reply-To: <1364331735.49.0.0652208703783.issue17554@psf.upfronthosting.co.za> Message-ID: <1404580501.22.0.765700446533.issue17554@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 19:16:58 2014 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 05 Jul 2014 17:16:58 +0000 Subject: [issue15974] Optional compact and colored output for regrest In-Reply-To: <1348077938.27.0.260547344914.issue15974@psf.upfronthosting.co.za> Message-ID: <1404580618.92.0.357615664583.issue15974@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- superseder: Optional compact and colored output for regrest -> Compact output for regrtest _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 19:33:48 2014 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 05 Jul 2014 17:33:48 +0000 Subject: [issue20898] Missing 507 response description In-Reply-To: <1394637244.26.0.361164120424.issue20898@psf.upfronthosting.co.za> Message-ID: <1404581628.07.0.0194800503649.issue20898@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 19:34:21 2014 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 05 Jul 2014 17:34:21 +0000 Subject: [issue15025] httplib and http.client are missing response messages for defined WEBDAV responses, e.g., UNPROCESSABLE_ENTITY (422) In-Reply-To: <1339067742.9.0.619240246861.issue15025@psf.upfronthosting.co.za> Message-ID: <1404581661.03.0.383945359503.issue15025@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 19:36:40 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 05 Jul 2014 17:36:40 +0000 Subject: [issue21923] distutils.sysconfig.customize_compiler will try to read variable that has not been initialized In-Reply-To: <1404578660.09.0.628845153111.issue21923@psf.upfronthosting.co.za> Message-ID: <1404581800.79.0.223406321916.issue21923@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: -> ned.deily nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 20:28:47 2014 From: report at bugs.python.org (Berker Peksag) Date: Sat, 05 Jul 2014 18:28:47 +0000 Subject: [issue21578] Misleading error message when ImportError called with invalid keyword args In-Reply-To: <1401078695.26.0.813929580296.issue21578@psf.upfronthosting.co.za> Message-ID: <1404584927.75.0.00884044010006.issue21578@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 21:56:38 2014 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 05 Jul 2014 19:56:38 +0000 Subject: [issue10395] new os.path function to extract common prefix based on path components In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1404590198.36.0.726504156259.issue10395@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: patch review -> commit review versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 22:27:34 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Jul 2014 20:27:34 +0000 Subject: [issue21859] Add Python implementation of FileIO In-Reply-To: <1403608013.94.0.257739188668.issue21859@psf.upfronthosting.co.za> Message-ID: <1404592054.11.0.26431487316.issue21859@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Many thanks Victor for your review. Updated patch addresses your comments. It also fixes debugging remnants in test_file_eintr. ---------- Added file: http://bugs.python.org/file35871/pyio_fileio_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 22:58:35 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 05 Jul 2014 20:58:35 +0000 Subject: [issue5051] test_update2 in test_os.py invalid due to os.environ.clear() followed by reliance on environ COMSPEC In-Reply-To: <1232883558.71.0.175097990327.issue5051@psf.upfronthosting.co.za> Message-ID: <1404593915.17.0.448118613662.issue5051@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- type: -> behavior versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 23:00:19 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 05 Jul 2014 21:00:19 +0000 Subject: [issue17737] test_gdb fails on armv7hl In-Reply-To: <1366033268.62.0.309892862388.issue17737@psf.upfronthosting.co.za> Message-ID: <1404594019.75.0.126910132486.issue17737@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- type: -> behavior versions: +Python 3.4, Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 23:01:18 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 05 Jul 2014 21:01:18 +0000 Subject: [issue17755] test_builtin assumes LANG=C In-Reply-To: <1366111412.63.0.121023508439.issue17755@psf.upfronthosting.co.za> Message-ID: <1404594078.63.0.0784322944678.issue17755@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- type: -> behavior versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 23:48:06 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 05 Jul 2014 21:48:06 +0000 Subject: [issue12259] Document which compilers can be created on which platform In-Reply-To: <1307121595.57.0.945178123037.issue12259@psf.upfronthosting.co.za> Message-ID: <1404596886.79.0.140245912745.issue12259@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 23:58:12 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 05 Jul 2014 21:58:12 +0000 Subject: [issue12523] 'str' object has no attribute 'more' [/usr/lib/python3.2/asynchat.py|initiate_send|245] In-Reply-To: <1310256264.97.0.142665013721.issue12523@psf.upfronthosting.co.za> Message-ID: <1404597492.17.0.74139424759.issue12523@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've no objection to people trying to take this forward but they should be aware that asyncio is recommended for new code. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 5 23:59:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 05 Jul 2014 21:59:59 +0000 Subject: [issue11259] asynchat does not check if terminator is negative integer In-Reply-To: <1298220002.68.0.352394054223.issue11259@psf.upfronthosting.co.za> Message-ID: <1404597599.04.0.104693185907.issue11259@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've no objection to people trying to take this forward but they should be aware that asyncio is recommended for new code. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 00:04:58 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 05 Jul 2014 22:04:58 +0000 Subject: [issue6087] distutils.sysconfig.get_python_lib gives surprising result when used with a Python build In-Reply-To: <1242995950.24.0.540152639281.issue6087@psf.upfronthosting.co.za> Message-ID: <1404597898.43.0.922483237199.issue6087@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- components: -Distutils2 nosy: +dstufft versions: +Python 3.4, Python 3.5 -3rd party, Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 00:09:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 05 Jul 2014 22:09:01 +0000 Subject: [issue12602] Missing cross-references in Doc/using In-Reply-To: <1311249393.53.0.190511112739.issue12602@psf.upfronthosting.co.za> Message-ID: <1404598141.32.0.99993176045.issue12602@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- type: -> behavior versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 00:09:47 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 05 Jul 2014 22:09:47 +0000 Subject: [issue1565071] update Lib/plat-linux2/IN.py Message-ID: <1404598187.98.0.466124549976.issue1565071@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 00:10:35 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 05 Jul 2014 22:10:35 +0000 Subject: =?utf-8?q?=5Bissue1011113=5D_Make_=E2=80=9Cinstall=E2=80=9D_find_the_buil?= =?utf-8?q?d=5Fbase_directory?= Message-ID: <1404598235.76.0.985538076088.issue1011113@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- components: -Distutils2 nosy: +dstufft versions: +Python 3.4, Python 3.5 -3rd party, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 00:12:34 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Jul 2014 22:12:34 +0000 Subject: [issue21880] IDLE: Ability to run 3rd party code checkers In-Reply-To: <1404066447.3.0.940760126754.issue21880@psf.upfronthosting.co.za> Message-ID: <1404598354.04.0.200645420924.issue21880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Small feature requiring a new menu entry. ---------- versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 00:56:55 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 05 Jul 2014 22:56:55 +0000 Subject: [issue17755] test_builtin assumes LANG=C In-Reply-To: <1366111412.63.0.121023508439.issue17755@psf.upfronthosting.co.za> Message-ID: <1404601015.21.0.079728144087.issue17755@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> readline-related test_builtin failure _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 00:57:18 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 05 Jul 2014 22:57:18 +0000 Subject: [issue13886] readline-related test_builtin failure In-Reply-To: <1327659819.71.0.475160045664.issue13886@psf.upfronthosting.co.za> Message-ID: <1404601038.23.0.655490292996.issue13886@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 01:41:26 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 05 Jul 2014 23:41:26 +0000 Subject: [issue9571] argparse: Allow the use of -- to break out of nargs and into subparser In-Reply-To: <1281554487.14.0.725527410465.issue9571@psf.upfronthosting.co.za> Message-ID: <1404603686.91.0.136351964693.issue9571@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +paul.j3 versions: +Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 01:46:03 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 05 Jul 2014 23:46:03 +0000 Subject: [issue10190] Can argparse._AttributeHolder._get_kwargs become a public API? In-Reply-To: <1287981887.42.0.335099838745.issue10190@psf.upfronthosting.co.za> Message-ID: <1404603963.79.0.184093383842.issue10190@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 01:48:47 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 05 Jul 2014 23:48:47 +0000 Subject: [issue6253] optparse.OptionParser.get_usage uses wrong formatter In-Reply-To: <1244644097.18.0.346116774289.issue6253@psf.upfronthosting.co.za> Message-ID: <1404604127.05.0.733152202175.issue6253@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is it worth leaving this open as optparse was deprecated in 2.7 in favour of argparse? ---------- components: +Library (Lib) -Extension Modules nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 01:52:50 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 05 Jul 2014 23:52:50 +0000 Subject: [issue20554] Use specific asserts in optparse test In-Reply-To: <1391808859.25.0.0531028969207.issue20554@psf.upfronthosting.co.za> Message-ID: <1404604370.23.0.534918479538.issue20554@psf.upfronthosting.co.za> Mark Lawrence added the comment: I don't object to these changes but I don't see much sense in them as optparse has been deprecated since 2.7/3.2. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 01:54:18 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 05 Jul 2014 23:54:18 +0000 Subject: [issue21852] Fix optparse in unicodeless build In-Reply-To: <1403595612.48.0.11976821558.issue21852@psf.upfronthosting.co.za> Message-ID: <1404604458.46.0.695093866606.issue21852@psf.upfronthosting.co.za> Mark Lawrence added the comment: I don't see much point to this as optparse has been deprecated in 2.7. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 01:56:54 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 05 Jul 2014 23:56:54 +0000 Subject: [issue10766] optparse uses %s in gettext calls In-Reply-To: <1293148753.14.0.11198082887.issue10766@psf.upfronthosting.co.za> Message-ID: <1404604614.66.0.0635705229146.issue10766@psf.upfronthosting.co.za> Mark Lawrence added the comment: I don't see much point doing any work with optparse as it's deprecated. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 02:00:47 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 06 Jul 2014 00:00:47 +0000 Subject: [issue2403] Add figleaf coverage metrics In-Reply-To: <1205869378.43.0.216108511876.issue2403@psf.upfronthosting.co.za> Message-ID: <1404604847.07.0.610398976455.issue2403@psf.upfronthosting.co.za> Mark Lawrence added the comment: As there have been no replies to msg213358 can someone close this please. ---------- nosy: +BreamoreBoy status: pending -> open versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 02:04:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 06 Jul 2014 00:04:15 +0000 Subject: [issue19608] devguide needs pictures In-Reply-To: <1384510390.93.0.961404476169.issue19608@psf.upfronthosting.co.za> Message-ID: <1404605055.47.0.521228871283.issue19608@psf.upfronthosting.co.za> Mark Lawrence added the comment: Please close this. ---------- nosy: +BreamoreBoy status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 02:28:36 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Jul 2014 00:28:36 +0000 Subject: [issue21913] Possible deadlock in threading.Condition.wait() in Python 2.7.7 In-Reply-To: <1404434419.41.0.802359833018.issue21913@psf.upfronthosting.co.za> Message-ID: <1404606516.51.0.610066463433.issue21913@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Josh, your analysis is right, I had forgotten that we had improved this point in 3.x (interruptibility of lock.acquire()). It is *extremely* unlikely to be backported to 2.7, though, since it is really an enhancement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 02:30:33 2014 From: report at bugs.python.org (Peter Inglesby) Date: Sun, 06 Jul 2014 00:30:33 +0000 Subject: [issue21924] Cannot import anything that imports tokenize from script called token.py Message-ID: <1404606633.02.0.0390950296543.issue21924@psf.upfronthosting.co.za> New submission from Peter Inglesby: A script called token.py that imports anything that ends up importing tokenize, such as logging, triggers the following error when the script is run: $ cat token.py import tokenize $ python3 token.py Traceback (most recent call last): File "token.py", line 1, in import tokenize File "/usr/local/Cellar/python3/3.4.0/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tokenize.py", line 38, in __all__ = token.__all__ + ["COMMENT", "tokenize", "detect_encoding", AttributeError: 'module' object has no attribute '__all__' ---------- messages: 222386 nosy: inglesp priority: normal severity: normal status: open title: Cannot import anything that imports tokenize from script called token.py versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 02:48:31 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 06 Jul 2014 00:48:31 +0000 Subject: [issue21924] Cannot import anything that imports tokenize from script called token.py In-Reply-To: <1404606633.02.0.0390950296543.issue21924@psf.upfronthosting.co.za> Message-ID: <1404607711.45.0.0705450260089.issue21924@psf.upfronthosting.co.za> Ned Deily added the comment: That's because there is also a standard library module named token (https://docs.python.org/3/library/token.html). When you run python, by default the current working directory is inserted at the beginning of sys.path, the list of directories searched for modules. If you have a file there that has the same name as a standard library module, e.g. token.py, it will be found first and, thus, "hide" the standard library module of the same name. Either change the name of your file so it does not conflict or make sure it is in a directory not on sys.path. ---------- nosy: +ned.deily resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 03:20:58 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Jul 2014 01:20:58 +0000 Subject: [issue12523] 'str' object has no attribute 'more' [/usr/lib/python3.2/asynchat.py|initiate_send|245] In-Reply-To: <1310256264.97.0.142665013721.issue12523@psf.upfronthosting.co.za> Message-ID: <1404609658.97.0.742950021556.issue12523@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I've no objection to people trying to take this forward We were really looking for your approval, thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 04:19:25 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Jul 2014 02:19:25 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404613165.95.0.257510712257.issue21922@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Note that we could probably release the GIL in the current implementation, too - we just haven't bothered adding such an optimization. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 04:49:33 2014 From: report at bugs.python.org (Masami HIRATA) Date: Sun, 06 Jul 2014 02:49:33 +0000 Subject: [issue21925] ResouceWarning sometimes doesn't display Message-ID: <1404614973.3.0.388136336832.issue21925@psf.upfronthosting.co.za> New submission from Masami HIRATA: It seems that ResouceWarning about unclosed file handles with '-W all' option sometimes doesn't display. Is this behaviour normal? $ uname -a Linux ashrose 3.2.0-65-generic #99-Ubuntu SMP Fri Jul 4 21:03:29 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux $ python3.4 --version Python 3.4.1 $ touch spam.txt $ echo 'a = open("spam.txt")' >test_warning.py $ $ python3.4 -W all test_warning.py $ python3.4 -W all test_warning.py sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='spam.txt' mode='r' encoding='UTF-8'> $ python3.4 -W all test_warning.py sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='spam.txt' mode='r' encoding='UTF-8'> $ python3.4 -W all test_warning.py $ python3.4 -W all test_warning.py $ python3.4 -W all test_warning.py $ python3.4 -W all test_warning.py $ python3.4 -W all test_warning.py sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='spam.txt' mode='r' encoding='UTF-8'> $ ---------- components: Interpreter Core messages: 222390 nosy: msmhrt priority: normal severity: normal status: open title: ResouceWarning sometimes doesn't display type: resource usage versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 06:05:54 2014 From: report at bugs.python.org (Zachary Ware) Date: Sun, 06 Jul 2014 04:05:54 +0000 Subject: [issue17652] Add skip_on_windows decorator to test.support In-Reply-To: <1365353236.0.0.311562843433.issue17652@psf.upfronthosting.co.za> Message-ID: <1404619554.94.0.369765355147.issue17652@psf.upfronthosting.co.za> Zachary Ware added the comment: The patch looks fine, but I don't see a big gain from it; call me +0. It might be interesting to see a patch that converts current "@skipIf(sys.platform == 'win32' or os.name == 'nt')" instances to "@skip_on_windows" to see just what kind of difference it makes, but I'm honestly more interested in seeing how many different ways "don't run this test on Windows" is spelled currently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 07:30:47 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 06 Jul 2014 05:30:47 +0000 Subject: [issue21925] ResouceWarning sometimes doesn't display In-Reply-To: <1404614973.3.0.388136336832.issue21925@psf.upfronthosting.co.za> Message-ID: <1404624647.27.0.692928217696.issue21925@psf.upfronthosting.co.za> Ned Deily added the comment: I believe this is an artifact of hash randomization which affects the order of how objects are destroyed during shutdown. If you run your test using different values of the PYTHONHASHSEED environment variable, you'll probably see predictable results. For example, with a particular build of Python 3.4.1, if I set PYTHONHASHSEED set to 0, thereby disabling hash randomization, I never see the warning: PYTHONHASHSEED=0 python3.4 -W all test_warning.py With it set to 1, I always see the warning. With 2, no warning. With no PYTHONHASHSEED, I see random behavior similar to your results. I don't think there is anything to be done here as Python makes no promises about when and in what order objects are collected. https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 07:32:42 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 06 Jul 2014 05:32:42 +0000 Subject: [issue21880] IDLE: Ability to run 3rd party code checkers In-Reply-To: <1404571857.56.0.78065919825.issue21880@psf.upfronthosting.co.za> Message-ID: <53B8DF59.9060808@udel.edu> Terry J. Reedy added the comment: I was going to work on this 'today' (well, Saturday), but I injured my eye a bit and cannot see well enough to work on code. I am hoping things will be better after sleeping for a night. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 07:56:56 2014 From: report at bugs.python.org (paul j3) Date: Sun, 06 Jul 2014 05:56:56 +0000 Subject: [issue10190] Can argparse._AttributeHolder._get_kwargs become a public API? In-Reply-To: <1287981887.42.0.335099838745.issue10190@psf.upfronthosting.co.za> Message-ID: <1404626216.94.0.25180262627.issue10190@psf.upfronthosting.co.za> paul j3 added the comment: Apart from sorting, `_get_kwargs` does little more than: return [k for k in action.__dict__.items() if not k[0].startswith('_')] That is, it's the `items()` of the 'public' attributes of the action (or parser). Those attributes are already accessible to the code that is using 'argparse'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 08:04:03 2014 From: report at bugs.python.org (Ben Lucato) Date: Sun, 06 Jul 2014 06:04:03 +0000 Subject: [issue21926] Bundle C++ compiler with Python on Windows Message-ID: <1404626643.71.0.229210257111.issue21926@psf.upfronthosting.co.za> New submission from Ben Lucato: I am wondering if it is at all on the roadmap to bundle a C compiler with Python on Windows, given that installing libraries with C extensions is very confusing on Windows. For example, to install NumPy on Windows you end up either having to download the right version of Visual Studio or install it from the list of precompiled libraries at http://www.lfd.uci.edu/~gohlke/pythonlibs/. The problem is, either of those solutions feel quite bloated and aren't easily apparent when searching for fixes online. BTW, since this is my first issue I looked around for a guide on how to submit issues but I couldn't find one - so I hope I'm raising it right. ---------- components: Windows messages: 222395 nosy: Ben.Lucato priority: normal severity: normal status: open title: Bundle C++ compiler with Python on Windows versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 08:33:18 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Jul 2014 06:33:18 +0000 Subject: [issue9554] test_argparse.py: use new unittest features In-Reply-To: <1281408827.47.0.183260667114.issue9554@psf.upfronthosting.co.za> Message-ID: <3h5g8Y1YZdz7LsG@mail.python.org> Roundup Robot added the comment: New changeset f240ca6345c8 by Berker Peksag in branch 'default': Issue #9554: Use modern unittest features in test_argparse. http://hg.python.org/cpython/rev/f240ca6345c8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 08:34:49 2014 From: report at bugs.python.org (Berker Peksag) Date: Sun, 06 Jul 2014 06:34:49 +0000 Subject: [issue9554] test_argparse.py: use new unittest features In-Reply-To: <1281408827.47.0.183260667114.issue9554@psf.upfronthosting.co.za> Message-ID: <1404628489.79.0.742329876261.issue9554@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks Denver and Radu. And thanks for the review, Ezio. ---------- assignee: -> berker.peksag resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 08:54:21 2014 From: report at bugs.python.org (Berker Peksag) Date: Sun, 06 Jul 2014 06:54:21 +0000 Subject: [issue2403] Add figleaf coverage metrics In-Reply-To: <1205869378.43.0.216108511876.issue2403@psf.upfronthosting.co.za> Message-ID: <1404629661.43.0.513301485206.issue2403@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 09:03:50 2014 From: report at bugs.python.org (Lita Cho) Date: Sun, 06 Jul 2014 07:03:50 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404630230.39.0.587047331555.issue21597@psf.upfronthosting.co.za> Lita Cho added the comment: Hey Terry, So the reason why the tearing is a lot slower in 06/09 patch is because the canvas is using the turtle.ScrolledCanvas widget. Everytime the window resizes, it is calling a callback to `onResize` -> `adjustScrolls` to update the scrollbars. When I comment out that binding in turtle.py (line 358) it still tears, but it snaps back a lot quicker. The main widget is already a 2x2 grid (ScrolledCanvas). I tried just returning the ScrolledCanvas, but that didn't work either. I will try to ask in stackoverflow tomorrow and seeing what they say! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 10:55:37 2014 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 06 Jul 2014 08:55:37 +0000 Subject: [issue14121] add a convenience C-API function for unpacking iterables In-Reply-To: <1330161121.09.0.794717935446.issue14121@psf.upfronthosting.co.za> Message-ID: <1404636937.48.0.265921931707.issue14121@psf.upfronthosting.co.za> Stefan Behnel added the comment: Ok. This has been idling long enough to just close it. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 11:52:01 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 06 Jul 2014 09:52:01 +0000 Subject: [issue21923] distutils.sysconfig.customize_compiler will try to read variable that has not been initialized In-Reply-To: <1404578660.09.0.628845153111.issue21923@psf.upfronthosting.co.za> Message-ID: <1404640321.29.0.770639205982.issue21923@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the patch, Alex, and sorry about the bug. The fix looks good. I've added a test that should be valid whether or not a compiler is available and, I hope, on Windows (I haven't tested it there). ---------- stage: -> patch review versions: +Python 3.5 -Python 3.2, Python 3.3 Added file: http://bugs.python.org/file35872/issue21923_3x.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 11:52:22 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 06 Jul 2014 09:52:22 +0000 Subject: [issue21923] distutils.sysconfig.customize_compiler will try to read variable that has not been initialized In-Reply-To: <1404578660.09.0.628845153111.issue21923@psf.upfronthosting.co.za> Message-ID: <1404640342.76.0.516041514169.issue21923@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file35873/issue21923_27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 12:51:57 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 06 Jul 2014 10:51:57 +0000 Subject: [issue12523] 'str' object has no attribute 'more' [/usr/lib/python3.2/asynchat.py|initiate_send|245] In-Reply-To: <1310256264.97.0.142665013721.issue12523@psf.upfronthosting.co.za> Message-ID: <1404643917.51.0.614850429248.issue12523@psf.upfronthosting.co.za> Mark Lawrence added the comment: Just close this as asynchat is deprecated from 3.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 13:53:57 2014 From: report at bugs.python.org (Konstantin S. Solnushkin) Date: Sun, 06 Jul 2014 11:53:57 +0000 Subject: [issue21323] CGI HTTP server not running scripts from subdirectories In-Reply-To: <1398107131.28.0.812868414728.issue21323@psf.upfronthosting.co.za> Message-ID: <1404647637.73.1.80383978877e-05.issue21323@psf.upfronthosting.co.za> Konstantin S. Solnushkin added the comment: Hi, I am curious about the fate of this issue -- whether it will be recognised as a bug (possibly a regression bug). Remember, it worked in Python 3.3 but stopped working in 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 15:14:32 2014 From: report at bugs.python.org (Masami HIRATA) Date: Sun, 06 Jul 2014 13:14:32 +0000 Subject: [issue21052] Consider dropping ImportWarning for empty sys.path_hooks and sys.meta_path In-Reply-To: <1395681608.6.0.965988272103.issue21052@psf.upfronthosting.co.za> Message-ID: <1404652472.04.0.282428075274.issue21052@psf.upfronthosting.co.za> Masami HIRATA added the comment: Hi, I can reproduce this issue with the following steps. $ uname -a Linux ashrose 3.2.0-65-generic #99-Ubuntu SMP Fri Jul 4 21:03:29 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux $ python3.4 --version Python 3.4.1 $ touch spam.txt $ python3.4 -Wa -c "class A: pass; a = open('spam.txt')" sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='spam.txt' mode='r' encoding='UTF-8'> _frozen_importlib:2150: ImportWarning: sys.meta_path is empty _frozen_importlib:2150: ImportWarning: sys.meta_path is empty _frozen_importlib:2150: ImportWarning: sys.meta_path is empty _frozen_importlib:2150: ImportWarning: sys.meta_path is empty _frozen_importlib:2150: ImportWarning: sys.meta_path is empty ... $ python3.4 -Wa -c "a = open('spam.txt')" sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='spam.txt' mode='r' encoding='UTF-8'> $ python3.4 -Wa -c "class A: pass; open('spam.txt')" -c:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='spam.txt' mode='r' encoding='UTF-8'> $ ---------- nosy: +msmhrt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 15:30:17 2014 From: report at bugs.python.org (=?utf-8?q?Francisco_Mart=C3=ADn_Brugu=C3=A9?=) Date: Sun, 06 Jul 2014 13:30:17 +0000 Subject: [issue1602742] itemconfigure returns incorrect text property of text items Message-ID: <1404653417.88.0.318462483032.issue1602742@psf.upfronthosting.co.za> Francisco Mart?n Brugu? added the comment: Hi, just a question: the status of this issue is pending but it seems to be already resolved/duplicated. Means that this issue can be closed? Thansk in advance! ---------- nosy: +francismb status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 16:04:00 2014 From: report at bugs.python.org (Berker Peksag) Date: Sun, 06 Jul 2014 14:04:00 +0000 Subject: [issue1602742] itemconfigure returns incorrect text property of text items Message-ID: <1404655440.86.0.42155671556.issue1602742@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 16:11:47 2014 From: report at bugs.python.org (Alex Gaynor) Date: Sun, 06 Jul 2014 14:11:47 +0000 Subject: [issue21923] distutils.sysconfig.customize_compiler will try to read variable that has not been initialized In-Reply-To: <1404578660.09.0.628845153111.issue21923@psf.upfronthosting.co.za> Message-ID: <1404655907.57.0.762723783694.issue21923@psf.upfronthosting.co.za> Alex Gaynor added the comment: Test looks reasonable to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 16:39:22 2014 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 06 Jul 2014 14:39:22 +0000 Subject: [issue21927] BOM appears in stdin when using Powershell Message-ID: <1404657562.39.0.323212380566.issue21927@psf.upfronthosting.co.za> New submission from Jason R. Coombs: Consider this simple example in Powershell (Windows 8.1): C:\Users\jaraco> cat .\print-input.py import sys print(next(sys.stdin)) C:\Users\jaraco> echo foo | .\print-input.py ???foo The BOM (byte order mark) appears in the standard input stream. When using cmd.exe, the BOM is not present. This behavior occurs in CP1252 as well as CP65001. I suspect that Python should be detecting/stripping and possibly honoring the BOM when decoding input on stdin. This issue is present in Python 3.4.0 and Python 3.4.1. I have not tested other Python versions. ---------- components: Unicode, Windows messages: 222406 nosy: ezio.melotti, haypo, jason.coombs priority: normal severity: normal status: open title: BOM appears in stdin when using Powershell versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 17:14:02 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 06 Jul 2014 15:14:02 +0000 Subject: [issue10374] distutils[2] should recreate scripts in the build tree In-Reply-To: <1289308289.62.0.579780588392.issue10374@psf.upfronthosting.co.za> Message-ID: <1404659642.32.0.46855772834.issue10374@psf.upfronthosting.co.za> Mark Lawrence added the comment: I always find distutils anything but easy :) ---------- components: -Distutils2 nosy: +BreamoreBoy, dstufft versions: +Python 3.4, Python 3.5 -3rd party, Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 17:43:41 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 06 Jul 2014 15:43:41 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1404661421.29.0.775145686638.issue16438@psf.upfronthosting.co.za> Mark Lawrence added the comment: I find the numeric operator predecence simply wrong, not confusing, so +1 from me for applying the attached patch from ktt3ja. It's as simple as possible but no simpler :) ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 19:22:22 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 06 Jul 2014 17:22:22 +0000 Subject: [issue1565071] update Lib/plat-linux2/IN.py Message-ID: <1404667342.64.0.665364691986.issue1565071@psf.upfronthosting.co.za> Mark Lawrence added the comment: Related issues via #12619 include #3990 and #19554. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 19:38:05 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 06 Jul 2014 17:38:05 +0000 Subject: [issue4256] argparse: provide a simple way to get a programmatically useful list of options In-Reply-To: <1225729854.98.0.852900527881.issue4256@psf.upfronthosting.co.za> Message-ID: <1404668285.83.0.432762332713.issue4256@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +paul.j3 versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 19:39:43 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 06 Jul 2014 17:39:43 +0000 Subject: [issue6114] distutils build_ext path comparison only based on strings In-Reply-To: <1243335359.03.0.865660639037.issue6114@psf.upfronthosting.co.za> Message-ID: <1404668383.81.0.781639502282.issue6114@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- components: -Distutils2 nosy: +dstufft versions: +Python 3.4, Python 3.5 -3rd party, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 19:58:07 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Jul 2014 17:58:07 +0000 Subject: [issue20135] FAQ need list mutation answers In-Reply-To: <1388979444.45.0.0357103143169.issue20135@psf.upfronthosting.co.za> Message-ID: <3h5yLk6gsCz7LmN@mail.python.org> Roundup Robot added the comment: New changeset 3881c12fa3ae by Ezio Melotti in branch '2.7': #20135: move FAQ about mutable default arguments to the programming FAQs page. http://hg.python.org/cpython/rev/3881c12fa3ae New changeset 3b7b0f5aac1e by Ezio Melotti in branch '3.4': #20135: move FAQ about mutable default arguments to the programming FAQs page. http://hg.python.org/cpython/rev/3b7b0f5aac1e New changeset f2a36b01ac02 by Ezio Melotti in branch 'default': #20135: merge with 3.4. http://hg.python.org/cpython/rev/f2a36b01ac02 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 20:56:59 2014 From: report at bugs.python.org (Lita Cho) Date: Sun, 06 Jul 2014 18:56:59 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404673019.48.0.0588802563514.issue21597@psf.upfronthosting.co.za> Lita Cho added the comment: I also put this patch out there. This doesn't have the PaneWindow, but I manually widen the text pane. This would be the compromise if I can't figure out the tearing due to the sash moving. ---------- Added file: http://bugs.python.org/file35874/turtledemo_grid.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 21:15:04 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 06 Jul 2014 19:15:04 +0000 Subject: [issue20135] FAQ need list mutation answers In-Reply-To: <1388979444.45.0.0357103143169.issue20135@psf.upfronthosting.co.za> Message-ID: <1404674104.46.0.373845958568.issue20135@psf.upfronthosting.co.za> Ezio Melotti added the comment: I moved the FAQ about mutable default arguments to the programming FAQs page. I was going to do a review about new FAQ, but it since I had several comments I just tried to rewrite it and make a new patch. Do you think this is clear enough? ---------- Added file: http://bugs.python.org/file35875/issue20135.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 21:34:41 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 06 Jul 2014 19:34:41 +0000 Subject: [issue20135] FAQ need list mutation answers In-Reply-To: <1388979444.45.0.0357103143169.issue20135@psf.upfronthosting.co.za> Message-ID: <1404675281.82.0.129077381535.issue20135@psf.upfronthosting.co.za> Mark Lawrence added the comment: +1 from me, I thought it was crystal clear. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 21:35:50 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 06 Jul 2014 19:35:50 +0000 Subject: [issue1581182] Definition of a "character" is wrong Message-ID: <1404675350.31.0.475738544296.issue1581182@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- resolution: -> duplicate stage: needs patch -> resolved status: languishing -> closed superseder: -> Issues in Unicode HOWTO _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 21:36:28 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 06 Jul 2014 19:36:28 +0000 Subject: [issue20906] Issues in Unicode HOWTO In-Reply-To: <1394702187.81.0.00522221343959.issue20906@psf.upfronthosting.co.za> Message-ID: <1404675388.09.0.492595594756.issue20906@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #1581182. ---------- stage: -> needs patch versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 21:45:06 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 06 Jul 2014 19:45:06 +0000 Subject: [issue1660009] continuing problem with httplib multiple set-cookie headers Message-ID: <1404675906.38.0.0693154942275.issue1660009@psf.upfronthosting.co.za> Mark Lawrence added the comment: msg179391 states this is fixed in Python 3 so we can close this as "out of date". ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 21:53:04 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 06 Jul 2014 19:53:04 +0000 Subject: [issue1610654] cgi.py multipart/form-data Message-ID: <1404676384.59.0.109384711682.issue1610654@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Hynek could you port the patch as you've shown some interest in it? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 22:51:19 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 06 Jul 2014 20:51:19 +0000 Subject: [issue12602] Missing cross-references in Doc/using In-Reply-To: <1311249393.53.0.190511112739.issue12602@psf.upfronthosting.co.za> Message-ID: <1404679879.68.0.792297727894.issue12602@psf.upfronthosting.co.za> Ezio Melotti added the comment: Patch LGTM. ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 23:03:01 2014 From: report at bugs.python.org (Tal Einat) Date: Sun, 06 Jul 2014 21:03:01 +0000 Subject: [issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers. In-Reply-To: <1402787574.99.0.986548729035.issue21765@psf.upfronthosting.co.za> Message-ID: <1404680581.99.0.877331282597.issue21765@psf.upfronthosting.co.za> Tal Einat added the comment: Indeed, I seem to have been misinterpreting the grammar, despite taking care and reading it several times. This strengthens my opinion that we should use str.isidentifier() rather than attempt to correctly re-implement just the parts that we need. Attached is a patch which fixes HyperParser._eat_identifier(), to the extent of my testing (tests included). When non-ASCII characters are encountered, this patch uses Terry's suggestion of checking for valid identifier characters using ('a' + string_part).isidentifier(). It also employs his suggestion of how to avoid executing this check at every index, by skipping 4 characters at a time. However, even with this fix, HyperParser.get_expression() still fails with non-ASCII Unicode strings. This is because it uses PyParse, which doesn't support Unicode! For example, it apparently replaces all non-ASCII characters with 'x'. I've added (in this patch) a few tests for this, which currently fail. FWIW, PyParse includes a comment to this effect[1]: The parse functions have no idea what to do with Unicode, so replace all Unicode characters with "x". This is "safe" so long as the only characters germane to parsing the structure of Python are 7-bit ASCII. It's *necessary* because Unicode strings don't have a .translate() method that supports deletechars. Properly resolving this issue will apparently require fixing PyParse to properly support Unicode. .. [1]: http://hg.python.org/cpython/file/d25ae22cc992/Lib/idlelib/PyParse.py#l117 ---------- keywords: +patch Added file: http://bugs.python.org/file35876/taleinat.20140706.IDLE_HyperParser_unicode_ids.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 6 23:37:03 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 06 Jul 2014 21:37:03 +0000 Subject: [issue614557] LookupError etc. need API to get the key Message-ID: <1404682623.56.0.427156329553.issue614557@psf.upfronthosting.co.za> Mark Lawrence added the comment: See also #18156, #18163, #18165 and #18166, possibly others? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 00:00:07 2014 From: report at bugs.python.org (Lita Cho) Date: Sun, 06 Jul 2014 22:00:07 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404684007.68.0.467660877186.issue21597@psf.upfronthosting.co.za> Lita Cho added the comment: ?! After debugging for awhile, I got it so that PanedWindow doesn't cause the rightmost widget to tear! I had to disable the resizing binding on Turtle to make it work. However, now it seems like the canvas is no longer centered. Is there anyway for me to get around this? Maybe I disable the binding on the demo side and re-adjust the center when we initialize the canvas? I want to make sure it works for you guys first before digging into it. ---------- Added file: http://bugs.python.org/file35877/turtledemo_pane_srcoll_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 00:06:00 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 06 Jul 2014 22:06:00 +0000 Subject: [issue21323] CGI HTTP server not running scripts from subdirectories In-Reply-To: <1398107131.28.0.812868414728.issue21323@psf.upfronthosting.co.za> Message-ID: <1404684360.83.0.281761417435.issue21323@psf.upfronthosting.co.za> Ned Deily added the comment: The change in behavior is definitely caused by the changes for Issue19435. The code added there does not work correctly if there are nested directories in the "cgi-bin" directory; for one thing, the initial os.path.isdir(scriptdir) test in run_cgi is failing because the path in nextdir is missing the dir component: it's testing /path/to/test instead of /path/to/cgi-bin/test. I didn't look further. Along with a fix, there should be a test for nested directories. And decide whether to fix the regression it presumably caused in the security branches as well. http://hg.python.org/cpython/file/d25ae22cc992/Lib/http/server.py#l1009 ---------- keywords: +buildbot nosy: +benjamin.peterson, ned.deily priority: normal -> high stage: -> needs patch versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 00:30:26 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 06 Jul 2014 22:30:26 +0000 Subject: [issue20187] The Great Argument Clinic Conversion Derby Meta-Issue In-Reply-To: <1389141105.5.0.459903580868.issue20187@psf.upfronthosting.co.za> Message-ID: <1404685826.41.0.475912508984.issue20187@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 00:43:10 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 06 Jul 2014 22:43:10 +0000 Subject: [issue21323] CGI HTTP server not running scripts from subdirectories In-Reply-To: <1398107131.28.0.812868414728.issue21323@psf.upfronthosting.co.za> Message-ID: <1404686590.2.0.246851692551.issue21323@psf.upfronthosting.co.za> Ned Deily added the comment: BTW, if someone is looking for an issue to help out with, this might be a good choice. ---------- keywords: +easy -buildbot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 01:03:33 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 06 Jul 2014 23:03:33 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404687813.08.0.897398811425.issue21597@psf.upfronthosting.co.za> Ned Deily added the comment: Lita, turtledemo_pane_srcoll_fix.patch definitely solves the "tearing" problems (when viewed with OS X Cocoa and X11 Tk's): yay! Good luck with getting the centering working! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 01:18:16 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Jul 2014 23:18:16 +0000 Subject: [issue21923] distutils.sysconfig.customize_compiler will try to read variable that has not been initialized In-Reply-To: <1404578660.09.0.628845153111.issue21923@psf.upfronthosting.co.za> Message-ID: <3h65S762bMz7LjT@mail.python.org> Roundup Robot added the comment: New changeset bdbfbb57e37e by Ned Deily in branch '2.7': Issue #21923: Prevent AttributeError in distutils.sysconfig.customize_compiler http://hg.python.org/cpython/rev/bdbfbb57e37e New changeset 78fa18e95445 by Ned Deily in branch '3.4': Issue #21923: Prevent AttributeError in distutils.sysconfig.customize_compiler http://hg.python.org/cpython/rev/78fa18e95445 New changeset 12546bfa1f4f by Ned Deily in branch 'default': Issue #21923: merge from 3.4 http://hg.python.org/cpython/rev/12546bfa1f4f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 01:24:57 2014 From: report at bugs.python.org (Lita Cho) Date: Sun, 06 Jul 2014 23:24:57 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404689097.64.0.858549527449.issue21597@psf.upfronthosting.co.za> Lita Cho added the comment: !!!! I think I have a fix!! I made it so that centering works while fixing the tearing. For some reason, in the Turtle API, the adjustScrolls method creates a new scroll widget for x and y and deletes the old one. I am not sure why it does it this way. I'm sure there is a reason for it though. For the demo, I overwrote the onResize method so that it centers canvas but doesn't instantiate a new scroll widget and throws away the old one, which fixes the tearing! I would love for someone to review the patch. Thanks! ---------- Added file: http://bugs.python.org/file35878/turtledemo_pane_srcoll_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 02:05:51 2014 From: report at bugs.python.org (Dustin Oprea) Date: Mon, 07 Jul 2014 00:05:51 +0000 Subject: [issue21928] Incorrect reference to partial() in functools.wraps documentation Message-ID: <1404691551.32.0.43724066382.issue21928@psf.upfronthosting.co.za> New submission from Dustin Oprea: functools.wraps docs say "This is a convenience function for invoking partial(update_wrapper, wrapped=wrapped, assigned=assigned, updated=updated) as a function decorator when defining a wrapper function." The referenced function should be update_wrapper(), not partial(). ---------- assignee: docs at python components: Documentation messages: 222426 nosy: Dustin.Oprea, docs at python priority: normal severity: normal status: open title: Incorrect reference to partial() in functools.wraps documentation versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 02:18:27 2014 From: report at bugs.python.org (paul j3) Date: Mon, 07 Jul 2014 00:18:27 +0000 Subject: [issue9571] argparse: Allow the use of -- to break out of nargs and into subparser In-Reply-To: <1281554487.14.0.725527410465.issue9571@psf.upfronthosting.co.za> Message-ID: <1404692307.14.0.799271949275.issue9571@psf.upfronthosting.co.za> paul j3 added the comment: In elsdoerfer's example, the '--' effectively ends the argument list for '--ignore'. '--' are not allowed in the arguments of an optional (see the end of '_get_nargs_pattern()'). Rather the problem is at the start of _get_values() if action.nargs not in [PARSER, REMAINDER]: arg_strings = [s for s in arg_strings if s != '--'] '--' is not stripped out of the 'parser' input, hence the error message: error: invalid choice: '--' You can see this by replacing the subparsers with an argument with 'nargs=PARSER'. The argument will get `['--','COMMAND',...]`. http://bugs.python.org/issue13922 tries to rework how '--' are handled. Ideally only the current '--' should be removed, leaving the rest to be handled by the subparser (or whoever else gets the strings). Looks like the 13922 fix needs another fix, one that removes '--' if it is the 1st string for a REMAINDER or PARSER argument. With that fix: ./script.py --ignore one two -- COMMAND arg1 arg2 should work, assigning ['one','two'] to 'ignore', and ['arg1','arg2'] to 'COMMAND's positional. (I've tested this in a development version with many other changes. I'll try to write a simpler patch.) ---------------- If a 'end of a list' flag is still needed (as between 2 * positionals), a 'counter' or 'store_true' optional could be used. Or a new action class that doesn't write anything to the namespace could be written. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 03:38:47 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 01:38:47 +0000 Subject: [issue20639] pathlib.PurePath.with_suffix() does not allow removing the suffix In-Reply-To: <1392557330.28.0.692268458915.issue20639@psf.upfronthosting.co.za> Message-ID: <3h68ZG3GRTz7Ljd@mail.python.org> Roundup Robot added the comment: New changeset 0d84855861ff by Antoine Pitrou in branch '3.4': Issue #20639: calling Path.with_suffix('') allows removing the suffix again. http://hg.python.org/cpython/rev/0d84855861ff ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 03:38:48 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 01:38:48 +0000 Subject: [issue21714] Path.with_name can construct invalid paths In-Reply-To: <1402465166.82.0.496470455769.issue21714@psf.upfronthosting.co.za> Message-ID: <3h68ZH1cxxz7Ljd@mail.python.org> Roundup Robot added the comment: New changeset c2636b5816a3 by Antoine Pitrou in branch '3.4': Issue #21714: Disallow the construction of invalid paths using Path.with_name(). Original patch by Antony Lee. http://hg.python.org/cpython/rev/c2636b5816a3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 03:39:34 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Jul 2014 01:39:34 +0000 Subject: [issue20639] pathlib.PurePath.with_suffix() does not allow removing the suffix In-Reply-To: <1392557330.28.0.692268458915.issue20639@psf.upfronthosting.co.za> Message-ID: <1404697174.64.0.216032985002.issue20639@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sorry for the delay! The patch is now applied. Thank you for contributing! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 03:40:30 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Jul 2014 01:40:30 +0000 Subject: [issue21714] Path.with_name can construct invalid paths In-Reply-To: <1402465166.82.0.496470455769.issue21714@psf.upfronthosting.co.za> Message-ID: <1404697230.14.0.713619320443.issue21714@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, patch now applied (as well as the original patch for with_suffix()). Thank you very much! ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 06:30:15 2014 From: report at bugs.python.org (Ned Deily) Date: Mon, 07 Jul 2014 04:30:15 +0000 Subject: [issue21923] distutils.sysconfig.customize_compiler will try to read variable that has not been initialized In-Reply-To: <1404578660.09.0.628845153111.issue21923@psf.upfronthosting.co.za> Message-ID: <1404707415.06.0.167455603876.issue21923@psf.upfronthosting.co.za> Ned Deily added the comment: Committed for release in 2.7.9, 3.4.2, and 3.5.0. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 07:36:21 2014 From: report at bugs.python.org (Claudiu Popa) Date: Mon, 07 Jul 2014 05:36:21 +0000 Subject: [issue21518] Expose RegUnloadKey in winreg In-Reply-To: <1400346760.52.0.0203244636304.issue21518@psf.upfronthosting.co.za> Message-ID: <1404711381.15.0.621037707277.issue21518@psf.upfronthosting.co.za> Claudiu Popa added the comment: Any type of feedback will be appreciated. ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 08:20:32 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Jul 2014 06:20:32 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404714032.3.0.530587983429.issue21597@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Great improvement. Full screen on my system, the artifact ghosting band is about 1/4 inch, as with the empty panes, instead of several inches, as it was in the original patch moving right to left. This worst-case (Windows) behavior is good enough to commit when I recover enough from a minor eye injury to read and review the actual code. The one thing I think this patch still needs is a notice to the user that the sash can be moved. Once place is one of the help files. I can do that. Can we also put a line in the text box on startup? "Change text pane width by moving the divider ==>" With wider text panes, the tiny font, which is too small for my less than perfect, uninjured, 'normal' vision, is no longer necessary. Lita, feel free to open another issue and start on a patch. I think the best option be to have control-mousewheel change size, as is standard in browsers. (And add help text.) If tk has a problem with that, a second choice would be a menu entry "Font size with choices such as the current size (9?), 10, 12, 14. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 08:37:08 2014 From: report at bugs.python.org (Ned Deily) Date: Mon, 07 Jul 2014 06:37:08 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404715028.26.0.797462920003.issue21597@psf.upfronthosting.co.za> Ned Deily added the comment: > The one thing I think this patch still needs is a notice to the user that the > sash can be moved. Once place is one of the help files. I can do that. Can we > also put a line in the text box on startup? > "Change text pane width by moving the divider ==>" Is that really necessary? Adjustable dividers like that have been a standard user interface element on desktop applications for a long time. I would expect most users to be surprised to find that it didn't adjust. And Tk, at least on the OS X ones I tried, provides a visual clue that the frame is adjustable by changing the cursor to a 2-headed arrow when mousing over the slider. Adding something to the help files is sufficient, I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 08:56:52 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 07 Jul 2014 06:56:52 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <1404716212.88.0.438497797793.issue21907@psf.upfronthosting.co.za> Martin v. L?wis added the comment: All fine with me. As for buildmsi.bat: note that we used to have a "daily msi" builder that was using the script. It took too much effort to keep it running. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 09:08:18 2014 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 07 Jul 2014 07:08:18 +0000 Subject: [issue21803] Remove macro indirections in complexobject In-Reply-To: <1403118051.82.0.958241354648.issue21803@psf.upfronthosting.co.za> Message-ID: <1404716898.72.0.695810564922.issue21803@psf.upfronthosting.co.za> Mark Dickinson added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 09:08:44 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 07 Jul 2014 07:08:44 +0000 Subject: [issue19714] Add tests for importlib.machinery.WindowsRegistryFinder In-Reply-To: <1385139731.13.0.379714643713.issue19714@psf.upfronthosting.co.za> Message-ID: <1404716924.97.0.527097464786.issue19714@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch looks fine to me. Someone please apply. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 09:10:31 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 07 Jul 2014 07:10:31 +0000 Subject: [issue21926] Bundle C++ compiler with Python on Windows In-Reply-To: <1404626643.71.0.229210257111.issue21926@psf.upfronthosting.co.za> Message-ID: <1404717031.17.0.347278992429.issue21926@psf.upfronthosting.co.za> Martin v. L?wis added the comment: No, it's not on the roadmap. The recommended compiler is Microsoft Visual C, which we are not legally allowed to redistribute. ---------- nosy: +loewis resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 09:11:08 2014 From: report at bugs.python.org (Berker Peksag) Date: Mon, 07 Jul 2014 07:11:08 +0000 Subject: [issue20135] FAQ need list mutation answers In-Reply-To: <1388979444.45.0.0357103143169.issue20135@psf.upfronthosting.co.za> Message-ID: <1404717068.56.0.0319664450317.issue20135@psf.upfronthosting.co.za> Berker Peksag added the comment: LGTM. ---------- nosy: +berker.peksag stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 09:15:57 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Jul 2014 07:15:57 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404717357.26.0.759741992807.issue21597@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I don't really know what most beginners will expect. Perhaps an entry in the help will be enough. I would like have a better how to use summary at the top of the file anyway. If I swish the normal cursor across the divide, it jumps from I-bar on text side to arrow on canvas side without even displaying the two-headed arrow. Checking with a magnifying glass, I have to pause the cursor in the 3 pixels wide gray shadow of the solid black line*. (The And even then, the cursor does not always switch. Since this patch does not use ttk, I will try 'showhandle=True' and see how it looks and behaves. The shadow is not normal for Windows divider lines. It would be better is if could be turned off. The 'sensitive' zone of about 3 (maybe 4) pixels to the right or under the line seems to be normal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 10:12:32 2014 From: report at bugs.python.org (Andy Maier) Date: Mon, 07 Jul 2014 08:12:32 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1404720752.53.0.29322956692.issue12067@psf.upfronthosting.co.za> Andy Maier added the comment: I see. But I don't think it is a sensible default, as the source code states. The Python doc (v2 and v3) is quite consistent in stating that `==` compares the values of two objects, while `is` compares object identity. Having a default implementation on the object type that implements `==` by comparing object identity is not consistent with that. -> Can someone please elaborate what the reason for that is? -> Where is the discrepancy between the documentation of == and its default implementation on object documented? To me, a sensible default implementation for == on object would be (in Python): if v is w: return True; elif type(v) != type(w): return False else: raise ValueError("Equality cannot be determined in default implementation") Andy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 11:57:13 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 07 Jul 2014 09:57:13 +0000 Subject: [issue20135] FAQ need list mutation answers In-Reply-To: <1388979444.45.0.0357103143169.issue20135@psf.upfronthosting.co.za> Message-ID: <1404727033.9.0.340464665018.issue20135@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: docs at python -> ezio.melotti nosy: +rhettinger stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 12:31:31 2014 From: report at bugs.python.org (Andy Maier) Date: Mon, 07 Jul 2014 10:31:31 +0000 Subject: [issue10289] Document magic methods called by built-in functions In-Reply-To: <1288655696.94.0.809001507215.issue10289@psf.upfronthosting.co.za> Message-ID: <1404729091.94.0.023401629837.issue10289@psf.upfronthosting.co.za> Andy Maier added the comment: Uploaded a patch for Python 3.4, and for merging into "default". The patch addresses items 1) to 3) from my previous post; item 4) does not need to be addressed IMHO. Andy ---------- keywords: +patch Added file: http://bugs.python.org/file35879/issue10289-magic-py34_v1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 12:35:06 2014 From: report at bugs.python.org (Jeroen de Jong) Date: Mon, 07 Jul 2014 10:35:06 +0000 Subject: [issue21929] Rounding properly Message-ID: <1404729306.28.0.45044219182.issue21929@psf.upfronthosting.co.za> New submission from Jeroen de Jong: I ma trying to find a way to round correctly. So far I get unexpected results for some values. ---------- components: Windows files: Rounding.py messages: 222444 nosy: jeroen1225 priority: normal severity: normal status: open title: Rounding properly type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file35880/Rounding.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 12:35:56 2014 From: report at bugs.python.org (Berker Peksag) Date: Mon, 07 Jul 2014 10:35:56 +0000 Subject: [issue16099] robotparser doesn't support request rate and crawl delay parameters In-Reply-To: <1349096305.17.0.983395980337.issue16099@psf.upfronthosting.co.za> Message-ID: <1404729356.89.0.697521951974.issue16099@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- assignee: -> berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 12:39:09 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 07 Jul 2014 10:39:09 +0000 Subject: [issue21929] Rounding properly In-Reply-To: <1404729306.28.0.45044219182.issue21929@psf.upfronthosting.co.za> Message-ID: <1404729549.41.0.180715561022.issue21929@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +mark.dickinson, skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 12:48:30 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 10:48:30 +0000 Subject: [issue21881] python cannot parse tcl value In-Reply-To: <1404070726.81.0.038892791749.issue21881@psf.upfronthosting.co.za> Message-ID: <3h6NmY41Lyz7Lks@mail.python.org> Roundup Robot added the comment: New changeset 4514804d0e50 by Serhiy Storchaka in branch '2.7': Issue #21881: Be more tolerant in test_tcl to not parsable by float() NaN http://hg.python.org/cpython/rev/4514804d0e50 New changeset 4879f6337ef6 by Serhiy Storchaka in branch '3.4': Issue #21881: Be more tolerant in test_tcl to not parsable by float() NaN http://hg.python.org/cpython/rev/4879f6337ef6 New changeset 72289f574664 by Serhiy Storchaka in branch 'default': Issue #21881: Be more tolerant in test_tcl to not parsable by float() NaN http://hg.python.org/cpython/rev/72289f574664 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 12:50:04 2014 From: report at bugs.python.org (Andy Maier) Date: Mon, 07 Jul 2014 10:50:04 +0000 Subject: [issue10289] Document magic methods called by built-in functions In-Reply-To: <1288655696.94.0.809001507215.issue10289@psf.upfronthosting.co.za> Message-ID: <1404730204.11.0.987461204908.issue10289@psf.upfronthosting.co.za> Andy Maier added the comment: Uploaded v2 of the 3.4/default patch, which removes the comment line at the top of Doc/library/functions.rst (mentioned by ?ric in the original message of this issue). -> Please review the patch. -> Please also double check whether there are any additional built-in functions in 3.x that have a need to document their underlying __special__ functions. Andy ---------- Added file: http://bugs.python.org/file35881/issue10289-magic-py34_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 12:59:06 2014 From: report at bugs.python.org (Andy Maier) Date: Mon, 07 Jul 2014 10:59:06 +0000 Subject: [issue14050] Tutorial, list.sort() and items comparability In-Reply-To: <1329584329.12.0.545057513034.issue14050@psf.upfronthosting.co.za> Message-ID: <1404730746.39.0.891487284428.issue14050@psf.upfronthosting.co.za> Andy Maier added the comment: Comments on v2 of both patches: 1. The paragraph "Each item needs to ..." describes the requirement in terms of "ordering relationships between items". It would be both simpler and less ambiguous to describe the requirement in terms of "type must be orderable". See the text added to sorted() as part of the patch for issue10289, for details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 13:09:41 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 11:09:41 +0000 Subject: [issue19593] Use specific asserts in importlib tests In-Reply-To: <1384462583.85.0.490812724335.issue19593@psf.upfronthosting.co.za> Message-ID: <3h6PDz74ZLz7Ll7@mail.python.org> Roundup Robot added the comment: New changeset f426bd85f808 by Serhiy Storchaka in branch '3.4': Issue #19593: Use specific asserts in importlib tests. http://hg.python.org/cpython/rev/f426bd85f808 New changeset cace5cc29df0 by Serhiy Storchaka in branch 'default': Issue #19593: Use specific asserts in importlib tests. http://hg.python.org/cpython/rev/cace5cc29df0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 13:15:11 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Jul 2014 11:15:11 +0000 Subject: [issue19593] Use specific asserts in importlib tests In-Reply-To: <1384462583.85.0.490812724335.issue19593@psf.upfronthosting.co.za> Message-ID: <1404731711.86.0.100526909021.issue19593@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Ezio for the review. I hope issue18864 will be merged without conflicts. ---------- dependencies: -Implementation for PEP 451 (importlib.machinery.ModuleSpec) resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 13:15:52 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Jul 2014 11:15:52 +0000 Subject: [issue19593] Use specific asserts in importlib tests In-Reply-To: <1384462583.85.0.490812724335.issue19593@psf.upfronthosting.co.za> Message-ID: <1404731752.91.0.311881623449.issue19593@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: commit review -> resolved status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 13:25:24 2014 From: report at bugs.python.org (Pavel Tyslyatsky) Date: Mon, 07 Jul 2014 11:25:24 +0000 Subject: [issue21930] new assert raises syntax proposal Message-ID: <1404732324.49.0.351341465779.issue21930@psf.upfronthosting.co.za> New submission from Pavel Tyslyatsky: This proposal look preaty close to pep-463: http://legacy.python.org/dev/peps/pep-0463/, but in assertion context. Now python test libraries have different aproach for assertions, some try use own implementations, for example, for equality `assertEqual` (`assertEqulas`), `eq_`, some use python `assert` keyword. `assert` work fine for variables, but requred verbose wrappers for exception raising, for example: >>> try: ... do_raise_code() ... except Exception: ... assert False Test libraries already have self implementations but it still not pure python like `assert`: unittest: `self.assertRaises` py.test: `pytest.raises` nose: `nose.tools.raises` or `nose.tools.assert_raises` I propose add pure python implementation for this case because it enough popular, for example: >>> assert do_raise_code() raises # ok if `do_raise_code` raise any exception >>> assert do_raise_code() raises, 'text message' # ok if `do_raise_code` raise any exception with message >>> assert do_raise_code() raises Exception # ok if `do_raise_code` raise specific exception >>> assert do_raise_code() raises Exception, 'text message' # ok if `do_raise_code` raise specific exception with message >>> assert do_raise_code() raises (TypeError, ValueError) # ok if `do_raise_code` raise one of specific exceptions >>> assert do_raise_code() raises (TypeError, ValueError), 'text message' # ok if `do_raise_code` raise one of specific exceptions with message Test libraries can use tham raises implementations as decorator, this proposal currently ignore similar behaviour. Test libraries can use them raises implementations as context, this propasal currently ignore similar behaviour. `unittest` module also has `assertRaisesRegex` method, this proposal currently ignore similar behaviour. `unittest` module also has `assertWarns` and `assertLogs`, this proposal currently ignore similar behaviour. Also this proposal currently ignore any access to exception object and it fields. ---------- messages: 222450 nosy: tbicr priority: normal severity: normal status: open title: new assert raises syntax proposal type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 13:59:40 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 11:59:40 +0000 Subject: [issue21707] modulefinder uses wrong CodeType signature in .replace_paths_in_code() In-Reply-To: <1402419588.93.0.311747753061.issue21707@psf.upfronthosting.co.za> Message-ID: <3h6QLg0p7gz7Ljm@mail.python.org> Roundup Robot added the comment: New changeset 59921d2f023c by Berker Peksag in branch '3.4': Issue #21707: Add missing kwonlyargcount argument to ModuleFinder.replace_paths_in_code(). http://hg.python.org/cpython/rev/59921d2f023c New changeset 4b6798e74dcf by Berker Peksag in branch 'default': Issue #21707: Merge with 3.4. http://hg.python.org/cpython/rev/4b6798e74dcf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 14:00:27 2014 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 07 Jul 2014 12:00:27 +0000 Subject: [issue21929] Rounding properly In-Reply-To: <1404729306.28.0.45044219182.issue21929@psf.upfronthosting.co.za> Message-ID: <1404734427.52.0.610917669043.issue21929@psf.upfronthosting.co.za> Mark Dickinson added the comment: This is working as designed, though admittedly the cause of the unexpected results is non-obvious. In Python 2, there's no way to implement `round` for a general type: instead, the `round` function converts its *input* to a Python (binary) float, and then rounds the resulting value. So you're effectively doing: >>> from decimal import Decimal >>> round(float(Decimal('167.75')), 1) 167.8 >>> round(float(Decimal('167.85')), 1) 167.8 >>> round(float(Decimal('167.95')), 1) 167.9 And the results above are explainable in terms of rounding the corresponding floating-point value: the closest exactly representable binary float to 167.85 is 167.849999999999994315658113919198513031005859375, which is a touch less than the halfway mark, so rounds down. Similarly, the closest exactly representable float to 167.95 is 167.94999999999998863131622783839702606201171875, which again rounds down. 167.75 is already exactly representable as a float, so there you get the expected result. In Python 3, `round` rounds the Decimal object directly without converting to float first, so you shouldn't see the above problems. In Python 2, you'll need to stick to your quantize approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 14:00:51 2014 From: report at bugs.python.org (Berker Peksag) Date: Mon, 07 Jul 2014 12:00:51 +0000 Subject: [issue21707] modulefinder uses wrong CodeType signature in .replace_paths_in_code() In-Reply-To: <1402419588.93.0.311747753061.issue21707@psf.upfronthosting.co.za> Message-ID: <1404734451.74.0.693003737603.issue21707@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- assignee: -> berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 14:01:25 2014 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 07 Jul 2014 12:01:25 +0000 Subject: [issue21929] Rounding properly In-Reply-To: <1404729306.28.0.45044219182.issue21929@psf.upfronthosting.co.za> Message-ID: <1404734485.27.0.487283442529.issue21929@psf.upfronthosting.co.za> Mark Dickinson added the comment: There may be an opportunity for a documentation improvement here: it would be helpful if the Python 2.7 documentation for the "round" function explained that its input is converted to float. ---------- assignee: -> docs at python components: +Documentation -Windows nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 14:11:27 2014 From: report at bugs.python.org (Berker Peksag) Date: Mon, 07 Jul 2014 12:11:27 +0000 Subject: [issue21707] modulefinder uses wrong CodeType signature in .replace_paths_in_code() In-Reply-To: <1402419588.93.0.311747753061.issue21707@psf.upfronthosting.co.za> Message-ID: <1404735087.8.0.0393796287927.issue21707@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 14:15:49 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 07 Jul 2014 12:15:49 +0000 Subject: [issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers. In-Reply-To: <1402787574.99.0.986548729035.issue21765@psf.upfronthosting.co.za> Message-ID: <1404735349.53.0.0560237071784.issue21765@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Two observations: 1. This issue is only about identifiers. So processing of string literals is technically out of scope. 2. I'd suggest to replace .translate with regular expressions: py> re.sub('[^(){}\[\]]','','foo(b[a]{r}?)') '([]{})' I'm sure people interested in performance will want to time this approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 14:20:20 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 12:20:20 +0000 Subject: [issue21881] python cannot parse tcl value In-Reply-To: <1404070726.81.0.038892791749.issue21881@psf.upfronthosting.co.za> Message-ID: <3h6QpW24c2z7M16@mail.python.org> Roundup Robot added the comment: New changeset 01ec8bb7187f by Serhiy Storchaka in branch '2.7': Issue #21881: Just omit tests for platform-specific NaN representation in test_tcl. http://hg.python.org/cpython/rev/01ec8bb7187f New changeset 5ac811cbec87 by Serhiy Storchaka in branch '3.4': Issue #21881: Just omit tests for platform-specific NaN representation in test_tcl. http://hg.python.org/cpython/rev/5ac811cbec87 New changeset f138a74ee611 by Serhiy Storchaka in branch 'default': Issue #21881: Just omit tests for platform-specific NaN representation in test_tcl. http://hg.python.org/cpython/rev/f138a74ee611 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 14:29:41 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Jul 2014 12:29:41 +0000 Subject: [issue21881] python cannot parse tcl value In-Reply-To: <1404070726.81.0.038892791749.issue21881@psf.upfronthosting.co.za> Message-ID: <1404736181.97.0.331117994131.issue21881@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: On some platforms NaN representation has a minus before "nan" (see http://buildbot.python.org/all/builders/x86%20OpenIndiana%202.7/builds/2384/steps/test/logs/stdio). So it is easier just omit tests for these platform-specific values. Regardless of the fact that it is very unlikely to get NaN in Tk, in future we should fix getdouble() (it should work with Tcl_Obj) and use it everywhere in tkinter instead of float(). ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 14:45:47 2014 From: report at bugs.python.org (Tal Einat) Date: Mon, 07 Jul 2014 12:45:47 +0000 Subject: [issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers. In-Reply-To: <1402787574.99.0.986548729035.issue21765@psf.upfronthosting.co.za> Message-ID: <1404737147.5.0.672545013354.issue21765@psf.upfronthosting.co.za> Tal Einat added the comment: @Martin: > 1. This issue is only about identifiers. So processing of > string literals is technically out of scope. I added a test with a non-ASCII string literal only for good measure, while I was already adding a test with a non-ASCII identifier. The patch doesn't change anything in that regard. Supporting Unicode string literals could be considered a separate issue, though the root cause of the problems is the same, and fixing it properly will fix both issues. > 2. I'd suggest to replace .translate with regular expressions: Indeed, something along those lines should work well, and probably would be fast enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 14:53:10 2014 From: report at bugs.python.org (Jeffrey Armstrong) Date: Mon, 07 Jul 2014 12:53:10 +0000 Subject: [issue21931] Nonsense errors reported by msilib.FCICreate for bad argument Message-ID: <1404737590.72.0.85327158616.issue21931@psf.upfronthosting.co.za> New submission from Jeffrey Armstrong: The function fcicreate in PC/_msi.c can return nonsense if the list of files passed to msilib.FCICreate does not contains tuples as expected. To replicate, import msilib msilib.FCICreate("test.cab", ["entry.txt"]) The above code will return a ValueError of the format: ValueError: FCI error 11260524 The error code is meaningless. If one were to examine the code, you can see in PC/_msi.c:246 (in "current"): if (!PyArg_ParseTuple(item, "ss", &filename, &cabname)) goto err; If we look at the error handler at PC/_msi.c:262, it assumes that one of the Windows MSI API calls had failed, and will print the contents of the ERF error structure: err: PyErr_Format(PyExc_ValueError, "FCI error %d", erf.erfOper); /* XXX better error type */ In the case where the list does not contain tuples, the value of erf.erfOper was never initialized or set because the error being raised is not due to the Windows MSI API. The error is highly misleading as it is simply an argument error. ---------- components: Extension Modules messages: 222458 nosy: Jeffrey.Armstrong priority: normal severity: normal status: open title: Nonsense errors reported by msilib.FCICreate for bad argument type: behavior versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 15:04:56 2014 From: report at bugs.python.org (Brett Cannon) Date: Mon, 07 Jul 2014 13:04:56 +0000 Subject: [issue21930] new assert raises syntax proposal In-Reply-To: <1404732324.49.0.351341465779.issue21930@psf.upfronthosting.co.za> Message-ID: <1404738296.96.0.354661293586.issue21930@psf.upfronthosting.co.za> Brett Cannon added the comment: The best way to get language changes made is to first propose them on the python-ideas mailing list (https://docs.python.org/devguide/faq.html#suggesting-changes). ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 15:11:36 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 07 Jul 2014 13:11:36 +0000 Subject: [issue21930] new assert raises syntax proposal In-Reply-To: <1404732324.49.0.351341465779.issue21930@psf.upfronthosting.co.za> Message-ID: <1404738696.42.0.50102552771.issue21930@psf.upfronthosting.co.za> Ezio Melotti added the comment: Agreed, but there are a few problems with the proposals: 1) it requires the addition of a new keyword (raises), and that will break any program that uses it as an identifier; 2) the use case is arguably limited; 3) assertRaises is consistent with the other assert* methods, and it also provides way to inspect the exception, whereas IIUC what you are proposing does not (and also doesn't replace assertRaisesRegex); 4) I don't find your proposal simpler or more readable than what we have now: In other words there are quite a few problems for little benefit, so even if you decide to bring this up to python-ideas, it's very unlikely that it will be accepted in its current form. ---------- components: +Tests nosy: +ezio.melotti resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 15:17:24 2014 From: report at bugs.python.org (Piotr Dobrogost) Date: Mon, 07 Jul 2014 13:17:24 +0000 Subject: [issue9861] subprocess module changed exposed attributes In-Reply-To: <1284560392.0.0.232628441453.issue9861@psf.upfronthosting.co.za> Message-ID: <1404739044.9.0.0413324743373.issue9861@psf.upfronthosting.co.za> Piotr Dobrogost added the comment: The statement in comment http://bugs.python.org/issue9861#msg133051 seems to be wrong as changes between versions 2.5 and 2.6 are not security only fixes. Changing visibility of module's public attributes should at least be documented thus closing this bug without pointing to such a documentation is not ok. People do have problem with this as can be seen in the following questions: "Cannot find STARTF_USESHOWWINDOW in python" (http://stackoverflow.com/q/5485668/95735) "Module subprocess has no attribute 'STARTF_USESHOWWINDOW'" (http://stackoverflow.com/q/4703983/95735) Remark to the answer to the "Cross-platform subprocess with hidden window" question (http://stackoverflow.com/a/3443174/95735) ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 15:37:54 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jul 2014 13:37:54 +0000 Subject: [issue21932] os.read() must use Py_ssize_t for the size parameter Message-ID: <1404740274.81.0.177768774974.issue21932@psf.upfronthosting.co.za> New submission from STINNER Victor: os.read() currently uses the int type for the size parameter, whereas the C function uses a C size_t parameter: ssize_t read(int fd, void *buf, size_t count); The Python function must use the Py_ssize_t type, but truncate to INT_MAX on Windows, as done in FileIO.read(). It would help to implement FileIO in pure Python: issue #21859. I don't think that this enhancement should be backported to Python 2.7 nor Python 3.4. ---------- files: posix_read_py_ssize_t.patch keywords: patch messages: 222462 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: os.read() must use Py_ssize_t for the size parameter type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file35882/posix_read_py_ssize_t.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 15:46:47 2014 From: report at bugs.python.org (Pavel Tyslyatsky) Date: Mon, 07 Jul 2014 13:46:47 +0000 Subject: [issue21930] new assert raises syntax proposal In-Reply-To: <1404732324.49.0.351341465779.issue21930@psf.upfronthosting.co.za> Message-ID: <1404740807.77.0.924282376669.issue21930@psf.upfronthosting.co.za> Pavel Tyslyatsky added the comment: Thanks for reply, I really missed many cases. I will try look deeper. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 15:56:29 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Mon, 07 Jul 2014 13:56:29 +0000 Subject: [issue18592] Idle: test SearchDialogBase.py In-Reply-To: <1375146770.41.0.774627283078.issue18592@psf.upfronthosting.co.za> Message-ID: <1404741389.78.0.316690022455.issue18592@psf.upfronthosting.co.za> Saimadhav Heblikar added the comment: Hi, test_make_entry seems to be failing (for eg: http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.4/builds/306/steps/test/logs/stdio and http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/911/steps/test/logs/stdio) ====================================================================== FAIL: test_make_entry (idlelib.idle_test.test_searchdialogbase.SearchDialogBaseTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/idlelib/idle_test/test_searchdialogbase.py", line 83, in test_make_entry equal(egi['row'], 0) AssertionError: '0' != 0 ---------------------------------------------------------------------- Ran 128 tests in 0.779s FAILED (failures=1) test test_idle failed Attach patch fixes it in a straight forward way. ---------- nosy: +sahutd Added file: http://bugs.python.org/file35883/issue18592-fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 16:23:22 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Jul 2014 14:23:22 +0000 Subject: [issue21932] os.read() must use Py_ssize_t for the size parameter In-Reply-To: <1404740274.81.0.177768774974.issue21932@psf.upfronthosting.co.za> Message-ID: <1404743002.34.0.351263326364.issue21932@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch LGTM. Here is a test for it. ---------- Added file: http://bugs.python.org/file35884/test_posix_read_py_ssize_t.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 17:18:15 2014 From: report at bugs.python.org (Lita Cho) Date: Mon, 07 Jul 2014 15:18:15 +0000 Subject: [issue21933] Allow the user to change font sizes with the text pane of turtledemo Message-ID: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za> New submission from Lita Cho: Currently, the turtledemo doesn't allow you to change font sizes of the demo code, and the default font size is really small. I can work on creating a patch to fix this. Best option be to have control-mousewheel change size, as is standard in browsers, as well as Ctrl + and Ctrl - to change sizes (since laptops don't have a mousewheel). If tk has a problem with that, a second choice would be a menu entry "Font size with choices such as the current size (9?), 10, 12, 14. Also, update the Help Text of this new feature. ---------- messages: 222466 nosy: Lita.Cho, jesstess, ned.deily, terry.reedy priority: normal severity: normal status: open title: Allow the user to change font sizes with the text pane of turtledemo versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 17:30:13 2014 From: report at bugs.python.org (Daniel Dickman) Date: Mon, 07 Jul 2014 15:30:13 +0000 Subject: [issue21934] OpenBSD has no /dev/full device Message-ID: <1404747013.93.0.393614299649.issue21934@psf.upfronthosting.co.za> New submission from Daniel Dickman: There is no /dev/full device on OpenBSD. If you run the 2.7 regress tests as root on OpenBSD, a /dev/full regular file will be created and the "test_write_full" test will fail. (because the subsequent write will succeed in writing to the /dev/full regular file). To fix, change the test to check that /dev/full exists and is a character device. Patch attached. ---------- components: Tests messages: 222467 nosy: Daniel.Dickman priority: normal severity: normal status: open title: OpenBSD has no /dev/full device type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 17:31:40 2014 From: report at bugs.python.org (Daniel Dickman) Date: Mon, 07 Jul 2014 15:31:40 +0000 Subject: [issue21934] OpenBSD has no /dev/full device In-Reply-To: <1404747013.93.0.393614299649.issue21934@psf.upfronthosting.co.za> Message-ID: <1404747100.9.0.716445335162.issue21934@psf.upfronthosting.co.za> Changes by Daniel Dickman : ---------- keywords: +patch Added file: http://bugs.python.org/file35885/python.dev.full.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 17:48:11 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jul 2014 15:48:11 +0000 Subject: [issue21934] OpenBSD has no /dev/full device In-Reply-To: <1404747013.93.0.393614299649.issue21934@psf.upfronthosting.co.za> Message-ID: <1404748091.56.0.627914342588.issue21934@psf.upfronthosting.co.za> STINNER Victor added the comment: I would prefer a decorator checking if a device exists, something like: @requires_character_device('/dev/full') It would always skip on Windows. Implement it in test_support.py. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 17:55:13 2014 From: report at bugs.python.org (Zachary Ware) Date: Mon, 07 Jul 2014 15:55:13 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <1404748513.35.0.809452605528.issue21907@psf.upfronthosting.co.za> Zachary Ware added the comment: With a vote and a half in favor, I'll go ahead with this probably later today. There is one change needed to the `clean` script; the `hg purge` call should ignore Lib/test/data to avoid downloading the codecmaps test files every time. I may backport to 3.4 and/or 2.7 later on, but will not do so until default has been happy with it for a while. I'll leave buildmsi.bat in place for now; I'm interested in trying to resurrect the daily MSI builder some day. Possibly not before Steve converts us to WIX :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 18:00:43 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jul 2014 16:00:43 +0000 Subject: [issue21680] asyncio: document event loops In-Reply-To: <1402058495.48.0.977334805226.issue21680@psf.upfronthosting.co.za> Message-ID: <1404748843.93.0.936816117701.issue21680@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, it looks like the proactor event loop doesn't support datagram protocol. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 18:09:01 2014 From: report at bugs.python.org (Zachary Ware) Date: Mon, 07 Jul 2014 16:09:01 +0000 Subject: [issue21518] Expose RegUnloadKey in winreg In-Reply-To: <1400346760.52.0.0203244636304.issue21518@psf.upfronthosting.co.za> Message-ID: <1404749341.01.0.559715424308.issue21518@psf.upfronthosting.co.za> Zachary Ware added the comment: I'd like to see the windows_helper.py part of the patch split into its own issue, and someone more qualified than I to review it (though I'll learn what I can and give it a shot if nobody else can). The new issue should also try to use the new windows_helper utilities to replace what Brian mentioned in msg106613 for os.symlink privileges, since that's an existing place where it can be used. The actual change of adding UnloadKey looks fine to me, aside from a copy/paste error in the documentation (s/subkey to load/subkey to unload/). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 18:09:52 2014 From: report at bugs.python.org (Claudiu Popa) Date: Mon, 07 Jul 2014 16:09:52 +0000 Subject: [issue21518] Expose RegUnloadKey in winreg In-Reply-To: <1400346760.52.0.0203244636304.issue21518@psf.upfronthosting.co.za> Message-ID: <1404749392.22.0.899642871996.issue21518@psf.upfronthosting.co.za> Claudiu Popa added the comment: Sure, that sounds good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 18:47:41 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Jul 2014 16:47:41 +0000 Subject: [issue20420] BufferedIncrementalEncoder violates IncrementalEncoder interface In-Reply-To: <1390926885.67.0.351173619746.issue20420@psf.upfronthosting.co.za> Message-ID: <1404751661.53.0.786925953782.issue20420@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: IncrementalNewlineDecoder requires that decoder state is integer (C implementation requires at most 63-bit unsigned integer). TextIOWrapper requires that decoder state is at most 64-bit unsigned integer (only 63-bit if universal newlines is enabled). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 18:48:37 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Jul 2014 16:48:37 +0000 Subject: [issue12808] Coverage of codecs.py In-Reply-To: <1313983372.14.0.793098723033.issue12808@psf.upfronthosting.co.za> Message-ID: <1404751717.14.0.514812554958.issue12808@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue20420. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 18:53:56 2014 From: report at bugs.python.org (Zachary Ware) Date: Mon, 07 Jul 2014 16:53:56 +0000 Subject: [issue21781] make _ssl module 64-bit clean In-Reply-To: <1402935536.94.0.808370256195.issue21781@psf.upfronthosting.co.za> Message-ID: <1404752036.25.0.440792590747.issue21781@psf.upfronthosting.co.za> Zachary Ware added the comment: This appears to have broken 64-bit Windows: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/4745 ---------- nosy: +zach.ware resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 19:02:30 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Jul 2014 17:02:30 +0000 Subject: [issue21866] zipfile.ZipFile.close() doesn't respect allowZip64 In-Reply-To: <1403675769.56.0.836465783864.issue21866@psf.upfronthosting.co.za> Message-ID: <1404752550.22.0.314898549521.issue21866@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: An offset is checked in write() and writestr() methods and an exception is raised if an offset is >= 2 GiB and ZIP64 extension is not allowed. I don't see a possibility for a bug. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 19:07:41 2014 From: report at bugs.python.org (Andy Maier) Date: Mon, 07 Jul 2014 17:07:41 +0000 Subject: [issue10289] Document magic methods called by built-in functions In-Reply-To: <1288655696.94.0.809001507215.issue10289@psf.upfronthosting.co.za> Message-ID: <1404752861.7.0.411961511794.issue10289@psf.upfronthosting.co.za> Andy Maier added the comment: Comments on the patch py34_v2: 1. On complex(): It delegates to object.__complex__(); that should also be described. 2. On hex(): The use of "__index__()" is text and should be changed to a hyperlink. Andy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 19:11:06 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Jul 2014 17:11:06 +0000 Subject: [issue9267] Update pickle opcode documentation in pickletools for 3.x In-Reply-To: <1279217581.88.0.294098163632.issue9267@psf.upfronthosting.co.za> Message-ID: <1404753066.6.0.957864585448.issue9267@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> docs at python nosy: +docs at python -serhiy.storchaka versions: +Python 3.4, Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 19:12:55 2014 From: report at bugs.python.org (paul j3) Date: Mon, 07 Jul 2014 17:12:55 +0000 Subject: [issue9571] argparse: Allow the use of -- to break out of nargs and into subparser In-Reply-To: <1281554487.14.0.725527410465.issue9571@psf.upfronthosting.co.za> Message-ID: <1404753175.85.0.93705569942.issue9571@psf.upfronthosting.co.za> paul j3 added the comment: This patch modifies that '--' handling from 13922, removing '--' from PARSER and REMAINDER if it is the first string: if action.nargs not in [PARSER, REMAINDER]: try: arg_strings.remove('--') except ValueError: pass else: # remove '--' if it is the first string, issue9571 if arg_strings and arg_strings[0] == '--': arg_strings = arg_strings[1:] Doing this for PARSER addresses this issue, and should not have any backward compatibility issues, since starting a 'A...' list with '--' does not make sense. The argument for doing this with REMAINDER is a bit weaker. I can't think of why a user would expect or want an initial '--', but someone might have written code to compensate for this flaw. test_argparse has 2 new tests, added at the end of the subparsers class. The one for subparser has to contend with a bug that makes subparsers optional (http://bugs.python.org/issue9253). The REMAINDER one is clearly related, though it doesn't fit the test class theme. ---------- keywords: +patch Added file: http://bugs.python.org/file35886/issue9571_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 19:16:45 2014 From: report at bugs.python.org (paul j3) Date: Mon, 07 Jul 2014 17:16:45 +0000 Subject: [issue13922] argparse handling multiple "--" in args improperly In-Reply-To: <1328132556.72.0.92385645061.issue13922@psf.upfronthosting.co.za> Message-ID: <1404753405.41.0.50945610668.issue13922@psf.upfronthosting.co.za> paul j3 added the comment: http://bugs.python.org/issue9571 proposes a refinement to this patch - drop the '--' from PARSER and REMAINDER nargs if it is the 1st string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 19:16:51 2014 From: report at bugs.python.org (Andy Maier) Date: Mon, 07 Jul 2014 17:16:51 +0000 Subject: [issue10289] Document magic methods called by built-in functions In-Reply-To: <1288655696.94.0.809001507215.issue10289@psf.upfronthosting.co.za> Message-ID: <1404753411.19.0.190295803485.issue10289@psf.upfronthosting.co.za> Andy Maier added the comment: I reviewed the description of the built-in functions in Python 2.7, and found these issues: 1. The following built-in functions do not mention their underyling __special__ functions: - cmp() - delattr(), getattr(), hasattr(), setattr() - complex(), int(), long(), float() - hash() - len() - str() - int(), oct() 2. The following built-in functions list the __special__ functions they invoke as text that is not a hyperlink: - dir() - format() - hex() 3. The following built-in functions could be improved from the description of the 3.x version: - bool(): References and links from 3.x version could be added. - bytearray(): References from last line of 3.x version could be added. - callable(): Wording "if they have a..." could be improved by using 3.x wording. 4. The codepage of the ASCII string for chr() is not documented. Andy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 19:23:38 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 07 Jul 2014 17:23:38 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1404753818.58.0.897128701755.issue2771@psf.upfronthosting.co.za> Ezio Melotti added the comment: test ---------- resolution: later -> not a bug Added file: http://bugs.python.org/file35887/issue18958-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 19:31:40 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Jul 2014 17:31:40 +0000 Subject: [issue15133] tkinter.BooleanVar.get() behavior and docstring disagree In-Reply-To: <1340357266.8.0.524344970378.issue15133@psf.upfronthosting.co.za> Message-ID: <1404754300.36.0.96002096155.issue15133@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Serhiy, what do you think is the proper disposition of this issue *now*? ---------- nosy: +serhiy.storchaka versions: -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 19:39:10 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Jul 2014 17:39:10 +0000 Subject: [issue21888] plistlib.FMT_BINARY behavior doesn't send required dict parameter In-Reply-To: <1404148099.9.0.0254576282966.issue21888@psf.upfronthosting.co.za> Message-ID: <1404754750.85.0.213626452906.issue21888@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch. ---------- stage: test needed -> patch review Added file: http://bugs.python.org/file35888/plistlib_explicit_fmt.path _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 19:41:24 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Jul 2014 17:41:24 +0000 Subject: [issue18592] Idle: test SearchDialogBase.py In-Reply-To: <1375146770.41.0.774627283078.issue18592@psf.upfronthosting.co.za> Message-ID: <1404754884.35.0.387078818386.issue18592@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Serhiy: we are having a problem with tkinter sometimes reporting boolean vars as '0' and '1' versus 0 and 1. As I remember, you pushed a patch about this in the last year, probably before 3.4 came out, but after last August. Am I correct? If so, do you remember the issue? Saimadhav: changing expected values *back* to '0'/'1', as in Phil's original patch, will make the test fail on all the systems (including all stable buildbots) that *do* return 0/1. After Serhiy's fix, I had to switch to 0/1 for 3.4/5 to make the tests pass again, after the change made them fail. Notice that the 2.7 version, pushed on 6/30 also, still has '0', '1'. The interesting question is why the Debian 3.4 system is different? Why is it acting like 2.7? Serhiy, do you have any idea? I am also puzzled why the corresponding text_tcl or _tk did not fail, as I presume there is a text for the change. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 19:51:06 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Mon, 07 Jul 2014 17:51:06 +0000 Subject: [issue18592] Idle: test SearchDialogBase.py In-Reply-To: <1375146770.41.0.774627283078.issue18592@psf.upfronthosting.co.za> Message-ID: <1404755465.99.0.908344501787.issue18592@psf.upfronthosting.co.za> Saimadhav Heblikar added the comment: >The interesting question is why the Debian 3.4 system is different? That is what caused me to notice the issue. I ran the IDLE test suite on my pc(debian 7) and it failed, while most buildbots were "green". >Why is it acting like 2.7? Serhiy, do you have any idea? 2.7 with '0'/'1' is passing. (I am removing the patch as this issue has a background that I was not aware of.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 19:51:28 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Mon, 07 Jul 2014 17:51:28 +0000 Subject: [issue18592] Idle: test SearchDialogBase.py In-Reply-To: <1375146770.41.0.774627283078.issue18592@psf.upfronthosting.co.za> Message-ID: <1404755488.86.0.872406814435.issue18592@psf.upfronthosting.co.za> Changes by Saimadhav Heblikar : Removed file: http://bugs.python.org/file35883/issue18592-fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 20:05:31 2014 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 07 Jul 2014 18:05:31 +0000 Subject: [issue10289] Document magic methods called by built-in functions In-Reply-To: <1288655696.94.0.809001507215.issue10289@psf.upfronthosting.co.za> Message-ID: <1404756331.52.0.918973864933.issue10289@psf.upfronthosting.co.za> Mark Dickinson added the comment: Should the Python 2.7 delegation of `round` to `__float__` for its input also be described as part of this issue? >>> class A(object): ... def __float__(self): return 1729.1 ... >>> round(A()) 1729.0 ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 20:13:11 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 07 Jul 2014 18:13:11 +0000 Subject: [issue10289] Document magic methods called by built-in functions In-Reply-To: <1288655696.94.0.809001507215.issue10289@psf.upfronthosting.co.za> Message-ID: <1404756791.41.0.977200497731.issue10289@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could #15436 "__sizeof__ is not documented" also be covered by this? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 20:13:25 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Jul 2014 18:13:25 +0000 Subject: [issue18592] Idle: test SearchDialogBase.py In-Reply-To: <1375146770.41.0.774627283078.issue18592@psf.upfronthosting.co.za> Message-ID: <1404756805.82.0.935287417424.issue18592@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What micro tk version? as in >>> t = tk.Tk() >>> t.tk.call('info', 'patchlevel') '8.5.15' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 20:19:19 2014 From: report at bugs.python.org (Benjamin Gilbert) Date: Mon, 07 Jul 2014 18:19:19 +0000 Subject: [issue21866] zipfile.ZipFile.close() doesn't respect allowZip64 In-Reply-To: <1403675769.56.0.836465783864.issue21866@psf.upfronthosting.co.za> Message-ID: <1404757159.43.0.65316795822.issue21866@psf.upfronthosting.co.za> Benjamin Gilbert added the comment: Here are the cases where close() will generate a ZIP64 archive and an exception will never be raised: 1. There are more than 65535 files in the archive. 2. The start of the central directory is at > 2 GB. 3. The central directory size is > 2 GB. #1 could be checked from write/writestr. #2 could possibly be checked from write/writestr by looking at the file offset after writing the compressed data. #3 cannot be checked until close, but I'm not sure if it can ever occur without triggering one of the other checks first. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 20:21:26 2014 From: report at bugs.python.org (Lita Cho) Date: Mon, 07 Jul 2014 18:21:26 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404757286.17.0.547817991119.issue21597@psf.upfronthosting.co.za> Lita Cho added the comment: Hi Terry, So the shadow can easily be removed. I just went with the default sashrelief style. I am going to attach two patches with different sashrelief styles, both of which don't have the shadow. ---------- Added file: http://bugs.python.org/file35889/turtledemo_pane_scroll_FLAT.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 20:21:34 2014 From: report at bugs.python.org (Lita Cho) Date: Mon, 07 Jul 2014 18:21:34 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404757294.5.0.653837917039.issue21597@psf.upfronthosting.co.za> Changes by Lita Cho : Added file: http://bugs.python.org/file35890/turtledemo_pane_scroll_SOLID.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 20:23:04 2014 From: report at bugs.python.org (Lita Cho) Date: Mon, 07 Jul 2014 18:23:04 +0000 Subject: [issue21597] Allow turtledemo code pane to get wider. In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za> Message-ID: <1404757384.1.0.571300183042.issue21597@psf.upfronthosting.co.za> Lita Cho added the comment: I personally like the FLAT look because it matches with the rest of the GUI. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 20:29:35 2014 From: report at bugs.python.org (Jonathan Dowland) Date: Mon, 07 Jul 2014 18:29:35 +0000 Subject: [issue20328] mailbox: add method to delete mailbox In-Reply-To: <1390304458.71.0.378928457479.issue20328@psf.upfronthosting.co.za> Message-ID: <1404757775.92.0.27478641845.issue20328@psf.upfronthosting.co.za> Jonathan Dowland added the comment: Hi, sorry for the long silence on this issue. I've had a few things going on. Anyway, I didn't want to forget all about this; I've been working on it in two phases. Phase 1 adds delete methods; Phase 2 handles non-existent mailboxes. Please find attached my first cut at phase 1. I am working on further tests as well, but they aren't quite ready. ---------- keywords: +patch Added file: http://bugs.python.org/file35891/0001-add-delete-methods-to-mailbox-types.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 20:29:55 2014 From: report at bugs.python.org (Jonathan Dowland) Date: Mon, 07 Jul 2014 18:29:55 +0000 Subject: [issue20328] mailbox: add method to delete mailbox In-Reply-To: <1390304458.71.0.378928457479.issue20328@psf.upfronthosting.co.za> Message-ID: <1404757795.97.0.318522613946.issue20328@psf.upfronthosting.co.za> Jonathan Dowland added the comment: patch adding tests ---------- Added file: http://bugs.python.org/file35892/0002-add-tests-for-deleting-Maildir-and-singleFileMailbox.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 20:30:07 2014 From: report at bugs.python.org (Jonathan Dowland) Date: Mon, 07 Jul 2014 18:30:07 +0000 Subject: [issue20328] mailbox: add method to delete mailbox In-Reply-To: <1390304458.71.0.378928457479.issue20328@psf.upfronthosting.co.za> Message-ID: <1404757807.89.0.504005635149.issue20328@psf.upfronthosting.co.za> Jonathan Dowland added the comment: another test ---------- Added file: http://bugs.python.org/file35893/0003-test-for-deletion-of-sub-folders.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 20:30:44 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 18:30:44 +0000 Subject: [issue21707] modulefinder uses wrong CodeType signature in .replace_paths_in_code() In-Reply-To: <1402419588.93.0.311747753061.issue21707@psf.upfronthosting.co.za> Message-ID: <3h6b1v6mkVz7Lv4@mail.python.org> Roundup Robot added the comment: New changeset f8deaac44ed4 by Berker Peksag in branch '3.4': Issue #21707: Fix tests on Windows. http://hg.python.org/cpython/rev/f8deaac44ed4 New changeset e66c387da81b by Berker Peksag in branch 'default': Issue #21707: Merge with 3.4. http://hg.python.org/cpython/rev/e66c387da81b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 20:41:40 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 18:41:40 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <3h6bGW6W1Sz7Llr@mail.python.org> Roundup Robot added the comment: New changeset c3022e2606df by Zachary Ware in branch 'default': Issue #21907: Improved the batch scripts provided for building Python. http://hg.python.org/cpython/rev/c3022e2606df ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 20:45:44 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 18:45:44 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <3h6bMC513Sz7LsN@mail.python.org> Roundup Robot added the comment: New changeset ed3fa77804f8 by Zachary Ware in branch 'default': Issue #21907: Update the instructions for building on Windows http://hg.python.org/devguide/rev/ed3fa77804f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 20:54:23 2014 From: report at bugs.python.org (Zachary Ware) Date: Mon, 07 Jul 2014 18:54:23 +0000 Subject: [issue9973] Sometimes buildbot fails to cleanup working copy In-Reply-To: <1285691660.36.0.731785440446.issue9973@psf.upfronthosting.co.za> Message-ID: <1404759263.39.0.537710361813.issue9973@psf.upfronthosting.co.za> Zachary Ware added the comment: This should be fixed by #21907 for 3.5, at least; other versions can either have #21907 backported (in whole or in part), or continue to live with it (like they have for the past 4 years). ---------- assignee: -> zach.ware resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> Update Windows build batch scripts versions: -Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 21:14:23 2014 From: report at bugs.python.org (Zachary Ware) Date: Mon, 07 Jul 2014 19:14:23 +0000 Subject: [issue9822] windows batch files are dependent on cmd current directory In-Reply-To: <1284118620.1.0.910652087288.issue9822@psf.upfronthosting.co.za> Message-ID: <1404760463.3.0.372068621081.issue9822@psf.upfronthosting.co.za> Zachary Ware added the comment: Fixed by #21907. ---------- assignee: -> zach.ware resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> Update Windows build batch scripts versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 21:26:33 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 07 Jul 2014 19:26:33 +0000 Subject: [issue10583] Encoding issue with chm help in 2.7.1 In-Reply-To: <1291060108.22.0.631034667944.issue10583@psf.upfronthosting.co.za> Message-ID: <1404761193.67.0.416520919195.issue10583@psf.upfronthosting.co.za> Mark Lawrence added the comment: I don't see this in 3.4.1. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 21:27:21 2014 From: report at bugs.python.org (Francis MB) Date: Mon, 07 Jul 2014 19:27:21 +0000 Subject: [issue16040] nntplib: unlimited readline() from connection In-Reply-To: <1348569525.38.0.219080768405.issue16040@psf.upfronthosting.co.za> Message-ID: <1404761241.28.0.836970381244.issue16040@psf.upfronthosting.co.za> Francis MB added the comment: Just a small detail on the patches, they seem to have a typo (lenght vs. length) on the line: >> reading arbitrary lenght lines. RFC 3977 limits NNTP line length to ---------- nosy: +francismb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 21:35:49 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 19:35:49 +0000 Subject: [issue17846] Building Python on Windows - Supplementary info In-Reply-To: <1366919664.94.0.0931557904055.issue17846@psf.upfronthosting.co.za> Message-ID: <3h6cT11bfyz7Llf@mail.python.org> Roundup Robot added the comment: New changeset bb3f1afcd082 by Zachary Ware in branch '3.4': Issue #17846: Clarify note about Solution Folders. http://hg.python.org/cpython/rev/bb3f1afcd082 New changeset 39f9cd7ad19a by Zachary Ware in branch 'default': Issue #17846: Merge with 3.4 http://hg.python.org/cpython/rev/39f9cd7ad19a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 21:47:49 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 19:47:49 +0000 Subject: [issue17846] Building Python on Windows - Supplementary info In-Reply-To: <1366919664.94.0.0931557904055.issue17846@psf.upfronthosting.co.za> Message-ID: <3h6cks1dHYz7Lnf@mail.python.org> Roundup Robot added the comment: New changeset 369891476cf8 by Zachary Ware in branch 'default': Issue #17846: Add a note about solution folders with VS Express. http://hg.python.org/devguide/rev/369891476cf8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 21:48:30 2014 From: report at bugs.python.org (Zachary Ware) Date: Mon, 07 Jul 2014 19:48:30 +0000 Subject: [issue17846] Building Python on Windows - Supplementary info In-Reply-To: <1366919664.94.0.0931557904055.issue17846@psf.upfronthosting.co.za> Message-ID: <1404762510.29.0.744041313003.issue17846@psf.upfronthosting.co.za> Zachary Ware added the comment: Issue #21907 changed how things are done somewhat, and has made PCbuild/build.bat the new obvious place to go for building Python from the command line; the devguide has been updated to reflect that (although I may have missed a place to update). What else still needs to be done here in light of those changes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 21:53:26 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 19:53:26 +0000 Subject: [issue21781] make _ssl module 64-bit clean In-Reply-To: <1402935536.94.0.808370256195.issue21781@psf.upfronthosting.co.za> Message-ID: <3h6csK4dRKz7Lnf@mail.python.org> Roundup Robot added the comment: New changeset 34a0d98c51ea by Victor Stinner in branch '3.4': Issue #21781, _ssl: Fix asn1obj2py() on Windows 64-bit, "s#" format requires http://hg.python.org/cpython/rev/34a0d98c51ea New changeset 1dca2e7ad5ad by Victor Stinner in branch 'default': (Merge 3.4) Issue #21781, _ssl: Fix asn1obj2py() on Windows 64-bit, "s#" format http://hg.python.org/cpython/rev/1dca2e7ad5ad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 21:56:10 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jul 2014 19:56:10 +0000 Subject: [issue21781] make _ssl module 64-bit clean In-Reply-To: <1402935536.94.0.808370256195.issue21781@psf.upfronthosting.co.za> Message-ID: <1404762970.02.0.371838680018.issue21781@psf.upfronthosting.co.za> STINNER Victor added the comment: > This appears to have broken 64-bit Windows Correct, I missed a call to Py_BuildValue() which uses the s# format. It's now fixed. Thanks for the report! I keep the issue open until the buildbot turns green again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 21:59:23 2014 From: report at bugs.python.org (Hristo Venev) Date: Mon, 07 Jul 2014 19:59:23 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404763163.82.0.288848058953.issue21922@psf.upfronthosting.co.za> Hristo Venev added the comment: After optimization, tests on small ints (< 2**30) Currently only addition, subtraction, negation and ~ are a bit slower (< 5%). Most other operations are the same. Bitwise operators, //, %, ** and pow are faster. Converting to and from strings is a bit faster. pickle, marshal and json are faster. bm_nqueens is a bit slower. pystone is a bit faster. There are no performance regressions in other benchmarks. When I fix +,- and ~ I will reupload the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 22:05:03 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jul 2014 20:05:03 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404763503.46.0.0100660748597.issue21922@psf.upfronthosting.co.za> STINNER Victor added the comment: IMO you must discuss the GMP license on the python-dev mailing list since we wrote that if the GMP patch is accepted, it will not be optional and so affect all platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 22:09:04 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jul 2014 20:09:04 +0000 Subject: [issue17652] Add skip_on_windows decorator to test.support In-Reply-To: <1365353236.0.0.311562843433.issue17652@psf.upfronthosting.co.za> Message-ID: <1404763744.43.0.177094961752.issue17652@psf.upfronthosting.co.za> STINNER Victor added the comment: """It might be interesting to see a patch that converts current "@skipIf(sys.platform == 'win32' or os.name == 'nt')" instances to "@skip_on_windows" to see just what kind of difference it makes, but I'm honestly more interested in seeing how many different ways "don't run this test on Windows" is spelled currently.""" I agree. Berker: are you interested to work on such patch? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 22:11:23 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 20:11:23 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <3h6dG22B92z7Lnl@mail.python.org> Roundup Robot added the comment: New changeset f0a5be139717 by Zachary Ware in branch 'default': Issue #21907: Exit with the correct return code http://hg.python.org/cpython/rev/f0a5be139717 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 22:19:21 2014 From: report at bugs.python.org (Zachary Ware) Date: Mon, 07 Jul 2014 20:19:21 +0000 Subject: [issue10583] Encoding issue with chm help in 2.7.1 In-Reply-To: <1291060108.22.0.631034667944.issue10583@psf.upfronthosting.co.za> Message-ID: <1404764361.26.0.285045692359.issue10583@psf.upfronthosting.co.za> Zachary Ware added the comment: I do in 2.7.8, though. This appears to have been a Sphinx issue (likely caused by HTML Help's lack of Unicode support), introduced sometime between Sphinx versions 0.6.5 and 0.6.7, and fixed sometime between versions 1.1.3 and 1.2.2. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 22:29:14 2014 From: report at bugs.python.org (Zachary Ware) Date: Mon, 07 Jul 2014 20:29:14 +0000 Subject: [issue21781] make _ssl module 64-bit clean In-Reply-To: <1402935536.94.0.808370256195.issue21781@psf.upfronthosting.co.za> Message-ID: <1404764954.22.0.778967563508.issue21781@psf.upfronthosting.co.za> Zachary Ware added the comment: Looks good now, thanks for the quick fix, Victor! ---------- resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 22:40:24 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Jul 2014 20:40:24 +0000 Subject: [issue18592] Idle: test SearchDialogBase.py In-Reply-To: <1375146770.41.0.774627283078.issue18592@psf.upfronthosting.co.za> Message-ID: <1404765624.8.0.630669920824.issue18592@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I pushed a patch which fixed Text.debug(). This is not related to this issue. grid_info() values are depend on Tcl/Tk version. When < 8.6 strings are always returned (except the 'in' key which is special case), when >= 8.6 values can be integers or even tuples. I introduced the AbstractWidgetTest._str() method to convert expected value in widget tests. In these tests you can just write equal(int(egi['row']), 0). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 22:44:00 2014 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Mon, 07 Jul 2014 20:44:00 +0000 Subject: [issue21879] str.format() gives poor diagnostic on placeholder mismatch In-Reply-To: <1404052648.46.0.81950938275.issue21879@psf.upfronthosting.co.za> Message-ID: <1404765840.01.0.462959564358.issue21879@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 22:50:24 2014 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Mon, 07 Jul 2014 20:50:24 +0000 Subject: [issue21879] str.format() gives poor diagnostic on placeholder mismatch In-Reply-To: <1404052648.46.0.81950938275.issue21879@psf.upfronthosting.co.za> Message-ID: <1404766224.82.0.119028485769.issue21879@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: @terry would a change like this be accepted in 2.7 and 3.4? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 22:53:02 2014 From: report at bugs.python.org (Brian Kearns) Date: Mon, 07 Jul 2014 20:53:02 +0000 Subject: [issue20858] Enhancements/fixes to pure-python datetime module In-Reply-To: <1394131058.9.0.404670194335.issue20858@psf.upfronthosting.co.za> Message-ID: <1404766382.68.0.134062377959.issue20858@psf.upfronthosting.co.za> Brian Kearns added the comment: Updated patch, now it also caches the result of __hash__ like the C accelerator. ---------- Added file: http://bugs.python.org/file35894/datetime-py35.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 23:00:24 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Mon, 07 Jul 2014 21:00:24 +0000 Subject: [issue21935] Implement AUTH command in smtpd. Message-ID: <1404766823.82.0.391401675174.issue21935@psf.upfronthosting.co.za> New submission from Milan Oberkirch: I implemented message processing for LOGIN and PLAIN authentication in smtpd. I also patched test_smtplib to make use of this functionality. The goal for the API is to provide decryption and message processing in the smtpd library and call a externally provided or overwritten function(user, password) to verify credentials. The patch provided is missing documentation and a proper API to use/activate this feature (and API specific tests of cause). Things which need to be discussed: a) how shoud AUTH be activated? (when should MAIL etc. require AUTH? when should 'AUTH' be announced in the EHLO response?) b) how should the programmer change the _verify_user_credentials method? My idea to solve a and b at once would be to set the verification function by a keyword argument and require/activate AUTH if this kwarg is set. I didn't implement CRAM-MD5 because it requires the correct password to be available in plain text. ---------- components: email files: smtpd_AUTH.patch keywords: patch messages: 222516 nosy: barry, jesstess, pitrou, r.david.murray, zvyn priority: normal severity: normal status: open title: Implement AUTH command in smtpd. type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file35895/smtpd_AUTH.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 23:04:44 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jul 2014 21:04:44 +0000 Subject: [issue21925] ResouceWarning sometimes doesn't display In-Reply-To: <1404614973.3.0.388136336832.issue21925@psf.upfronthosting.co.za> Message-ID: <1404767084.62.0.0679232271935.issue21925@psf.upfronthosting.co.za> STINNER Victor added the comment: The problem is tricky. The modules are deleted in a random order at exit. The problem is that showing the warning requires to import the linecache module. But during Python finalization, we may or may not be able to import modules. Py_Finalize() calls PyImport_Cleanup() which starts by setting sys.path and sys.meta_path to None. The _find_spec() function of importlib._bootstrap fails because sys.meta_path is None. In fact, find_spec() starts by emiting a warning which calls formatwarning() which tries to import linecache again... and then importlib emits again a warning... "import linecache" is tried twice and then everything fails. A workaround would be to unload the __main__ module first, before clearing sys attributes. Another workaround would be to not try to import modules in warnings.formatwarning() if Python is exiting. The tricky exit code was already discussed in the issue #19421 ("FileIO destructor imports indirectly the io module at exit"). See also my more general issue #21788 ("Rework Python finalization"). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 23:07:53 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 21:07:53 +0000 Subject: [issue21925] ResouceWarning sometimes doesn't display In-Reply-To: <1404614973.3.0.388136336832.issue21925@psf.upfronthosting.co.za> Message-ID: <3h6fWF0TLYz7Ln4@mail.python.org> Roundup Robot added the comment: New changeset 047da19efdab by Victor Stinner in branch '3.4': Issue #21925: PyImport_Cleanup(): Remove unused parameter in http://hg.python.org/cpython/rev/047da19efdab New changeset b255ecb175c4 by Victor Stinner in branch 'default': (Merge 3.4) Issue #21925: PyImport_Cleanup(): Remove unused parameter in http://hg.python.org/cpython/rev/b255ecb175c4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 23:10:17 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jul 2014 21:10:17 +0000 Subject: [issue21925] ResouceWarning sometimes doesn't display In-Reply-To: <1404614973.3.0.388136336832.issue21925@psf.upfronthosting.co.za> Message-ID: <1404767417.2.0.438788798095.issue21925@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't know if it's the best trick, but here is a patch to unload the __main__ module first in PyImport_Cleanup(). ---------- keywords: +patch Added file: http://bugs.python.org/file35896/unload_main_first.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 23:14:40 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Jul 2014 21:14:40 +0000 Subject: [issue15133] tkinter.BooleanVar.get() behavior and docstring disagree In-Reply-To: <1340357266.8.0.524344970378.issue15133@psf.upfronthosting.co.za> Message-ID: <1404767680.23.0.830609314858.issue15133@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have no strong opinion. Definitely getboolean() (and other getXXX) is not consistent. The question is what should getboolean (and BooleanVar.get) always return, bool or int? Note that since 8.6 Tcl doesn't use special boolean type internally and use integers 0 and 1 to represent boolean values. So any boolean values returned from Tk will be converted by Tkinter to 0/1. ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 23:26:34 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jul 2014 21:26:34 +0000 Subject: [issue21936] test_future_exception_never_retrieved() of test_asyncio fails on AMD64 Debian root 3.x Message-ID: <1404768394.83.0.876638783758.issue21936@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/915/steps/test/logs/stdio ====================================================================== FAIL: test_future_exception_never_retrieved (test.test_asyncio.test_futures.FutureTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/mock.py", line 1152, in patched return func(*args, **keywargs) File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_asyncio/test_futures.py", line 329, in test_future_exception_never_retrieved m_log.error.assert_called_once_with(mock.ANY, exc_info=exc_info) File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/mock.py", line 797, in assert_called_once_with raise AssertionError(msg) AssertionError: Expected 'error' to be called once. Called 3 times. ---------- components: Tests, asyncio keywords: buildbot messages: 222521 nosy: gvanrossum, haypo, yselivanov priority: normal severity: normal status: open title: test_future_exception_never_retrieved() of test_asyncio fails on AMD64 Debian root 3.x versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 23:33:55 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jul 2014 21:33:55 +0000 Subject: [issue21936] test_future_exception_never_retrieved() of test_asyncio fails on AMD64 Debian root 3.x In-Reply-To: <1404768394.83.0.876638783758.issue21936@psf.upfronthosting.co.za> Message-ID: <1404768835.36.0.264977406799.issue21936@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, this failure is probably a side effect of new logs emited by test_asyncio because of #21163. The issue #21163 has a pending patch which is waiting for a review ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 23:36:32 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jul 2014 21:36:32 +0000 Subject: [issue21936] test_future_exception_never_retrieved() of test_asyncio fails on AMD64 Debian root 3.x In-Reply-To: <1404768394.83.0.876638783758.issue21936@psf.upfronthosting.co.za> Message-ID: <1404768992.82.0.946592858198.issue21936@psf.upfronthosting.co.za> STINNER Victor added the comment: > The issue #21163 has a pending patch which is waiting for a review ;-) Oops, wrong: I already commited the part of the patch which was correct, but wait() and gather() have no updated patch yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 7 23:46:30 2014 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 07 Jul 2014 21:46:30 +0000 Subject: [issue21879] str.format() gives poor diagnostic on placeholder mismatch In-Reply-To: <1404052648.46.0.81950938275.issue21879@psf.upfronthosting.co.za> Message-ID: <1404769590.17.0.607679761625.issue21879@psf.upfronthosting.co.za> Eric V. Smith added the comment: I don't think we can change the exception type in a bugfix release, if ever. I don't see much point in changing the exception type: it's just churn. I'm +1 for a better error message. I'm -0 on changing the error message in a bugfix release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 00:01:56 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 22:01:56 +0000 Subject: [issue12523] 'str' object has no attribute 'more' [/usr/lib/python3.2/asynchat.py|initiate_send|245] In-Reply-To: <1310256264.97.0.142665013721.issue12523@psf.upfronthosting.co.za> Message-ID: <3h6gjb2Jw2z7Llx@mail.python.org> Roundup Robot added the comment: New changeset f8c9dd2626aa by Victor Stinner in branch '3.4': Issue #12523: asynchat.async_chat.push() now raises a TypeError if it doesn't http://hg.python.org/cpython/rev/f8c9dd2626aa New changeset 4b29d338cc41 by Victor Stinner in branch 'default': (Merge 3.4) Issue #12523: asynchat.async_chat.push() now raises a TypeError if http://hg.python.org/cpython/rev/4b29d338cc41 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 00:07:59 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jul 2014 22:07:59 +0000 Subject: [issue12523] 'str' object has no attribute 'more' [/usr/lib/python3.2/asynchat.py|initiate_send|245] In-Reply-To: <1310256264.97.0.142665013721.issue12523@psf.upfronthosting.co.za> Message-ID: <1404770879.39.0.925110384368.issue12523@psf.upfronthosting.co.za> STINNER Victor added the comment: I fixed the issue. I copied the check from asyncio, _SelectorSocketTransport.write() of asyncio.selector_events for example. ---------- nosy: +haypo resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 00:10:50 2014 From: report at bugs.python.org (=?utf-8?q?Denilson_Figueiredo_de_S=C3=A1?=) Date: Mon, 07 Jul 2014 22:10:50 +0000 Subject: [issue14841] os.get_terminal_size() should check stdin as a fallback In-Reply-To: <1337275274.3.0.172049776796.issue14841@psf.upfronthosting.co.za> Message-ID: <1404771050.38.0.0269320887459.issue14841@psf.upfronthosting.co.za> Denilson Figueiredo de S? added the comment: FYI, "tput" tool can find out the dimensions even when both stdin and stdout are redirected. It can't, however, if all stdin, stdout and stderr are redirected. Python should probably implement a similar logic. $ echo | stty size stty: standard input: Inappropriate ioctl for device $ echo | tput cols | cat 223 $ echo | tput cols 2>&1 | cat 80 (tested under Linux) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 00:34:43 2014 From: report at bugs.python.org (Pablo Sole) Date: Mon, 07 Jul 2014 22:34:43 +0000 Subject: [issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see In-Reply-To: <1206293428.96.0.660613140218.issue2466@psf.upfronthosting.co.za> Message-ID: <1404772483.8.0.61798001552.issue2466@psf.upfronthosting.co.za> Pablo Sole added the comment: I found another case where the result of ismount() is misleading. I'm using a FUSE-based filesystem controlled by a python supervisor daemon. When the fuse daemon dies and you try to access the filesystem with os.stat() it returns: OSError: [Errno 107] Transport endpoint is not connected: '/tmp/fuse-test'. Although, the filesystem is actually mounted and you can verify this: # cat /proc/self/mountinfo | grep fuse 26 25 0:20 / /tmp/fuse-test rw,nosuid,nodev,relatime - fuse /dev/fuse rw,user_id=1000,group_id=1000,default_permissions,allow_other If the idea of ismount() is to show what paths are mountpoints, in this case it should return True, even if it's non-accessible (the fuse daemon died in this case, it might also happen for a stale NFS mount *not checked* ). ---------- nosy: +pablo.sole _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 00:35:10 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 22:35:10 +0000 Subject: [issue11259] asynchat does not check if terminator is negative integer In-Reply-To: <1298220002.68.0.352394054223.issue11259@psf.upfronthosting.co.za> Message-ID: <3h6hRx5LLKz7Ljf@mail.python.org> Roundup Robot added the comment: New changeset f67df13dd512 by Victor Stinner in branch '3.4': Issue #11259: asynchat.async_chat().set_terminator() now raises a ValueError if http://hg.python.org/cpython/rev/f67df13dd512 New changeset d164fda9063a by Victor Stinner in branch 'default': (Merge 3.4) Issue #11259: asynchat.async_chat().set_terminator() now raises a http://hg.python.org/cpython/rev/d164fda9063a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 00:38:19 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jul 2014 22:38:19 +0000 Subject: [issue11259] asynchat does not check if terminator is negative integer In-Reply-To: <1298220002.68.0.352394054223.issue11259@psf.upfronthosting.co.za> Message-ID: <1404772699.22.0.840222432161.issue11259@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is now fixed, thanks for the report. Sorry for the delay :-( Asy Mark wrote, asynchat is now deprecated: it's time to switch to the new shiny asyncio module! ---------- nosy: +haypo resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 00:41:49 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jul 2014 22:41:49 +0000 Subject: [issue6916] Remove deprecated items from asynchat In-Reply-To: <1252994156.96.0.167712988312.issue6916@psf.upfronthosting.co.za> Message-ID: <1404772909.81.0.0858256519228.issue6916@psf.upfronthosting.co.za> STINNER Victor added the comment: asynchat.fifo is now explicitly marked as deprecated and scheduled for removal in Python 3.6. I consider that the issue is done and so I'm closing it. Reopen a more specific issue if you consider that there is still something to do. @Berker: You may apply use-assertwarns.diff yourself, I have no opinion, but your patch doesn't apply cleanly anymore. ---------- nosy: +haypo resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 00:50:02 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 22:50:02 +0000 Subject: [issue21803] Remove macro indirections in complexobject In-Reply-To: <1403118051.82.0.958241354648.issue21803@psf.upfronthosting.co.za> Message-ID: <3h6hn623nzz7Lm6@mail.python.org> Roundup Robot added the comment: New changeset 9f75a29c9577 by Antoine Pitrou in branch 'default': Issue #21803: remove macro indirections in complexobject.h http://hg.python.org/cpython/rev/9f75a29c9577 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 00:50:31 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Jul 2014 22:50:31 +0000 Subject: [issue21803] Remove macro indirections in complexobject In-Reply-To: <1403118051.82.0.958241354648.issue21803@psf.upfronthosting.co.za> Message-ID: <1404773431.94.0.890105535792.issue21803@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, pushed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 00:55:23 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jul 2014 22:55:23 +0000 Subject: [issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell In-Reply-To: <1404254403.84.0.153705596072.issue21901@psf.upfronthosting.co.za> Message-ID: <1404773723.0.0.0663139779624.issue21901@psf.upfronthosting.co.za> STINNER Victor added the comment: ping? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 01:04:39 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jul 2014 23:04:39 +0000 Subject: [issue21803] Remove macro indirections in complexobject In-Reply-To: <1403118051.82.0.958241354648.issue21803@psf.upfronthosting.co.za> Message-ID: <1404774279.45.0.653978725251.issue21803@psf.upfronthosting.co.za> STINNER Victor added the comment: Failure on buildbot. http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/4599/steps/test/logs/stdio running build_ext building 'cmath' extension gcc -pthread -fPIC -Wno-unused-result -Werror=declaration-after-statement -g -O0 -Wall -Wstrict-prototypes -I./Include -I. -IInclude -I/usr/include/x86_64-linux-gnu -I/usr/local/include -I/opt/python/3.x.langa-ubuntu/build/Include -I/opt/python/3.x.langa-ubuntu/build -c /opt/python/3.x.langa-ubuntu/build/Modules/cmathmodule.c -o build/temp.linux-x86_64-3.5-pydebug/opt/python/3.x.langa-ubuntu/build/Modules/cmathmodule.o /opt/python/3.x.langa-ubuntu/build/Modules/cmathmodule.c: In function ?c_atanh?: /opt/python/3.x.langa-ubuntu/build/Modules/cmathmodule.c:316:9: warning: implicit declaration of function ?c_neg? [-Wimplicit-function-declaration] /opt/python/3.x.langa-ubuntu/build/Modules/cmathmodule.c:316:9: error: incompatible type for argument 1 of ?c_atanh? /opt/python/3.x.langa-ubuntu/build/Modules/cmathmodule.c:307:1: note: expected ?Py_complex? but argument is of type ?int? /opt/python/3.x.langa-ubuntu/build/Modules/cmathmodule.c: In function ?cmath_log?: /opt/python/3.x.langa-ubuntu/build/Modules/cmathmodule.c:845:9: warning: implicit declaration of function ?c_quot? [-Wimplicit-function-declaration] /opt/python/3.x.langa-ubuntu/build/Modules/cmathmodule.c:845:11: error: incompatible types when assigning to type ?Py_complex? from type ?int? /opt/python/3.x.langa-ubuntu/build/Modules/cmathmodule.c: In function ?cmath_polar?: /opt/python/3.x.langa-ubuntu/build/Modules/cmathmodule.c:946:5: warning: implicit declaration of function ?c_abs? [-Wimplicit-function-declaration] Failed to build these modules: cmath ---------- nosy: +haypo resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 01:08:30 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Jul 2014 23:08:30 +0000 Subject: [issue21803] Remove macro indirections in complexobject In-Reply-To: <1403118051.82.0.958241354648.issue21803@psf.upfronthosting.co.za> Message-ID: <1404774510.69.0.018505887949.issue21803@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ha, I hadn't noticed the compilation failures when rebuilding... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 01:08:56 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 07 Jul 2014 23:08:56 +0000 Subject: [issue21803] Remove macro indirections in complexobject In-Reply-To: <1403118051.82.0.958241354648.issue21803@psf.upfronthosting.co.za> Message-ID: <3h6jBv2Z18z7Lm6@mail.python.org> Roundup Robot added the comment: New changeset 4609e31092b2 by Antoine Pitrou in branch 'default': Fix compilation failure (followup to #21803) http://hg.python.org/cpython/rev/4609e31092b2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 01:12:13 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 07 Jul 2014 23:12:13 +0000 Subject: [issue21930] new assert raises syntax proposal In-Reply-To: <1404732324.49.0.351341465779.issue21930@psf.upfronthosting.co.za> Message-ID: <1404774733.28.0.704101140951.issue21930@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also https://mail.python.org/pipermail/python-ideas/2014-June/028206.html for a list of things to keep in mind while adding new features (especially keywords). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 01:44:24 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Jul 2014 23:44:24 +0000 Subject: [issue21803] Remove macro indirections in complexobject In-Reply-To: <1403118051.82.0.958241354648.issue21803@psf.upfronthosting.co.za> Message-ID: <1404776664.05.0.863453844236.issue21803@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 06:04:34 2014 From: report at bugs.python.org (ingrid) Date: Tue, 08 Jul 2014 04:04:34 +0000 Subject: [issue21806] Add tests for turtle.TPen class Message-ID: <1404792274.11.0.826536647332.issue21806@psf.upfronthosting.co.za> New submission from ingrid: Duplicate of http://bugs.python.org/issue21916 ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 06:05:35 2014 From: report at bugs.python.org (ingrid) Date: Tue, 08 Jul 2014 04:05:35 +0000 Subject: [issue21754] Add tests for turtle.TurtleScreenBase Message-ID: <1404792335.7.0.235617090941.issue21754@psf.upfronthosting.co.za> New submission from ingrid: Duplicate of http://bugs.python.org/issue21914 ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 06:05:48 2014 From: report at bugs.python.org (ingrid) Date: Tue, 08 Jul 2014 04:05:48 +0000 Subject: [issue21646] Add tests for turtle.ScrolledCanvas In-Reply-To: <1402544825.36.0.732484348181.issue21646@psf.upfronthosting.co.za> Message-ID: <1404792348.83.0.364505946235.issue21646@psf.upfronthosting.co.za> ingrid added the comment: Duplicate of http://bugs.python.org/issue21914 ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 06:42:03 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 08 Jul 2014 04:42:03 +0000 Subject: [issue21937] IDLE interactive window doesn't display unsaved-indicator Message-ID: <1404794523.71.0.976776826141.issue21937@psf.upfronthosting.co.za> New submission from Raymond Hettinger: * Open a Python Shell * Save as session_log.txt * Type a line of code * Notice that the asterisk for "unsaved" does not appear ---------- components: IDLE messages: 222542 nosy: rhettinger priority: normal severity: normal status: open title: IDLE interactive window doesn't display unsaved-indicator type: behavior versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 06:47:43 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 08 Jul 2014 04:47:43 +0000 Subject: [issue21929] Rounding properly In-Reply-To: <1404729306.28.0.45044219182.issue21929@psf.upfronthosting.co.za> Message-ID: <1404794863.45.0.217602981489.issue21929@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, the FAQ in the decimal docs shows how to round Decimal objects using the quantize() method: https://docs.python.org/2.7/library/decimal.html#decimal-faq Unfortunately, only it Python 3 does the one-obvious-way-to-do-it work. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 06:50:11 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 08 Jul 2014 04:50:11 +0000 Subject: [issue18592] Idle: test SearchDialogBase.py In-Reply-To: <1375146770.41.0.774627283078.issue18592@psf.upfronthosting.co.za> Message-ID: <1404795011.78.0.0687624435883.issue18592@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ah, Debian must not be using 8.6. Thanks for both the clarification and how to fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 07:15:02 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 08 Jul 2014 05:15:02 +0000 Subject: [issue21879] str.format() gives poor diagnostic on placeholder mismatch In-Reply-To: <1404052648.46.0.81950938275.issue21879@psf.upfronthosting.co.za> Message-ID: <1404796502.33.0.967919246764.issue21879@psf.upfronthosting.co.za> Terry J. Reedy added the comment: After reading Eric's comments and checking the signature of .format and rereading the Format String Syntax section, I have changed my mind. The signature of .format is "S.format(*args, **kwargs) -> str" and args is a tuple. So the user asks for creation of a tuple by calling .format. The only unusual part is the the user also provides indexes into the args tuple, but the doc is clear enough that ints passed as specification field names select positional arguments. I think the current message is correct enough to leave alone in current releases. An improved message might be IndexError("Replacement index %d out of range for positional args tuple") This uses 'replacement index' as a contraction of 'integer passed as replacement field name'. ---------- type: behavior -> enhancement versions: -Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 08:12:55 2014 From: report at bugs.python.org (Kushal Das) Date: Tue, 08 Jul 2014 06:12:55 +0000 Subject: [issue21270] unittest.mock.call object has inherited count method In-Reply-To: <1397681359.44.0.204245756188.issue21270@psf.upfronthosting.co.za> Message-ID: <1404799975.67.0.643528275638.issue21270@psf.upfronthosting.co.za> Kushal Das added the comment: To start with I am overriding count and index method. Do you think this is enough? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 08:53:08 2014 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 08 Jul 2014 06:53:08 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404802388.2.0.187127444306.issue21922@psf.upfronthosting.co.za> Mark Dickinson added the comment: > IMO you must discuss the GMP license on the python-dev mailing list I think the maintenance implications of having another external dependency would also need discussion on python-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 09:44:53 2014 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 08 Jul 2014 07:44:53 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404805493.26.0.685315779348.issue21922@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hmm. Looking back at my previous comments, I should explain my negativity a bit better. 1. Like Victor's issue 1814 work, this is great stuff, and very impressive. 2. I'm really not convinced that it belongs in the Python core. To expand on 2: we already have a simple, highly portable, battle-tested implementation of big integers that's reasonably efficient for normal uses and requires little day-to-day maintenance. We'd be replacing that with something that's a lot more complicated, less thoroughly tested, and *not* significantly more efficient in normal use-cases. Apart from the pain of the transition (and any refactor of this size is bound to involve some pain), I'm particularly worried about future headaches involved in maintaining the external GMP dependency: keeping up with bugfixes, managing the binary builds, etc. I anticipate that that would add quite of a lot of work for the core team in general and those building releases in particular. (And that's another reason that we should have a python-dev discussion, so that those involved in the release process get a chance to weigh in.) To offset that, there needs to be a clear *benefit* to making this change. A couple of specific questions for Hristo Venev: - What's the current status of GMP on Windows? IIUC, one of the motivations for the MPIR unfriendly fork of GMP was better Windows support. Does your patch already build cleanly on Windows? - Whom do you see this change benefiting? Those doing serious large-number stuff on Python (SAGE users, for example) are presumably already using gmpy2 or something similar. - Do you want to initiate the python-dev discussion, or leave that to someone else? [I'm deliberately steering clear of the licensing issues; it needs discussion, but IANAL and I have nothing useful to contribute here.] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 09:54:39 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Jul 2014 07:54:39 +0000 Subject: [issue15133] tkinter.BooleanVar.get() behavior and docstring disagree In-Reply-To: <1340357266.8.0.524344970378.issue15133@psf.upfronthosting.co.za> Message-ID: <1404806079.96.0.106237497412.issue15133@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch. 1) getboolean() and BooleanVar.get() now always return bool. Wrapping the result of getboolean() into bool() is not more needed. 2) getboolean() and BooleanVar.get() now works with Tcl_Obj. This makes Tkinter more robust against future Tcl/Tk changes. 3) An exception is raised if an argument to BooleanVar.set() couldn't be considered as boolean value. An argument is converted to canonized 0/1 values. This makes errors to be exposed earlier. Similar changes should be made for getint() and getdouble(). ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file35897/tkinter_getboolean.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 10:01:12 2014 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 08 Jul 2014 08:01:12 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1404806472.16.0.757091777569.issue21922@psf.upfronthosting.co.za> Mark Dickinson added the comment: Previous python-dev discussions: https://mail.python.org/pipermail/python-dev/2008-November/083315.html https://mail.python.org/pipermail/python-3000/2007-September/010718.html [Regarding the ancient mpz module, which used to be part of Python] https://mail.python.org/pipermail/python-dev/2001-December/018967.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 11:40:57 2014 From: report at bugs.python.org (Stefano Borini) Date: Tue, 08 Jul 2014 09:40:57 +0000 Subject: [issue21772] platform.uname() not EINTR safe In-Reply-To: <1402853550.81.0.562777788511.issue21772@psf.upfronthosting.co.za> Message-ID: <1404812457.02.0.898385985278.issue21772@psf.upfronthosting.co.za> Stefano Borini added the comment: You can't use subprocess. platform is used during build. subprocess needs select, but select is a compiled module and at that specific time in the build process is not compiled yet. ---------- nosy: +stefanoborini _______________________________________ Python tracker _______________________________________ From mal at egenix.com Tue Jul 8 11:50:22 2014 From: mal at egenix.com (M.-A. Lemburg) Date: Tue, 08 Jul 2014 11:50:22 +0200 Subject: [issue21772] platform.uname() not EINTR safe In-Reply-To: <1404812457.02.0.898385985278.issue21772@psf.upfronthosting.co.za> References: <1404812457.02.0.898385985278.issue21772@psf.upfronthosting.co.za> Message-ID: <53BBBEDE.4080203@egenix.com> On 08.07.2014 11:40, Stefano Borini wrote: > > You can't use subprocess. platform is used during build. subprocess needs select, but select is a compiled module and at that specific time in the build process is not compiled yet. Good point :-) -- Marc-Andre Lemburg eGenix.com From report at bugs.python.org Tue Jul 8 11:50:26 2014 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 08 Jul 2014 09:50:26 +0000 Subject: [issue21772] platform.uname() not EINTR safe In-Reply-To: <1404812457.02.0.898385985278.issue21772@psf.upfronthosting.co.za> Message-ID: <53BBBEDE.4080203@egenix.com> Marc-Andre Lemburg added the comment: On 08.07.2014 11:40, Stefano Borini wrote: > > You can't use subprocess. platform is used during build. subprocess needs select, but select is a compiled module and at that specific time in the build process is not compiled yet. Good point :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 12:40:12 2014 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Tue, 08 Jul 2014 10:40:12 +0000 Subject: [issue17153] tarfile extract fails when Unicode in pathname In-Reply-To: <1360255401.83.0.937643629633.issue17153@psf.upfronthosting.co.za> Message-ID: <1404816012.41.0.932157710788.issue17153@psf.upfronthosting.co.za> Lars Gust?bel added the comment: IIRC, tarfile under 2.7 has never been explicitly unicode-safe, support for unicode objects is heterogeneous at best. The obvious work-around is to work exclusively with str objects. What we can't do is to decode the utf-8 pathname from the archive to a unicode object, because we have no way to detect an archive's encoding. We can either emit a warning if the user passes a unicode object to extract() or we implicitly encode the passed unicode object using TarFile.encoding, so that the os.path.join() succeeds. Unfortunately, I am not entirely sure if there was possibly a rationale behind the current behaviour of extract(). This needs more inspection. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 12:57:52 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Jul 2014 10:57:52 +0000 Subject: [issue21365] asyncio.Task reference misses the most important fact about it, related info spread around intros and example commentary instead In-Reply-To: <1398613098.75.0.265677522517.issue21365@psf.upfronthosting.co.za> Message-ID: <1404817072.86.0.68550398592.issue21365@psf.upfronthosting.co.za> STINNER Victor added the comment: Hi, I pushed my change to add a new BaseEventLoop.create_task() method. For that, I also updated the documentation: http://hg.python.org/cpython/rev/66f06fbf8a2f I rewrote the documentation of the Task method, and more generally all places describing how to create a Task object. I changed the first sentence to "Schedule the execution of a coroutine object" to be the most explicit. The documentation will be readable online in a few hours: https://docs.python.org/dev/library/asyncio-task.html#task Thanks for your report. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 12:58:00 2014 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 08 Jul 2014 10:58:00 +0000 Subject: [issue17288] cannot jump from a return after setting f_lineno In-Reply-To: <1361726813.15.0.719765769531.issue17288@psf.upfronthosting.co.za> Message-ID: <1404817080.03.0.146993659633.issue17288@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Python 3.5 is still crashing with this test: $ python jump.py > jump.py(7)() -> for i in gen(): (Pdb) break 3 Breakpoint 1 at jump.py:3 (Pdb) continue > jump.py(3)gen() -> yield i (Pdb) step --Return-- > jump.py(3)gen()->0 -> yield i (Pdb) jump 2 > jump.py(2)gen()->0 -> for i in range(1): (Pdb) continue Segmentation fault (core dumped) It is true that frame_setlineno() assumes incorrectly that f->f_stacktop is not NULL, but the reason of the crash or of the "SystemError: unknown opcode" is that PyEval_EvalFrameEx() expects on its invocation f->f_lasti to refer to the index of the last instruction executed and sets (and assumes this instruction does not have argument) 'next_instr' accordingly to the next byte, while by jumping to line 2 we set f->f_lasti to zero and 'SETUP_LOOP', the opcode at this index, has an argument. The attached patch is a slight improvement over the last one. ---------- type: behavior -> crash versions: +Python 3.5 -Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file35898/default_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 12:59:16 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Jul 2014 10:59:16 +0000 Subject: [issue17288] cannot jump from a return after setting f_lineno In-Reply-To: <1361726813.15.0.719765769531.issue17288@psf.upfronthosting.co.za> Message-ID: <1404817156.41.0.427930090233.issue17288@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 13:02:00 2014 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 08 Jul 2014 11:02:00 +0000 Subject: [issue21938] Py_XDECREF statement in gen_iternext() Message-ID: <1404817320.2.0.605121131918.issue21938@psf.upfronthosting.co.za> New submission from Xavier de Gaye: The Py_XDECREF statement in gen_iternext() at Objects/genobject.c is not needed since val is NULL (may be optimized out by the compiler). Actually, the whole function could be written as: return gen_send_ex(gen, NULL, 0); ---------- components: Interpreter Core messages: 222556 nosy: xdegaye priority: normal severity: normal status: open title: Py_XDECREF statement in gen_iternext() type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 13:57:31 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Tue, 08 Jul 2014 11:57:31 +0000 Subject: [issue21937] IDLE interactive window doesn't display unsaved-indicator In-Reply-To: <1404794523.71.0.976776826141.issue21937@psf.upfronthosting.co.za> Message-ID: <1404820651.51.0.0486589246103.issue21937@psf.upfronthosting.co.za> Changes by Saimadhav Heblikar : ---------- nosy: +sahutd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 14:05:24 2014 From: report at bugs.python.org (Hynek Schlawack) Date: Tue, 08 Jul 2014 12:05:24 +0000 Subject: [issue1610654] cgi.py multipart/form-data Message-ID: <1404821124.77.0.621747309881.issue1610654@psf.upfronthosting.co.za> Hynek Schlawack added the comment: I would have long ago if I had any domain knowlege on this topic, but alas?. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 15:09:56 2014 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 08 Jul 2014 13:09:56 +0000 Subject: [issue19608] devguide needs pictures In-Reply-To: <1384510390.93.0.961404476169.issue19608@psf.upfronthosting.co.za> Message-ID: <1404824996.44.0.454888593047.issue19608@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- resolution: -> works for me stage: -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 15:10:01 2014 From: report at bugs.python.org (Stefano Borini) Date: Tue, 08 Jul 2014 13:10:01 +0000 Subject: [issue21772] platform.uname() not EINTR safe In-Reply-To: <1402853550.81.0.562777788511.issue21772@psf.upfronthosting.co.za> Message-ID: <1404825001.66.0.462851403201.issue21772@psf.upfronthosting.co.za> Stefano Borini added the comment: Wouldn't it make sense to use the same strategy used in the subprocess fix (that is, retry?). See http://hg.python.org/cpython/rev/6e664bcc958d/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 15:24:22 2014 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 08 Jul 2014 13:24:22 +0000 Subject: [issue21927] BOM appears in stdin when using Powershell In-Reply-To: <1404657562.39.0.323212380566.issue21927@psf.upfronthosting.co.za> Message-ID: <1404825862.28.0.655543396067.issue21927@psf.upfronthosting.co.za> Ezio Melotti added the comment: I would argue that adding the BOM is a Powershell issue, and I'm not sure Python should do anything about it. There are probably cases where people expects the BOM to be received by python, so stripping it is probably not an option. As for detecting, it should happen automatically only if sys.stdin.encoding is set to 'utf-8-bom', but, by default, Python 3 uses 'UTF-8'. ---------- nosy: +lemburg, loewis type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 16:00:53 2014 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 08 Jul 2014 14:00:53 +0000 Subject: [issue15759] "make suspicious" doesn't display instructions in case of failure In-Reply-To: <1345613663.78.0.519613331574.issue15759@psf.upfronthosting.co.za> Message-ID: <1404828053.33.0.417626408427.issue15759@psf.upfronthosting.co.za> Ezio Melotti added the comment: Serhiy, your patch LGTM. Can you apply a similar fix for the linkcheck and doctest target and commit it? FWIW the patch produces a slightly different output (in addition to showing the missing message), but I don't think it's a problem: Without patch: ... build finished with problems, 8 warnings. make: *** [build] Error 1 With patch: ... build finished with problems, 8 warnings. make[1]: *** [build] Error 1 make[1]: Leaving directory `/home/wolf/dev/py/py3k/Doc' Suspicious check complete; ... make: *** [suspicious] Error 1 ---------- versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 16:19:46 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Tue, 08 Jul 2014 14:19:46 +0000 Subject: [issue21939] IDLE - Test Percolator Message-ID: <1404829186.29.0.812778916434.issue21939@psf.upfronthosting.co.za> New submission from Saimadhav Heblikar: Attached is a unittest for idlelib.Percolator. 2.7 version will be added once this is OK. ---------- components: IDLE files: test_percolator-34.diff keywords: patch messages: 222561 nosy: jesstess, sahutd, taleinat, terry.reedy priority: normal severity: normal status: open title: IDLE - Test Percolator versions: Python 2.7, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file35899/test_percolator-34.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 16:24:49 2014 From: report at bugs.python.org (Michael Foord) Date: Tue, 08 Jul 2014 14:24:49 +0000 Subject: [issue21270] unittest.mock.call object has inherited count method In-Reply-To: <1397681359.44.0.204245756188.issue21270@psf.upfronthosting.co.za> Message-ID: <1404829489.84.0.379633380798.issue21270@psf.upfronthosting.co.za> Michael Foord added the comment: Those are the only ones I think. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 16:37:15 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Tue, 08 Jul 2014 14:37:15 +0000 Subject: [issue21940] IDLE - Test WidgetRedirector Message-ID: <1404830235.88.0.167497005824.issue21940@psf.upfronthosting.co.za> New submission from Saimadhav Heblikar: Attached is unittest for idlelib.WidgetRedirector 2.7 version will be uploaded once this is OK. ---------- components: Extension Modules files: test-widgetredir-34.diff keywords: patch messages: 222563 nosy: jesstess, sahutd, taleinat, terry.reedy priority: normal severity: normal status: open title: IDLE - Test WidgetRedirector versions: Python 2.7, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file35900/test-widgetredir-34.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 16:42:29 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 08 Jul 2014 14:42:29 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <3h75w41f25z7LjM@mail.python.org> Roundup Robot added the comment: New changeset 06589e81fd56 by Zachary Ware in branch 'default': Issue #21907: Make the buildbot clean script always return 0. http://hg.python.org/cpython/rev/06589e81fd56 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 16:46:12 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Jul 2014 14:46:12 +0000 Subject: [issue15759] "make suspicious" doesn't display instructions in case of failure In-Reply-To: <1345613663.78.0.519613331574.issue15759@psf.upfronthosting.co.za> Message-ID: <1404830772.73.0.79027291589.issue15759@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, I forgot about this patch. Here is more correct patch. It now works with non-default make command and "make suspicious" now returns success return code if no suspicious markups were found. Made similar fix for the linkcheck and doctest target. ---------- Added file: http://bugs.python.org/file35901/make_suspicious_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 16:51:28 2014 From: report at bugs.python.org (Zachary Ware) Date: Tue, 08 Jul 2014 14:51:28 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <1404831088.86.0.922105710314.issue21907@psf.upfronthosting.co.za> Zachary Ware added the comment: The XP buildbot seems to have choked on this change, I suspect because of the 'clean' script exiting with a non-zero error code. I'm not certain why it can't recover, though. David, can you tell what's going on with it? ---------- nosy: +db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 17:12:08 2014 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 08 Jul 2014 15:12:08 +0000 Subject: [issue14953] Reimplement subset of multiprocessing.sharedctypes using memoryview In-Reply-To: <1338303583.56.0.322806581737.issue14953@psf.upfronthosting.co.za> Message-ID: <1404832328.31.0.732797572107.issue14953@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Updated version of the patch. Still needs docs. ---------- Added file: http://bugs.python.org/file35902/memoryview-array-value.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 17:34:54 2014 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 08 Jul 2014 15:34:54 +0000 Subject: [issue21844] Fix HTMLParser in unicodeless build In-Reply-To: <1403594743.84.0.436263477794.issue21844@psf.upfronthosting.co.za> Message-ID: <1404833694.33.0.694474119937.issue21844@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- dependencies: -Fix unicodeless build of Python stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 17:35:09 2014 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 08 Jul 2014 15:35:09 +0000 Subject: [issue21844] Fix HTMLParser in unicodeless build In-Reply-To: <1403594743.84.0.436263477794.issue21844@psf.upfronthosting.co.za> Message-ID: <1404833709.97.0.500606447198.issue21844@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- dependencies: +Fix unicodeless build of Python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 18:27:05 2014 From: report at bugs.python.org (koobs) Date: Tue, 08 Jul 2014 16:27:05 +0000 Subject: [issue21704] _multiprocessing module builds incorrectly when POSIX semaphores are disabled In-Reply-To: <1402396404.2.0.758262532851.issue21704@psf.upfronthosting.co.za> Message-ID: <1404836825.39.0.81874735519.issue21704@psf.upfronthosting.co.za> Changes by koobs : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 18:31:57 2014 From: report at bugs.python.org (koobs) Date: Tue, 08 Jul 2014 16:31:57 +0000 Subject: [issue20981] ssl doesn't build anymore with OpenSSL 0.9.7 or older: X509_check_ca In-Reply-To: <1395247121.79.0.24713590698.issue20981@psf.upfronthosting.co.za> Message-ID: <1404837117.26.0.492561620869.issue20981@psf.upfronthosting.co.za> Changes by koobs : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 19:11:19 2014 From: report at bugs.python.org (Stefan Krah) Date: Tue, 08 Jul 2014 17:11:19 +0000 Subject: [issue20981] ssl doesn't build anymore with OpenSSL 0.9.7 or older: X509_check_ca In-Reply-To: <1395247121.79.0.24713590698.issue20981@psf.upfronthosting.co.za> Message-ID: <1404839479.71.0.648924877025.issue20981@psf.upfronthosting.co.za> Stefan Krah added the comment: FreeBSD 6.4 is EOL though, for quite some time already: http://lists.freebsd.org/pipermail/freebsd-announce/2010-September/001344.html Maybe we should ask the buildbot owner to upgrade to something newer. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 19:19:51 2014 From: report at bugs.python.org (Som Veettil) Date: Tue, 08 Jul 2014 17:19:51 +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: <1404839991.43.0.641752609534.issue5712@psf.upfronthosting.co.za> Som Veettil added the comment: @Serhiy Storchaka - its Python 2.7.6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 19:23:56 2014 From: report at bugs.python.org (Danek Duvall) Date: Tue, 08 Jul 2014 17:23:56 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1404840236.74.0.304096857292.issue20104@psf.upfronthosting.co.za> Danek Duvall added the comment: Our project (the Solaris packaging system, IPS), relies on posix_spawn() primarily for the ability to fork without making a large memory reservation (and possibly failing) because the forking process was itself very large. That's the (a?) bug benefit of posix_spawn() -- it's not a benefit for the programmer using it (who might have to fall back to fork/exec), but for the end-user that benefits from its streamlined operation. You're right that it doesn't handle everything that subprocess.Popen() does -- though at least on Solaris there's a way to change the cwd in the file actions, and I'm sure we'd consider adding a way to do the setsid() as well. The rest should be possible cross-platform. ---------- nosy: +dhduvall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 19:26:20 2014 From: report at bugs.python.org (Alex Gaynor) Date: Tue, 08 Jul 2014 17:26:20 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1404840380.55.0.668087925559.issue20104@psf.upfronthosting.co.za> Alex Gaynor added the comment: Danek, you might find https://github.com/dreid/posix_spawn/ useful, it provides bindings and a public API over posix_spawn (it's not complete yet, but if there's stuff missing, feel free to file a ticket!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 19:38:08 2014 From: report at bugs.python.org (Danek Duvall) Date: Tue, 08 Jul 2014 17:38:08 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1404841088.49.0.586011360523.issue20104@psf.upfronthosting.co.za> Danek Duvall added the comment: Cool. We implemented our own version as a straight-up native module (https://java.net/projects/ips/sources/pkg-gate/content/src/modules/pspawn.c), and our Popen replacement is not at present a complete replacement for the one in the stdlib, but it does what we need it to do. We'd absolutely switch if it came in to the stdlib, though, and I think there would be plenty of programs that would benefit from it (certainly a number of large Python programs in Solaris have run into exactly this problem). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 20:08:10 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Jul 2014 18:08:10 +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: <1404842890.85.0.842747369453.issue5712@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This bug was fixed in 2.7.7. ---------- resolution: -> duplicate status: open -> closed superseder: -> Regression: Windows-tkinter-idle, unicode, and 0xxx filename _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 20:35:43 2014 From: report at bugs.python.org (David Bolen) Date: Tue, 08 Jul 2014 18:35:43 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <1404844543.04.0.493784647979.issue21907@psf.upfronthosting.co.za> David Bolen added the comment: Interesting - it's got a "Visual Studio Just-In-Time Debugger" dialog on the screen for an unhandled win32 exception in the compiler (cl.exe). That's a dialog my pop-up AutoIt script wasn't expecting, so I've added it to the other (RTL error) checks, and it'll clear automatically going forward. But I'm not sure what triggered the error. -- David ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 20:56:15 2014 From: report at bugs.python.org (David Bolen) Date: Tue, 08 Jul 2014 18:56:15 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <1404845775.27.0.277170427808.issue21907@psf.upfronthosting.co.za> David Bolen added the comment: Ok, the last spurt of exceptions on the XP buildbot in the 3.x branch were all related to the fact that somehow the .hg folder in the 3.x branch build tree was missing. The rest of the build files seemed present. I've removed the build tree completely to let a new checkout take place and restarted the most recent build. There does also appear to have been a test file beneath the build tree that the new clean script couldn't remove (build/test_python_580/@test_580_tmp-?L???.py). I was able to remove it myself interactively from cmd.exe, but I've had problems like this myself when cleaning up temp files on the buildbots sometimes, and believe it has something to do with filename character encodings, depending on the tool being used to reference the file. That might explain the non-zero error on XP though, and I agree that making sure such failures don't propagate seems right. -- David ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 21:00:48 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Tue, 08 Jul 2014 19:00:48 +0000 Subject: [issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18 In-Reply-To: <1374657571.18.0.17831195671.issue18540@psf.upfronthosting.co.za> Message-ID: <1404846048.98.0.907520256107.issue18540@psf.upfronthosting.co.za> Milan Oberkirch added the comment: I patched it as you suggested (9 lines added/changed in total). ---------- Added file: http://bugs.python.org/file35903/imaplib_interpret_empty_string_as_None.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 21:16:02 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Tue, 08 Jul 2014 19:16:02 +0000 Subject: [issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18 In-Reply-To: <1374657571.18.0.17831195671.issue18540@psf.upfronthosting.co.za> Message-ID: <1404846962.64.0.0936827811637.issue18540@psf.upfronthosting.co.za> Milan Oberkirch added the comment: Ignore what I just did (the test is obviously dump; it fails if you run it on an IMAP server). I'll make a new attempt after a coffee break ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 21:36:37 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Tue, 08 Jul 2014 19:36:37 +0000 Subject: [issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18 In-Reply-To: <1374657571.18.0.17831195671.issue18540@psf.upfronthosting.co.za> Message-ID: <1404848197.96.0.165923350864.issue18540@psf.upfronthosting.co.za> Milan Oberkirch added the comment: I'm still wondering if the test could be done better. At least it fixes the bug. ---------- Added file: http://bugs.python.org/file35904/imaplib_interpret_empty_string_as_NoneV2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 21:53:19 2014 From: report at bugs.python.org (Zachary Ware) Date: Tue, 08 Jul 2014 19:53:19 +0000 Subject: [issue21918] Convert test_tools to directory In-Reply-To: <1404499693.28.0.512453806731.issue21918@psf.upfronthosting.co.za> Message-ID: <1404849199.32.0.469673592693.issue21918@psf.upfronthosting.co.za> Zachary Ware added the comment: How about this? ---------- keywords: +patch Added file: http://bugs.python.org/file35905/test_tools.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 21:54:20 2014 From: report at bugs.python.org (Zachary Ware) Date: Tue, 08 Jul 2014 19:54:20 +0000 Subject: [issue21918] Convert test_tools to directory In-Reply-To: <1404499693.28.0.512453806731.issue21918@psf.upfronthosting.co.za> Message-ID: <1404849260.63.0.918219263206.issue21918@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's the same patch in --git format, which should make the actual changes clearer (though probably not in Rietveld). ---------- Added file: http://bugs.python.org/file35906/test_tools.diff--git _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 21:55:52 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 08 Jul 2014 19:55:52 +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: <1404849352.85.0.576345621867.issue20513@psf.upfronthosting.co.za> Mark Lawrence added the comment: Looking at PEP 11 and this http://support.microsoft.com/lifecycle/?c2=1163 it seems to depend on which service pack you've got as to whether or not Win2003 is supported by 2.7. Can one of our Windows gurus take a look please, it's as clear as mud to me. ---------- nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 21:58:41 2014 From: report at bugs.python.org (Berker Peksag) Date: Tue, 08 Jul 2014 19:58:41 +0000 Subject: [issue21918] Convert test_tools to directory In-Reply-To: <1404499693.28.0.512453806731.issue21918@psf.upfronthosting.co.za> Message-ID: <1404849521.6.0.377845552435.issue21918@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- assignee: -> zach.ware stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 22:11:39 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 08 Jul 2014 20:11:39 +0000 Subject: [issue15011] Change Scripts to bin on Windows In-Reply-To: <1338952995.87.0.980800482386.issue15011@psf.upfronthosting.co.za> Message-ID: <1404850299.18.0.142772144444.issue15011@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +steve.dower, zach.ware versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 22:45:45 2014 From: report at bugs.python.org (Zachary Ware) Date: Tue, 08 Jul 2014 20:45:45 +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: <1404852345.69.0.522331128842.issue20513@psf.upfronthosting.co.za> Zachary Ware added the comment: Windows Server 2003, XP, and 2000 are all officially supported by Python 2.7, as they were all current (for certain values of "current") at the time Python 2.7 was released. That said, it's not completely clear to me what the bug is but it strikes me as being something that's not all that likely to be hit, and either way about it, I don't have any way to test it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 23:05:07 2014 From: report at bugs.python.org (Claudiu Popa) Date: Tue, 08 Jul 2014 21:05:07 +0000 Subject: [issue21518] Expose RegUnloadKey in winreg In-Reply-To: <1400346760.52.0.0203244636304.issue21518@psf.upfronthosting.co.za> Message-ID: <1404853507.49.0.881420650181.issue21518@psf.upfronthosting.co.za> Claudiu Popa added the comment: Here's the patch with only the change for winreg.UnloadKey. I'll have the patch with windows_helper soon. ---------- Added file: http://bugs.python.org/file35907/winreg_unload_key.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 23:43:20 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 08 Jul 2014 21:43:20 +0000 Subject: [issue21680] asyncio: document event loops In-Reply-To: <1402058495.48.0.977334805226.issue21680@psf.upfronthosting.co.za> Message-ID: <3h7HFg4Xw3z7LjX@mail.python.org> Roundup Robot added the comment: New changeset 3f1381e3a68f by Victor Stinner in branch '3.4': Issue #21680: Document asyncio event loops http://hg.python.org/cpython/rev/3f1381e3a68f New changeset 2c9d5f32f6c5 by Victor Stinner in branch 'default': (Merge 3.4) Issue #21680: Document asyncio event loops http://hg.python.org/cpython/rev/2c9d5f32f6c5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 23:43:54 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Jul 2014 21:43:54 +0000 Subject: [issue21680] asyncio: document event loops In-Reply-To: <1402058495.48.0.977334805226.issue21680@psf.upfronthosting.co.za> Message-ID: <1404855834.65.0.219627331021.issue21680@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 8 23:44:42 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Jul 2014 21:44:42 +0000 Subject: [issue21437] document that asyncio.ProactorEventLoop doesn't support SSL In-Reply-To: <1399296732.42.0.791038898639.issue21437@psf.upfronthosting.co.za> Message-ID: <1404855882.17.0.772554237759.issue21437@psf.upfronthosting.co.za> STINNER Victor added the comment: Done in these commits: New changeset 3f1381e3a68f by Victor Stinner in branch '3.4': Issue #21680: Document asyncio event loops http://hg.python.org/cpython/rev/3f1381e3a68f New changeset 2c9d5f32f6c5 by Victor Stinner in branch 'default': (Merge 3.4) Issue #21680: Document asyncio event loops http://hg.python.org/cpython/rev/2c9d5f32f6c5 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 00:43:55 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 08 Jul 2014 22:43:55 +0000 Subject: [issue21938] Py_XDECREF statement in gen_iternext() In-Reply-To: <1404817320.2.0.605121131918.issue21938@psf.upfronthosting.co.za> Message-ID: <3h7JbZ2cV1z7Lks@mail.python.org> Roundup Robot added the comment: New changeset 5cfa919609a0 by Antoine Pitrou in branch 'default': Issue #21938: simplify gen_iternext() http://hg.python.org/cpython/rev/5cfa919609a0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 00:44:41 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Jul 2014 22:44:41 +0000 Subject: [issue21938] Py_XDECREF statement in gen_iternext() In-Reply-To: <1404817320.2.0.605121131918.issue21938@psf.upfronthosting.co.za> Message-ID: <1404859481.09.0.412336579475.issue21938@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Good point, thanks :) ---------- nosy: +pitrou resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 01:21:32 2014 From: report at bugs.python.org (Christopher Cabanne) Date: Tue, 08 Jul 2014 23:21:32 +0000 Subject: [issue6931] dreadful performance in difflib: ndiff and HtmlDiff In-Reply-To: <1253199298.69.0.280559653373.issue6931@psf.upfronthosting.co.za> Message-ID: <1404861692.36.0.177199648263.issue6931@psf.upfronthosting.co.za> Christopher Cabanne added the comment: I ran into the slowness of difflib.HtmlDiff.make_table yesterday, and see this issue is three years stale now; is there any update or chance that the fix will be applied? ---------- nosy: +Christopher.Cabanne _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 01:28:01 2014 From: report at bugs.python.org (Christopher Cabanne) Date: Tue, 08 Jul 2014 23:28:01 +0000 Subject: [issue6931] dreadful performance in difflib: ndiff and HtmlDiff In-Reply-To: <1253199298.69.0.280559653373.issue6931@psf.upfronthosting.co.za> Message-ID: <1404862081.68.0.588867455689.issue6931@psf.upfronthosting.co.za> Christopher Cabanne added the comment: Here is a timeit command to test with the attached test files: python -m timeit -n 10 "import difflib; difflib.HtmlDiff().make_table(open('left500.txt').readlines(), open('righ500.txt').readlines())" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 01:29:36 2014 From: report at bugs.python.org (Christopher Cabanne) Date: Tue, 08 Jul 2014 23:29:36 +0000 Subject: [issue6931] dreadful performance in difflib: ndiff and HtmlDiff In-Reply-To: <1253199298.69.0.280559653373.issue6931@psf.upfronthosting.co.za> Message-ID: <1404862176.22.0.447005581429.issue6931@psf.upfronthosting.co.za> Christopher Cabanne added the comment: Sorry about the typo; here is the corrected timeit command: python -m timeit -n 10 "import difflib; difflib.HtmlDiff().make_table(open('left500.txt').readlines(), open('right500.txt').readlines())" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 01:45:55 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Tue, 08 Jul 2014 23:45:55 +0000 Subject: [issue12815] Coverage of smtpd.py In-Reply-To: <1314001507.51.0.00455911966964.issue12815@psf.upfronthosting.co.za> Message-ID: <1404863155.78.0.100340493504.issue12815@psf.upfronthosting.co.za> Changes by Milan Oberkirch : ---------- nosy: +zvyn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 01:46:29 2014 From: report at bugs.python.org (Chui Tey) Date: Tue, 08 Jul 2014 23:46:29 +0000 Subject: [issue1610654] cgi.py multipart/form-data In-Reply-To: <1404821124.77.0.621747309881.issue1610654@psf.upfronthosting.co.za> Message-ID: Chui Tey added the comment: Hi, I'm still available. There's a test case in the patch, would you like me to separate that to another file? Would that help with assessing it? Best, On 8 July 2014 22:05, Hynek Schlawack wrote: > > Hynek Schlawack added the comment: > > I would have long ago if I had any domain knowlege on this topic, but alas?. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- nosy: +Chui.Tey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 01:49:28 2014 From: report at bugs.python.org (David Bolen) Date: Tue, 08 Jul 2014 23:49:28 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <1404863368.31.0.110676891973.issue21907@psf.upfronthosting.co.za> David Bolen added the comment: I'm seeing an apparent side-effect of the new clean script (or it seems to correlate). Since it started running, the Windows buildbots (both 7 and XP) seem to always perform a full clone of the master repository for each build rather than just a pull/update. That's a noticeable performance difference (15-20 minutes per clone rather than the more typical 1-2 minutes for pull/update) and seems like it should be unnecessary. I'm not quite sure how the buildbot task makes the decision between the two approaches, but could the new clean be removing a file that's relevant to how the decision is made? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 02:03:46 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 09 Jul 2014 00:03:46 +0000 Subject: [issue6916] Remove deprecated items from asynchat In-Reply-To: <1252994156.96.0.167712988312.issue6916@psf.upfronthosting.co.za> Message-ID: <1404864226.25.0.833432531547.issue6916@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: needs patch -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 02:12:41 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 09 Jul 2014 00:12:41 +0000 Subject: [issue6916] Remove deprecated items from asynchat In-Reply-To: <1252994156.96.0.167712988312.issue6916@psf.upfronthosting.co.za> Message-ID: <3h7LYz68y8z7LmP@mail.python.org> Roundup Robot added the comment: New changeset 486c1a81ee32 by Berker Peksag in branch 'default': Issue #6916: Use assertWarns in test_asynchat. http://hg.python.org/cpython/rev/486c1a81ee32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 02:43:30 2014 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 09 Jul 2014 00:43:30 +0000 Subject: [issue6931] dreadful performance in difflib: ndiff and HtmlDiff In-Reply-To: <1253199298.69.0.280559653373.issue6931@psf.upfronthosting.co.za> Message-ID: <1404866610.19.0.662087195713.issue6931@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 02:44:05 2014 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 09 Jul 2014 00:44:05 +0000 Subject: [issue6931] dreadful performance in difflib: ndiff and HtmlDiff In-Reply-To: <1253199298.69.0.280559653373.issue6931@psf.upfronthosting.co.za> Message-ID: <1404866645.8.0.685697947483.issue6931@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 02:54:08 2014 From: report at bugs.python.org (Zach Byrne) Date: Wed, 09 Jul 2014 00:54:08 +0000 Subject: [issue21323] CGI HTTP server not running scripts from subdirectories In-Reply-To: <1398107131.28.0.812868414728.issue21323@psf.upfronthosting.co.za> Message-ID: <1404867247.99.0.224343248514.issue21323@psf.upfronthosting.co.za> Zach Byrne added the comment: Hi, I'm new. I wrote a test for nested directories under cgi-bin and got that to pass without failing the test added for 19435 by undoing most of the changes to run_cgi() but building path from the values in self.cgi_info. Thoughts? ---------- keywords: +patch nosy: +zbyrne Added file: http://bugs.python.org/file35908/21323.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 03:49:23 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 09 Jul 2014 01:49:23 +0000 Subject: [issue21925] ResouceWarning sometimes doesn't display In-Reply-To: <1404614973.3.0.388136336832.issue21925@psf.upfronthosting.co.za> Message-ID: <1404870563.96.0.0324562759647.issue21925@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, it's unclear to me why we would want to remove the __main__ module first, rather than last. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 03:59:50 2014 From: report at bugs.python.org (Steve Dower) Date: Wed, 09 Jul 2014 01:59:50 +0000 Subject: [issue20513] Python 2.7. Script interruption on logoff from 0 session under Win2003 and earlier In-Reply-To: <1404852345.69.0.522331128842.issue20513@psf.upfronthosting.co.za> Message-ID: <64b999cca5e9429db75cf4c8ee438334@BLUPR03MB389.namprd03.prod.outlook.com> Steve Dower added the comment: Looks like a legitimate issue to me, and the patch is fine. It's probably something that ought to be fixed in default too, since I don't see how it is restricted to session 0 - any Python service will incorrectly treat these notifications as interruptions. Sent from my Windows Phone ________________________________ From: Zachary Ware Sent: ?7/?8/?2014 15:45 To: Steve Dower Subject: [issue20513] Python 2.7. Script interruption on logoff from 0 session under Win2003 and earlier Zachary Ware added the comment: Windows Server 2003, XP, and 2000 are all officially supported by Python 2.7, as they were all current (for certain values of "current") at the time Python 2.7 was released. That said, it's not completely clear to me what the bug is but it strikes me as being something that's not all that likely to be hit, and either way about it, I don't have any way to test it. ---------- _______________________________________ Python tracker _______________________________________ ---------- title: Python 2.7. 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 Wed Jul 9 04:16:20 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 09 Jul 2014 02:16:20 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404872180.31.0.951312298453.issue21911@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Looking at a single lookup performed over and over isn't going to get you a very good benchmark. If your keys are constantly reused, most of the losses won't show themselves. A more fair comparison I've used before is the difference between using the bytes object produced by bytes.maketrans as the mapping object for str.translate vs. using the dictionary produced by str.maketrans. That gets you the dynamically generated lookups that don't hit the dict optimizations for repeatedly looking up the same key, don't predictably access the same memory that never leaves the CPU cache, etc. Check the timing data I submitted with #21118; the exact same translation applied to the same input strings, with the only difference being whether the table is bytes or dict, takes nearly twice as long using a dict as it does using a bytes object. And the bytes object isn't actually being used efficiently here; str.translate isn't optimized for the buffer protocol or anything, so it's constantly retrieving the cached small ints; a tuple might be even faster by avoiding that minor additional cost. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 04:46:29 2014 From: report at bugs.python.org (ingrid) Date: Wed, 09 Jul 2014 02:46:29 +0000 Subject: [issue21941] Clean up turtle TPen class Message-ID: <1404873989.47.0.448854632734.issue21941@psf.upfronthosting.co.za> New submission from ingrid: There are a lot of methods in the TPen class that are defined but not used because all the child classes overwrite almost all the functions and TPen itself isn't used directly a whole lot. This patch removes the unused code so it's less confusing to read turtle.py. ---------- components: Library (Lib) files: TPen_cleanup.patch keywords: patch messages: 222598 nosy: ingrid, jesstess priority: normal severity: normal status: open title: Clean up turtle TPen class type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file35909/TPen_cleanup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 05:13:14 2014 From: report at bugs.python.org (Eric Galloway) Date: Wed, 09 Jul 2014 03:13:14 +0000 Subject: [issue21942] pydoc source not displayed in browser on Windows Message-ID: <1404875594.67.0.480533952364.issue21942@psf.upfronthosting.co.za> New submission from Eric Galloway: In Python 3 on Windows, pydoc fails to display source file listings in the browser. To reproduce in Python 3.4: 1. start pydoc: python -m pydoc -p 8888 2. Navigate to the url: http://127.0.0.1:8888/getfile?key=///C:/python34/lib/pydoc.py The error message: getfile?key=///C:/python34/lib/pydoc.py FileNotFoundError: [Errno 2] No such file or directory: '///C:/python34/lib/pydoc.py' The url passed to html_getfile needs to be converted into a NT pathname. ---------- components: Library (Lib) files: diff.txt messages: 222599 nosy: Eric.Galloway priority: normal severity: normal status: open title: pydoc source not displayed in browser on Windows type: behavior versions: Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file35910/diff.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 06:57:35 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 09 Jul 2014 04:57:35 +0000 Subject: [issue6931] dreadful performance in difflib: ndiff and HtmlDiff In-Reply-To: <1253199298.69.0.280559653373.issue6931@psf.upfronthosting.co.za> Message-ID: <1404881855.92.0.469234953052.issue6931@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 08:52:50 2014 From: report at bugs.python.org (Ram Rachum) Date: Wed, 09 Jul 2014 06:52:50 +0000 Subject: [issue21911] "IndexError: tuple index out of range" should include the requested index and tuple length In-Reply-To: <1404390794.54.0.630083668536.issue21911@psf.upfronthosting.co.za> Message-ID: <1404888770.75.0.143568658741.issue21911@psf.upfronthosting.co.za> Ram Rachum added the comment: Thanks for the information about timing, Stefan and Josh. That is good to know regardless of this ticket :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 09:14:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 07:14:27 +0000 Subject: [issue20587] sqlite3 converter not being called In-Reply-To: <1392069177.84.0.794324739968.issue20587@psf.upfronthosting.co.za> Message-ID: <1404890067.25.0.097722240172.issue20587@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can somebody try my code on 2.7 as I don't run it anymore. You'll probably have to undo the str => bytes dance I've just performed. Any reason why the default convertors and adapters described here https://docs.python.org/2/library/sqlite3.html#default-adapters-and-converters can't be used? Maybe something to do with microsecond formatting for which I know there is a completely separate issue? ---------- components: +Library (Lib) -Windows nosy: +BreamoreBoy Added file: http://bugs.python.org/file35911/workingdemo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 09:30:29 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 07:30:29 +0000 Subject: [issue9624] Error 2755, "failure to find drive" when installing Python In-Reply-To: <1282001795.13.0.196803574469.issue9624@psf.upfronthosting.co.za> Message-ID: <1404891029.94.0.124232325071.issue9624@psf.upfronthosting.co.za> Mark Lawrence added the comment: I don't see any evidence that this is actually a Python problem. There has been no response to msg115080. What do we do? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 09:31:17 2014 From: report at bugs.python.org (Ned Deily) Date: Wed, 09 Jul 2014 07:31:17 +0000 Subject: [issue21323] CGI HTTP server not running scripts from subdirectories In-Reply-To: <1398107131.28.0.812868414728.issue21323@psf.upfronthosting.co.za> Message-ID: <1404891077.58.0.95075771216.issue21323@psf.upfronthosting.co.za> Ned Deily added the comment: Zach, thanks for the patch and the test. Someone will review it in the coming days. In the meantime, if you haven't already, please review and submit the Python Contributor's Agreement: https://www.python.org/psf/contrib/contrib-form/ otherwise we won't be able to use your contribution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 09:33:09 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 07:33:09 +0000 Subject: [issue2233] Makefile.pre.in contains extra slash before $(DESTDIR) which can cause Cygwin build to fail In-Reply-To: <1204652870.95.0.330326965123.issue2233@psf.upfronthosting.co.za> Message-ID: <1404891189.84.0.701082630679.issue2233@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is this still a problem with cygwin? ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 09:33:57 2014 From: report at bugs.python.org (Brian Curtin) Date: Wed, 09 Jul 2014 07:33:57 +0000 Subject: [issue9624] Error 2755, "failure to find drive" when installing Python In-Reply-To: <1282001795.13.0.196803574469.issue9624@psf.upfronthosting.co.za> Message-ID: <1404891237.92.0.874533934867.issue9624@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 09:36:42 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 07:36:42 +0000 Subject: [issue9055] test_issue_8959_b fails when run from a service In-Reply-To: <1277159969.39.0.181729867437.issue9055@psf.upfronthosting.co.za> Message-ID: <1404891402.4.0.750772584548.issue9055@psf.upfronthosting.co.za> Mark Lawrence added the comment: I think this can be closed as fixed/resolved, am I correct? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 09:57:33 2014 From: report at bugs.python.org (Paul Moore) Date: Wed, 09 Jul 2014 07:57:33 +0000 Subject: [issue9055] test_issue_8959_b fails when run from a service In-Reply-To: <1277159969.39.0.181729867437.issue9055@psf.upfronthosting.co.za> Message-ID: <1404892653.98.0.536616687199.issue9055@psf.upfronthosting.co.za> Changes by Paul Moore : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 11:11:52 2014 From: report at bugs.python.org (Toni Diaz) Date: Wed, 09 Jul 2014 09:11:52 +0000 Subject: [issue21943] To duplicate a list has biyective properties, not inyective ones Message-ID: <1404897112.14.0.409769296554.issue21943@psf.upfronthosting.co.za> New submission from Toni Diaz: Python 2.7.3 (default, Mar 13 2014, 11:03:55) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> a=['dog'] >>> b=a >>> a ['dog'] >>> b ['dog'] >>> b.remove('dog') >>> a [] >>> b [] >>> When defining a list from another (b=a), in my opinion, I expect that all you do to one doesn't affect to the other one. However, with the commands .remove & .append I don't see that (the definition b=a is bijective). Should it work this way? Thanks ---------- components: Demos and Tools messages: 222606 nosy: Toni Diaz priority: normal severity: normal status: open title: To duplicate a list has biyective properties, not inyective ones type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 12:22:59 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 09 Jul 2014 10:22:59 +0000 Subject: [issue21943] To duplicate a list has biyective properties, not inyective ones In-Reply-To: <1404897112.14.0.409769296554.issue21943@psf.upfronthosting.co.za> Message-ID: <1404901379.93.0.567275012433.issue21943@psf.upfronthosting.co.za> Josh Rosenberg added the comment: This is a natural consequence of Python using reference semantics. x = y just makes x and y references to the same object. For immutable objects like int and str, you'll never notice consequences of this, since changes to the value (x += 1) replace the reference in x with a new reference. But for mutable objects like lists, you need to explicitly copy (shallow or deep) to avoid a dependency of the sort you've encountered. For the specific case of sequences, the empty slice is the simplest, fastest way to perform a shallow copy: x = y[:] For other built-in types, you can often call .copy() or wrap in the constructor: newdict = olddict.copy() # or dict(olddict) For more complex cases, the copy module offers shallow and deep copy abilities (via the copy and deepcopy function) for arbitrary data structures. ---------- nosy: +josh.rosenberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 12:25:32 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 09 Jul 2014 10:25:32 +0000 Subject: [issue21943] To duplicate a list has biyective properties, not inyective ones In-Reply-To: <1404897112.14.0.409769296554.issue21943@psf.upfronthosting.co.za> Message-ID: <1404901532.87.0.79945063576.issue21943@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Short answer: This is not a bug. Run through one of the comprehensive Python tutorials on the net (or in Learning Python); reference semantics and their fairly varied consequences are covered in detail in most of them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 12:47:05 2014 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 09 Jul 2014 10:47:05 +0000 Subject: [issue21943] To duplicate a list has biyective properties, not inyective ones In-Reply-To: <1404897112.14.0.409769296554.issue21943@psf.upfronthosting.co.za> Message-ID: <1404902825.75.0.267846624174.issue21943@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 13:52:09 2014 From: report at bugs.python.org (Robert Lehmann) Date: Wed, 09 Jul 2014 11:52:09 +0000 Subject: [issue21944] Allow copying of CodecInfo objects Message-ID: <1404906729.25.0.633895333058.issue21944@psf.upfronthosting.co.za> New submission from Robert Lehmann: CodecInfo objects as retrieved from codecs.lookup currently throw an exception when trying to copy or pickle them. I have attached a patch with a fix and tests. ---------- components: Library (Lib) files: copy_codecinfo.patch keywords: patch messages: 222609 nosy: lehmannro priority: normal severity: normal status: open title: Allow copying of CodecInfo objects type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file35912/copy_codecinfo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 14:37:55 2014 From: report at bugs.python.org (LtWorf) Date: Wed, 09 Jul 2014 12:37:55 +0000 Subject: [issue21945] Wrong grammar in documentation Message-ID: <1404909475.04.0.739880818459.issue21945@psf.upfronthosting.co.za> New submission from LtWorf: [Note: Long-time users of Cookie.py will remember using Cookie.Cookie() to create an Cookie object. I think it should be "a Cookie". This is from the documentation of the Cookie module. ---------- assignee: docs at python components: Documentation messages: 222610 nosy: docs at python, tiposchi priority: normal severity: normal status: open title: Wrong grammar in documentation type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 14:44:17 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 09 Jul 2014 12:44:17 +0000 Subject: [issue21945] Wrong grammar in documentation In-Reply-To: <1404909475.04.0.739880818459.issue21945@psf.upfronthosting.co.za> Message-ID: <3h7gFD5Mlxz7LjM@mail.python.org> Roundup Robot added the comment: New changeset c3ec90a6526e by Ezio Melotti in branch '2.7': #21945: fix typo in Cookie module docstring. http://hg.python.org/cpython/rev/c3ec90a6526e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 14:46:01 2014 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 09 Jul 2014 12:46:01 +0000 Subject: [issue21945] Wrong grammar in documentation In-Reply-To: <1404909475.04.0.739880818459.issue21945@psf.upfronthosting.co.za> Message-ID: <1404909961.3.0.189708019899.issue21945@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 14:51:58 2014 From: report at bugs.python.org (Matthias St.Pierre) Date: Wed, 09 Jul 2014 12:51:58 +0000 Subject: [issue21946] 'python -u' yields trailing carriage return '\r' (Python2 for Windows) Message-ID: <1404910318.13.0.0636532194943.issue21946@psf.upfronthosting.co.za> New submission from Matthias St.Pierre: raw_input yields trailing carriage return ('\r') when C:\Python27\python.exe is called using the -u option How to reproduce the error: save the attached file 'input.py' which contains the following lines -- begin input.py -- i = raw_input("enter y or n: ") print(repr(i)) print([ord(c) for c in i]) -- end input.py -- then run the two following commands from a windows command shell python input.py python -u input.py and compare the output. (see transcript 1 below) The same bug affects also the interactive mode: start 'python -u' and enter an arbitrary command. You will get a syntax error at the end of line. (see transcript 2 below) -- begin transcript 1 of cmd session -- C:\Temp>where python C:\Python27\python.exe C:\Temp>python --version Python 2.7.8 C:\Temp>type input.py i = raw_input("enter y or n: ") print(repr(i)) print([ord(c) for c in i]) C:\Temp>python input.py enter y or n: y 'y' [121] -- end transcript 1 of cmd session -- -- begin transcript 2 of cmd session -- C:\Temp>python -u input.py enter y or n: y 'y\r' [121, 13] C:\Temp>python -u Python 2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> print "hello world" File "", line 1 print "hello world" ^ SyntaxError: invalid syntax >>> -- end transcript 2 of cmd session -- ---------- components: Interpreter Core, Windows files: input.py messages: 222613 nosy: msp priority: normal severity: normal status: open title: 'python -u' yields trailing carriage return '\r' (Python2 for Windows) type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file35913/input.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 14:56:28 2014 From: report at bugs.python.org (Matthias St.Pierre) Date: Wed, 09 Jul 2014 12:56:28 +0000 Subject: [issue21946] 'python -u' yields trailing carriage return '\r' (Python2 for Windows) In-Reply-To: <1404910318.13.0.0636532194943.issue21946@psf.upfronthosting.co.za> Message-ID: <1404910588.77.0.186634396474.issue21946@psf.upfronthosting.co.za> Matthias St.Pierre added the comment: correction: the markers for transcripts 1 and 2 were inserted at the wrong location; here's the correction: -- begin transcript 1 of cmd session -- C:\Temp>where python C:\Python27\python.exe C:\Temp>python --version Python 2.7.8 C:\Temp>type input.py i = raw_input("enter y or n: ") print(repr(i)) print([ord(c) for c in i]) C:\Temp>python input.py enter y or n: y 'y' [121] C:\Temp>python -u input.py enter y or n: y 'y\r' [121, 13] -- end transcript 1 of cmd session -- -- begin transcript 2 of cmd session -- C:\Temp>python -u Python 2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> print "hello world" File "", line 1 print "hello world" ^ SyntaxError: invalid syntax >>> -- end transcript 2 of cmd session -- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 15:18:34 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 13:18:34 +0000 Subject: [issue9745] MSVC .pdb files not created by python 2.7 distutils In-Reply-To: <1283442735.74.0.917204488917.issue9745@psf.upfronthosting.co.za> Message-ID: <1404911914.13.0.92295907111.issue9745@psf.upfronthosting.co.za> Mark Lawrence added the comment: /pdb:None is still set in msvc9compiler.py. Does this need changing in this file, or a more modern equivalent, so that symbols can be loaded in the debugger? ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 15:25:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 13:25:14 +0000 Subject: [issue7182] For non-debug builds, the cygwinccompiler.py should define NDEBUG In-Reply-To: <1256147342.16.0.0286188762329.issue7182@psf.upfronthosting.co.za> Message-ID: <1404912314.25.0.262135584495.issue7182@psf.upfronthosting.co.za> Mark Lawrence added the comment: I think this is a bug but on the other hand I found msg94327 extremely confusing. Would someone like to clarify the situation. ---------- nosy: +BreamoreBoy type: -> behavior versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 15:27:13 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 13:27:13 +0000 Subject: [issue9782] _multiprocessing.c warnings under 64-bit Windows In-Reply-To: <1283776985.14.0.464453735202.issue9782@psf.upfronthosting.co.za> Message-ID: <1404912433.85.0.0441588404694.issue9782@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'd assume that these were cleared years ago. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 15:49:19 2014 From: report at bugs.python.org (Brian Curtin) Date: Wed, 09 Jul 2014 13:49:19 +0000 Subject: [issue9782] _multiprocessing.c warnings under 64-bit Windows In-Reply-To: <1283776985.14.0.464453735202.issue9782@psf.upfronthosting.co.za> Message-ID: <1404913759.39.0.154125559736.issue9782@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 16:25:23 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 14:25:23 +0000 Subject: [issue9937] _winreg.EnumValue causes MemoryError In-Reply-To: <1285319837.21.0.430903654303.issue9937@psf.upfronthosting.co.za> Message-ID: <1404915923.85.0.0774668153426.issue9937@psf.upfronthosting.co.za> Mark Lawrence added the comment: Does anyone wish to follow this up as I no longer run 2.7? ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 16:28:29 2014 From: report at bugs.python.org (hakril) Date: Wed, 09 Jul 2014 14:28:29 +0000 Subject: [issue21947] `Dis` module doesn't know how to disassemble generators Message-ID: <1404916109.31.0.935138955837.issue21947@psf.upfronthosting.co.za> New submission from hakril: The `dis` module doesn't know how to disassemble generator object because it has no idea about the `gi_code` attribute. I made a (very) little patch to change this behavior. If there is a valid reason to not let the `dis` module disassemble generator, I would be glad to know it. ---------- components: Extension Modules files: dis_generator.patch keywords: patch messages: 222619 nosy: hakril priority: normal severity: normal status: open title: `Dis` module doesn't know how to disassemble generators type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file35914/dis_generator.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 16:30:53 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 09 Jul 2014 14:30:53 +0000 Subject: [issue21947] `Dis` module doesn't know how to disassemble generators In-Reply-To: <1404916109.31.0.935138955837.issue21947@psf.upfronthosting.co.za> Message-ID: <1404916253.72.0.942984975873.issue21947@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 16:45:55 2014 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 09 Jul 2014 14:45:55 +0000 Subject: [issue17277] incorrect line numbers in backtrace after removing a trace function In-Reply-To: <1361551369.14.0.772985934528.issue17277@psf.upfronthosting.co.za> Message-ID: <1404917155.65.0.475376603595.issue17277@psf.upfronthosting.co.za> Xavier de Gaye added the comment: The previous patch changed a field in the PyThreadState structure. This new patch is simpler and does not prevent to change f_lineno when it is not the attribute of the frame being traced. The new patch fixes also issue 7238, issue 16482 and issue 17697. ---------- Added file: http://bugs.python.org/file35915/lineno_getter.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 17:26:57 2014 From: report at bugs.python.org (Brian Curtin) Date: Wed, 09 Jul 2014 15:26:57 +0000 Subject: [issue9937] _winreg.EnumValue causes MemoryError In-Reply-To: <1285319837.21.0.430903654303.issue9937@psf.upfronthosting.co.za> Message-ID: <1404919617.12.0.590403837985.issue9937@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 17:29:17 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 09 Jul 2014 15:29:17 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <1404919757.24.0.119805997476.issue21907@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for getting the XP bot running again, it looks like it's now having issues with how the tests are now run (some issue with how sys.stdin is set up in a subprocess); I'm not sure if that should be fixed by reverting back to not using run_tests.py, or fixing stdin in a subprocess on XP (which is now officially unsupported by 3.5 anyway...). As for the fact that your bots are now doing full clones instead of pulls is disturbing and must be fixed, but I'm not sure how that happened. The AMD64 Windows 7 bot is still doing pulls, so the new clean script shouldn't be a problem. Do you have any insight into what happened on the x86 Win7 bot's build 8503[1]? That should have been the first build with this issue's changes, but it didn't even try to update at all. Build 10744[2] on the XP bot seems to have tried to clobber the build directory on update after a successful clean on the previous build, which doesn't make sense to me either (though the 'test' step did time out, which might play into it). [1] http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/8503 [2] http://buildbot.python.org/all/builders/x86%20XP-4%203.x/builds/10744 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 17:33:02 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Wed, 09 Jul 2014 15:33:02 +0000 Subject: [issue19806] smtpd crashes when a multi-byte UTF-8 sequence is split between consecutive data packets In-Reply-To: <1385532648.32.0.209027401379.issue19806@psf.upfronthosting.co.za> Message-ID: <1404919982.67.0.973661276669.issue19806@psf.upfronthosting.co.za> Milan Oberkirch added the comment: I do not think that the proposed patch solves the bug because it silently changes binary input. With the patch for issue 19662 a proper solution to avoid this bug has been applied. The only thing left is to prevent the server to raise the exception when in legacy mode. Instead of deleting single bytes from the input (which is what .decode('utf-8', 'ignore') does) I would reply with an error to the client. The attached patch implements and tests this behaviour. ---------- nosy: +zvyn Added file: http://bugs.python.org/file35916/smtpd_undecodable_data_does_not_raise.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 17:34:39 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Wed, 09 Jul 2014 15:34:39 +0000 Subject: [issue19806] smtpd crashes when a multi-byte UTF-8 sequence is split between consecutive data packets In-Reply-To: <1385532648.32.0.209027401379.issue19806@psf.upfronthosting.co.za> Message-ID: <1404920079.15.0.555851787918.issue19806@psf.upfronthosting.co.za> Changes by Milan Oberkirch : ---------- nosy: +jesstess _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 17:48:18 2014 From: report at bugs.python.org (Roy) Date: Wed, 09 Jul 2014 15:48:18 +0000 Subject: [issue21948] Documentation Typo Message-ID: <1404920898.4.0.99886911495.issue21948@psf.upfronthosting.co.za> New submission from Roy: In the documentation in 15.2 (https://docs.python.org/3/library/hmac.html), under hmac.new(key, msg=None, digestmod=None), it says "Paramter digestmod", which should be "Parameter digestmod" ---------- messages: 222623 nosy: thosehippos priority: normal severity: normal status: open title: Documentation Typo type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 17:57:21 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 09 Jul 2014 15:57:21 +0000 Subject: [issue21944] Allow copying of CodecInfo objects In-Reply-To: <1404906729.25.0.633895333058.issue21944@psf.upfronthosting.co.za> Message-ID: <1404921441.95.0.137412381147.issue21944@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag, lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 19:16:32 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 09 Jul 2014 17:16:32 +0000 Subject: [issue21948] Documentation Typo In-Reply-To: <1404920898.4.0.99886911495.issue21948@psf.upfronthosting.co.za> Message-ID: <3h7nHN0dLBz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 5be778fec115 by Berker Peksag in branch '3.4': Issues #21948 and #16040: Fix typos. http://hg.python.org/cpython/rev/5be778fec115 New changeset 051cc4f60384 by Berker Peksag in branch 'default': Issues #21948 and #16040: Merge with 3.4. http://hg.python.org/cpython/rev/051cc4f60384 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 19:16:33 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 09 Jul 2014 17:16:33 +0000 Subject: [issue16040] nntplib: unlimited readline() from connection In-Reply-To: <1348569525.38.0.219080768405.issue16040@psf.upfronthosting.co.za> Message-ID: <3h7nHN5p3Qz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 5be778fec115 by Berker Peksag in branch '3.4': Issues #21948 and #16040: Fix typos. http://hg.python.org/cpython/rev/5be778fec115 New changeset 051cc4f60384 by Berker Peksag in branch 'default': Issues #21948 and #16040: Merge with 3.4. http://hg.python.org/cpython/rev/051cc4f60384 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 19:18:16 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 09 Jul 2014 17:18:16 +0000 Subject: [issue21948] Documentation Typo In-Reply-To: <1404920898.4.0.99886911495.issue21948@psf.upfronthosting.co.za> Message-ID: <1404926296.77.0.65599045522.issue21948@psf.upfronthosting.co.za> Berker Peksag added the comment: Fixed. Thanks for the report. ---------- assignee: -> berker.peksag components: +Documentation nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: enhancement -> behavior versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 20:06:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 18:06:01 +0000 Subject: [issue1005895] curses for win32 Message-ID: <1404929161.02.0.00124082176495.issue1005895@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is this worth pursuing as https://docs.python.org/3/howto/curses.html states "The Windows version of Python doesn?t include the curses module. A ported version called UniCurses is available" ? This is available at https://pypi.python.org/pypi/UniCurses ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 20:21:24 2014 From: report at bugs.python.org (Phil Connell) Date: Wed, 09 Jul 2014 18:21:24 +0000 Subject: [issue9232] Allow trailing comma in any function argument list. In-Reply-To: <1278945017.29.0.842296068848.issue9232@psf.upfronthosting.co.za> Message-ID: <1404930084.25.0.525346716142.issue9232@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 20:43:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 18:43:59 +0000 Subject: [issue9423] Error in urllib2.do_open(self, http_class, req) In-Reply-To: <1280444947.69.0.433745373781.issue9423@psf.upfronthosting.co.za> Message-ID: <1404931439.77.0.109111071758.issue9423@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Lyle can we follow up with anything on this issue? If no as originator could you close it please. ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.4, Python 3.5 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 21:02:46 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 19:02:46 +0000 Subject: [issue2698] Extension module build fails for MinGW: missing vcvarsall.bat In-Reply-To: <1209230424.66.0.154562223128.issue2698@psf.upfronthosting.co.za> Message-ID: <1404932566.5.0.998924467731.issue2698@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can someone please confirm whether or not this is still an issue in either 2.7.x or 3.4.y. ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.4, Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 21:17:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 19:17:59 +0000 Subject: [issue1116520] Prefix search is filesystem-centric Message-ID: <1404933479.24.0.986945816621.issue1116520@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is this something that we could get into 3.5? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 21:33:44 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 19:33:44 +0000 Subject: [issue2445] Use The CygwinCCompiler Under Cygwin In-Reply-To: <1206117698.01.0.240143600903.issue2445@psf.upfronthosting.co.za> Message-ID: <1404934424.38.0.37968294535.issue2445@psf.upfronthosting.co.za> Mark Lawrence added the comment: >From msg194383 issues #18633, #18634 and #18654 are linked to this so is anybody up for providing a patch so that we can take this forward. See also #4032. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 21:39:51 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 19:39:51 +0000 Subject: [issue9745] MSVC .pdb files not created by python 2.7 distutils In-Reply-To: <1283442735.74.0.917204488917.issue9745@psf.upfronthosting.co.za> Message-ID: <1404934791.24.0.647146632769.issue9745@psf.upfronthosting.co.za> Mark Lawrence added the comment: /pdb:None is referenced on #4214. As there is more detail on that issue I recommend that this is closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 21:44:44 2014 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 09 Jul 2014 19:44:44 +0000 Subject: [issue21949] Document the Py_SIZE() macro. Message-ID: <1404935084.68.0.420259951718.issue21949@psf.upfronthosting.co.za> New submission from Gregory P. Smith: The Py_SIZE() macro is not documented. It should be. It is very useful along with PyList_New(positive_number) after using PyList_SET_ITEM() to fill in up to the first positive_number elements of a list object in the most optimal manner by avoiding numerous redundant array resizes and error checks along the away. The Py_SIZE() macro was introduced (in 2.6 I believe) and is specifically intended for use as an lvalue (see http://bugs.python.org/issue1724 to confirm that). It currently has uses in several places in CPython's core and modules as well as within some third party extension modules and tools such as Cython). ---------- assignee: docs at python components: Documentation keywords: easy messages: 222633 nosy: docs at python, gregory.p.smith priority: normal severity: normal status: open title: Document the Py_SIZE() macro. type: performance versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 22:02:43 2014 From: report at bugs.python.org (John Ehresman) Date: Wed, 09 Jul 2014 20:02:43 +0000 Subject: [issue9745] MSVC .pdb files not created by python 2.7 distutils In-Reply-To: <1283442735.74.0.917204488917.issue9745@psf.upfronthosting.co.za> Message-ID: <1404936163.24.0.132842392487.issue9745@psf.upfronthosting.co.za> John Ehresman added the comment: Are you saying close this as a duplicate? That would be fine with me. I still think the /pdb:None should be removed if it hasn't been already. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 22:12:17 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 20:12:17 +0000 Subject: [issue9745] MSVC .pdb files not created by python 2.7 distutils In-Reply-To: <1283442735.74.0.917204488917.issue9745@psf.upfronthosting.co.za> Message-ID: <1404936737.9.0.948026392963.issue9745@psf.upfronthosting.co.za> Mark Lawrence added the comment: Yes, close this as a duplicate. I'll put up a patch on #4214. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 22:13:17 2014 From: report at bugs.python.org (John Ehresman) Date: Wed, 09 Jul 2014 20:13:17 +0000 Subject: [issue9745] MSVC .pdb files not created by python 2.7 distutils In-Reply-To: <1283442735.74.0.917204488917.issue9745@psf.upfronthosting.co.za> Message-ID: <1404936797.98.0.204120207657.issue9745@psf.upfronthosting.co.za> Changes by John Ehresman : ---------- resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 22:30:45 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 20:30:45 +0000 Subject: [issue4214] no extension debug info with msvc9compiler.py In-Reply-To: <1225144462.62.0.9122976862.issue4214@psf.upfronthosting.co.za> Message-ID: <1404937845.36.0.548817436367.issue4214@psf.upfronthosting.co.za> Mark Lawrence added the comment: Patch is against default. The entire distutils test suite ran okay. Would someone like to try this in the real world please. ---------- components: -Distutils2 keywords: +patch nosy: +BreamoreBoy, dstufft versions: +Python 3.4, Python 3.5 -3rd party, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file35917/Issue4214.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 22:33:48 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 09 Jul 2014 20:33:48 +0000 Subject: [issue21947] `Dis` module doesn't know how to disassemble generators In-Reply-To: <1404916109.31.0.935138955837.issue21947@psf.upfronthosting.co.za> Message-ID: <1404938028.37.0.0223701763425.issue21947@psf.upfronthosting.co.za> Antoine Pitrou added the comment: That sounds like a good idea. The patch lacks a unit test, though. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 22:47:07 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 20:47:07 +0000 Subject: [issue19450] Bug in sqlite in Windows binaries In-Reply-To: <1383131558.55.0.853606379194.issue19450@psf.upfronthosting.co.za> Message-ID: <1404938827.81.0.701480751654.issue19450@psf.upfronthosting.co.za> Mark Lawrence added the comment: FYI 3.4.0 Windows was shipped with SQLite 3.8.3.1 see #20465. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 23:12:05 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 21:12:05 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1404940325.76.0.61382004336.issue19715@psf.upfronthosting.co.za> Mark Lawrence added the comment: #19727 is fixed so do we need issues for "the precision loss in pytime.c" from msg204062 and the analysis in msg204148 ? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 23:20:43 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 21:20:43 +0000 Subject: [issue2889] curses for windows (alternative patch) In-Reply-To: <1210919907.42.0.842256015219.issue2889@psf.upfronthosting.co.za> Message-ID: <1404940843.67.0.843683657526.issue2889@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can this be closed as curses binaries for Python 2.5, 2.6, 2.7, 3.1, 3.2, 3.3 and 3.4, win32 and win-amd64, are available at , plus there is also https://pypi.python.org/pypi/UniCurses/1.2 ? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 23:24:57 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 21:24:57 +0000 Subject: [issue18887] test_multiprocessing.test_connection failure on Python 2.7 In-Reply-To: <1377901644.63.0.505553589029.issue18887@psf.upfronthosting.co.za> Message-ID: <1404941097.44.0.362397224639.issue18887@psf.upfronthosting.co.za> Mark Lawrence added the comment: Presumably out of date. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 23:31:47 2014 From: report at bugs.python.org (hakril) Date: Wed, 09 Jul 2014 21:31:47 +0000 Subject: [issue21947] `Dis` module doesn't know how to disassemble generators In-Reply-To: <1404916109.31.0.935138955837.issue21947@psf.upfronthosting.co.za> Message-ID: <1404941507.5.0.431211793296.issue21947@psf.upfronthosting.co.za> hakril added the comment: Here is a try for a better patch. Added a unit test and updated the doc. ---------- Added file: http://bugs.python.org/file35918/dis_generator2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 23:32:44 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Jul 2014 21:32:44 +0000 Subject: [issue21947] `Dis` module doesn't know how to disassemble generators In-Reply-To: <1404916109.31.0.935138955837.issue21947@psf.upfronthosting.co.za> Message-ID: <1404941564.3.0.397866112353.issue21947@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 23:43:46 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 21:43:46 +0000 Subject: [issue1294959] Problems with /usr/lib64 builds. Message-ID: <1404942226.12.0.849137495213.issue1294959@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is there agreement on what needs doing here? I'd like to see this into 3.5 before it reaches its 10th birthday :) ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 23:49:51 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 21:49:51 +0000 Subject: [issue6377] distutils compiler switch ignored In-Reply-To: <1246299740.9.0.786372120366.issue6377@psf.upfronthosting.co.za> Message-ID: <1404942591.45.0.850669611972.issue6377@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.4, Python 3.5 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 23:51:28 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 21:51:28 +0000 Subject: [issue2437] Distutils runtime_library_dirs broken on Windows In-Reply-To: <1206044595.46.0.100105317073.issue2437@psf.upfronthosting.co.za> Message-ID: <1404942688.95.0.50958057317.issue2437@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 23:52:23 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 21:52:23 +0000 Subject: [issue4032] distutils cannot recognize ".dll.a" as library on cygwin In-Reply-To: <1223055534.39.0.439061882395.issue4032@psf.upfronthosting.co.za> Message-ID: <1404942743.81.0.275120932672.issue4032@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- components: -Distutils2 nosy: +dstufft versions: +Python 3.4, Python 3.5 -3rd party, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 9 23:53:37 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 21:53:37 +0000 Subject: [issue11361] suggestion for os.kill(pid,CTRL_C_EVENT) in tests In-Reply-To: <1298986221.06.0.20392871991.issue11361@psf.upfronthosting.co.za> Message-ID: <1404942817.03.0.676640911579.issue11361@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 00:04:38 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 22:04:38 +0000 Subject: [issue11077] Tkinter is not thread safe In-Reply-To: <1296488432.58.0.0945320697853.issue11077@psf.upfronthosting.co.za> Message-ID: <1404943478.85.0.468893524549.issue11077@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is this still an issue with 2.7.8 which has presumably had more fixes since 2.7.6? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 00:05:43 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 09 Jul 2014 22:05:43 +0000 Subject: [issue1252236] Simplying Tkinter's event loop Message-ID: <1404943543.33.0.32046606018.issue1252236@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've just asked for an update on #11077 . ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 02:09:01 2014 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 10 Jul 2014 00:09:01 +0000 Subject: [issue11361] suggestion for os.kill(pid,CTRL_C_EVENT) in tests In-Reply-To: <1298986221.06.0.20392871991.issue11361@psf.upfronthosting.co.za> Message-ID: <1404950941.4.0.346446035013.issue11361@psf.upfronthosting.co.za> Gregory P. Smith added the comment: (un-cc'ing myself as I can't deal with Windows) ---------- components: +Tests, Windows -IO _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 02:09:13 2014 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 10 Jul 2014 00:09:13 +0000 Subject: [issue11361] suggestion for os.kill(pid,CTRL_C_EVENT) in tests In-Reply-To: <1298986221.06.0.20392871991.issue11361@psf.upfronthosting.co.za> Message-ID: <1404950953.64.0.787466562844.issue11361@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: -gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 05:06:18 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Jul 2014 03:06:18 +0000 Subject: [issue11077] Tkinter is not thread safe In-Reply-To: <1296488432.58.0.0945320697853.issue11077@psf.upfronthosting.co.za> Message-ID: <1404961578.9.0.164069744928.issue11077@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Summarizing other messages, it seems that tkinter is intended to be thread-safe (as long tk.mainloop is started in the tk thread) and mostly is until it is not (probably from timing issue). With fresh 2.7.8 install, I ran TkinterCrash2.py. I got the following twice: Exception in thread Thread-12: Traceback (most recent call last): File "C:\Programs\Python27\lib\threading.py", line 810, in __bootstrap_inner self.run() File "tkcrash2.py", line 49, in run self.deliverToQueue((self.target, z, y)) File "tkcrash2.py", line 131, in arrival_122 new_yz[1]) File "C:\Programs\Python27\lib\lib-tk\Tkinter.py", line 2282, in create_line return self._create('line', args, kw) File "C:\Programs\Python27\lib\lib-tk\Tkinter.py", line 2270, in _create *(args + self._options(cnf, kw)))) ValueError: invalid literal for int() with base 10: 'None' and the progrm continued. After another 100-200 launches, I tried to close the tk window and got the "python has stopped working" message from Windows. After this, every time I restart, I soon got the message again. Something seems to have been altered, though I do not see a relevant process in task manager. I closed and reopened the command prompt process and restarted with pythonw instead of python and the program ran until too sluggish to continue. I then closed and reran and got 'pythonw has stopped working' at about launch 5. Third time ran until I closed at 50 launches. Fourth time stopped after 10 launches. Serhiy, have any fresh insight? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 05:32:44 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Jul 2014 03:32:44 +0000 Subject: [issue11077] Tkinter is not thread safe In-Reply-To: <1296488432.58.0.0945320697853.issue11077@psf.upfronthosting.co.za> Message-ID: <1404963164.67.0.292632883552.issue11077@psf.upfronthosting.co.za> Terry J. Reedy added the comment: With 3.4.1, (64 bit), I ran, saturated (200 launches?) and closed 4 windows without incident. This extends Alexander's claim, 'not 3.x problem', in msg127648, from 3.2 to 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 07:17:50 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 10 Jul 2014 05:17:50 +0000 Subject: [issue21940] IDLE - Test WidgetRedirector In-Reply-To: <1404830235.88.0.167497005824.issue21940@psf.upfronthosting.co.za> Message-ID: <3h85Hd6BzTz7Lk0@mail.python.org> Roundup Robot added the comment: New changeset 5af194064f96 by Terry Jan Reedy in branch '2.7': Issue #21940: add docstrings to idlelib.WidgetRedirector. http://hg.python.org/cpython/rev/5af194064f96 New changeset 220d5fdbe22e by Terry Jan Reedy in branch '3.4': Issue #21940: add docstrings to idlelib.WidgetRedirector. http://hg.python.org/cpython/rev/220d5fdbe22e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 07:22:16 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 10 Jul 2014 05:22:16 +0000 Subject: [issue21947] `Dis` module doesn't know how to disassemble generators In-Reply-To: <1404916109.31.0.935138955837.issue21947@psf.upfronthosting.co.za> Message-ID: <1404969736.33.0.416023700593.issue21947@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 08:19:17 2014 From: report at bugs.python.org (Ned Deily) Date: Thu, 10 Jul 2014 06:19:17 +0000 Subject: [issue21913] Possible deadlock in threading.Condition.wait() in Python 2.7.7 In-Reply-To: <1404434419.41.0.802359833018.issue21913@psf.upfronthosting.co.za> Message-ID: <1404973157.45.0.00437131509547.issue21913@psf.upfronthosting.co.za> Ned Deily added the comment: So do we agree that the resolution for this is "wont fix"? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 09:30:37 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 10 Jul 2014 07:30:37 +0000 Subject: [issue18887] test_multiprocessing.test_connection failure on Python 2.7 In-Reply-To: <1377901644.63.0.505553589029.issue18887@psf.upfronthosting.co.za> Message-ID: <1404977437.54.0.45084244577.issue18887@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 09:48:14 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 10 Jul 2014 07:48:14 +0000 Subject: [issue19450] Bug in sqlite in Windows binaries In-Reply-To: <1383131558.55.0.853606379194.issue19450@psf.upfronthosting.co.za> Message-ID: <1404978494.65.0.588815490942.issue19450@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't maintain Python 2.7 anymore, so removing myself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 09:48:19 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 10 Jul 2014 07:48:19 +0000 Subject: [issue19450] Bug in sqlite in Windows binaries In-Reply-To: <1383131558.55.0.853606379194.issue19450@psf.upfronthosting.co.za> Message-ID: <1404978499.87.0.490919585312.issue19450@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- nosy: -loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 09:58:41 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Jul 2014 07:58:41 +0000 Subject: [issue21940] IDLE - Test WidgetRedirector In-Reply-To: <1404830235.88.0.167497005824.issue21940@psf.upfronthosting.co.za> Message-ID: <1404979121.85.0.00516013376996.issue21940@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Attached is the 3.4 code I plan to commit after a trivial 2.7 backport. In the existing htest, 'global previous_tcl_fcn' is unnecessary because of Python's late binding of function locals. No forward definitions are needed. Already deleted in the first patch. Adding this test: def test_unregister_no_attribute(self): del self.text.insert self.assertEqual(self.redir.unregister('insert'), self.func) revealed that this code in .unregister if hasattr(self.widget, operation): delattr(self.widget, operation) is buggy because hasattr looks up the class tree for an attribute whereas delattr does not. Hence the former can be true, and will be after text.insert in deleted to unmask Text.insert, while delattr raises AttributeError. The if check is useless, and replaced by 'try...' in the new patch. I modified a few tests and added a few more. Coverage is now 100%. ---------- assignee: -> terry.reedy stage: -> commit review type: -> enhancement Added file: http://bugs.python.org/file35919/test-redir-21940-34.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 10:55:46 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 08:55:46 +0000 Subject: [issue19650] test_multiprocessing_spawn.test_mymanager_context() crashed with STATUS_ACCESS_VIOLATION In-Reply-To: <1384854809.52.0.780579914331.issue19650@psf.upfronthosting.co.za> Message-ID: <1404982546.07.0.763867256313.issue19650@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can this be reproduced or can this be closed as out of date? ---------- nosy: +BreamoreBoy type: -> crash versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 10:58:38 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jul 2014 08:58:38 +0000 Subject: [issue19650] test_multiprocessing_spawn.test_mymanager_context() crashed with STATUS_ACCESS_VIOLATION In-Reply-To: <1384854809.52.0.780579914331.issue19650@psf.upfronthosting.co.za> Message-ID: <1404982718.82.0.486513595515.issue19650@psf.upfronthosting.co.za> STINNER Victor added the comment: > Can this be reproduced or can this be closed as out of date? In general, issues reporting sporadic buildbot failures only seen once can be closed after 6 months. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 12:00:36 2014 From: report at bugs.python.org (Alejandro) Date: Thu, 10 Jul 2014 10:00:36 +0000 Subject: [issue21950] import sqlite3 not running Message-ID: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> New submission from Alejandro: We have compile python 3.4.1 in Suse Linux Enterprise Server 11 SP2 We have compiled it using --prefix as args : ./configure --prefix=/soft/pyt341 make make install We check python has been properly installed: /soft/pyt341/bin/python3 --version Python 3.4.1 We try to import sqlite3 lib and we get this error: /soft/pyt341/bin/python3 -c "import sqlite3" Traceback (most recent call last): File "", line 1, in File "/soft/pyt341/lib/python3.4/sqlite3/__init__.py", line 23, in from sqlite3.dbapi2 import * File "/soft/pyt341/lib/python3.4/sqlite3/dbapi2.py", line 26, in from _sqlite3 import * ImportError: No module named '_sqlite3' ---------- components: Library (Lib) messages: 222656 nosy: alexganwd priority: normal severity: normal status: open title: import sqlite3 not running type: crash versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 12:43:46 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 10 Jul 2014 10:43:46 +0000 Subject: [issue20187] The Great Argument Clinic Conversion Derby Meta-Issue In-Reply-To: <1389141105.5.0.459903580868.issue20187@psf.upfronthosting.co.za> Message-ID: <1404989026.36.0.393877289315.issue20187@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: -berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 12:48:33 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 10 Jul 2014 10:48:33 +0000 Subject: [issue9745] MSVC .pdb files not created by python 2.7 distutils In-Reply-To: <1283442735.74.0.917204488917.issue9745@psf.upfronthosting.co.za> Message-ID: <1404989313.01.0.0636083516101.issue9745@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: -> resolved status: open -> closed superseder: -> no extension debug info with msvc9compiler.py type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 13:35:40 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 10 Jul 2014 11:35:40 +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: <1404992140.85.0.138738429595.issue20465@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: needs patch -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 13:35:49 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 10 Jul 2014 11:35:49 +0000 Subject: [issue19450] Bug in sqlite in Windows binaries In-Reply-To: <1383131558.55.0.853606379194.issue19450@psf.upfronthosting.co.za> Message-ID: <1404992149.79.0.799497187961.issue19450@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 14:04:50 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 10 Jul 2014 12:04:50 +0000 Subject: [issue21950] import sqlite3 not running In-Reply-To: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> Message-ID: <1404993890.38.0.21720198392.issue21950@psf.upfronthosting.co.za> Berker Peksag added the comment: > We have compiled it using --prefix as args : Did you install sqlite3-devel? ---------- nosy: +berker.peksag type: crash -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 14:10:52 2014 From: report at bugs.python.org (Jason Tishler) Date: Thu, 10 Jul 2014 12:10:52 +0000 Subject: [issue2233] Makefile.pre.in contains extra slash before $(DESTDIR) which can cause Cygwin build to fail In-Reply-To: <1204652870.95.0.330326965123.issue2233@psf.upfronthosting.co.za> Message-ID: <1404994252.97.0.7184190921.issue2233@psf.upfronthosting.co.za> Jason Tishler added the comment: AFAICT, yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 14:19:50 2014 From: report at bugs.python.org (Alejandro) Date: Thu, 10 Jul 2014 12:19:50 +0000 Subject: [issue21950] import sqlite3 not running In-Reply-To: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> Message-ID: <1404994790.37.0.310576891562.issue21950@psf.upfronthosting.co.za> Alejandro added the comment: Yes. We have these packages installed: rpm -qa | grep sqlite sqlite3-3.7.6.3-1.4.4.1 libsqlite3-0-3.7.6.3-1.4.4.1 sqlite3-devel-3.7.6.3-1.4.4.1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 14:27:42 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 12:27:42 +0000 Subject: [issue19283] Need support to avoid Windows CRT compatibility issue. In-Reply-To: <1382091587.94.0.520470804942.issue19283@psf.upfronthosting.co.za> Message-ID: <1404995262.6.0.630084118647.issue19283@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is there a specific Python question here? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 14:32:56 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 12:32:56 +0000 Subject: [issue12939] Add new io.FileIO using the native Windows API In-Reply-To: <1315523941.29.0.146575875409.issue12939@psf.upfronthosting.co.za> Message-ID: <1404995576.53.0.157165734196.issue12939@psf.upfronthosting.co.za> Mark Lawrence added the comment: It strikes me as far more sense to use the native API so how do we take this forward, formal patch review, put it on pypi, or what? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 14:45:37 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 12:45:37 +0000 Subject: [issue11598] missing afxres.h error when building bdist_wininst in Visual Studio 2008 Express In-Reply-To: <1300472926.52.0.331223446631.issue11598@psf.upfronthosting.co.za> Message-ID: <1404996337.44.0.363818572899.issue11598@psf.upfronthosting.co.za> Mark Lawrence added the comment: You need VS 2010 to build 3.3 see https://docs.python.org/devguide/setup.html#windows ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 14:50:20 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jul 2014 12:50:20 +0000 Subject: [issue21859] Add Python implementation of FileIO In-Reply-To: <1403608013.94.0.257739188668.issue21859@psf.upfronthosting.co.za> Message-ID: <1404996620.66.0.175532096279.issue21859@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 14:51:18 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jul 2014 12:51:18 +0000 Subject: [issue12939] Add new io.FileIO using the native Windows API In-Reply-To: <1315523941.29.0.146575875409.issue12939@psf.upfronthosting.co.za> Message-ID: <1404996678.44.0.862519864162.issue12939@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy implemented the FileIO class in pure Python: see the issue #21859 (patch under review). Using thre Python class, it becomes easier to reimplement FileIO using the Windows API, at least to play with a prototype in pure Python. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 14:53:05 2014 From: report at bugs.python.org (Piotr Dobrogost) Date: Thu, 10 Jul 2014 12:53:05 +0000 Subject: [issue21859] Add Python implementation of FileIO In-Reply-To: <1403608013.94.0.257739188668.issue21859@psf.upfronthosting.co.za> Message-ID: <1404996785.43.0.0429334453091.issue21859@psf.upfronthosting.co.za> Changes by Piotr Dobrogost : ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 14:56:11 2014 From: report at bugs.python.org (Piotr Dobrogost) Date: Thu, 10 Jul 2014 12:56:11 +0000 Subject: [issue17984] io and _pyio modules require the _io module In-Reply-To: <1368647367.8.0.180383025422.issue17984@psf.upfronthosting.co.za> Message-ID: <1404996971.25.0.953393789681.issue17984@psf.upfronthosting.co.za> Changes by Piotr Dobrogost : ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 15:17:51 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 10 Jul 2014 13:17:51 +0000 Subject: [issue19283] Need support to avoid Windows CRT compatibility issue. In-Reply-To: <1382091587.94.0.520470804942.issue19283@psf.upfronthosting.co.za> Message-ID: <1404998271.47.0.708173454614.issue19283@psf.upfronthosting.co.za> Martin v. L?wis added the comment: In any case, this issue has too little information to be able to reproduce it in a meaningful way. Closing as out-of-date. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 15:28:56 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 10 Jul 2014 13:28:56 +0000 Subject: [issue18974] Use argparse in the diff script In-Reply-To: <1378654081.42.0.0708536053784.issue18974@psf.upfronthosting.co.za> Message-ID: <1404998936.91.0.860080659945.issue18974@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 15:40:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 13:40:15 +0000 Subject: [issue14750] Tkinter application doesn't run from source build on Windows In-Reply-To: <1336477408.86.0.0365400477373.issue14750@psf.upfronthosting.co.za> Message-ID: <1404999615.49.0.333956516922.issue14750@psf.upfronthosting.co.za> Mark Lawrence added the comment: Presumably out of date as we're now on 3.5. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 15:41:57 2014 From: report at bugs.python.org (Brian Curtin) Date: Thu, 10 Jul 2014 13:41:57 +0000 Subject: [issue14750] Tkinter application doesn't run from source build on Windows In-Reply-To: <1336477408.86.0.0365400477373.issue14750@psf.upfronthosting.co.za> Message-ID: <1404999717.91.0.465005947903.issue14750@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 15:51:10 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 13:51:10 +0000 Subject: [issue14802] Python fails to compile with VC11 ARM configuration In-Reply-To: <1336967845.45.0.147430912977.issue14802@psf.upfronthosting.co.za> Message-ID: <1405000270.27.0.801009750066.issue14802@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we close this due to the extensive work being done by Steve and Zach on the Windows build environment that I believe are covered by other issues? ---------- nosy: +BreamoreBoy, steve.dower, zach.ware versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 16:08:50 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 14:08:50 +0000 Subject: [issue8304] strftime and Unicode characters In-Reply-To: <1270307324.04.0.0348018847246.issue8304@psf.upfronthosting.co.za> Message-ID: <1405001330.66.0.518543771408.issue8304@psf.upfronthosting.co.za> Mark Lawrence added the comment: Using 3.4.1 and 3.5.0 I get:- time.strftime("%d\u200F%A", time.gmtime()) Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'locale' codec can't encode character '\u200f' in position 2: Illegal byte sequence ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 16:24:01 2014 From: report at bugs.python.org (Brett Cannon) Date: Thu, 10 Jul 2014 14:24:01 +0000 Subject: [issue21950] import sqlite3 not running In-Reply-To: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> Message-ID: <1405002241.88.0.102260202367.issue21950@psf.upfronthosting.co.za> Brett Cannon added the comment: The output from running `make` could help by pointing out either a compilation error or lack thereof to deduce that setup.py did not find the headers. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 16:30:21 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 14:30:21 +0000 Subject: [issue9445] Fix undefined symbol errors on VS8.0 build In-Reply-To: <1280627576.04.0.298775706484.issue9445@psf.upfronthosting.co.za> Message-ID: <1405002621.5.0.448864375874.issue9445@psf.upfronthosting.co.za> Mark Lawrence added the comment: I believe that this specific issue can be closed but is a follow up needed regarding problems mentioned in msg114084 ? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 16:37:36 2014 From: report at bugs.python.org (Alejandro) Date: Thu, 10 Jul 2014 14:37:36 +0000 Subject: [issue21950] import sqlite3 not running In-Reply-To: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> Message-ID: <1405003056.24.0.625093245961.issue21950@psf.upfronthosting.co.za> Alejandro added the comment: Here you have (attached): make.log Thanks! ---------- Added file: http://bugs.python.org/file35920/make.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 16:43:03 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 10 Jul 2014 14:43:03 +0000 Subject: [issue14802] Python fails to compile with VC11 ARM configuration In-Reply-To: <1336967845.45.0.147430912977.issue14802@psf.upfronthosting.co.za> Message-ID: <1405003383.7.0.64234854086.issue14802@psf.upfronthosting.co.za> Martin v. L?wis added the comment: None of this work affects WinRT. I don't know whether support of WinRT is a goal, but it is certainly not a solved problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 16:44:11 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 14:44:11 +0000 Subject: [issue20366] SQLite FTS (full text search) In-Reply-To: <1390487950.26.0.724740577433.issue20366@psf.upfronthosting.co.za> Message-ID: <1405003451.22.0.586752371054.issue20366@psf.upfronthosting.co.za> Mark Lawrence added the comment: "SQLite FTS3 and FTS4 Extensions" here http://www.sqlite.org/fts3.html ---------- nosy: +BreamoreBoy, steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 17:00:13 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 15:00:13 +0000 Subject: [issue16229] Demo *redemo.py* lacking in Windows installation In-Reply-To: <1350208645.0.0.150897720098.issue16229@psf.upfronthosting.co.za> Message-ID: <1405004413.51.0.213014389448.issue16229@psf.upfronthosting.co.za> Mark Lawrence added the comment: I have Tools\demo in my cpython default from Mercurial but not under 3.4.1 from the msi file downloaded from python.org. ---------- nosy: +BreamoreBoy, steve.dower, zach.ware type: -> behavior versions: +Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 17:34:16 2014 From: report at bugs.python.org (ingrid) Date: Thu, 10 Jul 2014 15:34:16 +0000 Subject: [issue20265] Bring Windows docs up to date In-Reply-To: <1389757265.26.0.116885263001.issue20265@psf.upfronthosting.co.za> Message-ID: <1405006456.14.0.681195832902.issue20265@psf.upfronthosting.co.za> ingrid added the comment: Hi Kathleen, I was just curious why you dropped the changes from Doc/using/windows.rst on your latest patch as they looked useful to me. I know there's some review going on outside this thread, so apologies if I'm missing something you already went over. ---------- nosy: +ingrid, jesstess _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 17:49:04 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 10 Jul 2014 15:49:04 +0000 Subject: [issue8585] zipimporter.find_module is untested In-Reply-To: <1272676536.77.0.29287206537.issue8585@psf.upfronthosting.co.za> Message-ID: <1405007344.42.0.386387776829.issue8585@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 18:21:56 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 10 Jul 2014 16:21:56 +0000 Subject: [issue21942] pydoc source not displayed in browser on Windows In-Reply-To: <1404875594.67.0.480533952364.issue21942@psf.upfronthosting.co.za> Message-ID: <3h8N1v1PSCz7LjT@mail.python.org> Roundup Robot added the comment: New changeset 74c7a186ffdd by Zachary Ware in branch '3.4': Issue #21942: Fixed source file viewing in pydoc's server mode on Windows. http://hg.python.org/cpython/rev/74c7a186ffdd New changeset 03b406f5aae0 by Zachary Ware in branch 'default': Issue #21942: Fixed source file viewing in pydoc's server mode on Windows. http://hg.python.org/cpython/rev/03b406f5aae0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 18:25:13 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 10 Jul 2014 16:25:13 +0000 Subject: [issue21942] pydoc source not displayed in browser on Windows In-Reply-To: <1404875594.67.0.480533952364.issue21942@psf.upfronthosting.co.za> Message-ID: <1405009513.91.0.310504408058.issue21942@psf.upfronthosting.co.za> Zachary Ware added the comment: Fixed, thanks for the report! I took an alternate approach to fixing the problem; nturl2path was only used at all because pydoc used to produce actual "file://" links rather than rendering the page itself, and there's no reason to use nturl2path if you're not making a "file://" link. ---------- nosy: +zach.ware resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 18:32:12 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Jul 2014 16:32:12 +0000 Subject: [issue16229] Demo *redemo.py* lacking in Windows installation In-Reply-To: <1350208645.0.0.150897720098.issue16229@psf.upfronthosting.co.za> Message-ID: <1405009932.96.0.924520145535.issue16229@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Steve, as the (new) Windows installer maker, it is ultimately your decision what to include. The 'policy' seems to have been rather fuzzy. Tools/demo is less than 100k total. The 'patch needed' is to the installer maker script. ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 18:33:33 2014 From: report at bugs.python.org (Brian Curtin) Date: Thu, 10 Jul 2014 16:33:33 +0000 Subject: [issue16229] Demo *redemo.py* lacking in Windows installation In-Reply-To: <1350208645.0.0.150897720098.issue16229@psf.upfronthosting.co.za> Message-ID: <1405010013.42.0.0776455357551.issue16229@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 19:29:57 2014 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 10 Jul 2014 17:29:57 +0000 Subject: [issue9445] Fix undefined symbol errors on VS8.0 build In-Reply-To: <1280627576.04.0.298775706484.issue9445@psf.upfronthosting.co.za> Message-ID: <1405013397.41.0.279514615994.issue9445@psf.upfronthosting.co.za> Ezio Melotti added the comment: The original issue seems to be fixed, but the other two related issues mentioned by Amaury still need to be addressed. One has already a patch, the other doesn't. ---------- components: +Extension Modules -Build type: compile error -> resource usage versions: +Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 19:32:40 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 17:32:40 +0000 Subject: [issue10722] IDLE's subprocess didnit make connection ..... Python 2.7 In-Reply-To: <1292541211.42.0.50542503549.issue10722@psf.upfronthosting.co.za> Message-ID: <1405013560.91.0.966619038987.issue10722@psf.upfronthosting.co.za> Mark Lawrence added the comment: This should be closed as a duplicate of #14576. There is far more data on that issue and it refers to problems with 3.x. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 19:38:46 2014 From: report at bugs.python.org (David Edelsohn) Date: Thu, 10 Jul 2014 17:38:46 +0000 Subject: [issue21951] tcl test change crashes AIX Message-ID: <1405013926.74.0.877232363604.issue21951@psf.upfronthosting.co.za> New submission from David Edelsohn: The patch for Issue #21881 causes CPython test_tcl to crash on AIX. $ ./python -m test -v test_tcl == CPython 3.5.0a0 (default:d1f89eb9ea1e+, Jul 10 2014, 10:21:22) [GCC 4.8.1] == AIX-1-00F84C0C4C00-powerpc-32bit big-endian == hash algorithm: siphash24 32bit == /home/dje/src/cpython/build/test_python_27984522 Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0) [1/1] test_tcl patchlevel = 8.4.7 testCall (test.test_tcl.TclTest) ... ok testCallException (test.test_tcl.TclTest) ... ok testCallException2 (test.test_tcl.TclTest) ... ok testEval (test.test_tcl.TclTest) ... ok testEvalException (test.test_tcl.TclTest) ... ok testEvalException2 (test.test_tcl.TclTest) ... ok testEvalFile (test.test_tcl.TclTest) ... ok testEvalFileException (test.test_tcl.TclTest) ... ok testGetVar (test.test_tcl.TclTest) ... ok testGetVarArray (test.test_tcl.TclTest) ... ok testGetVarArrayException (test.test_tcl.TclTest) ... ok testGetVarException (test.test_tcl.TclTest) ... ok testLoadWithUNC (test.test_tcl.TclTest) ... skipped 'Requires Windows' testPackageRequireException (test.test_tcl.TclTest) ... ok testSetVar (test.test_tcl.TclTest) ... ok testSetVarArray (test.test_tcl.TclTest) ... ok testUnsetVar (test.test_tcl.TclTest) ... ok testUnsetVarArray (test.test_tcl.TclTest) ... ok testUnsetVarException (test.test_tcl.TclTest) ... ok test_eval_null_in_result (test.test_tcl.TclTest) ... ok test_evalfile_null_in_result (test.test_tcl.TclTest) ... ok test_exprboolean (test.test_tcl.TclTest) ... ok test_exprdouble (test.test_tcl.TclTest) ... ok test_exprlong (test.test_tcl.TclTest) ... ok test_exprstring (test.test_tcl.TclTest) ... ok test_getboolean (test.test_tcl.TclTest) ... ok test_getdouble (test.test_tcl.TclTest) ... ok test_getint (test.test_tcl.TclTest) ... ok test_passing_values (test.test_tcl.TclTest) ... ok test_split (test.test_tcl.TclTest) ... ok test_splitlist (test.test_tcl.TclTest) ... ok test_user_command (test.test_tcl.TclTest) ... Assertion failed: __EX, file Objects/methodobject.c, line 94 Fatal Python error: Aborted Current thread 0x00000001 (most recent call first): File "/home/dje/src/cpython/Lib/test/test_tcl.py", line 426 in check File "/home/dje/src/cpython/Lib/test/test_tcl.py", line 458 in test_user_command File "/home/dje/src/cpython/Lib/unittest/case.py", line 577 in run File "/home/dje/src/cpython/Lib/unittest/case.py", line 625 in __call__ File "/home/dje/src/cpython/Lib/unittest/suite.py", line 125 in run File "/home/dje/src/cpython/Lib/unittest/suite.py", line 87 in __call__ File "/home/dje/src/cpython/Lib/unittest/suite.py", line 125 in run File "/home/dje/src/cpython/Lib/unittest/suite.py", line 87 in __call__ File "/home/dje/src/cpython/Lib/unittest/runner.py", line 168 in run File "/home/dje/src/cpython/Lib/test/support/__init__.py", line 1724 in _run_suite File "/home/dje/src/cpython/Lib/test/support/__init__.py", line 1758 in run_unittest File "/home/dje/src/cpython/Lib/test/test_tcl.py", line 601 in test_main File "/home/dje/src/cpython/Lib/test/regrtest.py", line 1278 in runtest_inner File "/home/dje/src/cpython/Lib/test/regrtest.py", line 978 in runtest File "/home/dje/src/cpython/Lib/test/regrtest.py", line 763 in main File "/home/dje/src/cpython/Lib/test/regrtest.py", line 1562 in main_in_temp_cwd File "/home/dje/src/cpython/Lib/test/__main__.py", line 3 in File "/home/dje/src/cpython/Lib/runpy.py", line 85 in _run_code File "/home/dje/src/cpython/Lib/runpy.py", line 170 in _run_module_as_main IOT/Abort trap (core dumped) ---------- components: Interpreter Core, Tkinter messages: 222680 nosy: David.Edelsohn, haypo, serhiy.storchaka priority: normal severity: normal status: open title: tcl test change crashes AIX type: crash versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 19:43:34 2014 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 10 Jul 2014 17:43:34 +0000 Subject: [issue21044] tarfile does not handle file .name being an int In-Reply-To: <1395624777.51.0.277506799413.issue21044@psf.upfronthosting.co.za> Message-ID: <1405014214.12.0.169847604216.issue21044@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 19:52:07 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 17:52:07 +0000 Subject: [issue13081] Crash in Windows with unknown cause In-Reply-To: <1317417665.11.0.474916583341.issue13081@psf.upfronthosting.co.za> Message-ID: <1405014727.76.0.627345889627.issue13081@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> docs at python components: +Documentation -Windows nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 20:05:28 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 18:05:28 +0000 Subject: [issue15418] 2to3 docs should mention setup.py fixes required to install compatible packages in Python 3 In-Reply-To: <1342944867.41.0.426616116312.issue15418@psf.upfronthosting.co.za> Message-ID: <1405015528.98.0.767130240814.issue15418@psf.upfronthosting.co.za> Mark Lawrence added the comment: I disagree with this on two grounds. First 2to3 can be run by anybody needing it, not just from setup.py. Second the recommended mechanism for writing new code is to use libraries such as six so that the one code base can run on 2 and 3. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 20:09:51 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 18:09:51 +0000 Subject: [issue15856] inspect.getsource(SomeClass) doesn't show @decorators In-Reply-To: <1346685224.9.0.738134714561.issue15856@psf.upfronthosting.co.za> Message-ID: <1405015791.96.0.909623495769.issue15856@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Thomas sorry about the delay in getting back to you. ---------- nosy: +BreamoreBoy, yselivanov versions: +Python 3.4, Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 20:23:09 2014 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 10 Jul 2014 18:23:09 +0000 Subject: [issue21927] BOM appears in stdin when using Powershell In-Reply-To: <1404657562.39.0.323212380566.issue21927@psf.upfronthosting.co.za> Message-ID: <1405016589.39.0.293225158772.issue21927@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I'm not sure what you're suggesting. Are you suggesting that Powershell is wrong here and that Powershell's attempt here to provide more detail about content encoding is wrong? Or are you suggesting that every client that reads from stdin should detect that it's running in Powershell or otherwise handle the BOM individually? >From my perspective, Powershell is innovating here and providing additional detail about the encoding of the content, but since Python is responsible for the content decoding (especially Python 3), it should honor that detail. I did some tests and determined that 'utf-8-sig' will honor the bom if present and ignore it if missing. Is there any reason Python shouldn't simply use that encoding for decoding stdin? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 20:23:39 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 18:23:39 +0000 Subject: [issue14714] PEP 414 tokenizing hook does not preserve tabs In-Reply-To: <1336059831.47.0.0507292871504.issue14714@psf.upfronthosting.co.za> Message-ID: <1405016619.53.0.026732691384.issue14714@psf.upfronthosting.co.za> Mark Lawrence added the comment: PEP 414 is "Explicit Unicode Literal for Python 3.3" so I've no idea where the part about "tokenizing hook" comes from. msg159865 refers to tabs in Django source and gives an example, then talks about "your GitHub repo where you published the hook". Would someone care to enlighten me. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 20:24:15 2014 From: report at bugs.python.org (Lita Cho) Date: Thu, 10 Jul 2014 18:24:15 +0000 Subject: [issue1186900] nntplib shouldn't raise generic EOFError Message-ID: <1405016655.37.0.565565234444.issue1186900@psf.upfronthosting.co.za> Lita Cho added the comment: I am going to fix it so that it raises the NNTPConnectionError rather than update the documentation. ---------- nosy: +Lita.Cho, jesstess _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 20:51:09 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Jul 2014 18:51:09 +0000 Subject: [issue10722] IDLE's subprocess didnit make connection ..... Python 2.7 In-Reply-To: <1292541211.42.0.50542503549.issue10722@psf.upfronthosting.co.za> Message-ID: <1405018269.54.0.59096995855.issue10722@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This has been an occasional problem since forever. It even happened to me yesterday, once, but was solved by shutting things down and restarting. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE: "IDLE's subprocess didn't make connection.Either IDLE can't start a subprocess or personal firewall software is blocking the connection." _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 20:54:55 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Jul 2014 18:54:55 +0000 Subject: [issue8231] Unable to run IDLE without write-access to home directory In-Reply-To: <1269531569.44.0.352644957859.issue8231@psf.upfronthosting.co.za> Message-ID: <1405018495.03.0.0877525487605.issue8231@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think the proper solution is to warn "Cannot write .idlerc to your home directory. Settings will not be saved." and continue. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 21:12:10 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 19:12:10 +0000 Subject: [issue15105] curses: wrong indentation In-Reply-To: <1340111999.91.0.28631303072.issue15105@psf.upfronthosting.co.za> Message-ID: <1405019530.54.0.968370073863.issue15105@psf.upfronthosting.co.za> Mark Lawrence added the comment: @vjp sorry about the delay in getting back to you :( Anyone with curses knowledge who can comment on this please, I'm sorry I'm on Windows. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 21:14:23 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 19:14:23 +0000 Subject: [issue15127] Supressing warnings with -w "whether gcc supports ParseTuple" In-Reply-To: <1340298177.77.0.231186835152.issue15127@psf.upfronthosting.co.za> Message-ID: <1405019663.6.0.421882895749.issue15127@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Samuel sorry about the delay in getting back to you :( Can we have a comment on this please. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 21:24:07 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 19:24:07 +0000 Subject: [issue15257] Misc/.gdbinit:pystack is too brittle In-Reply-To: <1341528030.36.0.158267038298.issue15257@psf.upfronthosting.co.za> Message-ID: <1405020247.04.0.845580910476.issue15257@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm assuming that we need a patch review on this, sadly it means nothing to me. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 21:28:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 19:28:01 +0000 Subject: [issue9102] pybench: Cannot compare 2.x and 3.x benchmarks In-Reply-To: <1277739722.07.0.677340784013.issue9102@psf.upfronthosting.co.za> Message-ID: <1405020481.83.0.776393842399.issue9102@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Alexander do you want to pick this up again? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 21:36:07 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Jul 2014 19:36:07 +0000 Subject: [issue21952] fnmatch.py can appear in tracemalloc diffs Message-ID: <1405020967.14.0.385293193823.issue21952@psf.upfronthosting.co.za> New submission from Antoine Pitrou: When using some filters and comparing snapshots, fnmatch will appear in the statistic diffs, e.g.: /home/antoine/34/lib/python3.4/fnmatch.py:70: size=824 B (+64 B), count=2 (+1), average=412 B eeleak.py:37: size=2512 B (+0 B), count=3 (+0), average=837 B /home/antoine/llvmpy/llvm/ee.py:109: size=976 B (+0 B), count=2 (+0), average=488 B /home/antoine/llvmpy/llvm/core.py:401: size=904 B (+0 B), count=2 (+0), average=452 B /home/antoine/34/lib/python3.4/sre_compile.py:488: size=856 B (+0 B), count=1 (+0), average=856 B Perhaps it would be nice to manually cache the compiled re pattern, instead of going through fnmatch's lru_cache thing which seems to make reports less robust. ---------- components: Library (Lib) messages: 222692 nosy: haypo, pitrou priority: normal severity: normal status: open title: fnmatch.py can appear in tracemalloc diffs type: behavior versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 21:40:44 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 19:40:44 +0000 Subject: [issue15626] unittest.main negates -bb option and programmatic warning configuration In-Reply-To: <1344730376.57.0.519562827761.issue15626@psf.upfronthosting.co.za> Message-ID: <1405021244.69.0.527582021609.issue15626@psf.upfronthosting.co.za> Mark Lawrence added the comment: The behaviour is still the same for 3.4.1 and 3.5.0a0 on Windows 7. ---------- components: +Tests nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 21:43:57 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Jul 2014 19:43:57 +0000 Subject: [issue8231] Unable to run IDLE without write-access to home directory In-Reply-To: <1269531569.44.0.352644957859.issue8231@psf.upfronthosting.co.za> Message-ID: <1405021437.57.0.122089240979.issue8231@psf.upfronthosting.co.za> Terry J. Reedy added the comment: .idlerc is a directory that contains the user versions of config-xyz.def. There are currently 4, another will probably be added. The 'offending' code is in configHandler.IdleConf.GetUserCfgDir() (line 195). if not os.path.exists(userDir): try: os.mkdir(userDir) except OSError: warn = ('\n Warning: unable to create user config directory\n'+ userDir+'\n Check path and permissions.\n Exiting!\n\n') sys.stderr.write(warn) raise SystemExit The last line could be replaces by 'return None'. The calling code that uses the normal return would have to be changed to skip trying to read and write the config files. According to Ned, Idle already manages if .idlerc exists but is unwritable. The recent files list and breakpoint lists are also stored in .idlerc. Here are the 4 hits for 'GetUserCfgDir' in C:\Programs\Python34\Lib\idlelib\*.py ... EditorWindow.py: 145: self.recent_files_path = os.path.join(idleConf.GetUserCfgDir(), PyShell.py: 131: self.breakpointPath = os.path.join(idleConf.GetUserCfgDir(), configHandler.py: 184: userDir=self.GetUserCfgDir() configHandler.py: 195: def GetUserCfgDir(self): While Idle could continue without any of these, I like Brian's idea of asking for an alternative first. Actually, if there is no 'home' directory (if expanduser('~') below fails), Idle already tries the current directory as a backup. It could do the same if a home directory exits but is unusable. How far should we go with this? A command-line option to set the user cfg dir? That should be doable. I thought about a new idlelib/config-users.def mapping users to directories, but that has its own problems of write permission, as will as cross-platform access to user name. The OP (Bryan) asked "[is] there is a way to hardcode a reference path that doesnt point to my "M:\" drive for this directory[?]" Yes. GetUserCfgDir starts with cfgDir = '.idlerc' userDir = os.path.expanduser('~') Replace the second line, after each install, to point to a writable directory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 21:51:43 2014 From: report at bugs.python.org (Brian Curtin) Date: Thu, 10 Jul 2014 19:51:43 +0000 Subject: [issue8231] Unable to run IDLE without write-access to home directory In-Reply-To: <1269531569.44.0.352644957859.issue8231@psf.upfronthosting.co.za> Message-ID: <1405021902.99.0.964216991729.issue8231@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 22:04:12 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 10 Jul 2014 20:04:12 +0000 Subject: [issue9445] Fix undefined symbol errors on VS8.0 build In-Reply-To: <1280627576.04.0.298775706484.issue9445@psf.upfronthosting.co.za> Message-ID: <1405022652.39.0.375637222294.issue9445@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I believe the patch is obsolete. Python does not support Windows XP anymore, so all supported versions provide GetFinalPathNameByHandle, and all the detection code can go. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 22:23:31 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jul 2014 20:23:31 +0000 Subject: [issue21952] fnmatch.py can appear in tracemalloc diffs In-Reply-To: <1405020967.14.0.385293193823.issue21952@psf.upfronthosting.co.za> Message-ID: <1405023811.63.0.691442120898.issue21952@psf.upfronthosting.co.za> STINNER Victor added the comment: > When using some filters and comparing snapshots, fnmatch will appear in the statistic diffs, e.g.: During the design of the tracemalloc module (PEP 454), it was decided to not filter traces in the C module, but filter traces on a snapshot object. The reason is to keep the C module simple. To debug, you can analyze snapshots on a fast machine. Can you try to filter traces? snapshot = snapshot.filter_traces(Filter(False, tracemalloc.__file__)) In you case, the top frame is in the fnmatch module, so you probably need to trace more than one thread (ex: tracemalloc.start(10)) and apply the filter on all frames, not only on the top frame: snapshot = snapshot.filter_traces(Filter(False, tracemalloc.__file__, all_frames=True)) You can also ignore fnmatch & sre_compile modules (blacklist, exclusive filters), or only keep traces of the directory /home/antoine/llvmpy/llvm/ (whitelist, an inclusive filter). > Perhaps it would be nice to manually cache the compiled re pattern, instead of going through fnmatch's lru_cache thing which seems to make reports less robust. Ah, interesting point. Would you be interested to work on that? I tried to use tracemalloc to detect memory leaks in test.regrtest, but it's very difficult to get a reliable output. See the issue #19816. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 22:28:52 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Jul 2014 20:28:52 +0000 Subject: [issue19816] test.regrtest: use tracemalloc to detect memory leaks? In-Reply-To: <1385574567.13.0.658193624023.issue19816@psf.upfronthosting.co.za> Message-ID: <1405024132.68.0.177778433052.issue19816@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The problem is snapshots will by themselves create allocation noise: you cannot really use tracemalloc to detect leaks, only to diagnose the leaks you have detected. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 22:30:56 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jul 2014 20:30:56 +0000 Subject: [issue19816] test.regrtest: use tracemalloc to detect memory leaks? In-Reply-To: <1385574567.13.0.658193624023.issue19816@psf.upfronthosting.co.za> Message-ID: <1405024256.95.0.216527613382.issue19816@psf.upfronthosting.co.za> STINNER Victor added the comment: > The problem is snapshots will by themselves create allocation noise: you cannot really use tracemalloc to detect leaks, only to diagnose the leaks you have detected. It's trivial to ignore allocations done in the tracemalloc module. My work-in-progress patch uses for example these filters: tracemalloc_filters = [ tracemalloc.Filter(False, '', all_frames=True), tracemalloc.Filter(False, tracemalloc.__file__, all_frames=True), ] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 22:36:52 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 10 Jul 2014 20:36:52 +0000 Subject: [issue21163] asyncio doesn't warn if a task is destroyed during its execution In-Reply-To: <1396732231.93.0.182409018223.issue21163@psf.upfronthosting.co.za> Message-ID: <3h8Th31zlrz7LkL@mail.python.org> Roundup Robot added the comment: New changeset f13cde63ca73 by Victor Stinner in branch '3.4': asyncio: sync with Tulip http://hg.python.org/cpython/rev/f13cde63ca73 New changeset a67adfaf670b by Victor Stinner in branch 'default': (Merge 3.4) asyncio: sync with Tulip http://hg.python.org/cpython/rev/a67adfaf670b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 22:36:52 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 10 Jul 2014 20:36:52 +0000 Subject: [issue21936] test_future_exception_never_retrieved() of test_asyncio fails on AMD64 Debian root 3.x In-Reply-To: <1404768394.83.0.876638783758.issue21936@psf.upfronthosting.co.za> Message-ID: <3h8Th408xBz7LkL@mail.python.org> Roundup Robot added the comment: New changeset f13cde63ca73 by Victor Stinner in branch '3.4': asyncio: sync with Tulip http://hg.python.org/cpython/rev/f13cde63ca73 New changeset a67adfaf670b by Victor Stinner in branch 'default': (Merge 3.4) asyncio: sync with Tulip http://hg.python.org/cpython/rev/a67adfaf670b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 22:55:25 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Jul 2014 20:55:25 +0000 Subject: [issue19816] test.regrtest: use tracemalloc to detect memory leaks? In-Reply-To: <1385574567.13.0.658193624023.issue19816@psf.upfronthosting.co.za> Message-ID: <1405025725.8.0.106907665875.issue19816@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > My work-in-progress patch uses for example these filters If you use filters, you need to add filters for fnmatch and a couple other things :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 23:15:05 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jul 2014 21:15:05 +0000 Subject: [issue19816] test.regrtest: use tracemalloc to detect memory leaks? In-Reply-To: <1405025725.8.0.106907665875.issue19816@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2014-07-10 22:55 GMT+02:00 Antoine Pitrou : > If you use filters, you need to add filters for fnmatch and a couple other things :) tracemalloc.Filter(False, tracemalloc.__file__, all_frames=True) ignores all memory allocated directly or indirectly by the tracemalloc module: notice the all_frames=True parameter. I'm saving at least 5 frames in tracemalloc when I work on this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 23:24:41 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 21:24:41 +0000 Subject: [issue5879] multiprocessing - example "pool of http servers " fails on windows "socket has no attribute fromfd" In-Reply-To: <1241019482.48.0.575158847578.issue5879@psf.upfronthosting.co.za> Message-ID: <1405027481.5.0.000931965300144.issue5879@psf.upfronthosting.co.za> Mark Lawrence added the comment: Unfortunately #1378 refers to r59004 which is incorrect. I can't find (due to my limited skill set :( where and when fromfd was included in the Python builds for Windows. If that can be found and if somebody is prepared to do a backport then this can go forward. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 23:30:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 21:30:59 +0000 Subject: [issue9524] Document CTRL_C_EVENT and CTRL_BREAK_EVENT usage on Windows In-Reply-To: <1281032507.28.0.881221183962.issue9524@psf.upfronthosting.co.za> Message-ID: <1405027859.98.0.428392777565.issue9524@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.4, Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 23:51:44 2014 From: report at bugs.python.org (Steve Dower) Date: Thu, 10 Jul 2014 21:51:44 +0000 Subject: [issue16229] Demo *redemo.py* lacking in Windows installation In-Reply-To: <1350208645.0.0.150897720098.issue16229@psf.upfronthosting.co.za> Message-ID: <1405029104.55.0.460160088976.issue16229@psf.upfronthosting.co.za> Steve Dower added the comment: Looks like tools/demo just isn't included. I'm totally okay with including it - looks like a few nice examples in there that I've never seen before. If someone wants to do a patch for msi.py that's fine, but I'm intending to have a completely new installer for 3.5, so any changes to the current one are very low priority for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 10 23:53:32 2014 From: report at bugs.python.org (Steve Dower) Date: Thu, 10 Jul 2014 21:53:32 +0000 Subject: [issue14802] Python fails to compile with VC11 ARM configuration In-Reply-To: <1336967845.45.0.147430912977.issue14802@psf.upfronthosting.co.za> Message-ID: <1405029212.69.0.11169904545.issue14802@psf.upfronthosting.co.za> Steve Dower added the comment: The build environment won't help here, this requires some significant rewrites within Python to remove usage of Windows APIs that don't work under the WinRT sandbox (similar to the projects to embed Python in Chromium et al.) I'd still like to see it done, but it's a huge task that is probably never going to be tackled by python-dev directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 00:02:05 2014 From: report at bugs.python.org (Steve Dower) Date: Thu, 10 Jul 2014 22:02:05 +0000 Subject: [issue21953] pythonrun.c does not check std streams the same as fileio.c Message-ID: <1405029725.94.0.581966464433.issue21953@psf.upfronthosting.co.za> New submission from Steve Dower: In pythonrun.c, the is_valid_fd() function checks whether fileno(std*) are valid before attempting to create IO objects for them. However, the class created also checks using fstat(). In pythonw.exe built with VS 2013 (or 14, maybe 2012), the fstat() check fails while the earlier one succeeds. This prevents pythonw from starting. The attached patch adds the fstat() check to pythonrun.c so that if the streams are not usable they will simply not be used. I believe this was the original intent, but at some point the invalid streams gained valid file numbers. (I have no strong opinion about applying this to 3.4, except that it will help out people who rebuild/embed that version of Python with a newer compiler. Thoughts?) ---------- components: IO, Windows files: pythonrun_fstat.diff keywords: patch messages: 222706 nosy: benjamin.peterson, pitrou, steve.dower, stutzbach, tim.golden, zach.ware priority: normal severity: normal status: open title: pythonrun.c does not check std streams the same as fileio.c versions: Python 3.5 Added file: http://bugs.python.org/file35921/pythonrun_fstat.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 00:16:24 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 22:16:24 +0000 Subject: [issue1708316] doctest work with Windows PyReadline Message-ID: <1405030584.23.0.278861315582.issue1708316@psf.upfronthosting.co.za> Mark Lawrence added the comment: http://mail.scipy.org/pipermail/ipython-user/2007-April/004299.html talks about a patch to work around this problem. I think this is what the originator is talking about in msg99887 as in "Since I only use the supported version of pyreadline, the error no longer happens in the unpatched code.". So would we be justified in closing this as "won't fix" or should we patch doctest in any case? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 00:23:57 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 22:23:57 +0000 Subject: [issue7877] Iterators over _winreg EnumKey and EnumValue results In-Reply-To: <1265578300.82.0.0744515010877.issue7877@psf.upfronthosting.co.za> Message-ID: <1405031037.33.0.859115421481.issue7877@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Zach any interest in this? ---------- nosy: +BreamoreBoy, zach.ware versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 00:30:39 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 22:30:39 +0000 Subject: [issue17056] Support Visual Studio 2012 In-Reply-To: <1359330739.37.0.839652698697.issue17056@psf.upfronthosting.co.za> Message-ID: <1405031439.46.0.957103145678.issue17056@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +steve.dower, tim.golden, zach.ware versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 00:33:56 2014 From: report at bugs.python.org (Ned Deily) Date: Thu, 10 Jul 2014 22:33:56 +0000 Subject: [issue8231] Unable to run IDLE without write-access to home directory In-Reply-To: <1269531569.44.0.352644957859.issue8231@psf.upfronthosting.co.za> Message-ID: <1405031636.38.0.0443986828728.issue8231@psf.upfronthosting.co.za> Ned Deily added the comment: The use case reported here sounds like a classroom or lab environment with many people (and likely novices) using open environment machines. In such cases, if users don't have write access to their home directories, it seems to me that there's no need to try to preserve IDLE configurations across sessions. Asking the user for another location in such cases would be confusing and add needless complexity. I'd say either just create a temporary directory or create the config files as temporary files as needed. For advanced users, I suppose a command line option could be added but has there been any demand for such a feature? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 00:56:23 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 22:56:23 +0000 Subject: [issue8849] python.exe problem with cvxopt In-Reply-To: <4C007915.6020901@internode.on.net> Message-ID: <1405032983.91.0.700639521847.issue8849@psf.upfronthosting.co.za> Mark Lawrence added the comment: I can't see how we can pursue this as the minimum Python version for cvxopt is now 2.7 and we don't know what version of cvxopt was originally involved. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 01:04:17 2014 From: report at bugs.python.org (Lita Cho) Date: Thu, 10 Jul 2014 23:04:17 +0000 Subject: [issue1186900] nntplib shouldn't raise generic EOFError Message-ID: <1405033457.62.0.611595478401.issue1186900@psf.upfronthosting.co.za> Lita Cho added the comment: I have a fix and added some test coverage in order to make sure the NNTFConnectError was being called. However, in the test case, I am monkey patching. If there is a way to do this with mock, I would appreciate the feedback. ---------- keywords: +patch Added file: http://bugs.python.org/file35922/nntplib_error.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 01:25:07 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 10 Jul 2014 23:25:07 +0000 Subject: [issue11470] Flag inappropriate uses of callable class attributes In-Reply-To: <1299871329.74.0.464645573136.issue11470@psf.upfronthosting.co.za> Message-ID: <1405034707.65.0.393091211005.issue11470@psf.upfronthosting.co.za> Mark Lawrence added the comment: This issue is referred to from #11455. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 01:25:26 2014 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 10 Jul 2014 23:25:26 +0000 Subject: [issue14714] PEP 414 tokenizing hook does not preserve tabs In-Reply-To: <1336059831.47.0.0507292871504.issue14714@psf.upfronthosting.co.za> Message-ID: <1405034726.36.0.129022746302.issue14714@psf.upfronthosting.co.za> Vinay Sajip added the comment: > Would someone care to enlighten me. It's supposed to be an install-time hook as mentioned in PEP 414 - see footnote no. 5 in the PEP. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 01:41:54 2014 From: report at bugs.python.org (Ned Deily) Date: Thu, 10 Jul 2014 23:41:54 +0000 Subject: [issue20580] IDLE should support platform-specific default config defaults In-Reply-To: <1392027551.21.0.533992391985.issue20580@psf.upfronthosting.co.za> Message-ID: <1405035714.56.0.662233259391.issue20580@psf.upfronthosting.co.za> Ned Deily added the comment: "I have presumed the the appropriate selections are made for other systems." As far as I know, there is nothing in IDLE itself to do that. As I noted earlier, there is a kludge in the Mac Makefile to edit config-main.def and config-extensions.def during installs of OS X framework builds. That doesn't help non-framework builds on OS X nor any builds on other non-Windows platforms. They default to the values in the checked-in versions, which default to Classic Windows. "Can any of the editing of Mac/Makefile be moved into runtime?" If you mean move the editing of config-main.def et al into IDLE itself, sure. That would address the issue of defaults for non-framework builds for OS X and could be extended to other non-Windows cases, assuming it was desirable to change the current defaults (I don't know if that is the case). On the other hand, that would only help when a user starts IDLE without existing .idlerc/*.cfg files, e.g. the first time the user uses IDLE and the first time was with a newer version of IDLE that had this feature. Presumably existing .cfg files would not be edited. "In 'all versions by default share the same user configuration files', does versions mean 2.7, 3.4, 3.5 on one machine? If so, the statement describes a great feature that I would not change." It means all versions of IDLE, not just the latest releases of branches undergoing active maintenance. We can't assume that the user is just using those. For example, various versions of IDLE are shipped with many OS's or by third-party package managers; Apple ships three versions of Python - 2.5, 2.6, and 2.7 - with the current release of OS X. That means all of those versions of IDLE and any others (newer or older) that the user has installed are all sharing the same configuration files. Is it reasonable to guarantee compatibility across all of them? And does it make sense to provide the same list of recent files for all versions, especially across Py2 and Py3? I don't think there is one right answer to these questions but today users have no choice. As IDLE continues to be enhanced and changes are made, the probability of possibly catastrophic incompatibilities will no doubt increase. I don't know if there are any today. I think it would be better to eliminate that risk. There certainly are other use cases, i.e. where home directories are shared across machines of the same OS type; I think the above considerations apply to nearly all of them, as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 02:27:46 2014 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Jul 2014 00:27:46 +0000 Subject: [issue15105] curses: wrong indentation In-Reply-To: <1340111999.91.0.28631303072.issue15105@psf.upfronthosting.co.za> Message-ID: <1405038466.11.0.0013233552841.issue15105@psf.upfronthosting.co.za> Ned Deily added the comment: Sorry, I am unable to reproduce the failure on a couple of different systems; they all work as expected. If the problem persists, try checking your terminal settings and perhaps what version of libncurses* is being used. ---------- nosy: +ned.deily resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 02:29:47 2014 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Jul 2014 00:29:47 +0000 Subject: [issue5879] multiprocessing - example "pool of http servers " fails on windows "socket has no attribute fromfd" In-Reply-To: <1241019482.48.0.575158847578.issue5879@psf.upfronthosting.co.za> Message-ID: <1405038587.5.0.630959097612.issue5879@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 02:30:19 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jul 2014 00:30:19 +0000 Subject: [issue15787] PEP 3121, 384 Refactoring In-Reply-To: <1346038565.61.0.980658052428.issue15787@psf.upfronthosting.co.za> Message-ID: <1405038619.87.0.959133893114.issue15787@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 04:10:24 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 02:10:24 +0000 Subject: [issue8231] Unable to run IDLE without write-access to home directory In-Reply-To: <1269531569.44.0.352644957859.issue8231@psf.upfronthosting.co.za> Message-ID: <1405044624.82.0.312880198072.issue8231@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I don't know of any request for a new option, so I would go for something simple that lets Idle run. Temporary files are a good idea for breakpoints (temporary anyway, I think) and maybe for recent files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 04:33:21 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 02:33:21 +0000 Subject: [issue20577] IDLE: Remove FormatParagraph's width setting from config dialog In-Reply-To: <1391974116.91.0.4701294104.issue20577@psf.upfronthosting.co.za> Message-ID: <1405046001.29.0.848772822194.issue20577@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ned's comments on #20580, msg222714, reminded me that while each idlelib has its own set of default config files, one set of user files is shared across all installed versions of idle. So we have to be careful about what we do. With this patch, 3.4.2, for instance, could not read the user setting set with 3.4.1. And a setting written by 3.4.2 could not be read by 2.7.8. While I think that is tolerable, let's hold off on this until it is both needed and tested a bit more. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 04:57:23 2014 From: report at bugs.python.org (Dev Player) Date: Fri, 11 Jul 2014 02:57:23 +0000 Subject: [issue21954] str(b'text') returns "b'text'" in interpreter Message-ID: <1405047443.55.0.837087456572.issue21954@psf.upfronthosting.co.za> New submission from Dev Player: str(b'text') returns double quoted item with b prefix within the str() object as so: "b'text'" in python interpreter. It seems the "b" shouldn't be within the outter quotes or apart of the str() instance data. Is this a bug or new syntax? I personally haven't see any documentation that this is the correct behavior. Nor did I find any previously register issue tickets. >>>bchars_list = [b'o', b'n', b'e'] >>>bchars_list [b'o', b'n', b'e'] >>>[str(x) for x in bchars_list] ["b'o'", "b'n'", "b'e'"] ---------- components: Interpreter Core files: str bug.bmp messages: 222718 nosy: devplayer priority: normal severity: normal status: open title: str(b'text') returns "b'text'" in interpreter type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file35923/str bug.bmp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 05:01:05 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 03:01:05 +0000 Subject: [issue20577] IDLE: Remove FormatParagraph's width setting from config dialog In-Reply-To: <1391974116.91.0.4701294104.issue20577@psf.upfronthosting.co.za> Message-ID: <1405047665.21.0.226842323127.issue20577@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This will at least need a What's New entry, though people do not expect new entries in maintenance releases. I think we need an Idle What's New accessible from the help menu and announced on the splash screen. Unlike the standard What's New, it will get occasional entries during a release, and that (and PEP 434) explained at the top. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 05:06:40 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 03:06:40 +0000 Subject: [issue20580] IDLE should support platform-specific default config defaults In-Reply-To: <1392027551.21.0.533992391985.issue20580@psf.upfronthosting.co.za> Message-ID: <1405048000.83.0.758302074881.issue20580@psf.upfronthosting.co.za> Terry J. Reedy added the comment: You appear to be saying that even though some of the per system defaults you want are present, they are not automatically used, but users must go into the options dialog to select bindings other than Windows. Correct? And you would like to change this? The odd situation we have is that default configuration in idlelib is specific to the installation, but the same for all users, whereas user overrides are specific to the user, but the same for all installations. Thanks for the reminder that we need to be careful. I will consider this before we change the location of format width in #20579. As I say there, some changes will need Idle What's New entries and perhaps a reminder to read it in the signon message, and access from the help menu. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 05:46:15 2014 From: report at bugs.python.org (Dev Player) Date: Fri, 11 Jul 2014 03:46:15 +0000 Subject: [issue12902] help("modules") executes module code In-Reply-To: <1315251083.43.0.259542197646.issue12902@psf.upfronthosting.co.za> Message-ID: <1405050375.01.0.812469430679.issue12902@psf.upfronthosting.co.za> Dev Player added the comment: Mentioned for informational purposes only. I too experience the running of external packages with a different library when doing help('modules') in the interpreter. This is a fresh install of Python 3.4 on WinXP. The text I get in the python.exe interpreter is: "Expected Tk Togl installation in C:\Python\Python34\lib\site-packages\OpenGl\Tk\togl-win32" Then I get an empty TK popup window. Although this other issue was ages ago and was with a different machine, Python version and set of libraries I'm giving reference to this only because of mention of help(). http://bugs.python.org/issue10060 Although there is a command line option to prevent the import of site, while I may not want "help" to be imported, I usually want "site" to be imported. It would be nice to exclude the "help" import only via a command line. I wonder if the interpreter could be given a command line option just to parse modules/scripts/packages/librarys to only compile the lines containing def and class without anything within the namespace except implicitly declared docstrings (it not __doc__ = """...""") In other words if you had source like: def somefunc(arg=None): """here is the func __doc__""" x = value callme() the interpreter could basically compile that into: def somefunc(arg-None): """here is the func __doc__""" return None or perhaps shortcircuit any non def/class/ """ """ to be tokenized as the pass statement would be. Those would be feature/enhance kind thing I suppose. ---------- nosy: +devplayer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 06:16:56 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Jul 2014 04:16:56 +0000 Subject: [issue21940] IDLE - Test WidgetRedirector In-Reply-To: <1404830235.88.0.167497005824.issue21940@psf.upfronthosting.co.za> Message-ID: <3h8gtv4WNxz7Ljs@mail.python.org> Roundup Robot added the comment: New changeset 53d0776aab53 by Terry Jan Reedy in branch '2.7': #21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav Heblikar. http://hg.python.org/cpython/rev/53d0776aab53 New changeset edf2ae293d70 by Terry Jan Reedy in branch '3.4': #21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav Heblikar. http://hg.python.org/cpython/rev/edf2ae293d70 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 06:17:41 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 04:17:41 +0000 Subject: [issue21940] IDLE - Test WidgetRedirector In-Reply-To: <1404830235.88.0.167497005824.issue21940@psf.upfronthosting.co.za> Message-ID: <1405052261.87.0.419693525501.issue21940@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 06:38:12 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Jul 2014 04:38:12 +0000 Subject: [issue18592] Idle: test SearchDialogBase.py In-Reply-To: <1375146770.41.0.774627283078.issue18592@psf.upfronthosting.co.za> Message-ID: <3h8hMR6Ht4z7Llp@mail.python.org> Roundup Robot added the comment: New changeset 30a75f75a4d4 by Terry Jan Reedy in branch '2.7': Issue #18592: Make unittest for SearchDialogBase work on all tk versions. http://hg.python.org/cpython/rev/30a75f75a4d4 New changeset 91546aa91cee by Terry Jan Reedy in branch '3.4': Issue #18592: Make unittest for SearchDialogBase work on all tk versions. http://hg.python.org/cpython/rev/91546aa91cee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 07:30:45 2014 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Jul 2014 05:30:45 +0000 Subject: [issue21954] str(b'text') returns "b'text'" in interpreter In-Reply-To: <1405047443.55.0.837087456572.issue21954@psf.upfronthosting.co.za> Message-ID: <1405056645.7.0.569639744497.issue21954@psf.upfronthosting.co.za> Ned Deily added the comment: This is as expected. In Python 3, b'text' represents a bytes object. "Passing a bytes object to str() without the encoding or errors arguments falls under the first case of returning the informal string representation". Also, in the case of simple bytes objects, their str() representation is the same as their repr() representation. For many simple types, the repr() representation of an object allows you to recover the object by using eval(). >>> b'one' b'one' >>> type(b'one') >>> str(b'one') "b'one'" >>> repr(b'one') "b'one'" >>> eval(repr(b'one')) b'one' >>> b'one'.decode('ascii') 'one' https://docs.python.org/3/library/stdtypes.html#str https://docs.python.org/3/library/functions.html#repr Python 2 (as of 2.6) accepts b'text' literals to make writing code compatible with both Py2 and Py3 easier. However, Py2 treats b'text' the same as 'text'. >>> b'one' 'one' >>> type(b'one') >>> str(b'one') 'one' >>> b'one'.decode('ascii') u'one' https://docs.python.org/2/whatsnew/2.6.html#pep-3112-byte-literals ---------- nosy: +ned.deily resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 07:37:49 2014 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Jul 2014 05:37:49 +0000 Subject: [issue20580] IDLE should support platform-specific default config defaults In-Reply-To: <1392027551.21.0.533992391985.issue20580@psf.upfronthosting.co.za> Message-ID: <1405057069.34.0.0575846578211.issue20580@psf.upfronthosting.co.za> Ned Deily added the comment: "Correct?" Yes "And you would like to change this?" I think it should be considered, yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 07:44:52 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 05:44:52 +0000 Subject: [issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers. In-Reply-To: <1402787574.99.0.986548729035.issue21765@psf.upfronthosting.co.za> Message-ID: <1405057492.35.0.645819605202.issue21765@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I just noticed that ColorDelegator has idprog = re.compile(r"\s+(\w+)", re.S) which will recognize unicode 'words', if not exactly Python 'identifiers'. However, UndoDelegator has alphanumeric = string.ascii_letters + string.digits + "_" which is the same as in Hyperparser. It is used in def classify(self, c): if c in self.alphanumeric: return "alphanumeric" if c == "\n": return "newline" return "punctuation" and probably does not do what we really want. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 07:56:49 2014 From: report at bugs.python.org (Mark Summerfield) Date: Fri, 11 Jul 2014 05:56:49 +0000 Subject: [issue20366] SQLite FTS (full text search) In-Reply-To: <1390487950.26.0.724740577433.issue20366@psf.upfronthosting.co.za> Message-ID: <1405058209.66.0.809582706029.issue20366@psf.upfronthosting.co.za> Mark Summerfield added the comment: Just to mention that I don't need this feature anymore since I've now switched to using APSW which includes it and also has much fuller SQLite support than the sqlighe3 module. (I haven't closed it though since other people have participated in some way.) See http://rogerbinns.github.io/apsw/index.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 08:40:35 2014 From: report at bugs.python.org (Daniel Dickman) Date: Fri, 11 Jul 2014 06:40:35 +0000 Subject: [issue21934] OpenBSD has no /dev/full device In-Reply-To: <1404747013.93.0.393614299649.issue21934@psf.upfronthosting.co.za> Message-ID: <1405060835.39.0.993934454959.issue21934@psf.upfronthosting.co.za> Daniel Dickman added the comment: We will merge any fix decided by the python team when it's committed. In the meantime may commit our fix on OpenBSD to solve the problem in the short term as it seems no one has time to go further right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 09:49:33 2014 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Jul 2014 07:49:33 +0000 Subject: [issue21323] CGI HTTP server not running scripts from subdirectories In-Reply-To: <1398107131.28.0.812868414728.issue21323@psf.upfronthosting.co.za> Message-ID: <1405064973.12.0.341921789366.issue21323@psf.upfronthosting.co.za> Ned Deily added the comment: The fix and test look good to me. I'll apply it after Zach submits the contributor agreement. ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 11:08:23 2014 From: report at bugs.python.org (Tal Einat) Date: Fri, 11 Jul 2014 09:08:23 +0000 Subject: [issue21939] IDLE - Test Percolator In-Reply-To: <1404829186.29.0.812778916434.issue21939@psf.upfronthosting.co.za> Message-ID: <1405069703.13.0.650168637921.issue21939@psf.upfronthosting.co.za> Tal Einat added the comment: I've reviewed the patch and made my remarks in the review tool. These tests don't test the central functionality of Percolator nearly enough. We should test, at least: 1) That the text actually went through the filter (and not directly to the Text widget). 2) That if a filter modifies the text, the modified text appears in the Text widget. 3) That a filter can stop the event from continuing through the following filters. 4) That having more than one filter modify the arguments works. 5) That not having any filters works. 6) That this doesn't only work on a Text widget's "insert" and "delete" events. There are probably more things we should test. Take a look at what this is used for in practice in the code for ideas. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 11:10:27 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jul 2014 09:10:27 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit Message-ID: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> New submission from STINNER Victor: Python 2 has fast path in ceval.c for operations (a+b, a-b, etc.) on small integers ("int" type) if the operation does not overflow. We loose these fast-path in Python 3 when we dropped the int type in favor of the long type. Antoine Pitrou proposed a fast-path, but only for int singletons (integers in the range [-5; 255]): issue #10044. His patch was rejected because it introduces undefined behaviour. I propose to reimplemenet Python 2 optimization for long with a single digit, which are the most common numbers. Pseudo-code for BINARY_ADD: --- if (PyLong_CheckExact(x) && Py_ABS(Py_SIZE(x)) == 1 && PyLong_CheckExact(y) && Py_ABS(Py_SIZE(y)) == 1) { stwodigits a = ..., b = ...; stwodigits c; if (... a+b will not overflow ...) { c = a + b; return PyLong_FromLongLong(c); } } /* fall back to PyNumber_Add() */ --- The code can be copied from longobject.c, there are already fast-path for single digit numbers. See for example long_mul(): --- /* fast path for single-digit multiplication */ if (Py_ABS(Py_SIZE(a)) <= 1 && Py_ABS(Py_SIZE(b)) <= 1) { .... } --- As any other optimization, it should be proved to be faster with benchmarks. ---------- messages: 222731 nosy: haypo, mark.dickinson priority: normal severity: normal status: open title: ceval.c: implement fast path for integers with a single digit type: performance versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 11:12:25 2014 From: report at bugs.python.org (Tal Einat) Date: Fri, 11 Jul 2014 09:12:25 +0000 Subject: [issue20577] IDLE: Remove FormatParagraph's width setting from config dialog In-Reply-To: <1391974116.91.0.4701294104.issue20577@psf.upfronthosting.co.za> Message-ID: <1405069945.96.0.619352563212.issue20577@psf.upfronthosting.co.za> Tal Einat added the comment: I don't think this is a major issue. Most users only use one version of IDLE with one version of Python. IDLE's user config is indeed shared between all versions. This is an unfortunate design mistake, and could perhaps be fixed in 3.5. Regarding this issue, we could skip 3.4 and include it only in 3.5. I think telling users "fix your IDLE config when switching from 3.4 to 3.5 as so" is reasonable. If we don't allow ourselves this, then without switching to having separate configs for each version of Python, we'll never be able to change anything in IDLE's configuration! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 11:13:07 2014 From: report at bugs.python.org (David) Date: Fri, 11 Jul 2014 09:13:07 +0000 Subject: [issue21950] import sqlite3 not running In-Reply-To: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> Message-ID: <1405069987.96.0.990885056254.issue21950@psf.upfronthosting.co.za> David added the comment: Hi, I've the same problem. I've already tested (from source, Python-3.4.1.tgz) under OpenSUSE 12.3 and Debian 7.5 with the same issue. I've compiled it in standard way (./configure; make; make install) although the output (error) is the same, after import sqlite3: #python3 -c "import sqlite3" Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.4/sqlite3/__init__.py", line 23, in from sqlite3.dbapi2 import * File "/usr/lib/python3.4/sqlite3/dbapi2.py", line 26, in from _sqlite3 import * ImportError: No module named '_sqlite3' However, if I install it using specific distro packages it works properly. ---------- nosy: +dpatino _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 11:46:59 2014 From: report at bugs.python.org (Berker Peksag) Date: Fri, 11 Jul 2014 09:46:59 +0000 Subject: [issue21950] import sqlite3 not running In-Reply-To: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> Message-ID: <1405072019.85.0.331174445402.issue21950@psf.upfronthosting.co.za> Berker Peksag added the comment: Works for me on Ubuntu 12.04 LTS: $ sudo apt-get install sqlite3 libsqlite3-dev $ ./configure $ make -j3 $ sudo make install $ sqlite3 -version 3.7.9 2011-11-01 00:52:41 c7c6050ef060877ebe77b41d959e9df13f8c9b5e $ python3.4 -V 3.4.1 $ python3.4 -c "import sqlite3; print(sqlite3.sqlite_version)" 3.7.9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 12:31:13 2014 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Fri, 11 Jul 2014 10:31:13 +0000 Subject: [issue19806] smtpd crashes when a multi-byte UTF-8 sequence is split between consecutive data packets In-Reply-To: <1385532648.32.0.209027401379.issue19806@psf.upfronthosting.co.za> Message-ID: <1405074673.8.0.374983780509.issue19806@psf.upfronthosting.co.za> Walter D?rwald added the comment: I don't know anything about SMTP, but would it make sense to use an incremental decoder for decoding UTF-8? ---------- nosy: +doerwalter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 13:02:52 2014 From: report at bugs.python.org (Alejandro) Date: Fri, 11 Jul 2014 11:02:52 +0000 Subject: [issue21950] import sqlite3 not running In-Reply-To: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> Message-ID: <1405076572.12.0.491382456602.issue21950@psf.upfronthosting.co.za> Alejandro added the comment: I've downloaded UBUNTU 12.04. I've compiled python3 and I got the same error. Seleccionando el paquete sqlite3 previamente no seleccionado. Desempaquetando sqlite3 (de .../sqlite3_3.7.9-2ubuntu1.1_i386.deb) ... Procesando disparadores para man-db ... Configurando libsqlite3-dev (3.7.9-2ubuntu1.1) ... Configurando sqlite3 (3.7.9-2ubuntu1.1) ... ubuntu at ubuntu:~$ python3.4 -c "import sqlite3" Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.4/sqlite3/__init__.py", line 23, in from sqlite3.dbapi2 import * File "/usr/local/lib/python3.4/sqlite3/dbapi2.py", line 26, in from _sqlite3 import * ImportError: No module named '_sqlite3' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 13:12:31 2014 From: report at bugs.python.org (Ismail Donmez) Date: Fri, 11 Jul 2014 11:12:31 +0000 Subject: [issue21950] import sqlite3 not running In-Reply-To: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> Message-ID: <1405077151.19.0.405630503649.issue21950@psf.upfronthosting.co.za> Ismail Donmez added the comment: Chiming in here as a SUSE guy; Can you make sure /usr/local/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so does exist. If yes run ldd on it ldd /usr/local/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so And also give output of "which python3.4" to make sure you are running the right python instance. ---------- nosy: +cartman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 13:51:04 2014 From: report at bugs.python.org (Stefan Krah) Date: Fri, 11 Jul 2014 11:51:04 +0000 Subject: [issue15722] PEP 3121, 384 Refactoring applied to decimal module In-Reply-To: <1345293070.72.0.383930872934.issue15722@psf.upfronthosting.co.za> Message-ID: <1405079464.77.0.102385790991.issue15722@psf.upfronthosting.co.za> Stefan Krah added the comment: Sorry Robin, I was wrong about the context -- it should be fine since it's thread-local. So the slowdown is back to 25%. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 14:21:39 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jul 2014 12:21:39 +0000 Subject: [issue21950] import sqlite3 not running In-Reply-To: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> Message-ID: <1405081299.38.0.475046149138.issue21950@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 14:46:12 2014 From: report at bugs.python.org (Tal Einat) Date: Fri, 11 Jul 2014 12:46:12 +0000 Subject: [issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers. In-Reply-To: <1402787574.99.0.986548729035.issue21765@psf.upfronthosting.co.za> Message-ID: <1405082772.55.0.649334415226.issue21765@psf.upfronthosting.co.za> Tal Einat added the comment: If you think ColorDelegator and UndoDelegator should be fixed as well, I'd be happy to take a look, but we should open a separate tracker issue for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 15:01:26 2014 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 11 Jul 2014 13:01:26 +0000 Subject: [issue21927] BOM appears in stdin when using Powershell In-Reply-To: <1404657562.39.0.323212380566.issue21927@psf.upfronthosting.co.za> Message-ID: <1405083686.97.0.237614728685.issue21927@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I've tested it and setting PYTHONIOENCODING='utf-8-sig' starts to get there. It causes Python to consume the BOM on stdin, but it also causes stdout to print a spurious non-printable character in the output: C:\Users\jaraco> echo foo | ./print-input ?foo There is a non-printable character before foo. I've included it in this message. In Powershell, it's rendered with a square before foo: ?foo Using PowerShell under ConEmu, it appears as a space: foo In cmd.exe, I see this: C:\Users\jaraco>python -c "print('foo')" ???foo The space before the 'foo' apparently isn't a space at all. Indeed, the input is being processed as desired, but the output now is not. C:\Users\jaraco> python -c "print('bar')" ?bar (the non-printable character appears there too) If I copy that text to the clipboard, I find that character is actually a \ufeff (zero-width no-break space, aka byte order mark). So by setting the environment variable to use utf-8-sig for input, it simultaneously changes the output to also use utf-8-sig. So it appears as if setting the environment variable would work for my purposes except that I only want to alter the input encoding and not the output encoding. I think my goal is pretty basic - read text from standard input and write text to standard output on the primary shell included with the most popular operating system. I contend that goal should be easily achieved and straightforward on Python out of the box. What does everyone think of the proposal that Python should simply default to utf-8-sig instead of utf-8 for stdin encoding? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 15:07:11 2014 From: report at bugs.python.org (Andy Maier) Date: Fri, 11 Jul 2014 13:07:11 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1405084031.16.0.417541172472.issue12067@psf.upfronthosting.co.za> Changes by Andy Maier : ---------- nosy: +benjamin.peterson, steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 15:07:11 2014 From: report at bugs.python.org (Brandon Rhodes) Date: Fri, 11 Jul 2014 13:07:11 +0000 Subject: [issue21956] Deleted document should not appear in 3.4 docs Message-ID: <1405084031.97.0.312909906567.issue21956@psf.upfronthosting.co.za> New submission from Brandon Rhodes: There was an old document in the "howto" folder whose advice was in many cases flat-out wrong, so Raymond Hettinger performed a wonderful public service by deleting it back in 2011: http://hg.python.org/cpython/rev/80ff78425419 Unfortunately it looks like the process for publishing Python documentation only adds documents, but never deletes them, so a copy of the documentation is still available under the "3.4" document tree: https://docs.python.org/3.4/howto/doanddont.html It should be deleted as soon as possible. Because it is presumed that only the most accurate and up-to-date documentation lives under the URL "3.4", people are reading and debating this document's bad advice as though it is official guidance as to how to use the language. (The only hint that something is wrong, alas, is the tiny detail that the top-left of the page says ?Python v3.3a0 documentation?). The advice is currently being debated on Twitter and people are sad that they are supposed to stop using ?from foo import bar? in Python. ---------- messages: 222741 nosy: brandon-rhodes priority: normal severity: normal status: open title: Deleted document should not appear in 3.4 docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 15:07:43 2014 From: report at bugs.python.org (Brandon Rhodes) Date: Fri, 11 Jul 2014 13:07:43 +0000 Subject: [issue21956] Deleted document should not appear in 3.4 docs In-Reply-To: <1405084031.97.0.312909906567.issue21956@psf.upfronthosting.co.za> Message-ID: <1405084063.02.0.155523683935.issue21956@psf.upfronthosting.co.za> Changes by Brandon Rhodes : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 15:07:46 2014 From: report at bugs.python.org (Andy Maier) Date: Fri, 11 Jul 2014 13:07:46 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1405084066.75.0.631548167783.issue12067@psf.upfronthosting.co.za> Changes by Andy Maier : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 15:42:50 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 11 Jul 2014 13:42:50 +0000 Subject: [issue14714] PEP 414 tokenizing hook does not preserve tabs In-Reply-To: <1336059831.47.0.0507292871504.issue14714@psf.upfronthosting.co.za> Message-ID: <1405086170.18.0.635213321791.issue14714@psf.upfronthosting.co.za> Mark Lawrence added the comment: What are the Python core developers meant to do with this issue? How does a piece of code on github relate to the core Python code in Mercurial? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 16:04:50 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jul 2014 14:04:50 +0000 Subject: [issue21927] BOM appears in stdin when using Powershell In-Reply-To: <1404657562.39.0.323212380566.issue21927@psf.upfronthosting.co.za> Message-ID: <1405087490.09.0.873647602224.issue21927@psf.upfronthosting.co.za> STINNER Victor added the comment: > The BOM (byte order mark) appears in the standard input stream. When using cmd.exe, the BOM is not present. This behavior occurs in CP1252 as well as CP65001. How you do change the console encoding? Using the chcp command? I'm surprised that you get a UTF-8 BOM when the code page 1252 is used. Can you please check that sys.stdin.encoding is "cp1252"? I tested PowerShell with Python 3.5 on Windows 7 with an OEM code page 850 and ANSI code page 1252: - by default, the stdin encoding is cp850 (OEM code page) and os.device_encoding(0) returns "cp850". sys.stdin.readline() does not contain a BOM. - when stdin is a pipe (ex: echo "abc"|python ...), the stdin encoding becomes cp1252 (ANSI code page) because os.device_encoding(0) returns None; cp1252 is the result of locale.getpreferredencoding(False) (ANSI code page). sys.stdin.readline() does not contain a BOM. If I change the console encoding using the command "chcp 65001": - by default, the stdin encoding = os.device_encoding(0) = "cp65001". sys.stdin.readline() does not contain a BOM. - when stdin is a pipe, stdin encoding = locale.getpreferredencoding(False) = "cp1252" and sys.stdin.readline() *contains* the UTF-8 BOM Note: The UTF-8 BOM is only written once, before the first character. So the UTF-8 BOM is only written in one case under these conditions: - Python is running in PowerShell (The UTF-8 BOM is not written in cmd.exe, even with chcp 65001) - sys.stdin is a pipe - the console encoding was set manually to cp65001 -- It looks like PowerShell decodes the output of the producer program (echo, type, ...) and then encodes the output to the consumer program (ex: python). It's possible to change the encoding of the encoder by setting $OutputEncoding variable. Example to encode to UTF-8 without the BOM: $OutputEncoding = New-Object System.Text.UTF8Encoding($False) Example to encode to UTF-8 without the BOM: $OutputEncoding = [System.Text.Encoding]::UTF8 Using [System.Text.Encoding]::UTF8, sys.stdin.readline() starts with a BOM even if the console encoding is cp850. If you set the console encoding to 65001 (chcp 65001) and $OutputEncoding to [System.Text.Encoding]::UTF8, you get... two UTF-8 BOMs... yeah! I tried different producer programs: [MS-DOS] echo "abc", [PowerShell] write-output "abc", [MS-DOS] type document.txt, [PowerShell] Get-Content document.txt, python -c "print('abc')". It doesn't like like using a different program changes anything. The UTF-8 BOM is added somewhere by PowerShell between by producer and the consumer programs. To show the console input and output encodings in PowerShell, type "[console]::InputEncoding" and "[console]::OutputEncoding". See also: http://stackoverflow.com/questions/22349139/utf8-output-from-powershell ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 16:12:36 2014 From: report at bugs.python.org (Alejandro) Date: Fri, 11 Jul 2014 14:12:36 +0000 Subject: [issue21950] import sqlite3 not running In-Reply-To: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> Message-ID: <1405087956.54.0.676438563351.issue21950@psf.upfronthosting.co.za> Alejandro added the comment: we have /usr/local/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so but we didn't have it in /soft/pyt341/lib/python3.4/lib-dynload/ After copying it into /sofy/pyt341.... the problem was solved!! ;) /soft/pyt341/bin/python3 -c "import sqlite3;print(sqlite3.sqlite_version)" 3.7.6.3 In my opinion running ./configure should check if sqlite libs are properly satisfied and break compilation if they aren't installed. :) I don't know if this issue could be considered a bug. So I will close it as "works for me" Thanks for all! ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 16:18:53 2014 From: report at bugs.python.org (David) Date: Fri, 11 Jul 2014 14:18:53 +0000 Subject: [issue21950] import sqlite3 not running In-Reply-To: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> Message-ID: <1405088333.11.0.640947995561.issue21950@psf.upfronthosting.co.za> David added the comment: You're absolute right that file is not in path. However, in my view this a bug, due to the fact libsqlite3-dev package must be installed before Python3.4.1 is compiled (or install it and recompile python) because there is no errors, no warnings... nothing. In any case, thanks a lot for your help. This solution works for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 16:20:30 2014 From: report at bugs.python.org (Igor Franchuk) Date: Fri, 11 Jul 2014 14:20:30 +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: <1405088430.22.0.0868169942099.issue20065@psf.upfronthosting.co.za> Igor Franchuk added the comment: Confirmed as fixed at least in Python 3.3.5 Successfully compiled at Linux gw 2.6.33-gentoo #1 SMP Mon Mar 8 23:29:59 MSK 2010 i686 Intel(R) Pentium(R) D CPU 3.00GHz GenuineIntel GNU/Linux ---------- versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 16:23:04 2014 From: report at bugs.python.org (Andy Maier) Date: Fri, 11 Jul 2014 14:23:04 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1405088584.9.0.174438283781.issue12067@psf.upfronthosting.co.za> Andy Maier added the comment: Uploaded v8 of the patch for 3.4 and default. It reflects hopefully everything that was said in this issue thread, and on the python-dev mailing list (subject: == on object tests identity in 3.x), at least to the extent it was related to comparisons. Besides the doc changes it contained previously, it now also contains improvements for the test suite for comparisons (lib/test/test_compare.py). -> Please review both. Andy ---------- Added file: http://bugs.python.org/file35924/issue12067-expressions-py34_v8.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 16:27:46 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jul 2014 14:27:46 +0000 Subject: [issue21927] BOM appears in stdin when using Powershell In-Reply-To: <1404657562.39.0.323212380566.issue21927@psf.upfronthosting.co.za> Message-ID: <1405088866.54.0.49745112173.issue21927@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issues #1602 (Windows console) and #16587 (stdin, _setmode() and wprintf). I tried msvcrt.setmode(0, 0x40000): set stdin mode to _O_U8TEXT. In this mode, echo "abc"|python -c "import sys; print(ascii(sys.stdin.read()))" displays "\xff\xfea\x00b\x00c\x00\n\x00" which is "abc" encoded to UTF-16 (little endian with the BOM), b'\xff\xfe' is the Unicode BOM U+FEFF (u'\uFEFF') encoded to UTF-16-LE. U+FEFF encoded to UTF-8 gives b'\xef\xbb\xbf'. So it looks like it's not an issue of the stdin mode. I tried all modes and I always get the Unicode BOM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 16:29:40 2014 From: report at bugs.python.org (Stephen Paul Chappell) Date: Fri, 11 Jul 2014 14:29:40 +0000 Subject: [issue21957] ASCII Formfeed (FF) & ASCII Vertical Tab (VT) Have Hexadecimal Representation Message-ID: <1405088980.95.0.801380317459.issue21957@psf.upfronthosting.co.za> New submission from Stephen Paul Chappell: In the string module, the definition of whitespace is ' \t\n\r\v\f'. However, the representation of string.whitespace is ' \t\n\r\x0b\x0c'. Would it be terribly inconvenient to change the representation of '\x0b\x0c' to '\v\f'? The documentation at https://docs.python.org/3.4/reference/lexical_analysis.html#string-and-bytes-literals lists recognized escape sequences, but string represetations seem to diverge slightly from what is recognized. The same "problem" exists with the representation of bytes. ---------- messages: 222749 nosy: Zero priority: normal severity: normal status: open title: ASCII Formfeed (FF) & ASCII Vertical Tab (VT) Have Hexadecimal Representation type: enhancement 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 Fri Jul 11 16:38:28 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jul 2014 14:38:28 +0000 Subject: [issue21953] pythonrun.c does not check std streams the same as fileio.c In-Reply-To: <1405029725.94.0.581966464433.issue21953@psf.upfronthosting.co.za> Message-ID: <1405089508.01.0.869587231498.issue21953@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issues: - issue #17797: Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program - issue #18804: I proposed a similar change for other reasons. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 16:38:46 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jul 2014 14:38:46 +0000 Subject: [issue21936] test_future_exception_never_retrieved() of test_asyncio fails on AMD64 Debian root 3.x In-Reply-To: <1404768394.83.0.876638783758.issue21936@psf.upfronthosting.co.za> Message-ID: <1405089526.02.0.685167544074.issue21936@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 16:39:59 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jul 2014 14:39:59 +0000 Subject: [issue13081] Crash in Windows with unknown cause In-Reply-To: <1317417665.11.0.474916583341.issue13081@psf.upfronthosting.co.za> Message-ID: <1405089599.54.0.354072216657.issue13081@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy implemented the FileIO class in pure Python: see the issue #21859 (patch under review). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 16:40:23 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jul 2014 14:40:23 +0000 Subject: [issue13081] Crash in Windows with unknown cause In-Reply-To: <1317417665.11.0.474916583341.issue13081@psf.upfronthosting.co.za> Message-ID: <1405089623.38.0.428446453592.issue13081@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- Removed message: http://bugs.python.org/msg222751 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 16:40:31 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jul 2014 14:40:31 +0000 Subject: [issue17984] io and _pyio modules require the _io module In-Reply-To: <1368647367.8.0.180383025422.issue17984@psf.upfronthosting.co.za> Message-ID: <1405089631.3.0.544113963972.issue17984@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy implemented the FileIO class in pure Python: see the issue #21859 (patch under review). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 16:52:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 11 Jul 2014 14:52:27 +0000 Subject: [issue11455] issue a warning when populating a CPython type dict with non-string keys In-Reply-To: <1299704028.56.0.168922481621.issue11455@psf.upfronthosting.co.za> Message-ID: <1405090347.0.0.334095617166.issue11455@psf.upfronthosting.co.za> Mark Lawrence added the comment: The patch is short and sweet. Assuming it is acceptable do we commit or don't we? See also the reference to #11470 in msg132032. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 16:54:08 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jul 2014 14:54:08 +0000 Subject: [issue21732] SubprocessTestsMixin.test_subprocess_terminate() hangs on "AMD64 Snow Leop 3.x" buildbot In-Reply-To: <1402584959.34.0.367211302665.issue21732@psf.upfronthosting.co.za> Message-ID: <1405090448.08.0.36901373421.issue21732@psf.upfronthosting.co.za> STINNER Victor added the comment: It looks like the bug is gone... I don't know why :-/ But at least, it didn't occur recently. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 17:03:17 2014 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 11 Jul 2014 15:03:17 +0000 Subject: [issue21956] Deleted document should not appear in 3.4 docs In-Reply-To: <1405084031.97.0.312909906567.issue21956@psf.upfronthosting.co.za> Message-ID: <1405090997.64.0.837142463377.issue21956@psf.upfronthosting.co.za> Steven D'Aprano added the comment: > in many cases flat-out wrong What advice is "flat-out wrong"? All the advice seems excellent to me: * avoid "from spam import *" (with a very few exceptions) * be cautious about "from spam import eggs" * avoid bare "except" clauses * watch out for "time from check to time to use" race conditions (e.g. prefer EAFP over LBYL when opening files) * don't reinvent the wheel poorly when the std lib already solves your problem * avoid backslash as line continuation > It should be deleted as soon as possible. Why delete it rather than fix any (alleged) problems with it? > The advice is currently being debated on Twitter and people > are sad that they are supposed to stop using ?from foo import bar? Debated on Twitter. Why am I not surprised that they've misunderstood it? The document explains why "from foo import bar" can *sometimes* be harmful. The wording could be improved, and isn't as clear as it should be, but the advice is broadly correct: "from foo import bar" injects the object bar into the current namespace, not the name, which means that if foo rebinds bar, that change will not be seen in the current namespace. If foo never rebinds bar, then there is no problem, but if bar is a *variable* rather than a (pseudo-)constant, you may run into subtle and tricky problems. -1 on deleting. If the consensus is to keep it, I'll look at rewording and improving some of the weaker descriptions. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 17:11:06 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Jul 2014 15:11:06 +0000 Subject: [issue21932] os.read() must use Py_ssize_t for the size parameter In-Reply-To: <1404740274.81.0.177768774974.issue21932@psf.upfronthosting.co.za> Message-ID: <3h8yPj42ppz7NFs@mail.python.org> Roundup Robot added the comment: New changeset e9b401d46e20 by Victor Stinner in branch 'default': Issue #21932: os.read() now uses a :c:func:`Py_ssize_t` type instead of http://hg.python.org/cpython/rev/e9b401d46e20 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 17:12:57 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jul 2014 15:12:57 +0000 Subject: [issue21932] os.read() must use Py_ssize_t for the size parameter In-Reply-To: <1404740274.81.0.177768774974.issue21932@psf.upfronthosting.co.za> Message-ID: <1405091577.47.0.168167395594.issue21932@psf.upfronthosting.co.za> STINNER Victor added the comment: > Patch LGTM. Thanks for the review. > Here is a test for it. Your test does not pass because Linux truncates the read() size to 2GB - 4096. I tested with /dev/zero device and with a regular file. I wrote a simplified test to just check that size larger than INT_MAX does not emit an OverflowError. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 17:16:38 2014 From: report at bugs.python.org (Brandon Rhodes) Date: Fri, 11 Jul 2014 15:16:38 +0000 Subject: [issue21956] Deleted document should not appear in 3.4 docs In-Reply-To: <1405084031.97.0.312909906567.issue21956@psf.upfronthosting.co.za> Message-ID: <1405091798.89.0.799000038321.issue21956@psf.upfronthosting.co.za> Brandon Rhodes added the comment: The question of whether the document ought to be removed is not at issue here. The document was already deleted, in 2011, by Raymond Hettinger, with the consent of its author. I told that story merely as background. The issue here is that the Python web site is out of date with the documentation in the Mercurial source repository, which is clear because what is clearly marked as an old 3.3-alpha document is being served out of the /3.4/ directory. This is probably because the documentation ?push? script does not remove documents from the site, and can be corrected through a simple "rm" by anyone with access to the server. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 17:21:13 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 11 Jul 2014 15:21:13 +0000 Subject: [issue21956] Doc files deleted from repo are not deleted from docs.python.org. In-Reply-To: <1405084031.97.0.312909906567.issue21956@psf.upfronthosting.co.za> Message-ID: <1405092073.06.0.178695613992.issue21956@psf.upfronthosting.co.za> R. David Murray added the comment: The file no longer exists in the 3.5 tree on the server. Since it isn't linked from the 3.4 index, it may be more effort than it is worth to get someone to delete the file from the 3.4 tree on the server. On the other hand, fixing the publication process to delete files is something the doc team should probably tackle (note: it might be a sphinx issue, but as Brandon says is more likely an issue with the script that publishes the pages to the server). As for revising the howto and re-adding it, that is a separate issue and should be discussed on the original issue 7391, where the possibility was already raised and got some support. ---------- nosy: +r.david.murray title: Deleted document should not appear in 3.4 docs -> Doc files deleted from repo are not deleted from docs.python.org. versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 17:35:34 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Jul 2014 15:35:34 +0000 Subject: [issue21932] os.read() must use Py_ssize_t for the size parameter In-Reply-To: <1404740274.81.0.177768774974.issue21932@psf.upfronthosting.co.za> Message-ID: <3h8yxx1vl6z7NFW@mail.python.org> Roundup Robot added the comment: New changeset 4a7fcd5273ce by Victor Stinner in branch 'default': Issue #21932: Ooops, os.read(fd, size) allocates a buffer of size bytes, even http://hg.python.org/cpython/rev/4a7fcd5273ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 18:15:06 2014 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 11 Jul 2014 16:15:06 +0000 Subject: [issue21927] BOM appears in stdin when using Powershell In-Reply-To: <1404657562.39.0.323212380566.issue21927@psf.upfronthosting.co.za> Message-ID: <1405095306.74.0.191708344513.issue21927@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I get different results that @haypo when testing Powershell on Windows 8.1 with Python 3.4.1: C:\Users\jaraco> chcp 1252 Active code page: 1252 C:\Users\jaraco> $env:PYTHONIOENCODING='' > How you do change the console encoding? Using the chcp command? Yes. I recently discovered that if I use chcp 65001 in my Powershell profile, I can finally see Unicode characters output from my Python programs! > I'm surprised that you get a UTF-8 BOM when the code page 1252 is used. Can you please check that sys.stdin.encoding is "cp1252"? C:\Users\jaraco> echo foo | python -c "import sys; print(sys.stdin.readline())" ???foo C:\Users\jaraco> python -c "import sys; print(sys.stdin.encoding)" cp1252 C:\Users\jaraco> chcp 65001 C:\Users\jaraco> echo foo | python -c "import locale, os; print(os.device_encoding(0), locale.getpreferredencoding(False))" None cp1252 It seems as if something may have changed in Powershell between Windows 7 and 8.1, because my results are inconsistent with your findings. There's a lot more to digest from your response, so I'll going to have to revisit this later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 18:55:16 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Jul 2014 16:55:16 +0000 Subject: [issue16382] Better warnings exception for bad category In-Reply-To: <1351779406.35.0.0813926106632.issue16382@psf.upfronthosting.co.za> Message-ID: <3h90cL6Ry9z7Q7j@mail.python.org> Roundup Robot added the comment: New changeset c4a86fe52006 by Berker Peksag in branch 'default': Issue #16382: Improve exception message of warnings.warn() for bad category. http://hg.python.org/cpython/rev/c4a86fe52006 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 19:09:15 2014 From: report at bugs.python.org (Tal Einat) Date: Fri, 11 Jul 2014 17:09:15 +0000 Subject: [issue20577] IDLE: Remove FormatParagraph's width setting from config dialog In-Reply-To: <1391974116.91.0.4701294104.issue20577@psf.upfronthosting.co.za> Message-ID: <1405098555.78.0.878902403298.issue20577@psf.upfronthosting.co.za> Tal Einat added the comment: So is that a go-ahead to commit to the 2.7 and 3.4 branches (as well as default)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 18:58:14 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 16:58:14 +0000 Subject: [issue20577] IDLE: Remove FormatParagraph's width setting from config dialog In-Reply-To: <1391974116.91.0.4701294104.issue20577@psf.upfronthosting.co.za> Message-ID: <1405097894.21.0.415560290218.issue20577@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The awkwardness of the config design is that idlelib/config-xyz.def files are separate for each version and shared across users (and systems) while .idlerc/config-xyz.def files are separate for each user (account) and shared across versions on the same machine. #20580 is about at least using the existing system-specific sections. Ned also suggested the possibility of version-specific systems. Version specific files are also possible: config-xyz-34.def. I am willing to also tell users in 2.8.9 and 3.4.2 to reset any custom formatwidth setting. But we need a way to *tell* users that, even for 3.5. I would like to replace the useless "Type "copyright", "credits" or "license()" for more information." with "See HELP/NEWS for information about changes in each release." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 18:51:59 2014 From: report at bugs.python.org (Berker Peksag) Date: Fri, 11 Jul 2014 16:51:59 +0000 Subject: [issue16382] Better warnings exception for bad category In-Reply-To: <1351779406.35.0.0813926106632.issue16382@psf.upfronthosting.co.za> Message-ID: <1405097519.14.0.948810102696.issue16382@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch, Phil. ---------- assignee: -> berker.peksag nosy: +r.david.murray resolution: -> fixed stage: patch review -> resolved status: open -> closed type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 19:48:17 2014 From: report at bugs.python.org (Audrey Roy) Date: Fri, 11 Jul 2014 17:48:17 +0000 Subject: [issue21956] Doc files deleted from repo are not deleted from docs.python.org. In-Reply-To: <1405084031.97.0.312909906567.issue21956@psf.upfronthosting.co.za> Message-ID: <1405100897.58.0.728928387819.issue21956@psf.upfronthosting.co.za> Audrey Roy added the comment: > Since it isn't linked from the 3.4 index, it may be more effort than > it is worth to get someone to delete the file from the 3.4 tree on the > server. It would be worthwhile to delete or fix it in the 2.7 and 3.4 tree. It accidentally gets linked, still causing confusion to 2.7 and 3.4 users: https://twitter.com/audreyr/status/487446878837944320 ---------- nosy: +audreyr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 19:20:05 2014 From: report at bugs.python.org (Zachary Turner) Date: Fri, 11 Jul 2014 17:20:05 +0000 Subject: [issue21958] Allow python 2.7 to compile with Visual Studio 2013 Message-ID: <1405099204.33.0.886354272035.issue21958@psf.upfronthosting.co.za> New submission from Zachary Turner: VS2013 and beyond implement C99 math functions. Of interest to Python is the function round(). Python conditionally provides its own implementation of round() based on whether or not HAVE_ROUND is defined, but in no case is HAVE_ROUND ever defined. This leads to a huge spew of warnings when compiling with VS2013, and presumably it also leads to undefined behavior. The attached patch conditionally defines HAVE_ROUND based on _MSC_VER, and additionally provides a VS2013 port in the form of a set of native VS2013 solution and project files. This patch is based against tip of 2.7 release branch. The same fix may or may not still be needed in 3.x ---------- components: Windows files: python.patch keywords: patch messages: 222766 nosy: Zachary.Turner, steve.dower priority: normal severity: normal status: open title: Allow python 2.7 to compile with Visual Studio 2013 type: compile error versions: Python 2.7 Added file: http://bugs.python.org/file35925/python.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 19:46:16 2014 From: report at bugs.python.org (Berker Peksag) Date: Fri, 11 Jul 2014 17:46:16 +0000 Subject: [issue21906] Tools\Scripts\md5sum.py doesn't work in Python 3.x In-Reply-To: <1404315532.22.0.153511853972.issue21906@psf.upfronthosting.co.za> Message-ID: <1405100776.82.0.715603777187.issue21906@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch, Zachary. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 19:32:40 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 17:32:40 +0000 Subject: [issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers. In-Reply-To: <1402787574.99.0.986548729035.issue21765@psf.upfronthosting.co.za> Message-ID: <1405099960.39.0.858333791657.issue21765@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I did not open another issue yet because I did not want to split the general discussion of parsing 3.x unicode-based python. We might also need another issue for idlelib/PyParse, and that might need to come first. What I think is that Idle should have at 1 definition of 'identifier' and not a least 3, in 3 separate places ;-). Hyperparser seems like the most appropriate place if there is to be more than str.isidentifier. That is not to say that equivalents versions might be needed for different uses. ColorDelegator, as it is, needs an re version to be combined with other regexes. I have not looked yet at what UndoDelegator does with its character classification function and whether str.isidentifier could be used. Hyperparsar seems the hardest since it parses backwards. I do not consider this issue to be the highest priority, at the moment, but we have collected enough info with help from Ezio and Martin to do some experiments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 20:10:51 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 18:10:51 +0000 Subject: [issue1074333] On linux, numeric pad input is ignored when numlock off Message-ID: <1405102251.97.0.839589087728.issue1074333@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I verified that this issue does not affect Windows. What about Mac? A patch might best be system-specific in only being active on systems that need it. The lack of complaints other than by one person suggests that it is not a high priority among linux users -- or that they are all resigned to flakey behavior, or that some other linux apps also do not recognize numlock-off keypad keys. ---------- assignee: kbk -> nosy: +terry.reedy priority: normal -> low title: input from numeric pad always dropped when numlock off -> On linux, numeric pad input is ignored when numlock off type: behavior -> enhancement versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 20:31:29 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Jul 2014 18:31:29 +0000 Subject: [issue21906] Tools\Scripts\md5sum.py doesn't work in Python 3.x In-Reply-To: <1404315532.22.0.153511853972.issue21906@psf.upfronthosting.co.za> Message-ID: <3h91q564n8z7LpK@mail.python.org> Roundup Robot added the comment: New changeset eafe4007c999 by Berker Peksag in branch '3.4': Issue #21906: Make Tools/scripts/md5sum.py work in Python 3. http://hg.python.org/cpython/rev/eafe4007c999 New changeset e1913d2780d7 by Berker Peksag in branch 'default': Issue #21906: Merge from 3.4. http://hg.python.org/cpython/rev/e1913d2780d7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 20:13:00 2014 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 11 Jul 2014 18:13:00 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1405102380.41.0.1132489152.issue12067@psf.upfronthosting.co.za> Mark Dickinson added the comment: + In other words, the following expressions should have the same result: + + ``x == y`` and ``not x != y`` + + ``x < y`` and ``not x >= y`` + + ``x > y`` and ``not x <= y`` I think the second and third items here go too far: sets don't obey these rules, for example. Not all uses of comparisons need to force a total ordering. OTOH, you leave out a more fundamental relation, namely that `x < y` and `y > x` should ordinarily give the same result, as should `x <= y` and `y >= x`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 19:44:14 2014 From: report at bugs.python.org (Matthias Klose) Date: Fri, 11 Jul 2014 17:44:14 +0000 Subject: [issue1856] shutdown (exit) can hang or segfault with daemon threads running In-Reply-To: <1200535276.53.0.276618350299.issue1856@psf.upfronthosting.co.za> Message-ID: <1405100654.45.0.225819091958.issue1856@psf.upfronthosting.co.za> Matthias Klose added the comment: http://tracker.ceph.com/issues/8797 reports that the backport to 2.7 causes a regression in ceph. ---------- nosy: +benjamin.peterson, doko status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 20:29:42 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 11 Jul 2014 18:29:42 +0000 Subject: [issue13574] refresh example in doc for Extending and Embedding In-Reply-To: <1323546725.7.0.960922330938.issue13574@psf.upfronthosting.co.za> Message-ID: <1405103382.7.0.433570810227.issue13574@psf.upfronthosting.co.za> Mark Lawrence added the comment: https://docs.python.org/3/extending/newtypes.html still refers to PyInstanceObject, I'm sorry but I've no idea what the replacement is called, so I'll leave this to someone in the know. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 20:26:03 2014 From: report at bugs.python.org (Anselm Kruis) Date: Fri, 11 Jul 2014 18:26:03 +0000 Subject: [issue21959] msi product code for 2.7.8150 not in Tools/msi/uuids.py In-Reply-To: <1405103126.17.0.536868582268.issue21959@psf.upfronthosting.co.za> Message-ID: <1405103163.69.0.664974362193.issue21959@psf.upfronthosting.co.za> Changes by Anselm Kruis : ---------- title: msi product code for 2.7.5150 not in Tools/msi/uuids.py -> msi product code for 2.7.8150 not in Tools/msi/uuids.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 21:17:21 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 11 Jul 2014 19:17:21 +0000 Subject: [issue16516] argparse types (and actions) must be hashable In-Reply-To: <1353468507.9.0.0965555550975.issue16516@psf.upfronthosting.co.za> Message-ID: <1405106241.32.0.0683789282078.issue16516@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Paul can you take a look at this please. ---------- nosy: +BreamoreBoy, paul.j3 versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 20:15:42 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 11 Jul 2014 18:15:42 +0000 Subject: [issue10175] vs version for win32 compilation of extension modules is undocumented. In-Reply-To: <1287795744.75.0.288699311556.issue10175@psf.upfronthosting.co.za> Message-ID: <1405102542.59.0.244727234848.issue10175@psf.upfronthosting.co.za> Mark Lawrence added the comment: There's a table here https://docs.python.org/X/using/windows.html#compiling-python-on-windows which shows what versions you need, where X can be 2 or 3. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 20:12:07 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 18:12:07 +0000 Subject: [issue6092] IDLE: Changed Shortcuts don't show up in menu In-Reply-To: <1243060734.82.0.446246510061.issue6092@psf.upfronthosting.co.za> Message-ID: <1405102327.92.0.807602229663.issue6092@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 20:39:06 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 11 Jul 2014 18:39:06 +0000 Subject: [issue15577] Real argc and argv in embedded interpreter In-Reply-To: <1344371910.44.0.262957922939.issue15577@psf.upfronthosting.co.za> Message-ID: <1405103946.03.0.338685898748.issue15577@psf.upfronthosting.co.za> Mark Lawrence added the comment: Without a patch this issue will go nowhere. I'm assuming that this limitation must have been overcome by other projects using embedded Python. Has anybody got any ideas as to how, I certainly haven't? ---------- nosy: +BreamoreBoy type: crash -> enhancement versions: +Python 3.5 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 20:25:26 2014 From: report at bugs.python.org (Anselm Kruis) Date: Fri, 11 Jul 2014 18:25:26 +0000 Subject: [issue21959] msi product code for 2.7.5150 not in Tools/msi/uuids.py Message-ID: <1405103126.17.0.536868582268.issue21959@psf.upfronthosting.co.za> New submission from Anselm Kruis: The file Tools/msi/uuids.py contains the product codes for all recently released Python 2.x versions except 2.7.8. Without this code it is not possible to recreate the MSI installer using Tools\msi\msi.py. The product code of https://www.python.org/ftp/python/2.7.8/python-2.7.8.msi is '{61121B12-88BD-4261-A6EE-AB32610A56DD}'. By the way. We had exactly the same issue with 2.7.5: #18023 ---------- components: Windows messages: 222774 nosy: anselm.kruis, loewis, zach.ware priority: normal severity: normal status: open title: msi product code for 2.7.5150 not in Tools/msi/uuids.py type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 21:20:32 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 11 Jul 2014 19:20:32 +0000 Subject: [issue12217] Cross-link docs for faulthandler, traceback and pdb In-Reply-To: <1306770313.4.0.799430970978.issue12217@psf.upfronthosting.co.za> Message-ID: <1405106432.26.0.624301932708.issue12217@psf.upfronthosting.co.za> Mark Lawrence added the comment: Who has the technical knowledge to write a patch for this? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 21:48:44 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 11 Jul 2014 19:48:44 +0000 Subject: [issue20135] FAQ need list mutation answers In-Reply-To: <1388979444.45.0.0357103143169.issue20135@psf.upfronthosting.co.za> Message-ID: <1405108124.75.0.352270967726.issue20135@psf.upfronthosting.co.za> R. David Murray added the comment: I think the example would be clarified by speaking about mutation operations versus non-mutation operations. After all: >>> x = [1] >>> y = x >>> x = x + [2] >>> x [1, 2] >>> y [1] At that point including a list += operation would also be beneficial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 21:05:33 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 11 Jul 2014 19:05:33 +0000 Subject: [issue21956] Doc files deleted from repo are not deleted from docs.python.org. In-Reply-To: <1405084031.97.0.312909906567.issue21956@psf.upfronthosting.co.za> Message-ID: <1405105533.16.0.65574478566.issue21956@psf.upfronthosting.co.za> Mark Lawrence added the comment: The docs state 'from module import name1, name2. - This is a ?don?t? which is much weaker than the previous ?don?t?s but is still something you should not do if you don?t have good reasons to do that.' How does that translate into 'The Python docs say that "from module import name1, name2" is an anti-idiom' ? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 20:55:07 2014 From: report at bugs.python.org (Zachary Ware) Date: Fri, 11 Jul 2014 18:55:07 +0000 Subject: [issue21959] msi product code for 2.7.8150 not in Tools/msi/uuids.py In-Reply-To: <1405103126.17.0.536868582268.issue21959@psf.upfronthosting.co.za> Message-ID: <1405104907.33.0.0374341417619.issue21959@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 21:10:32 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 19:10:32 +0000 Subject: [issue21960] Better path handling in Idle find in files Message-ID: <1405105832.92.0.37541050814.issue21960@psf.upfronthosting.co.za> New submission from Terry J. Reedy: I propose two interrelated changes for path handling in Idle's Find in Files feature (Alt-F3). 1. If I hit Alt-F3 in an editor window, the 'In files:' entry box displays a full path, such as "C:\Programs\Python34\Lib\idlelib\*.py". If I do the same in the shell, the display is "*.py" with the prefix, the starting directory containing pythonx.exe, suppressed. (In a repository build, the box is blank, perhaps because the executable is not in the directory containing Assuming 2, I would prefer the full path (in a wider dialog box). 1a. In a repository build, the box is blank, perhaps because the executable is not in the directory containing Lib. Starting with the patch to that directory, rather than pcbuild (on Windows) would be more useful than nothing. 2. FiF uses a generic Output Window. It first displays something like Searching 'Func' in lib/idlelib/idle_test/*.py ... where the path is copied from the 'In file:' path. This common prefix is displayed with all hits lib/idlelib/idle_test\htest.py: 15: or a wrapper function also work... lib/idlelib/idle_test\htest.py: 40: 'msg': "Test editor ... lib/idlelib/idle_test\mock_tk.py: 18: class Mbox_func: If one starts from the editor window, the common prefix is even longer and more noisy and obnoxious. (It is also slightly worse in my repository setup.) C:\Programs\Python34\lib/idlelib/idle_test\htest.py: 15: or a wrapper function also work... C:\Programs\Python34\lib/idlelib/idle_test\htest.py: 40: 'msg': "Test editor ... C:\Programs\Python34\lib/idlelib/idle_test\mock_tk.py: 18: class Mbox_func: which is why I do not especially want change 1 without change 2: delete the common prefix from the listing. htest.py: 15: or a wrapper function also work. The name of wrapper functions, like htest.py: 40: 'msg': "Test editor functions of interest" mock_tk.py: 18: class Mbox_func: The path prefix would have to be an attribute of the window, which should perhaps be an FiF subclass of OutputWindow anyway. The "Go to file/line" function would append the prefix. ---------- messages: 222779 nosy: terry.reedy priority: normal severity: normal status: open title: Better path handling in Idle find in files type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 21:59:49 2014 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Jul 2014 19:59:49 +0000 Subject: [issue21957] ASCII Formfeed (FF) & ASCII Vertical Tab (VT) Have Hexadecimal Representation In-Reply-To: <1405088980.95.0.801380317459.issue21957@psf.upfronthosting.co.za> Message-ID: <1405108789.78.0.0247967643165.issue21957@psf.upfronthosting.co.za> Ned Deily added the comment: I am not sure why the string reprs for FF and VT are not special-cased to \f and \v but they are not alone: \a (BEL) and \b (BS) are also not special-cased. My guess is that it was for performance reasons but perhaps someone with a longer memory can comment. As now implemented, supporting these special cases would add checks for each for every character being encoded, a critical path for many applications, and in most cases, CR, LF, and HT are much more likely to be encountered. I also don't see where this behavior is documented anywhere but it goes back a long way, probably to the earliest days of Python and, in general, Python does not make any promises about which of any valid representations for particular characters will be used. While, on the one hand, it would make some string reprs look cleaner, on the other hand there are downsides: the risks of breaking existing code that might depend on the long-standing behavior, the potential performance impact that would need to be measured and mitigated, and the cost to develop and test. In balance, I think the risks outweigh any benefit so I think we should not pursue this change. If others feel differently, feel free to reopen. In any case, thanks for the suggestion. ---------- nosy: +ned.deily resolution: -> rejected stage: -> resolved status: open -> closed versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 21:57:46 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 19:57:46 +0000 Subject: [issue20577] IDLE: Remove FormatParagraph's width setting from config dialog In-Reply-To: <1391974116.91.0.4701294104.issue20577@psf.upfronthosting.co.za> Message-ID: <1405108666.5.0.858887963124.issue20577@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What I meant was 'wait until we have an new announcement mechanism', which we very much need anyway, and then apply to all three. And that should have been 'Help/What's New' in the splash announcement. I opened #21961 for this and will try to have a minimal document is a day or so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 21:24:05 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 11 Jul 2014 19:24:05 +0000 Subject: [issue16494] Add a method on importlib.SourceLoader for creating bytecode file format/container In-Reply-To: <1353168017.12.0.0693705888433.issue16494@psf.upfronthosting.co.za> Message-ID: <1405106645.65.0.0923785195682.issue16494@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Brett as #15627 is in would you like to follow up on this. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 21:19:51 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 19:19:51 +0000 Subject: [issue21960] Better path handling in Idle find in files In-Reply-To: <1405105832.92.0.37541050814.issue21960@psf.upfronthosting.co.za> Message-ID: <1405106391.94.0.052416626118.issue21960@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 21:56:08 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 19:56:08 +0000 Subject: [issue21961] Add What's New for Idle. Message-ID: <1405108568.05.0.859499936838.issue21961@psf.upfronthosting.co.za> New submission from Terry J. Reedy: For the stdlib in general, What's New in x.y.0 is sufficient because there is not supposed to be anything new in bugfix releases except for bugfixes. 2.7 has a security enhancement exemption, and a corresponding section in the 2.7 What's New for security enhancements in maintenance releases. A similar section for Idle could be added to What's New for each Python version. But thinking about it, I would rather have a separate document listed in the Idle help menu and advertised in the Idle sign-on message. In particular, I would replace the useless "Type "copyright", "credits" or "license()" for more information." with "See HELP/WHAT'S NEW for information about changes in each release." ---------- assignee: terry.reedy components: IDLE messages: 222785 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Add What's New for Idle. type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 21:34:47 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 19:34:47 +0000 Subject: [issue14929] IDLE crashes on *Edit / Find in files ...* command In-Reply-To: <1338151641.58.0.68836434552.issue14929@psf.upfronthosting.co.za> Message-ID: <1405107287.16.0.590854191202.issue14929@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The 'In files:' field specifies the search directory. I opened #21960 about it being more informative when using Find in Files from the Shell window. Perfect encoding detection is a fantasy; decent encoding detection by heuristics is slow and not something to do when searchings 100s, 1000s, or more files. What would be reasonable is to check for an encoding cookie. Idle already does this when opening a .py file in the editor. That code should be encapsulated if it is not and reused. An encoding field for non-python files would be possible, but is a lesser priority to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 21:35:02 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 19:35:02 +0000 Subject: [issue14929] IDLE crashes on *Edit / Find in files ...* command In-Reply-To: <1338151641.58.0.68836434552.issue14929@psf.upfronthosting.co.za> Message-ID: <1405107302.21.0.952808392047.issue14929@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: needs patch -> test needed versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 22:11:16 2014 From: report at bugs.python.org (Brandon Rhodes) Date: Fri, 11 Jul 2014 20:11:16 +0000 Subject: [issue21956] Doc files deleted from repo are not deleted from docs.python.org. In-Reply-To: <1405084031.97.0.312909906567.issue21956@psf.upfronthosting.co.za> Message-ID: <1405109476.93.0.094929814012.issue21956@psf.upfronthosting.co.za> Brandon Rhodes added the comment: I do not find it unreasonable, on a page of Python idioms, the we would call an example that explicitly says "Don't" in its title an "anti-idiom." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 21:58:31 2014 From: report at bugs.python.org (Audrey Roy) Date: Fri, 11 Jul 2014 19:58:31 +0000 Subject: [issue21956] Doc files deleted from repo are not deleted from docs.python.org. In-Reply-To: <1405084031.97.0.312909906567.issue21956@psf.upfronthosting.co.za> Message-ID: <1405108711.43.0.929702865541.issue21956@psf.upfronthosting.co.za> Audrey Roy added the comment: Mark, I and a number of others simply misinterpreted the text in that section. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 22:46:16 2014 From: report at bugs.python.org (Zach Byrne) Date: Fri, 11 Jul 2014 20:46:16 +0000 Subject: [issue21323] CGI HTTP server not running scripts from subdirectories In-Reply-To: <1398107131.28.0.812868414728.issue21323@psf.upfronthosting.co.za> Message-ID: <1405111576.44.0.651361871174.issue21323@psf.upfronthosting.co.za> Zach Byrne added the comment: Done and done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 22:23:50 2014 From: report at bugs.python.org (Alexandre JABORSKA) Date: Fri, 11 Jul 2014 20:23:50 +0000 Subject: [issue21962] No timeout for asyncio.Event.wait() or asyncio.Condition.wait() ? Message-ID: <1405110230.82.0.890171299066.issue21962@psf.upfronthosting.co.za> New submission from Alexandre JABORSKA: Hi, Nor asyncio.Event.wait() neither asyncio.Condition.wait() (or .wait_for()) has a timeout parameter, while threading.Event.wait() has one. A timeout can be specified for the whole task using asyncio.wait_for() but it's tricky. I guess asyncio implementation could allow a timeout parameter (but I've not looked at the code yet). Maybe is this a feature ? ---------- components: asyncio messages: 222791 nosy: ajaborsk, gvanrossum, haypo, yselivanov priority: normal severity: normal status: open title: No timeout for asyncio.Event.wait() or asyncio.Condition.wait() ? type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 22:31:32 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Jul 2014 20:31:32 +0000 Subject: [issue21937] IDLE interactive window doesn't display unsaved-indicator In-Reply-To: <1404794523.71.0.976776826141.issue21937@psf.upfronthosting.co.za> Message-ID: <1405110692.33.0.974513998033.issue21937@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In installed 3.4.1 on Win 7, I *do* get the unsaved * back when typing. It disappears again when I hit return. So on this system, the meaning seems to be 'unsubmitted code'. Saving in the middle of a line inserts '\n' before saving (but does not submit for execution) and also removes *. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 22:46:43 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jul 2014 20:46:43 +0000 Subject: [issue21962] No timeout for asyncio.Event.wait() or asyncio.Condition.wait() ? In-Reply-To: <1405110230.82.0.890171299066.issue21962@psf.upfronthosting.co.za> Message-ID: <1405111603.47.0.51544496624.issue21962@psf.upfronthosting.co.za> STINNER Victor added the comment: > A timeout can be specified for the whole task using asyncio.wait_for() but it's tricky. Exactly, you can use wait_for() on any async operation. Why would you like to add a timeout on each async operation, while wait_for() is available? Replace event.wait(timeout=60) with wait_for(event.wait(), 60). Maybe we should put more examples using wait_for() on operations commonly used with a timeout? Guido proposed to add a timeout for some operations, but with a different meaning: maximum time without getting new events, each new event resets the timeout. It was maybe on StreamReader.readline() which uses multiple async read until it gets a full line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 23:09:55 2014 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Jul 2014 21:09:55 +0000 Subject: [issue21963] 2.7.8 backport of Issue1856 (avoid daemon thread problems at shutdown) breaks ceph In-Reply-To: <1405112765.87.0.0636941236839.issue21963@psf.upfronthosting.co.za> Message-ID: <1405112995.96.0.677494761773.issue21963@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: -ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 23:25:45 2014 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 11 Jul 2014 21:25:45 +0000 Subject: [issue14714] PEP 414 tokenizing hook does not preserve tabs In-Reply-To: <1336059831.47.0.0507292871504.issue14714@psf.upfronthosting.co.za> Message-ID: <1405113945.32.0.0238359223098.issue14714@psf.upfronthosting.co.za> Vinay Sajip added the comment: > How does a piece of code on github relate to the core Python code in Mercurial? Tangentially. Armin Ronacher is the developer of both the GitHub code and the PEP 414 implementation, and it's referenced in the PEP. It doesn't make sense for any other Python core developer to worry about it. If Armin wants to close the issue, it's up to him. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 23:06:05 2014 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Jul 2014 21:06:05 +0000 Subject: [issue21963] 2.7.8 backport of Issue1856 (avoid daemon thread problems at shutdown) breaks ceph Message-ID: <1405112765.87.0.0636941236839.issue21963@psf.upfronthosting.co.za> New submission from Ned Deily: doko in msg222768 of Issue1856: http://tracker.ceph.com/issues/8797 reports that the backport to 2.7 causes a regression in ceph. ---------- messages: 222795 nosy: benjamin.peterson, doko, ned.deily priority: release blocker severity: normal stage: needs patch status: open title: 2.7.8 backport of Issue1856 (avoid daemon thread problems at shutdown) breaks ceph versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 23:15:09 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 11 Jul 2014 21:15:09 +0000 Subject: [issue14143] test_ntpath failure on Windows In-Reply-To: <1330369660.88.0.127957807148.issue14143@psf.upfronthosting.co.za> Message-ID: <1405113309.16.0.771152311986.issue14143@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've just taken a look at the Windows buildbots and can't find anything relevant to this so can we close it. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 23:29:16 2014 From: report at bugs.python.org (Armin Ronacher) Date: Fri, 11 Jul 2014 21:29:16 +0000 Subject: [issue14714] PEP 414 tokenizing hook does not preserve tabs In-Reply-To: <1336059831.47.0.0507292871504.issue14714@psf.upfronthosting.co.za> Message-ID: <1405114156.78.0.140530679072.issue14714@psf.upfronthosting.co.za> Armin Ronacher added the comment: I hereby close this issue which is two years old. The only point of the tokenizer thing was to support Python 3.2 which many libraries already have stopped supporting anyways. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 23:29:25 2014 From: report at bugs.python.org (Armin Ronacher) Date: Fri, 11 Jul 2014 21:29:25 +0000 Subject: [issue14714] PEP 414 tokenizing hook does not preserve tabs In-Reply-To: <1336059831.47.0.0507292871504.issue14714@psf.upfronthosting.co.za> Message-ID: <1405114165.34.0.748701586823.issue14714@psf.upfronthosting.co.za> Changes by Armin Ronacher : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 23:08:57 2014 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Jul 2014 21:08:57 +0000 Subject: [issue1856] shutdown (exit) can hang or segfault with daemon threads running In-Reply-To: <1200535276.53.0.276618350299.issue1856@psf.upfronthosting.co.za> Message-ID: <1405112937.84.0.574798289235.issue1856@psf.upfronthosting.co.za> Ned Deily added the comment: I've opened Issue21963 to track the 2.7.8 regression. Please continue any discussion there. ---------- nosy: +ned.deily status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 23:28:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 11 Jul 2014 21:28:14 +0000 Subject: [issue12669] test_curses skipped on buildbots In-Reply-To: <1312149135.76.0.0319517534091.issue12669@psf.upfronthosting.co.za> Message-ID: <1405114094.87.0.128157764336.issue12669@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 11 23:57:20 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jul 2014 21:57:20 +0000 Subject: [issue21963] 2.7.8 backport of Issue1856 (avoid daemon thread problems at shutdown) breaks ceph In-Reply-To: <1405112765.87.0.0636941236839.issue21963@psf.upfronthosting.co.za> Message-ID: <1405115840.05.0.186919905858.issue21963@psf.upfronthosting.co.za> STINNER Victor added the comment: Does anyone have a *simple* script to reproduce the regression? The changeset 7741d0dd66ca looks good to me, Python 3 does the same thing since Python 3.2 (the new GIL). Anyway, daemon threads are evil :-( Expecting them to exit cleanly automatically is not good. Last time I tried to improve code to cleanup Python at exit in Python 3.4, I also had a regression (just before the release of Python 3.4.0): see the issue #21788. ---------- nosy: +haypo, neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 00:00:17 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jul 2014 22:00:17 +0000 Subject: [issue21963] 2.7.8 backport of Issue1856 (avoid daemon thread problems at shutdown) breaks ceph In-Reply-To: <1405112765.87.0.0636941236839.issue21963@psf.upfronthosting.co.za> Message-ID: <1405116017.74.0.849759852325.issue21963@psf.upfronthosting.co.za> STINNER Victor added the comment: > The changeset 7741d0dd66ca looks good to me, Python 3 does the same thing since Python 3.2 (the new GIL). Oh, I forgot to say that the simplest way to fix the regression is to revert this commit... As I wrote modifying the code to cleanup Python at exit is risky, and it's maybe too late to do that in Python 2.7? The risk of regression caused by 7741d0dd66ca is maybe higher than the benefit of the enhancement? :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 00:13:04 2014 From: report at bugs.python.org (Steve Dower) Date: Fri, 11 Jul 2014 22:13:04 +0000 Subject: [issue21958] Allow python 2.7 to compile with Visual Studio 2013 In-Reply-To: <1405099204.33.0.886354272035.issue21958@psf.upfronthosting.co.za> Message-ID: <1405116784.08.0.444784892806.issue21958@psf.upfronthosting.co.za> Steve Dower added the comment: The fix is certainly needed in default, though I already have it in my fork for porting to VC14. I'm okay with the HAVE_ROUND change, but I think the VS2013 project files are better off kept separate. We won't be rebuilding 2.x with a newer compiler, so they don't belong in hg.python.org. ---------- nosy: +tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 00:16:43 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 11 Jul 2014 22:16:43 +0000 Subject: [issue7063] Memory errors in array.array In-Reply-To: <1254730349.27.0.71088310024.issue7063@psf.upfronthosting.co.za> Message-ID: <1405117003.93.0.0882159109297.issue7063@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've tested the reworked patch on Windows 7, ran 718 tests with 1 skipped both before and after applying the patch. ---------- nosy: +BreamoreBoy Added file: http://bugs.python.org/file35926/Issue7063.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 00:23:35 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 11 Jul 2014 22:23:35 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1405117415.85.0.615063651451.issue21955@psf.upfronthosting.co.za> Josh Rosenberg added the comment: On: if (... a+b will not overflow ...) { Since you limited the optimization for addition to single digit numbers, at least for addition and subtraction, overflow is impossible. The signed twodigit you use for the result is guaranteed to be able to store far larger numbers than addition of single digits can produce. In fact, due to the extra wasted bit on large (30 bit) digits, if you used a fixed width 32 bit type for addition/subtraction, and a fixed width 64 bit type for multiplication, overflow would be impossible regardless of whether you used 15 or 30 bit digits. On a related note: Presumably you should check if the abs(size) <= 1 like in longobject.c, not == 1, or you omit the fast path for 0. Doesn't come up much, not worth paying extra to optimize, but it costs nothing to handle it. ---------- nosy: +josh.rosenberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 00:24:15 2014 From: report at bugs.python.org (Steve Dower) Date: Fri, 11 Jul 2014 22:24:15 +0000 Subject: [issue21959] msi product code for 2.7.8150 not in Tools/msi/uuids.py In-Reply-To: <1405103126.17.0.536868582268.issue21959@psf.upfronthosting.co.za> Message-ID: <1405117455.9.0.860336277512.issue21959@psf.upfronthosting.co.za> Steve Dower added the comment: Yeah, I patched my msi.py to get the build going but haven't checked it in (it was already after the tag...). I'll fill out the next few minor versions and check it in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 00:24:34 2014 From: report at bugs.python.org (Steve Dower) Date: Fri, 11 Jul 2014 22:24:34 +0000 Subject: [issue21953] pythonrun.c does not check std streams the same as fileio.c In-Reply-To: <1405029725.94.0.581966464433.issue21953@psf.upfronthosting.co.za> Message-ID: <1405117474.12.0.406227980793.issue21953@psf.upfronthosting.co.za> Steve Dower added the comment: This is definitely the same as #17797, so I'll close this as a dup. Over on that issue, it's confirmed as fixed in VC14 (and it is - I've checked). ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 00:26:13 2014 From: report at bugs.python.org (Zachary Ware) Date: Fri, 11 Jul 2014 22:26:13 +0000 Subject: [issue21953] pythonrun.c does not check std streams the same as fileio.c In-Reply-To: <1405029725.94.0.581966464433.issue21953@psf.upfronthosting.co.za> Message-ID: <1405117573.45.0.56005738331.issue21953@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 00:29:22 2014 From: report at bugs.python.org (Zachary Ware) Date: Fri, 11 Jul 2014 22:29:22 +0000 Subject: [issue21958] Allow python 2.7 to compile with Visual Studio 2013 In-Reply-To: <1405099204.33.0.886354272035.issue21958@psf.upfronthosting.co.za> Message-ID: <1405117762.88.0.400293057823.issue21958@psf.upfronthosting.co.za> Zachary Ware added the comment: Agreed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 00:37:00 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Jul 2014 22:37:00 +0000 Subject: [issue21959] msi product code for 2.7.8150 not in Tools/msi/uuids.py In-Reply-To: <1405103126.17.0.536868582268.issue21959@psf.upfronthosting.co.za> Message-ID: <3h98JD150QzSxb@mail.python.org> Roundup Robot added the comment: New changeset cc8849331528 by Steve Dower in branch '2.7': #21959: Adds 2.7.8 product code to Tools/msi/uuids.py http://hg.python.org/cpython/rev/cc8849331528 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 00:53:00 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 11 Jul 2014 22:53:00 +0000 Subject: [issue10213] tests shouldn't fail with unset timezone In-Reply-To: <1288180286.09.0.61662115749.issue10213@psf.upfronthosting.co.za> Message-ID: <1405119180.07.0.486145575087.issue10213@psf.upfronthosting.co.za> Mark Lawrence added the comment: Given the extended EOL I'd assume that this is worth doing for 2.7. ---------- nosy: +BreamoreBoy versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 01:00:57 2014 From: report at bugs.python.org (Lita Cho) Date: Fri, 11 Jul 2014 23:00:57 +0000 Subject: [issue21868] Tbuffer in turtle allows negative size In-Reply-To: <1403680225.27.0.922926576552.issue21868@psf.upfronthosting.co.za> Message-ID: <1405119657.19.0.784742822684.issue21868@psf.upfronthosting.co.za> Lita Cho added the comment: Hi Raymond! Just wanted to check if you had time to test this yet. I ran the tests through the Turtle tests I wrote (issue21914), but those are still pending approval. This is off topic, but I also didn't realize till now that you gave a talk about "Transforming Code into Beautiful, Idiomatic Python", which is super awesome! Getting a patch reviewed by you is super exciting! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 01:06:27 2014 From: report at bugs.python.org (hakril) Date: Fri, 11 Jul 2014 23:06:27 +0000 Subject: [issue21964] inconsistency in list-generator comprehension with yield(-from) Message-ID: <1405119987.38.0.925003339613.issue21964@psf.upfronthosting.co.za> New submission from hakril: Will playing with generators and `yield from` I found some inconsistency. list comprehension with yield(-from) would return a generator. generator comprehension would yield some None in the middle of the expected values. Examples: l = ["abc", range(3)] g1 = [(yield from i) for i in l] print(g) at 0x7f5ebd58b690> print(list(g)) ['a', 'b', 'c', 0, 1, 2] # this result is super cool ! g2 = ((yield from i) for i in l) print(g2) at 0x7f5ebd58b6e0> print(list(g2)) ['a', 'b', 'c', None, 0, 1, 2, None] For `g1`: it returns a generator because the listcomp contains a `yield from`. For `g2` it append None because it yield the return value of `yield from i`. It could be rewritten as: def comp(x): for i in x: yield (yield from i) ---------- components: Interpreter Core messages: 222811 nosy: hakril priority: normal severity: normal status: open title: inconsistency in list-generator comprehension with yield(-from) type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 01:31:55 2014 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 11 Jul 2014 23:31:55 +0000 Subject: [issue20135] FAQ need list mutation answers In-Reply-To: <1388979444.45.0.0357103143169.issue20135@psf.upfronthosting.co.za> Message-ID: <1405121515.23.0.115486651722.issue20135@psf.upfronthosting.co.za> Ezio Melotti added the comment: Good point, I'll try to add that to the FAQ. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 02:23:40 2014 From: report at bugs.python.org (Lita Cho) Date: Sat, 12 Jul 2014 00:23:40 +0000 Subject: [issue3015] tkinter with wantobjects=False has been broken for some time In-Reply-To: <1212187898.67.0.391803496997.issue3015@psf.upfronthosting.co.za> Message-ID: <1405124620.69.0.868929961257.issue3015@psf.upfronthosting.co.za> Lita Cho added the comment: That's perfect. I agree that this issue is closed! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 02:33:46 2014 From: report at bugs.python.org (Lita Cho) Date: Sat, 12 Jul 2014 00:33:46 +0000 Subject: [issue21655] Write Unit Test for Vec2 and TNavigator class in the Turtle Module In-Reply-To: <1401865520.46.0.61494157732.issue21655@psf.upfronthosting.co.za> Message-ID: <1405125226.32.0.302124063074.issue21655@psf.upfronthosting.co.za> Lita Cho added the comment: Ingrid and I combined our tests. The patch now lives here: http://bugs.python.org/issue21916 ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 02:36:18 2014 From: report at bugs.python.org (Lita Cho) Date: Sat, 12 Jul 2014 00:36:18 +0000 Subject: [issue17172] Add turtledemo to IDLE menu In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za> Message-ID: <1405125378.75.0.230987937065.issue17172@psf.upfronthosting.co.za> Lita Cho added the comment: I personally think it would be better to check to see if the turtledemo exists during startup, and if so, add the menu entry. Otherwise, don't add it when loading up IDLE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 02:47:22 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 00:47:22 +0000 Subject: [issue4453] MSI installer shows error message if "Compile .py files to bytecode" option is selected In-Reply-To: <1227885798.23.0.30127507321.issue4453@psf.upfronthosting.co.za> Message-ID: <1405126042.46.0.505877277491.issue4453@psf.upfronthosting.co.za> Mark Lawrence added the comment: I don't recall ever seeing this problem. ---------- nosy: +BreamoreBoy, steve.dower, zach.ware versions: +Python 3.4, Python 3.5 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 03:03:50 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 01:03:50 +0000 Subject: [issue21084] IDLE can't deal with characters above the range (U+0000-U+FFFF) In-Reply-To: <1396008065.84.0.00802001667749.issue21084@psf.upfronthosting.co.za> Message-ID: <1405127030.19.0.904876798693.issue21084@psf.upfronthosting.co.za> Mark Lawrence added the comment: Accidentally set to pending I take it. ---------- nosy: +BreamoreBoy status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 03:09:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 01:09:15 +0000 Subject: [issue16221] tokenize.untokenize() "compat" mode misses the encoding when using an iterator In-Reply-To: <1350192416.31.0.110132465833.issue16221@psf.upfronthosting.co.za> Message-ID: <1405127355.61.0.291607947439.issue16221@psf.upfronthosting.co.za> Mark Lawrence added the comment: #16224 has been closed as a duplicate of #8478. ---------- nosy: +BreamoreBoy status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 03:14:53 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 01:14:53 +0000 Subject: [issue12588] test_capi.test_subinterps() failed on OpenBSD (powerpc) In-Reply-To: <1311111401.9.0.18298571301.issue12588@psf.upfronthosting.co.za> Message-ID: <1405127693.54.0.521826390455.issue12588@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is this test failure still relevant three years on? ---------- nosy: +BreamoreBoy status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 03:27:19 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 01:27:19 +0000 Subject: [issue15883] Add Py_errno to work around multiple CRT issue In-Reply-To: <1347111302.92.0.306708953598.issue15883@psf.upfronthosting.co.za> Message-ID: <1405128439.44.0.468266950363.issue15883@psf.upfronthosting.co.za> Mark Lawrence added the comment: Am I imagining things or have I read that the Windows CRT is going to remain stable in the future, meaning this work would no longer be needed. ---------- components: +Windows nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 03:36:18 2014 From: report at bugs.python.org (Zachary Ware) Date: Sat, 12 Jul 2014 01:36:18 +0000 Subject: [issue4453] MSI installer shows error message if "Compile .py files to bytecode" option is selected In-Reply-To: <1227885798.23.0.30127507321.issue4453@psf.upfronthosting.co.za> Message-ID: <1405128978.48.0.860406118919.issue4453@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file18370/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 04:16:24 2014 From: report at bugs.python.org (Zachary Turner) Date: Sat, 12 Jul 2014 02:16:24 +0000 Subject: [issue21958] Allow python 2.7 to compile with Visual Studio 2013 In-Reply-To: <1405099204.33.0.886354272035.issue21958@psf.upfronthosting.co.za> Message-ID: <1405131384.0.0.846104953593.issue21958@psf.upfronthosting.co.za> Zachary Turner added the comment: That's fine with me, the HAVE_ROUND is the important change anyway. Do I need to re-upload a new patch, or are you able to just delete the VS2013 project files portion of the patch and apply the HAVE_ROUND portion? And do I push the patch myself or does someone need to push it on my behalf? Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 04:22:51 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Jul 2014 02:22:51 +0000 Subject: [issue21599] Argument transport in attach and detach method in Server class in base_events file is not used In-Reply-To: <1401333377.1.0.573803029837.issue21599@psf.upfronthosting.co.za> Message-ID: <1405131771.0.0.541728492275.issue21599@psf.upfronthosting.co.za> STINNER Victor added the comment: Issue fixed in changesets e6198242a537 (Python 3.4) and 5a299c3ec120 (Python 3.5). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 06:52:34 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 12 Jul 2014 04:52:34 +0000 Subject: [issue21913] threading.Condition.wait() is not interruptible in Python 2.7 In-Reply-To: <1404434419.41.0.802359833018.issue21913@psf.upfronthosting.co.za> Message-ID: <1405140754.47.0.390837652431.issue21913@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > So do we agree that the resolution for this is "wont fix"? Yes. We don't want to backport this (we've had enough regressions already, and people have been living withut loc interruptibility for a long time before Python 3). ---------- resolution: -> wont fix stage: -> resolved status: open -> closed title: Possible deadlock in threading.Condition.wait() in Python 2.7.7 -> threading.Condition.wait() is not interruptible in Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 08:52:18 2014 From: report at bugs.python.org (Case Van Horsen) Date: Sat, 12 Jul 2014 06:52:18 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1405147938.3.0.600032084162.issue21922@psf.upfronthosting.co.za> Changes by Case Van Horsen : ---------- nosy: +casevh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 09:19:28 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 Jul 2014 07:19:28 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1405149568.79.0.855947716464.issue21955@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Let's try. As I understand, issue10044 was rejected because it complicates the code too much. May be new attempt will be more successful. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 09:49:23 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 Jul 2014 07:49:23 +0000 Subject: [issue11077] Tkinter is not thread safe In-Reply-To: <1296488432.58.0.0945320697853.issue11077@psf.upfronthosting.co.za> Message-ID: <1405151363.6.0.11184121093.issue11077@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I can't reproduce the bug on 2.7.8+, but on 2.7.3 I sometimes got messages like "Exception in thread Thread-26 (most likely raised during interpreter shutdown):" or: File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 2204, in create_line File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 2184, in _create : 'NoneType' object is not callable This points to shutdown issue. When TkinterCrash2.py call quit(), other threads are still work. And when modules (including Tkinter and __main__) are cleaned, they try to call global functions which are set to None. After fixing TkinterCrash2.py to not invoke any code during shutdown, error messages on 2.7.3 gone. I don't see any bugs in Tkinter exposed by this script, only a bug in the script itself. Here is a script with quick and dirty fix. This solution is not perfect, there is small chance of race conditions (happened once in about 500 runs). Correct solution should be more complicated. If there no other errors in TkinterCrash2-2.py, this issue can be closed. ---------- Added file: http://bugs.python.org/file35927/TkinterCrash2-2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 10:23:26 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 12 Jul 2014 08:23:26 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1405153406.25.0.411785411153.issue21922@psf.upfronthosting.co.za> Mark Dickinson added the comment: ... and if there's one person who's *very* well placed to comment on the ease or difficulty of keeping up with GMP/MPIR (especially on Windows), it's Case Van Horsen, who I notice has recently added himself to the nosy. @casevh: any comments? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 10:43:08 2014 From: report at bugs.python.org (Landry Breuil) Date: Sat, 12 Jul 2014 08:43:08 +0000 Subject: [issue12588] test_capi.test_subinterps() failed on OpenBSD (powerpc) In-Reply-To: <1311111401.9.0.18298571301.issue12588@psf.upfronthosting.co.za> Message-ID: <1405154588.47.0.882459868778.issue12588@psf.upfronthosting.co.za> Landry Breuil added the comment: Seems something in between fixed it, because it works with 3.4.1. Can test 3.3 if needed. mikey:/usr/obj/tmpfs/ports/Python-3.4.1/Python-3.4.1/ $LD_LIBRARY_PATH=. ./Modules/_testembed --- Pass 0 --- interp 0xac003e00, thread state 0xb4380f80: id(modules) = 2813069072 interp 0xa84b8480, thread state 0xa897cd00: id(modules) = 2840181576 interp 0xa84b8dc0, thread state 0xb1a0b700: id(modules) = 2840181696 interp 0xb1efb540, thread state 0xaec09880: id(modules) = 2929755640 interp 0xac003e00, thread state 0xb4380f80: id(modules) = 2813069072 --- Pass 1 --- interp 0xab4f1780, thread state 0xaec09000: id(modules) = 2813071072 interp 0xac0035c0, thread state 0xaae20080: id(modules) = 2981253808 interp 0xb2bd6e00, thread state 0xaac10a00: id(modules) = 2981254728 interp 0xab4f1880, thread state 0xb0f31d00: id(modules) = 2862169464 interp 0xab4f1780, thread state 0xaec09000: id(modules) = 2813071072 --- Pass 2 --- interp 0xb3731e00, thread state 0xb3a6be00: id(modules) = 2812938720 interp 0xa8842e40, thread state 0xaac10c80: id(modules) = 2981325640 interp 0xab4f1500, thread state 0xaec09a80: id(modules) = 2981325160 interp 0xb3731b00, thread state 0xaec06580: id(modules) = 3039539968 interp 0xb3731e00, thread state 0xb3a6be00: id(modules) = 2812938720 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 10:48:12 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 Jul 2014 08:48:12 +0000 Subject: [issue21932] os.read() must use Py_ssize_t for the size parameter In-Reply-To: <1404740274.81.0.177768774974.issue21932@psf.upfronthosting.co.za> Message-ID: <1405154892.6.0.410647751921.issue21932@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Failed on 32-bit: ====================================================================== ERROR: test_large_read (test.test_os.FileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/support/__init__.py", line 1592, in wrapper return f(self, maxsize) File "/home/serhiy/py/cpython/Lib/test/test_os.py", line 136, in test_large_read data = os.read(fp.fileno(), size) OverflowError: Python int too large to convert to C ssize_t ---------------------------------------------------------------------- Re-add the @unittest.skipUnless(INT_MAX < PY_SSIZE_T_MAX, "needs INT_MAX < PY_SSIZE_T_MAX") decorator (between cpython_only and bigmemtest). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 11:01:30 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Jul 2014 09:01:30 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405149568.79.0.855947716464.issue21955@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Serhiy Storchaka added the comment: > Let's try. As I understand, issue10044 was rejected because it complicates the code too much. May be new attempt will be more successful. I read that Mark rejected the issue #10044 because it introduces an undefined behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 11:01:55 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Jul 2014 09:01:55 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: Message-ID: STINNER Victor added the comment: I'm not interested to work on this issue right now. If anyone is interested, please go ahead! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 11:04:58 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Jul 2014 09:04:58 +0000 Subject: [issue21932] os.read() must use Py_ssize_t for the size parameter In-Reply-To: <1404740274.81.0.177768774974.issue21932@psf.upfronthosting.co.za> Message-ID: <3h9QDp0BNtz7Lk3@mail.python.org> Roundup Robot added the comment: New changeset 880e2cdac8b1 by Victor Stinner in branch 'default': Issue #21932: Skip test_os.test_large_read() on 32-bit system http://hg.python.org/cpython/rev/880e2cdac8b1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 11:05:58 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Jul 2014 09:05:58 +0000 Subject: [issue21932] os.read() must use Py_ssize_t for the size parameter In-Reply-To: <1404740274.81.0.177768774974.issue21932@psf.upfronthosting.co.za> Message-ID: <1405155958.69.0.353947421498.issue21932@psf.upfronthosting.co.za> STINNER Victor added the comment: > Re-add the @unittest.skipUnless(INT_MAX < PY_SSIZE_T_MAX, "needs INT_MAX < PY_SSIZE_T_MAX") decorator (between cpython_only and bigmemtest). Oh, I removed it because I thought that it was useless. I didn't understand the purpose of the test. I added a comment. Thanks for the report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 11:08:55 2014 From: report at bugs.python.org (Geert Jansen) Date: Sat, 12 Jul 2014 09:08:55 +0000 Subject: [issue21965] Add support for Memory BIO to _ssl Message-ID: <1405156134.57.0.513965198344.issue21965@psf.upfronthosting.co.za> New submission from Geert Jansen: The attached patch adds a _MemoryBIO type to _ssl, and a _wrap_bio() method to _SSLContext. The patch also includes tests. For now I kept _wrap_bio() and _MemoryBIO semi-private. The reason is that it returns an _SSLSocket instead of an SSLSocket and this type has not been exposed before as part of the public API. Changing the result of _wrap_bio to return an SSLSocket is not appropriate IMHO because it should not inherit from socket.socket which would waste a file descriptor and None of the IO methods are relevant. The patch works for me and gives no errors with --with-pydebug. I've also used it in an experimental branch of Gruvi and all the tests pass there too. ---------- files: ssl-memory-bio.patch keywords: patch messages: 222833 nosy: geertj priority: normal severity: normal status: open title: Add support for Memory BIO to _ssl type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file35928/ssl-memory-bio.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 13:20:02 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 Jul 2014 11:20:02 +0000 Subject: [issue21084] IDLE can't deal with characters above the range (U+0000-U+FFFF) In-Reply-To: <1396008065.84.0.00802001667749.issue21084@psf.upfronthosting.co.za> Message-ID: <1405164002.04.0.786109192578.issue21084@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, this is very similar to issue13153. Both these issues can have same solution or can have different solutions. This issue relates to more realistic situation and therefore is more important. Here is simple and almost working solution for this issue. Unfortunately it works incorrectly when astral characters are encountered in raw string literals. More mature solution should parse sources and convert raw string literals containing astral characters to non-raw string literals. But this will not work with invalid Python files and non-Python files. I afraid this issue has not perfect solution. The question is which imperfect solution and compromise we will decided enough acceptable. ---------- assignee: -> serhiy.storchaka components: +Tkinter, Unicode keywords: +patch nosy: +haypo versions: +Python 2.7, Python 3.5 -Python 3.3 Added file: http://bugs.python.org/file35929/idle_fix_non_bmp.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 13:28:14 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 Jul 2014 11:28:14 +0000 Subject: [issue21961] Add What's New for Idle. In-Reply-To: <1405108568.05.0.859499936838.issue21961@psf.upfronthosting.co.za> Message-ID: <1405164494.63.0.0176188400518.issue21961@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Isn't IDLE-specific What's New file was merged in general What's New file few years ago? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 13:45:36 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 Jul 2014 11:45:36 +0000 Subject: [issue21932] os.read() must use Py_ssize_t for the size parameter In-Reply-To: <1405155958.69.0.353947421498.issue21932@psf.upfronthosting.co.za> Message-ID: <1720077.LS9BuE8ELy@raxxla> Serhiy Storchaka added the comment: Thank you for fixing os.read(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 14:21:43 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 Jul 2014 12:21:43 +0000 Subject: [issue21951] tcl test change crashes AIX In-Reply-To: <1405013926.74.0.877232363604.issue21951@psf.upfronthosting.co.za> Message-ID: <1405167703.98.0.280928584937.issue21951@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 14:34:14 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 Jul 2014 12:34:14 +0000 Subject: [issue21951] tcl test change crashes AIX In-Reply-To: <1405013926.74.0.877232363604.issue21951@psf.upfronthosting.co.za> Message-ID: <1405168454.18.0.702904021816.issue21951@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is it crashes when comment out "check((), '')"? Is it crashes when comment out two previous checks (for inf and -inf)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 15:40:03 2014 From: report at bugs.python.org (Brett Cannon) Date: Sat, 12 Jul 2014 13:40:03 +0000 Subject: [issue16494] Add a method on importlib.SourceLoader for creating bytecode file format/container In-Reply-To: <1353168017.12.0.0693705888433.issue16494@psf.upfronthosting.co.za> Message-ID: <1405172403.89.0.841046860562.issue16494@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 15:48:46 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 13:48:46 +0000 Subject: [issue15600] expose the finder details used by the FileFinder path hook In-Reply-To: <1344483800.66.0.152640034936.issue15600@psf.upfronthosting.co.za> Message-ID: <1405172926.71.0.38654285867.issue15600@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Eric do you wish to take this any further? I'm only asking as Brett's questions in msg185283 are currently unanswered. ---------- nosy: +BreamoreBoy status: pending -> open versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 15:52:51 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 13:52:51 +0000 Subject: [issue7979] connect_ex returns 103 often In-Reply-To: <1266812788.68.0.211126163639.issue7979@psf.upfronthosting.co.za> Message-ID: <1405173171.56.0.922262792914.issue7979@psf.upfronthosting.co.za> Mark Lawrence added the comment: As the resolution is already set to "out of date" I believe this can be closed. ---------- nosy: +BreamoreBoy status: pending -> open versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 15:54:54 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 13:54:54 +0000 Subject: [issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK In-Reply-To: <1386434917.9.0.425282577519.issue19919@psf.upfronthosting.co.za> Message-ID: <1405173294.33.0.730001679716.issue19919@psf.upfronthosting.co.za> Mark Lawrence added the comment: Accidentally set to pending? ---------- nosy: +BreamoreBoy status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 16:00:20 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 14:00:20 +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: <1405173620.68.0.951424616789.issue19954@psf.upfronthosting.co.za> Mark Lawrence added the comment: I think this was meant to be closed rather than moved to pending see msg210788. ---------- nosy: +BreamoreBoy status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 16:41:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 14:41:01 +0000 Subject: [issue20026] sqlite: handle correctly invalid isolation_level In-Reply-To: <1387457930.38.0.260350520356.issue20026@psf.upfronthosting.co.za> Message-ID: <1405176061.73.0.262205650725.issue20026@psf.upfronthosting.co.za> Mark Lawrence added the comment: Accidentally set to pending? ---------- nosy: +BreamoreBoy status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 16:45:33 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 14:45:33 +0000 Subject: [issue18228] AIX locale parsing failure In-Reply-To: <1371355395.07.0.213079327558.issue18228@psf.upfronthosting.co.za> Message-ID: <1405176333.81.0.126305341202.issue18228@psf.upfronthosting.co.za> Mark Lawrence added the comment: Presumably this can be closed as fixed. ---------- nosy: +BreamoreBoy status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 16:53:36 2014 From: report at bugs.python.org (Berker Peksag) Date: Sat, 12 Jul 2014 14:53:36 +0000 Subject: [issue2008] cookielib lacks FileCookieJar class for Safari In-Reply-To: <1202153846.32.0.869416159529.issue2008@psf.upfronthosting.co.za> Message-ID: <1405176816.05.0.482826533379.issue2008@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: -berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 16:54:40 2014 From: report at bugs.python.org (Berker Peksag) Date: Sat, 12 Jul 2014 14:54:40 +0000 Subject: [issue9325] Add an option to pdb/trace/profile to run library module as a script In-Reply-To: <1279743902.96.0.66207849175.issue9325@psf.upfronthosting.co.za> Message-ID: <1405176880.41.0.0163631147613.issue9325@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: -berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 17:26:03 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Jul 2014 15:26:03 +0000 Subject: [issue19076] Pdb.do_break calls error with obsolete file kwarg In-Reply-To: <1379896161.02.0.342769344307.issue19076@psf.upfronthosting.co.za> Message-ID: <3h9ZhW0jCrz7LjS@mail.python.org> Roundup Robot added the comment: New changeset afa9c0e24a71 by Berker Peksag in branch '3.4': Issue #19076: Don't pass the redundant 'file' argument to self.error(). http://hg.python.org/cpython/rev/afa9c0e24a71 New changeset d891ad8aeb80 by Berker Peksag in branch 'default': Issue #19076: Merge with 3.4. http://hg.python.org/cpython/rev/d891ad8aeb80 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 17:27:41 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Jul 2014 15:27:41 +0000 Subject: [issue21932] os.read() must use Py_ssize_t for the size parameter In-Reply-To: <1720077.LS9BuE8ELy@raxxla> Message-ID: STINNER Victor added the comment: > Serhiy Storchaka added the comment: > > Thank you for fixing os.read(). > You're welcome, thanks for your help with the test. I hope that it would help you to implement FileIO in Python. FYI I saw EINVAL errors on test_large_read() on some buildbots, Mac OS X and FreeBSD if I remember correctly, when I forgot the bigmem decorator. And FreeBSD kills the process if there is not enough memory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 17:27:53 2014 From: report at bugs.python.org (Berker Peksag) Date: Sat, 12 Jul 2014 15:27:53 +0000 Subject: [issue19076] Pdb.do_break calls error with obsolete file kwarg In-Reply-To: <1379896161.02.0.342769344307.issue19076@psf.upfronthosting.co.za> Message-ID: <1405178873.79.0.693576440053.issue19076@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report, Michael. ---------- assignee: -> berker.peksag components: -Extension Modules nosy: +r.david.murray resolution: -> fixed stage: needs patch -> resolved status: open -> closed type: -> behavior versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 17:28:55 2014 From: report at bugs.python.org (Lita Cho) Date: Sat, 12 Jul 2014 15:28:55 +0000 Subject: [issue21914] Create unit tests for Turtle guionly In-Reply-To: <1404442037.11.0.611165319303.issue21914@psf.upfronthosting.co.za> Message-ID: <1405178935.57.0.918842065256.issue21914@psf.upfronthosting.co.za> Lita Cho added the comment: Make some changes to patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 17:29:26 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Jul 2014 15:29:26 +0000 Subject: [issue20026] sqlite: handle correctly invalid isolation_level In-Reply-To: <1405176061.73.0.262205650725.issue20026@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: The patch has been commited, the issue can be closed. Yes pending was a mistake. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 17:32:31 2014 From: report at bugs.python.org (Lita Cho) Date: Sat, 12 Jul 2014 15:32:31 +0000 Subject: [issue21914] Create unit tests for Turtle guionly In-Reply-To: <1404442037.11.0.611165319303.issue21914@psf.upfronthosting.co.za> Message-ID: <1405179151.07.0.385962802419.issue21914@psf.upfronthosting.co.za> Lita Cho added the comment: Trying to attach a file again. I seem to be having trouble attaching it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 17:41:34 2014 From: report at bugs.python.org (Lita Cho) Date: Sat, 12 Jul 2014 15:41:34 +0000 Subject: [issue21914] Create unit tests for Turtle guionly In-Reply-To: <1404442037.11.0.611165319303.issue21914@psf.upfronthosting.co.za> Message-ID: <1405179694.63.0.678461220677.issue21914@psf.upfronthosting.co.za> Changes by Lita Cho : Added file: http://bugs.python.org/file35930/test_turtle_guionly_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 18:05:23 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 12 Jul 2014 16:05:23 +0000 Subject: [issue21966] InteractiveConsole does not support -q option Message-ID: <1405181123.73.0.894498211412.issue21966@psf.upfronthosting.co.za> New submission from Alexander Belopolsky: When invoked with -q option, python3 prints no banner: $ python3 -q >>> However, code.InteractiveConsole does not implement this feature: $ python3 -mcode -q Python 3.4.1 (default, May 19 2014, 13:10:29) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> ---------- keywords: easy messages: 222850 nosy: belopolsky priority: normal severity: normal status: open title: InteractiveConsole does not support -q option type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 18:11:36 2014 From: report at bugs.python.org (Case Van Horsen) Date: Sat, 12 Jul 2014 16:11:36 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1405181496.25.0.425167054493.issue21922@psf.upfronthosting.co.za> Case Van Horsen added the comment: Disclaimer: as Mark alluded to, I maintain gmpy2. Some comments on MPIR/GMP: For all practical purposes, building GMP on Windows requires some version of the mingw compiler toolchain. None of the performance gains of custom assembly code is available if GMP is build with the VS compiler. When compiled with mingw, GMP supports CPU detection to automatically use code optimized for the specific instruction set. This level of optimization may not be needed for Python, though. The MPIR fork of GMP can be built with VS. Assembly code is supported via the YASM assembler plugin. Only a single instruction set is supported by the lib/dll. gmpy2 currently uses MPIR. I've had no issues with its stability. The mpz type has a maximum precision. IIRC, the maximum length is 2^31 bits on a 32-bit platform and 2^37 on a 64-bit platform. The mpn interface may or may not have the same restrictions. This might impact code that runs correctly, but slowly, with Python's normal PyLong implementation. GMP does not handle out-of-memory situations gracefully. When GMP encounters a memory allocation failure (exceeding the limits above or when running our of scratch space), it will just abort. It is easy in gmpy2 to trigger an abort that will crash the Python interpreter. My main concern is tightly linking the Python interpreter to a specific version of GMP (i.e. whatever version is used for the Windows builds or the version provided by the distribution). As long as gmpy2 can continue to use another version of GMP, it shouldn't matter to me. GMP and MPIR are both licensed under LGPL v3+ (not v2+). I'll reserve any further licensing discussions for python-dev. I'll try to test the patch this weekend and that should answer some of my questions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 18:31:09 2014 From: report at bugs.python.org (Anselm Kruis) Date: Sat, 12 Jul 2014 16:31:09 +0000 Subject: [issue21967] Interpreter crash upon accessing frame.f_restricted of a frame from a dead thread Message-ID: <1405182669.73.0.676876650483.issue21967@psf.upfronthosting.co.za> New submission from Anselm Kruis: If you store a reference to a frame from a dead thread and then access frame.f_restricted python eventually crashed. I didn't investigate this bug in depth. Here is my preliminary explanation. The access of frame.f_restricted causes a call of PyFrame_IsRestricted(f). PyFrame_IsRestricted is a macro and expands to ((f)->f_builtins != (f)->f_tstate->interp->builtins) Now, if the thread that created f is already dead, the f_tstate points to an invalid structure. Depending on the content of the memory the access of f_tstate->interp causes an access violation. I use a Win32 debug build to reliable reproduce the issue. ---------- components: Interpreter Core files: crash_on_f_restricted.py messages: 222852 nosy: anselm.kruis priority: normal severity: normal status: open title: Interpreter crash upon accessing frame.f_restricted of a frame from a dead thread type: crash versions: Python 2.7 Added file: http://bugs.python.org/file35931/crash_on_f_restricted.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 18:47:54 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 12 Jul 2014 16:47:54 +0000 Subject: [issue21931] Nonsense errors reported by msilib.FCICreate for bad argument In-Reply-To: <1404737590.72.0.85327158616.issue21931@psf.upfronthosting.co.za> Message-ID: <1405183674.89.0.871292880174.issue21931@psf.upfronthosting.co.za> Ezio Melotti added the comment: Do you want to propose a patch? ---------- components: +Windows nosy: +ezio.melotti, loewis, steve.dower, tim.golden, zach.ware stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 18:51:50 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 16:51:50 +0000 Subject: [issue15414] os.path.join behavior on Windows (ntpath.join) is unexpected and not well documented In-Reply-To: <1342903268.21.0.193498975528.issue15414@psf.upfronthosting.co.za> Message-ID: <1405183910.37.0.877217389519.issue15414@psf.upfronthosting.co.za> Mark Lawrence added the comment: ntpath.join() was fixed in issue19456 so I think all we need here is a commit review of the attached documentation patch. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 18:53:37 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Jul 2014 16:53:37 +0000 Subject: [issue21965] Add support for Memory BIO to _ssl In-Reply-To: <1405156134.57.0.513965198344.issue21965@psf.upfronthosting.co.za> Message-ID: <1405184017.64.0.353175452662.issue21965@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 18:53:53 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 16:53:53 +0000 Subject: [issue1669539] Improve Windows os.path.join (ntpath.join) "smart" joining Message-ID: <1405184033.2.0.351870888833.issue1669539@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've asked for a commit review on issue 15414 so can we close this? ---------- nosy: +BreamoreBoy status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 18:56:51 2014 From: report at bugs.python.org (Brian Curtin) Date: Sat, 12 Jul 2014 16:56:51 +0000 Subject: [issue15414] os.path.join behavior on Windows (ntpath.join) is unexpected and not well documented In-Reply-To: <1342903268.21.0.193498975528.issue15414@psf.upfronthosting.co.za> Message-ID: <1405184211.8.0.632905188107.issue15414@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 18:57:08 2014 From: report at bugs.python.org (Brian Curtin) Date: Sat, 12 Jul 2014 16:57:08 +0000 Subject: [issue1669539] Improve Windows os.path.join (ntpath.join) "smart" joining Message-ID: <1405184228.3.0.877843144914.issue1669539@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 18:59:03 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 12 Jul 2014 16:59:03 +0000 Subject: [issue15849] PEP 3121, 384 Refactoring applied to xx module In-Reply-To: <1346596353.57.0.974507844943.issue15849@psf.upfronthosting.co.za> Message-ID: <1405184343.01.0.541655601042.issue15849@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I added "documentation" to the components list because this in the main purpose of this module - to serve as a template for extension module writers. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 18:59:14 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 12 Jul 2014 16:59:14 +0000 Subject: [issue15849] PEP 3121, 384 Refactoring applied to xx module In-Reply-To: <1346596353.57.0.974507844943.issue15849@psf.upfronthosting.co.za> Message-ID: <1405184354.9.0.00854587401583.issue15849@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 19:20:50 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 12 Jul 2014 17:20:50 +0000 Subject: [issue21928] Incorrect reference to partial() in functools.wraps documentation In-Reply-To: <1404691551.32.0.43724066382.issue21928@psf.upfronthosting.co.za> Message-ID: <1405185650.49.0.202542022626.issue21928@psf.upfronthosting.co.za> Ezio Melotti added the comment: The docstring is correct, as this is how wraps is implemented (see Lib/functools.py#l73). partial(update_wrapper, wrapped=wrapped, assigned=assigned, updated=updated) will return a partial version of update_wrapper() where only the wrapper argument is missing. The missing argument is the function decorated with wraps(). For example, this code: def my_decorator(f): @wraps(f) def wrapper(*args, **kwds): return f(*args, **kwds) return wrapper is equivalent to: def my_decorator(f): def wrapper(*args, **kwds): return f(*args, **kwds) wrapper = wraps(f)(wrapper) return wrapper Here wraps(f) creates a partial version of update_wrapper, with only the "wrapped" argument (i.e. f) set. When the partial object returned by wrap(f) gets called, the missing "wrapper" argument is received, thus making wraps(f)(wrapper) equivalent to: def my_decorator(f): def wrapper(*args, **kwds): return f(*args, **kwds) wrapper = update_wrapper(wrapper, f) return wrapper That said, I agree that the sentence you quoted is not too clear/intuitive, but the following example is quite clear, so I'm not sure it's worth to removing/rephrasing the first part. Maybe it could say something like "This is a convenience function for invoking update_wrapper() (by using partial(update_wrapper, wrapped=wrapped, assigned=assigned, updated=updated)) as a function decorator when defining a wrapper function." instead? ---------- nosy: +ezio.melotti, r.david.murray, rhettinger, terry.reedy status: open -> pending type: -> enhancement versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 19:31:19 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 12 Jul 2014 17:31:19 +0000 Subject: [issue21934] OpenBSD has no /dev/full device In-Reply-To: <1404747013.93.0.393614299649.issue21934@psf.upfronthosting.co.za> Message-ID: <1405186279.42.0.793557965689.issue21934@psf.upfronthosting.co.za> Ezio Melotti added the comment: If it's not needed in other places, I think the proposed patch might be OK (assuming it works fine on other platforms). ---------- nosy: +ezio.melotti stage: -> patch review versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 19:35:22 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 12 Jul 2014 17:35:22 +0000 Subject: [issue21941] Clean up turtle TPen class In-Reply-To: <1404873989.47.0.448854632734.issue21941@psf.upfronthosting.co.za> Message-ID: <1405186522.14.0.885300835561.issue21941@psf.upfronthosting.co.za> Ezio Melotti added the comment: While TPen doesn't seem to be documented, it's not prefixed by a '_', so there might people using it and relying on these methods. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 19:36:33 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 12 Jul 2014 17:36:33 +0000 Subject: [issue21946] 'python -u' yields trailing carriage return '\r' (Python2 for Windows) In-Reply-To: <1404910318.13.0.0636532194943.issue21946@psf.upfronthosting.co.za> Message-ID: <1405186593.75.0.640009669635.issue21946@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 19:49:17 2014 From: report at bugs.python.org (Stefan Krah) Date: Sat, 12 Jul 2014 17:49:17 +0000 Subject: [issue15849] PEP 3121, 384 Refactoring applied to xx module In-Reply-To: <1346596353.57.0.974507844943.issue15849@psf.upfronthosting.co.za> Message-ID: <1405187357.75.0.0325529597179.issue15849@psf.upfronthosting.co.za> Stefan Krah added the comment: I think we should perhaps leave the xxmodule as an example for static types and create another pep-384 version that mentions *potential* performance traps. Of course many modules won't suffer from this, but first-time extension writers tend to paste from the examples and should know the alternatives if they happen to write a performance sensitive application. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 20:15:45 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 12 Jul 2014 18:15:45 +0000 Subject: [issue15849] PEP 3121, 384 Refactoring applied to xx module In-Reply-To: <1346596353.57.0.974507844943.issue15849@psf.upfronthosting.co.za> Message-ID: <1405188945.93.0.0478365233085.issue15849@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > create another pep-384 version +1 - and with a more descriptive name than xxmodule.c Suggestions: * pep384module.c * pep384demo.c * pep384.c * abidemo.c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 20:17:52 2014 From: report at bugs.python.org (Anton Barkovsky) Date: Sat, 12 Jul 2014 18:17:52 +0000 Subject: [issue21966] InteractiveConsole does not support -q option In-Reply-To: <1405181123.73.0.894498211412.issue21966@psf.upfronthosting.co.za> Message-ID: <1405189072.82.0.634774558513.issue21966@psf.upfronthosting.co.za> Anton Barkovsky added the comment: Here's a patch. ---------- keywords: +patch nosy: +anton.barkovsky Added file: http://bugs.python.org/file35932/code.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 20:30:39 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 12 Jul 2014 18:30:39 +0000 Subject: [issue21966] InteractiveConsole does not support -q option In-Reply-To: <1405181123.73.0.894498211412.issue21966@psf.upfronthosting.co.za> Message-ID: <1405189839.63.0.602492066487.issue21966@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: That was quick! (Well - I knew it would not be hard.) I have two questions: 1. How should python3 -q -mcode behave? 2. If we add this patch, should we also attempt to emulate other command line options (-V, -h, etc.)? ---------- assignee: -> belopolsky nosy: +benjamin.peterson stage: -> commit review versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 20:32:11 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 12 Jul 2014 18:32:11 +0000 Subject: [issue21966] InteractiveConsole does not support -q option In-Reply-To: <1405181123.73.0.894498211412.issue21966@psf.upfronthosting.co.za> Message-ID: <1405189931.93.0.0836003315927.issue21966@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 20:34:43 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 12 Jul 2014 18:34:43 +0000 Subject: [issue14050] Tutorial, list.sort() and items comparability In-Reply-To: <1329584329.12.0.545057513034.issue14050@psf.upfronthosting.co.za> Message-ID: <1405190083.57.0.358735839749.issue14050@psf.upfronthosting.co.za> R. David Murray added the comment: Unless I'm misremembering, it is exactly __lt__ (or __gt__, if __lt__ returns NotImplemented) that sorting depends on. Since I'm sure there is code out there that depends on this fact, I wonder if it should be part of the language definition. Also, the comparison documentation (https://docs.python.org/3/reference/expressions.html#comparisons) speaks about "total ordering" as being the requirement, which has a specific mathematical meaning (which sets, for example, do not satisfy, even though they have a __lt__ method). Whether or not the distinction is worth explaining in the tutorial is a open question. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 20:34:55 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 12 Jul 2014 18:34:55 +0000 Subject: [issue7979] connect_ex returns 103 often In-Reply-To: <1266812788.68.0.211126163639.issue7979@psf.upfronthosting.co.za> Message-ID: <1405190095.65.0.828675168131.issue7979@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 20:44:07 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 12 Jul 2014 18:44:07 +0000 Subject: [issue21966] InteractiveConsole does not support -q option In-Reply-To: <1405181123.73.0.894498211412.issue21966@psf.upfronthosting.co.za> Message-ID: <1405190647.97.0.873832735828.issue21966@psf.upfronthosting.co.za> R. David Murray added the comment: Whether or not other options are emulated, unimplemented ones should probably be rejected. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 20:50:38 2014 From: report at bugs.python.org (Anton Barkovsky) Date: Sat, 12 Jul 2014 18:50:38 +0000 Subject: [issue21966] InteractiveConsole does not support -q option In-Reply-To: <1405181123.73.0.894498211412.issue21966@psf.upfronthosting.co.za> Message-ID: <1405191038.18.0.364736549316.issue21966@psf.upfronthosting.co.za> Anton Barkovsky added the comment: > 1. How should python3 -q -mcode behave? I've only now found out about sys.flags. I think we should check for -q both before -m and after, because why not? > 2. If we add this patch, should we also attempt to emulate other command line options (-V, -h, etc.)? As I see it, the module is only concerned with REPL functionality, making these options a bit out of scope. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 20:55:58 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 12 Jul 2014 18:55:58 +0000 Subject: [issue21966] InteractiveConsole does not support -q option In-Reply-To: <1405181123.73.0.894498211412.issue21966@psf.upfronthosting.co.za> Message-ID: <1405191358.44.0.0210327517868.issue21966@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: In order to implement reasonable rejection behavior, we probably need to add some support for -h. $ python3 -z Unknown option: -z usage: python3 [option] ... [-c cmd | -m mod | file | -] [arg] ... Try `python -h' for more information. I don't think we should condition acceptance of this patch on extra features. AFAICT, the main use of the code module is in embedded situations and the if __name__ == "__main__" behavior is mostly there for demonstration purposes. On the other hand, something like $ python3 -mcode -z Unknown option: -z usage: python3 -mcode [-q] is not hard to implement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 20:59:18 2014 From: report at bugs.python.org (Berker Peksag) Date: Sat, 12 Jul 2014 18:59:18 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1405191558.31.0.537361474146.issue7976@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 21:02:43 2014 From: report at bugs.python.org (Anton Barkovsky) Date: Sat, 12 Jul 2014 19:02:43 +0000 Subject: [issue21966] InteractiveConsole does not support -q option In-Reply-To: <1405181123.73.0.894498211412.issue21966@psf.upfronthosting.co.za> Message-ID: <1405191763.12.0.670919923243.issue21966@psf.upfronthosting.co.za> Anton Barkovsky added the comment: Here's a patch that checks both sys.flags and sys.argv and uses argparse. ---------- Added file: http://bugs.python.org/file35933/code_flags_argparse.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 21:07:32 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 12 Jul 2014 19:07:32 +0000 Subject: [issue21966] InteractiveConsole does not support -q option In-Reply-To: <1405181123.73.0.894498211412.issue21966@psf.upfronthosting.co.za> Message-ID: <1405192051.98.0.0487212083537.issue21966@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > I think we should check for -q both before -m and after, because why not? If we check for sys.flags.quiet, wouldn't it be surprising to have $ python3 -mcode -q >>> import sys; sys.flags.quiet 0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 21:12:16 2014 From: report at bugs.python.org (Anton Barkovsky) Date: Sat, 12 Jul 2014 19:12:16 +0000 Subject: [issue21966] InteractiveConsole does not support -q option In-Reply-To: <1405181123.73.0.894498211412.issue21966@psf.upfronthosting.co.za> Message-ID: <1405192336.24.0.571037975145.issue21966@psf.upfronthosting.co.za> Anton Barkovsky added the comment: That's not a very likely scenario and I think the distinction between arguments that are passed to the script and interpreter flags is fairly obvious. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 21:12:16 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 12 Jul 2014 19:12:16 +0000 Subject: [issue21966] InteractiveConsole does not support -q option In-Reply-To: <1405181123.73.0.894498211412.issue21966@psf.upfronthosting.co.za> Message-ID: <1405192336.78.0.322946871577.issue21966@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: A nitpick: banner=banner in + interact(banner=banner) is redundant. + interact(banner) would work and is just as clear. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 21:16:07 2014 From: report at bugs.python.org (Anton Barkovsky) Date: Sat, 12 Jul 2014 19:16:07 +0000 Subject: [issue21966] InteractiveConsole does not support -q option In-Reply-To: <1405181123.73.0.894498211412.issue21966@psf.upfronthosting.co.za> Message-ID: <1405192567.66.0.190462887573.issue21966@psf.upfronthosting.co.za> Anton Barkovsky added the comment: Yeah, my love for keyword arguments is a bit too big sometimes. ---------- Added file: http://bugs.python.org/file35934/code_flags_argparse_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 21:23:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 19:23:59 +0000 Subject: [issue21934] OpenBSD has no /dev/full device In-Reply-To: <1404747013.93.0.393614299649.issue21934@psf.upfronthosting.co.za> Message-ID: <1405193039.5.0.836023244864.issue21934@psf.upfronthosting.co.za> Mark Lawrence added the comment: The patch is against test_file2k.py which I can't find in my default cpython setup. If this was removed from (say) Python 3.0 how do I check for that? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 21:30:37 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 19:30:37 +0000 Subject: [issue6895] locale._parse_localename fails when localename does not contain encoding information In-Reply-To: <1252765618.77.0.920082811868.issue6895@psf.upfronthosting.co.za> Message-ID: <1405193437.39.0.162948050931.issue6895@psf.upfronthosting.co.za> Mark Lawrence added the comment: I agree with the sentiment expressed in msg218513 and would close this as "out of date". ---------- nosy: +BreamoreBoy status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 21:34:56 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 12 Jul 2014 19:34:56 +0000 Subject: [issue21934] OpenBSD has no /dev/full device In-Reply-To: <1404747013.93.0.393614299649.issue21934@psf.upfronthosting.co.za> Message-ID: <1405193696.3.0.518172092556.issue21934@psf.upfronthosting.co.za> Ezio Melotti added the comment: I tried to grep on 3.x for this test but it looks like it's been removed there, so this issue only affects 2.7. ---------- versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 21:58:06 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Jul 2014 19:58:06 +0000 Subject: [issue21961] Add What's New for Idle. In-Reply-To: <1405108568.05.0.859499936838.issue21961@psf.upfronthosting.co.za> Message-ID: <1405195086.8.0.638903544289.issue21961@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The Python x.y docs describe the Python x.y language and stdlib, minus Idle (and turtledemo). The Python x.(y+1) What's New describes the delta between Python x.y and x.(y+1) in a user friendly and relevant way. The Idle model of What's New type changes in every release does not fit the general model. For one thing, instead of all new non-bugfix changes appearing in .0 releases, there will be very few if any really new changes in x.(y+1).0. Almost all changes will have already appeared in some x.y.(z>0) release. Whatever is supposed to be the situation with Idle news is not working right and would not be sufficient even it did. What's New in 2.7 has this (and only this) about Idle: --- PEP 434: IDLE Enhancement Exception for All Branches PEP 434 describes a general exemption for changes made to the IDLE ... For details of any IDLE changes, refer to the NEWS file for the specific release. -- As near as I can tell, the general NEWS file is not easily accessible. So I think that should say 'Idle NEWS file ...., accessible through Help / About Idle'. However, the 2.7 Idle news.txt file has not been updated since 2.7.5. Last year I suggested that Idle NEWS entries should begin in the idlelib file and be transferred to Misc/NEWS upon release. This was vetoed, and it was claimed that the transfer should and would happen the other way. It is not. What's New 3.4 has only this about Idle: "Running IDLE with the -n flag (no subprocess) is deprecated. However, the feature will not be removed until issue 18823 is resolved." For 3.4.1, nothing was added to Idle NEWS. Nothing was added after 3.3.0 either. The update on release is not happening. Even if Idle news.txt were properly updated, it would not serve the purposes served by What's New and even the html changelog version of Misc/NEWS. The entries are disorganized, unfiltered, duplicated, tied to specific patches rather than user topics, begin with *unlinked* issue numbers, and say too little for the user. Unfiltered: most of the recent Idle news entries are about unittest and human test additions. Here is what I might put in a What's New document to cover them all. --- Idle tests: An automated unittest suite was started in May 2013. Users can run it with "python -m test -ugui test_idle". Adding "-v" will display the test classes and methods. A human-operated test suite was started in May 2014. Uses can run it with "python -m idlelib.test_idle.htest. Report problems to the idle-dev mailing list. --- There are other items that are also not relevant to normal users. Duplication: if 3.4 news.txt were properly updated release by release, then the items listed for 3.5.0 would be the cumulative list added for 3.4.1 through 3.4.final, plus any 3.5-only user-relevant items that get added (there are none now). This issue is about adding something that does not exist: an Idle specific file accessible from the idle help menu that it updated as needed with the occasional non-obvious user-relevant changes, especially those that users *need* to read. An example of the latter is moving the the setting for the formatparagraph extension from config-main to confix-extensions (#20577). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 22:08:22 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 12 Jul 2014 20:08:22 +0000 Subject: [issue21964] inconsistency in list-generator comprehension with yield(-from) In-Reply-To: <1405119987.38.0.925003339613.issue21964@psf.upfronthosting.co.za> Message-ID: <1405195702.9.0.906463474629.issue21964@psf.upfronthosting.co.za> Ezio Melotti added the comment: There seem to be two issues here: > list comprehension with yield(-from) would return a generator. This is somewhat surprising, and I'm not sure it's expected/documented. The example you provided seems to behave reasonably, so I don't think we should change the behavior (unless there is some actual bug in similar example). If anything, we could document this, but I'm not sure if it's worth doing it and where could be added. > generator comprehension would yield some None in the middle > of the expected values. This also seems expected, and the behavior is consistent with the equivalent generator function. ---------- nosy: +ezio.melotti, gcewing, ncoghlan versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 22:08:31 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 20:08:31 +0000 Subject: [issue5248] Adding T_SIZET to structmember.h In-Reply-To: <1234539731.32.0.475254376781.issue5248@psf.upfronthosting.co.za> Message-ID: <1405195711.38.0.217253645794.issue5248@psf.upfronthosting.co.za> Mark Lawrence added the comment: msg81942 states "structmember.h lacks a 'T_SIZET' define in order to properly support struct fields of type 'size_t' within PyMemberDef." As we have managed without this feature for the last five years do we really need it now? What do we gain by implementing this? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 22:26:53 2014 From: report at bugs.python.org (Apple Grew) Date: Sat, 12 Jul 2014 20:26:53 +0000 Subject: [issue21968] 'abort' object is not callable Message-ID: <1405196813.11.0.369629706677.issue21968@psf.upfronthosting.co.za> New submission from Apple Grew: I am sometimes getting the following error from imaplib. Traceback (most recent call last): File "client.py", line 105, in get_new_mail_uids result, data = retryableCall(lambda : mail.uid('search', None, "UNSEEN"), retries, delay) # search and return uids instead File "client.py", line 25, in retryableCall return f() File "client.py", line 105, in result, data = retryableCall(lambda : mail.uid('search', None, "UNSEEN"), retries, delay) # search and return uids instead File "/usr/lib/python2.6/imaplib.py", line 753, in uid typ, dat = self._simple_command(name, command, *args) File "/usr/lib/python2.6/imaplib.py", line 1060, in _simple_command return self._command_complete(name, self._command(name, *args)) File "/usr/lib/python2.6/imaplib.py", line 893, in _command_complete self._check_bye() File "/usr/lib/python2.6/imaplib.py", line 808, in _check_bye raise self.abort(bye[-1]) TypeError: 'abort' object is not callable ---------- components: Library (Lib) messages: 222879 nosy: Apple Grew priority: normal severity: normal status: open title: 'abort' object is not callable type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 22:36:46 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Jul 2014 20:36:46 +0000 Subject: [issue21966] InteractiveConsole does not support -q option In-Reply-To: <1405181123.73.0.894498211412.issue21966@psf.upfronthosting.co.za> Message-ID: <3h9jb143Bgz7Ljn@mail.python.org> Roundup Robot added the comment: New changeset 7f8843ec34ee by Alexander Belopolsky in branch 'default': Issue #21966: Respect -q command-line option when code module is ran. http://hg.python.org/cpython/rev/7f8843ec34ee ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 22:36:48 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 12 Jul 2014 20:36:48 +0000 Subject: [issue21968] 'abort' object is not callable In-Reply-To: <1405196813.11.0.369629706677.issue21968@psf.upfronthosting.co.za> Message-ID: <1405197408.37.0.931021719168.issue21968@psf.upfronthosting.co.za> Ezio Melotti added the comment: Do you assign anything to self.abort in your code? Without further information we can't determine if this is a bug with impalib, I checked the code and I don't see anything that might change self.abort. ---------- nosy: +ezio.melotti type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 22:38:01 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 12 Jul 2014 20:38:01 +0000 Subject: [issue21966] InteractiveConsole does not support -q option In-Reply-To: <1405181123.73.0.894498211412.issue21966@psf.upfronthosting.co.za> Message-ID: <1405197481.88.0.328010810407.issue21966@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed. Thanks, Anton. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 22:52:57 2014 From: report at bugs.python.org (Jeffrey Armstrong) Date: Sat, 12 Jul 2014 20:52:57 +0000 Subject: [issue21931] Nonsense errors reported by msilib.FCICreate for bad argument In-Reply-To: <1404737590.72.0.85327158616.issue21931@psf.upfronthosting.co.za> Message-ID: <1405198377.95.0.101474596344.issue21931@psf.upfronthosting.co.za> Jeffrey Armstrong added the comment: Attached a patch. The dangers of using goto... ---------- keywords: +patch Added file: http://bugs.python.org/file35935/_msi.3.4.0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 22:58:06 2014 From: report at bugs.python.org (Apple Grew) Date: Sat, 12 Jul 2014 20:58:06 +0000 Subject: [issue21968] 'abort' object is not callable In-Reply-To: <1405197408.37.0.931021719168.issue21968@psf.upfronthosting.co.za> Message-ID: Apple Grew added the comment: That is the problem. I don't assign anything to that. I in fact grepped my code for the word abort but could find none, except in the following code block. def retryableCall(f, retries, delay): while True: try: return f() except imaplib.IMAP4_SSL.abort, imaplib.IMAP4.abort: if retries > 0: retries -= 1 try: mail.shutdown() except Exception, e: if verbose: print 'Error in shutting down mail.', e print e time.sleep(delay) open_connection(non_retryable=True) else: raise except imaplib.IMAP4_SSL.readonly, imaplib.IMAP4.readonly: if retries > 0: retries -= 1 time.sleep(delay) else: raise ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 23:14:25 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 12 Jul 2014 21:14:25 +0000 Subject: [issue21968] 'abort' object is not callable In-Reply-To: <1405196813.11.0.369629706677.issue21968@psf.upfronthosting.co.za> Message-ID: <1405199665.14.0.436051002703.issue21968@psf.upfronthosting.co.za> Ezio Melotti added the comment: In imaplib, abort is either raised or caught (in addition to be the defined once), so the error doesn't seem to be there. I suggest you to try and print self.abort (and possibly its repr()/id() or similar informations) and try to determine if/when it gets changed and then try to find out what changed it to what. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 23:19:30 2014 From: report at bugs.python.org (Apple Grew) Date: Sat, 12 Jul 2014 21:19:30 +0000 Subject: [issue21968] 'abort' object is not callable In-Reply-To: <1405196813.11.0.369629706677.issue21968@psf.upfronthosting.co.za> Message-ID: <1405199970.76.0.820517921963.issue21968@psf.upfronthosting.co.za> Apple Grew added the comment: Yes, I actually doing - print '>>', self.abort, from _init_, and other methods I am invoking. However, that seems to print nothing! I don't know why. My codes which is using impalib is able to print stuffs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 23:46:07 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 21:46:07 +0000 Subject: [issue8972] subprocess.list2cmdline doesn't quote the & character In-Reply-To: <1276261868.23.0.953588591338.issue8972@psf.upfronthosting.co.za> Message-ID: <1405201567.86.0.47014607874.issue8972@psf.upfronthosting.co.za> Mark Lawrence added the comment: I believe this is still valid in which case could we have the stage and resolution fields set appropriately please. You might also like to take a look at issue 13238 which is referred to by issue 7839. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 12 23:55:20 2014 From: report at bugs.python.org (Brian Curtin) Date: Sat, 12 Jul 2014 21:55:20 +0000 Subject: [issue8972] subprocess.list2cmdline doesn't quote the & character In-Reply-To: <1276261868.23.0.953588591338.issue8972@psf.upfronthosting.co.za> Message-ID: <1405202120.64.0.526117594755.issue8972@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 00:05:07 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 22:05:07 +0000 Subject: [issue10837] Issue catching KeyboardInterrupt while reading stdin In-Reply-To: <1294257725.97.0.863829105509.issue10837@psf.upfronthosting.co.za> Message-ID: <1405202707.59.0.365523203998.issue10837@psf.upfronthosting.co.za> Mark Lawrence added the comment: I can confirm that this works fine with 3.4.1 and 3.5.0a0. I don't run 2.7 any more so I don't know if this is fixed in later versions. ---------- nosy: +BreamoreBoy versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 00:08:31 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 22:08:31 +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: <1405202911.75.0.692274238536.issue8075@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +steve.dower, zach.ware versions: +Python 2.7, Python 3.4, Python 3.5 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 00:12:10 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 22:12:10 +0000 Subject: [issue16895] Batch file to mimic 'make' on Windows In-Reply-To: <1357677821.21.0.151237367429.issue16895@psf.upfronthosting.co.za> Message-ID: <1405203130.18.0.641608452615.issue16895@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is this still relevant or has it been overtaken by other work from Zach or Steve? ---------- nosy: +BreamoreBoy, steve.dower versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 00:13:16 2014 From: report at bugs.python.org (Brian Curtin) Date: Sat, 12 Jul 2014 22:13:16 +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: <1405203196.2.0.77288665043.issue8075@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 00:13:30 2014 From: report at bugs.python.org (Brian Curtin) Date: Sat, 12 Jul 2014 22:13:30 +0000 Subject: [issue16895] Batch file to mimic 'make' on Windows In-Reply-To: <1357677821.21.0.151237367429.issue16895@psf.upfronthosting.co.za> Message-ID: <1405203210.54.0.0105172687759.issue16895@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 00:13:49 2014 From: report at bugs.python.org (Brian Curtin) Date: Sat, 12 Jul 2014 22:13:49 +0000 Subject: [issue10837] Issue catching KeyboardInterrupt while reading stdin In-Reply-To: <1294257725.97.0.863829105509.issue10837@psf.upfronthosting.co.za> Message-ID: <1405203229.17.0.645486536001.issue10837@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 00:22:35 2014 From: report at bugs.python.org (paul j3) Date: Sat, 12 Jul 2014 22:22:35 +0000 Subject: [issue16516] argparse types (and actions) must be hashable In-Reply-To: <1353468507.9.0.0965555550975.issue16516@psf.upfronthosting.co.za> Message-ID: <1405203755.32.0.34936549167.issue16516@psf.upfronthosting.co.za> paul j3 added the comment: This is a straight forward patch, modifying '_registry_get' to return 'default' if it gets this 'TypeError'. 'test_argparse.py' has a testcase based on jnothman's example. Temporarily it includes a skipped test that would pass the original code. The alternative would be to add a note to the documentation to the effect that the 'type' must also be hashable. But for an edge condition like this, that may be more confusing than enlightening. While 'dict(one=1, two=20).get' now works as a 'type' callable, it is not ideal. If there is no match it returns None. The alternative '.__getitem__' raises a KeyError. But '_get_values' handles TypeError and ValueErrors, the kinds returned by 'int' and 'float'. It also handles an ArgumentTypeError, giving a custom type more control over the error message. Is it worth noting something about the type errors in the documentation? I've seen users make a different error with the type parameter - 'type=boolean', thinking this means the input should be converted to boolean. They are thinking of 'type' as a datatype, rather than a function that converts a string into something else. I don't know of a solution other than explaining that 'boolean()' does not act like 'int()'. This patch also handles the 'action' case. However I can't think of a way write a Action subclass that would be unhashable. It would have to inherit from both Action and dict. ---------- keywords: +patch Added file: http://bugs.python.org/file35936/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 00:29:41 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 22:29:41 +0000 Subject: [issue17023] Subprocess does not find executable on Windows if it is PATH with quotes In-Reply-To: <1359032961.6.0.0734607018969.issue17023@psf.upfronthosting.co.za> Message-ID: <1405204181.03.0.481562847328.issue17023@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Pekka sorry about the delay in getting back to you. I can confirm that this is still in issue in 3.4.1 and 3.5.0a0. ---------- components: +Library (Lib) nosy: +BreamoreBoy type: -> behavior versions: +Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 00:45:24 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 22:45:24 +0000 Subject: [issue18016] subprocess should open stdin in mode w+b on windows In-Reply-To: <1368995353.89.0.988630901542.issue18016@psf.upfronthosting.co.za> Message-ID: <1405205124.45.0.238660109064.issue18016@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Jason I'm very sorry about the delay in getting back to you. Can our Windows gurus shed any light on this one? ---------- nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware type: -> behavior versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 00:48:45 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 22:48:45 +0000 Subject: [issue18544] subprocess.Popen support for redirection of arbitrary file descriptors In-Reply-To: <1374674400.76.0.00470955001934.issue18544@psf.upfronthosting.co.za> Message-ID: <1405205325.88.0.697168111758.issue18544@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Robert can we have a response to Victor's question please. ---------- nosy: +BreamoreBoy versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 00:53:20 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 22:53:20 +0000 Subject: [issue10482] subprocess and deadlock avoidance In-Reply-To: <1290320162.59.0.372707956205.issue10482@psf.upfronthosting.co.za> Message-ID: <1405205600.74.0.40032592255.issue10482@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Glenn can you provide a formal patch so we can take this forward? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 01:41:24 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 12 Jul 2014 23:41:24 +0000 Subject: [issue21961] Add What's New for Idle. In-Reply-To: <1405108568.05.0.859499936838.issue21961@psf.upfronthosting.co.za> Message-ID: <1405208484.72.0.742429685793.issue21961@psf.upfronthosting.co.za> Ned Deily added the comment: "The Python x.y docs describe the Python x.y language and stdlib, minus Idle (and turtledemo). The Python x.(y+1) What's New describes the delta between Python x.y and x.(y+1) in a user friendly and relevant way." I don't understand "minus IDLE (and turtledemo)". They look documented to me: https://docs.python.org/3.4/library/idle.html https://docs.python.org/3.4/library/turtle.html#demo-scripts https://docs.python.org/2.7/library/idle.html https://docs.python.org/2.7/library/turtle.html#demo-scripts "As near as I can tell, the general NEWS file is not easily accessible." The URL for the NEWS file for each release is included as the "Release Notes" link for each release on https://www.python.org/downloads/. For Py3 releases since Python 3.3, a formatted HTML version is available, at urls like: https://docs.python.org/3.4/whatsnew/changelog.html#python-3-4-1 For all current releases, include Py2.7.x, a raw text version is available at urls like: http://hg.python.org/cpython/raw-file/v2.7.8/Misc/NEWS I believe it has been suggested before that the NEWS button could open a browser window with the appropriate release-specific URL from above rather than opening a Tk window with news.txt. "What's New 3.4 has only this about Idle: [...]" These sections are not immutable. If the section for a previous release is incomplete, you can update it in the current branch(es). Rather than duplicating information between IDLE-specific files and the normal Python What's New and NEWS documents, wouldn't it better to just get it done well all in one place? This doesn't have to be difficult. In any case, this seems to be pretty much a duplicate of Issue17506 and probably Issue21621. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 01:55:31 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 12 Jul 2014 23:55:31 +0000 Subject: [issue20117] subprocess on Windows: wrong return code with shell=True In-Reply-To: <1388787639.9.0.977617126521.issue20117@psf.upfronthosting.co.za> Message-ID: <1405209331.04.0.380645389215.issue20117@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can our Windows gurus advise on this please. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 02:02:05 2014 From: report at bugs.python.org (David Edelsohn) Date: Sun, 13 Jul 2014 00:02:05 +0000 Subject: [issue21951] tcl test change crashes AIX In-Reply-To: <1405013926.74.0.877232363604.issue21951@psf.upfronthosting.co.za> Message-ID: <1405209725.25.0.867162215183.issue21951@psf.upfronthosting.co.za> David Edelsohn added the comment: If I comment out all three tests, it runs. --- a/Lib/test/test_tcl.py Thu Jul 10 01:17:11 2014 -0400 +++ b/Lib/test/test_tcl.py Sat Jul 12 16:59:33 2014 -0700 @@ -455,9 +455,9 @@ check(float('inf'), 'Inf', eq=float_eq) check(-float('inf'), '-Inf', eq=float_eq) # XXX NaN representation can be not parsable by float() - check((), '') - check((1, (2,), (3, 4), '5 6', ()), '1 2 {3 4} {5 6} {}') - check([1, [2,], [3, 4], '5 6', []], '1 2 {3 4} {5 6} {}') + #check((), '') + #check((1, (2,), (3, 4), '5 6', ()), '1 2 {3 4} {5 6} {}') + #check([1, [2,], [3, 4], '5 6', []], '1 2 {3 4} {5 6} {}') def test_splitlist(self): splitlist = self.interp.tk.splitlist ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 02:02:41 2014 From: report at bugs.python.org (Brian Curtin) Date: Sun, 13 Jul 2014 00:02:41 +0000 Subject: [issue20117] subprocess on Windows: wrong return code with shell=True In-Reply-To: <1388787639.9.0.977617126521.issue20117@psf.upfronthosting.co.za> Message-ID: <1405209761.39.0.686567551145.issue20117@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 03:19:13 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 13 Jul 2014 01:19:13 +0000 Subject: [issue21964] inconsistency in list-generator comprehension with yield(-from) In-Reply-To: <1405119987.38.0.925003339613.issue21964@psf.upfronthosting.co.za> Message-ID: <1405214353.36.0.905439565168.issue21964@psf.upfronthosting.co.za> Nick Coghlan added the comment: It's a side effect of the hidden closure that provides the new scope for the iteration variable - that's an ordinary function object, so using yield or yield from turns it into a generator expression instead. Generator expressions are already generators, so using yield or yield from just adds more yield points beyond the implied ones. I've never figured out a good way to document it - it's a natural consequence of the comprehension's closure. An explicit mention in the reference docs for comprehensions may be worth adding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 03:20:03 2014 From: report at bugs.python.org (Antony Lee) Date: Sun, 13 Jul 2014 01:20:03 +0000 Subject: [issue21969] WindowsPath constructor does not check for invalid characters Message-ID: <1405214403.71.0.545456092847.issue21969@psf.upfronthosting.co.za> New submission from Antony Lee: PureWindowsPath("foo*") returns a path object, even though it is an invalid one (e.g., open("foo*") on Windows throws an OSError for "invalid argument" rather than a FileNotFoundError). Given the amount of checking that is done in (e.g.) with_name and with_suffix, it seems reasonable to throw an exception in this case too. ---------- components: Library (Lib) messages: 222899 nosy: Antony.Lee priority: normal severity: normal status: open title: WindowsPath constructor does not check for invalid characters versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 03:21:58 2014 From: report at bugs.python.org (Martin Panter) Date: Sun, 13 Jul 2014 01:21:58 +0000 Subject: [issue6631] Disallow relative files paths in urllib*.open() In-Reply-To: <1249306383.87.0.829314243328.issue6631@psf.upfronthosting.co.za> Message-ID: <1405214518.13.0.971915554106.issue6631@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 03:38:40 2014 From: report at bugs.python.org (Martijn Pieters) Date: Sun, 13 Jul 2014 01:38:40 +0000 Subject: [issue21789] Broken link to PEP 263 in Python 2.7 error message In-Reply-To: <1403010008.76.0.912286060236.issue21789@psf.upfronthosting.co.za> Message-ID: <1405215520.85.0.424043121013.issue21789@psf.upfronthosting.co.za> Martijn Pieters added the comment: The *redirect* should be corrected here too! http://www.python.org/peps/pep-0263.html is still going to be in use for some time to come, a simple redirect *on Python.org* to the correct location would be helpful. ---------- nosy: +mjpieters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 03:49:21 2014 From: report at bugs.python.org (Martin Panter) Date: Sun, 13 Jul 2014 01:49:21 +0000 Subject: [issue21970] Broken code for handling file://host in urllib.request.FileHandler.file_open Message-ID: <1405216161.05.0.3363234179.issue21970@psf.upfronthosting.co.za> New submission from Martin Panter: This isn?t a particularly important problem for me but when reading the code I noticed some bit rot in this function, where a host name in a ?file:? URL would be handled differently than intended. * The url[:2] == '//' check is probably wrong because it is comparing the URL?s path component (selector), not the prefix for a host name. Compare urlopen("file://host//") and urlopen("file://host/") error messages. * The req.host is self.get_names() should probably use ?in?, not ?is?. The code author presumably expected urlopen("file://127.0.0.1//dev/null") to work. * Also it seems odd that urlopen("file://remote/missing") immediately reports ?No such file?, while urlopen("file://remote/") blocks for a host name lookup and then reports ?not on local host?. ---------- components: Library (Lib) messages: 222901 nosy: vadmium priority: normal severity: normal status: open title: Broken code for handling file://host in urllib.request.FileHandler.file_open versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 04:16:13 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 13 Jul 2014 02:16:13 +0000 Subject: [issue21789] Broken link to PEP 263 in Python 2.7 error message In-Reply-To: <1403010008.76.0.912286060236.issue21789@psf.upfronthosting.co.za> Message-ID: <1405217773.2.0.592511706814.issue21789@psf.upfronthosting.co.za> Ned Deily added the comment: Martijn, please report problems with the python.org web site to its issue tracker: https://github.com/python/pythondotorg/issues. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 04:19:20 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 Jul 2014 02:19:20 +0000 Subject: [issue21971] Index and update turtledemo doc. Message-ID: <1405217960.27.0.66457016468.issue21971@psf.upfronthosting.co.za> New submission from Terry J. Reedy: The doc section for the turtledemo package do not appear in either the module index or the general index. It should appear in both. https://docs.python.org/2.7/library/turtle.html#demo-scripts https://docs.python.org/3.4/library/turtle.html#demo-scripts This comment about the two-canvases demo, "Therefore it only can be run standalone." was previously obsolete is that it could be run from the demo viewer, but the text did not load. After the fix for #21882, the text load and it works find in the viewer. It should be added to the table and the count adjusted. ---------- messages: 222903 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Index and update turtledemo doc. type: behavior versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 04:19:57 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 Jul 2014 02:19:57 +0000 Subject: [issue14117] Turtledemo: exception and minor glitches. In-Reply-To: <1330120365.77.0.428280648922.issue14117@psf.upfronthosting.co.za> Message-ID: <1405217997.91.0.985859428559.issue14117@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- dependencies: +Index and update turtledemo doc. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 04:20:15 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 13 Jul 2014 02:20:15 +0000 Subject: [issue21969] WindowsPath constructor does not check for invalid characters In-Reply-To: <1405214403.71.0.545456092847.issue21969@psf.upfronthosting.co.za> Message-ID: <1405218015.51.0.572643701862.issue21969@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 05:13:48 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Jul 2014 03:13:48 +0000 Subject: [issue21969] WindowsPath constructor does not check for invalid characters In-Reply-To: <1405214403.71.0.545456092847.issue21969@psf.upfronthosting.co.za> Message-ID: <1405221228.67.0.915509671377.issue21969@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hmm, I am not sure. Is there a definite list of invalid Windows path characters, or can it be filesystem-specific? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 05:27:23 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 13 Jul 2014 03:27:23 +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: <1405222043.37.0.830860408299.issue8075@psf.upfronthosting.co.za> Martin v. L?wis added the comment: For 3.4, this was fixed as a side effect of fixing issue20641. ---------- versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 05:27:56 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 13 Jul 2014 03:27:56 +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: <1405222076.92.0.891988975531.issue8075@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- nosy: -loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 05:49:36 2014 From: report at bugs.python.org (=?utf-8?q?Fran=C3=A7ois-Ren=C3=A9_Rideau?=) Date: Sun, 13 Jul 2014 03:49:36 +0000 Subject: [issue21972] Bugs in the lexer and parser documentation Message-ID: <1405223376.11.0.196375962969.issue21972@psf.upfronthosting.co.za> New submission from Fran?ois-Ren? Rideau: The lexer documentation says that the u prefix works on strings since 3.3, but doesn't explain what or how, which is all the more problematic since it explicitly mentions difference from the behavior documented in Python 2. It also doesn't specify the ELLIPSIS token or the <> future token mentioned in the grammar (that should probably be removed, for PEP 401 is a joke ? unless that's intentional, in which case a smiley might be useful). https://docs.python.org/3.5/reference/lexical_analysis.html ---------- assignee: docs at python components: Documentation messages: 222906 nosy: Fran?ois-Ren?.Rideau, docs at python priority: normal severity: normal status: open title: Bugs in the lexer and parser documentation type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 06:09:29 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 13 Jul 2014 04:09:29 +0000 Subject: [issue21972] Bugs in the lexer and parser documentation In-Reply-To: <1405223376.11.0.196375962969.issue21972@psf.upfronthosting.co.za> Message-ID: <1405224569.2.0.608403850067.issue21972@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't understand. It says "it is possible again to prefix unicode strings with a u prefix" which seems to include both what ("prefix unicode strings") and how ("with a u prefix"). Can you propose specific wording that you want to see included? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 06:14:56 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 Jul 2014 04:14:56 +0000 Subject: [issue21961] Add What's New for Idle. In-Reply-To: <1405108568.05.0.859499936838.issue21961@psf.upfronthosting.co.za> Message-ID: <1405224896.16.0.200430170132.issue21961@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ned, Thank you for the turtledemo doc location. I opened #21971 to add it to the module and general indexes and update it with respect to the two_canvases demo. Neither Idle nor idlelib are in the modules index. The main link for IDLE in the general index goes to the glossary entry. Could that entry have a link to the doc section? The x.y docs do not describe 'Idle x.y' because there is no 'Idle x.y'. There was, for instance, 'Idle 3.4.0', there is now 'Idle 3.4.1', and there will be 'Idle 3.4.2'. There may not have been any doc-worthy changes in 3.4.1, but I expect there will be in 3.4.2 (and 2.7.9). This reality is the basis of and the reason for this issue and #21621 (which I will come back to). What is the idle section of the repository and online doc supposed to document? To the best of my knowledge, this has not been discussed, nor any policy written. However, I think the repository doc should be synchronized with the repository code, which would mean documenting unreleased new features. As far as I know, the current version is an html version of idlelib/help.txt as of 1.5 or more years ago. I have not checked to see if it includes any details that have changed. The current doc does not have any version-added, or in Idle's case, release-added notes. Assuming that there is something new since 3.0.0 should it? I don't think so. If someone conditionally includes a 3.4 feature in 3.3 code, the problem might show up years later. If someone tries to use an Idle feature in a version that lacks it, they won't find it. I think a focused feature log such as proposed in this issue is a better place for release-added update notes. Having two sources copies of the Idle docs is a nuisance. I would not mind either getting rid of help.txt or replacing it with help.html captured on the release date, and included as a back up for people who do not have web access at a particular time and place. There is an issue for this already. As for the update notes. In #21621, I proposed copying the boilerplate announcement in the 2.7 What's New to 3.x. I got no feedback that this is acceptable. In the meanwhile, I have realized that people need the sort of re-written update notes for the rest of the stdlib that currently comprise What's New. I would be happy to put them in What's New itself, as part of patches that add the feature and update the manual. I would then add an option to Help to access the online section of What's New. Nick, is updating the Idle section of What's New during the maintenance cycle, with per release notes, OK with you? #17506 was partly about the fact that Idle NEWS items sometimes (always since 3.4.1) do not merge forward properly. That is a separate issue from this one. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 06:24:06 2014 From: report at bugs.python.org (Antony Lee) Date: Sun, 13 Jul 2014 04:24:06 +0000 Subject: [issue21969] WindowsPath constructor does not check for invalid characters In-Reply-To: <1405214403.71.0.545456092847.issue21969@psf.upfronthosting.co.za> Message-ID: <1405225446.49.0.843686390564.issue21969@psf.upfronthosting.co.za> Antony Lee added the comment: There is a list of always forbidden characters (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#naming_conventions), and then a couple of obscure fs-dependent cases (http://en.wikipedia.org/wiki/Comparison_of_file_systems) but I believe excluding the main list should be enough for most purposes. Note that PosixPath is not immune to this either, as there is one forbidden character: the null byte. I would prefer if path.open() can only raise one of the OSError subclasses that correspond to errnos mentioned in "man 2 open". Currently, on Windows, "Path('*').open()" raises an OSError ("invalid argument"); on Linux, "Path('\0').open()" raises a TypeError(!). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 07:21:15 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Jul 2014 05:21:15 +0000 Subject: [issue21323] CGI HTTP server not running scripts from subdirectories In-Reply-To: <1398107131.28.0.812868414728.issue21323@psf.upfronthosting.co.za> Message-ID: <3h9xDB575lz7Ljs@mail.python.org> Roundup Robot added the comment: New changeset d367ea865ea4 by Ned Deily in branch '2.7': Issue #21323: Fix CGIHTTPServer to again handle scripts in CGI subdirectories, http://hg.python.org/cpython/rev/d367ea865ea4 New changeset 4de94641ba3e by Ned Deily in branch '3.2': Issue #21323: Fix http.server to again handle scripts in CGI subdirectories, http://hg.python.org/cpython/rev/4de94641ba3e New changeset b957f475e41e by Ned Deily in branch '3.3': Issue #21323: Fix http.server to again handle scripts in CGI subdirectories, http://hg.python.org/cpython/rev/b957f475e41e New changeset 385f4406dc26 by Ned Deily in branch '3.4': Issue #21323: Fix http.server to again handle scripts in CGI subdirectories, http://hg.python.org/cpython/rev/385f4406dc26 New changeset 22e5a85ba840 by Ned Deily in branch 'default': Issue #21323: Fix http.server to again handle scripts in CGI subdirectories, http://hg.python.org/cpython/rev/22e5a85ba840 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 07:21:16 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Jul 2014 05:21:16 +0000 Subject: [issue19435] Directory traversal attack for CGIHTTPRequestHandler In-Reply-To: <1383064441.57.0.197155402259.issue19435@psf.upfronthosting.co.za> Message-ID: <3h9xDC3Pj9z7Ljs@mail.python.org> Roundup Robot added the comment: New changeset d367ea865ea4 by Ned Deily in branch '2.7': Issue #21323: Fix CGIHTTPServer to again handle scripts in CGI subdirectories, http://hg.python.org/cpython/rev/d367ea865ea4 New changeset 4de94641ba3e by Ned Deily in branch '3.2': Issue #21323: Fix http.server to again handle scripts in CGI subdirectories, http://hg.python.org/cpython/rev/4de94641ba3e New changeset b957f475e41e by Ned Deily in branch '3.3': Issue #21323: Fix http.server to again handle scripts in CGI subdirectories, http://hg.python.org/cpython/rev/b957f475e41e New changeset 385f4406dc26 by Ned Deily in branch '3.4': Issue #21323: Fix http.server to again handle scripts in CGI subdirectories, http://hg.python.org/cpython/rev/385f4406dc26 New changeset 22e5a85ba840 by Ned Deily in branch 'default': Issue #21323: Fix http.server to again handle scripts in CGI subdirectories, http://hg.python.org/cpython/rev/22e5a85ba840 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 07:31:22 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 13 Jul 2014 05:31:22 +0000 Subject: [issue21323] CGI HTTP server not running scripts from subdirectories In-Reply-To: <1398107131.28.0.812868414728.issue21323@psf.upfronthosting.co.za> Message-ID: <1405229482.18.0.66136070226.issue21323@psf.upfronthosting.co.za> Ned Deily added the comment: Since the original changes for Issue19435 were also applied to branches in security fix mode, the fix here is applied to them as well, with the exception of 3.1 which has subsequently moved to end-of-life status. Applied for release in 2.7.9, 3.2.6, 3.3.6, 3.4.2, and 3.5.0. Thanks again, Konstantin and Zach. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 07:34:43 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 13 Jul 2014 05:34:43 +0000 Subject: [issue19435] Directory traversal attack for CGIHTTPRequestHandler In-Reply-To: <1383064441.57.0.197155402259.issue19435@psf.upfronthosting.co.za> Message-ID: <1405229683.81.0.993992570045.issue19435@psf.upfronthosting.co.za> Ned Deily added the comment: See Issue21323 for details of a problem introduced by the original fixes for this problem and now fixed (except for 3.1 which is now end-of-life). ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 07:48:29 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Sun, 13 Jul 2014 05:48:29 +0000 Subject: [issue18592] Idle: test SearchDialogBase.py In-Reply-To: <1375146770.41.0.774627283078.issue18592@psf.upfronthosting.co.za> Message-ID: <1405230509.27.0.319948079222.issue18592@psf.upfronthosting.co.za> Saimadhav Heblikar added the comment: A bug introduced by 91491:a0e8f2d882a3. Opening Find-in-files gives the following error Exception in Tkinter callback Traceback (most recent call last): File "/home/saimadhav/dev/34-cpython/Lib/tkinter/__init__.py", line 1487, in __call__ . . . . self.tk = master.tk AttributeError: 'tuple' object has no attribute 'tk' ---------- Added file: http://bugs.python.org/file35937/grepdialog_bug.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 08:52:36 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Jul 2014 06:52:36 +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: <1405234356.04.0.389838366305.issue19954@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Mark, pending state here means that I think this issue should be closed, but what to see agreement from David (as issue starter and as other core developer). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 10:59:40 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 13 Jul 2014 08:59:40 +0000 Subject: [issue21925] ResourceWarning sometimes doesn't display In-Reply-To: <1404614973.3.0.388136336832.issue21925@psf.upfronthosting.co.za> Message-ID: <1405241980.12.0.0881283986768.issue21925@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever title: ResouceWarning sometimes doesn't display -> ResourceWarning sometimes doesn't display versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 12:34:16 2014 From: report at bugs.python.org (Berker Peksag) Date: Sun, 13 Jul 2014 10:34:16 +0000 Subject: [issue20026] sqlite: handle correctly invalid isolation_level In-Reply-To: <1387457930.38.0.260350520356.issue20026@psf.upfronthosting.co.za> Message-ID: <1405247656.62.0.243309019189.issue20026@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 14:01:32 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 12:01:32 +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: <1405252892.4.0.962673624988.issue7405@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +jlt63, stutzbach versions: +Python 3.4, Python 3.5 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 14:01:45 2014 From: report at bugs.python.org (Thomas Kember) Date: Sun, 13 Jul 2014 12:01:45 +0000 Subject: [issue21973] Can't use Idle Message-ID: <1405252905.33.0.296703763462.issue21973@psf.upfronthosting.co.za> New submission from Thomas Kember: I am a retired programmer. I still like to write small programs for my own interest. Python is ideal for this. I prefer to use Idle rather than the command line. For some time now when I click on the Idle shortcut on the home screen, the command line screen flashes and then nothing. I am not able to do anything on Idle. I had been using Python33. So I upgraded to Python34. It was the same thing. I looked at the batch file, idle.bat. This is what it contains. @echo off rem Start IDLE using the appropriate Python interpreter set CURRDIR=%~dp0 start "IDLE" "%CURRDIR%..\..\pythonw.exe" "%CURRDIR%idle.pyw" %1 %2 %3 %4 %5 %6 %7 %8 %9 I don't understand what %~dp0 means. I can't think what changes I have made to the operating system, it is Windows 7, that could cause this problem. As I say Python is great for what I do. But I am stuck with the command line if I cannot fix this. Tomk ---------- messages: 222916 nosy: Tomk priority: normal severity: normal status: open title: Can't use Idle type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 14:04:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 12:04:01 +0000 Subject: [issue8526] msilib doesn't support multiple CAB instances in same installer In-Reply-To: <1272154034.54.0.42494510324.issue8526@psf.upfronthosting.co.za> Message-ID: <1405253041.49.0.522134726588.issue8526@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Steve/Zach just FYI ---------- nosy: +BreamoreBoy, steve.dower, zach.ware versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 14:07:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 12:07:14 +0000 Subject: [issue14484] missing return in win32_kill? In-Reply-To: <1333462226.23.0.725280599354.issue14484@psf.upfronthosting.co.za> Message-ID: <1405253234.81.0.426108715167.issue14484@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Zach can you add anything to this? ---------- nosy: +BreamoreBoy, zach.ware versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 14:15:36 2014 From: report at bugs.python.org (SilentGhost) Date: Sun, 13 Jul 2014 12:15:36 +0000 Subject: [issue21973] Can't use Idle In-Reply-To: <1405252905.33.0.296703763462.issue21973@psf.upfronthosting.co.za> Message-ID: <1405253736.35.0.379211868876.issue21973@psf.upfronthosting.co.za> SilentGhost added the comment: This is the normal content of idle.bat Could you run `c:\python34\python.exe -m idlelib.idle` from the command-line and post the output here? ---------- components: +IDLE nosy: +SilentGhost, kbk, roger.serwy, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 14:17:22 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 12:17:22 +0000 Subject: [issue15962] Windows STDIN/STDOUT Redirection is actually FIXED In-Reply-To: <1347970794.78.0.910609008076.issue15962@psf.upfronthosting.co.za> Message-ID: <1405253842.49.0.870398634796.issue15962@psf.upfronthosting.co.za> Mark Lawrence added the comment: This can be closed as "out of date" as extensive changes made to the Windows FAQ have removed the wording referenced in the patch. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 14:33:08 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 12:33:08 +0000 Subject: [issue16620] Avoid using private function glob.glob1() in msi module and tools In-Reply-To: <1354736049.23.0.98660459286.issue16620@psf.upfronthosting.co.za> Message-ID: <1405254788.96.0.55090721269.issue16620@psf.upfronthosting.co.za> Mark Lawrence added the comment: Just a reminder that there are comments on Rietveld. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 14:42:30 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 12:42:30 +0000 Subject: [issue17717] Set up nasm from external.bat In-Reply-To: <1365870872.82.0.912332979443.issue17717@psf.upfronthosting.co.za> Message-ID: <1405255350.94.0.758268790707.issue17717@psf.upfronthosting.co.za> Mark Lawrence added the comment: I think a message as suggested in msg187571 would be more than adequate. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 14:51:42 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 12:51:42 +0000 Subject: [issue5773] Crash on shutdown after os.fdopen(2) in debug builds In-Reply-To: <1239885549.06.0.444041706295.issue5773@psf.upfronthosting.co.za> Message-ID: <1405255902.74.0.13104496991.issue5773@psf.upfronthosting.co.za> Mark Lawrence added the comment: Using latest default. c:\cpython\PCbuild>python_d -c "import os; os.fdopen(2)" -c:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=2 mode='r' encoding='cp1252'> Do we need to do anything with 2.7, can this be closed or what? ---------- nosy: +BreamoreBoy versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 15:23:22 2014 From: report at bugs.python.org (Brian Curtin) Date: Sun, 13 Jul 2014 13:23:22 +0000 Subject: [issue14484] missing return in win32_kill? In-Reply-To: <1333462226.23.0.725280599354.issue14484@psf.upfronthosting.co.za> Message-ID: <1405257802.14.0.360286157681.issue14484@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 15:23:38 2014 From: report at bugs.python.org (Brian Curtin) Date: Sun, 13 Jul 2014 13:23:38 +0000 Subject: [issue15962] Windows STDIN/STDOUT Redirection is actually FIXED In-Reply-To: <1347970794.78.0.910609008076.issue15962@psf.upfronthosting.co.za> Message-ID: <1405257818.07.0.143508977709.issue15962@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 15:46:45 2014 From: report at bugs.python.org (Quan Nguyen) Date: Sun, 13 Jul 2014 13:46:45 +0000 Subject: [issue21974] Typo in "Set" in PEP 289 Message-ID: <1405259205.91.0.354050943878.issue21974@psf.upfronthosting.co.za> New submission from Quan Nguyen: This statement in the Rationale section: "s = Set(word for line in page for word in line.split())" "Set" should be "set" (lowercase 's') ---------- assignee: docs at python components: Documentation messages: 222924 nosy: Quan.Nguyen, docs at python priority: normal severity: normal status: open title: Typo in "Set" in PEP 289 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 15:52:08 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 13:52:08 +0000 Subject: [issue1175984] Make subprocess.Popen support file-like objects (win) Message-ID: <1405259528.62.0.153259455189.issue1175984@psf.upfronthosting.co.za> Mark Lawrence added the comment: I believe this should be closed as the patch refers to various win32xxx imports that no longer exists in subprocess.py. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 15:58:56 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 13:58:56 +0000 Subject: [issue1260171] subprocess: more general (non-buffering) communication Message-ID: <1405259936.82.0.554484285744.issue1260171@psf.upfronthosting.co.za> Mark Lawrence added the comment: Please note the work being performed on #1191964 which was first referenced in msg54591. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 16:00:08 2014 From: report at bugs.python.org (Andy Maier) Date: Sun, 13 Jul 2014 14:00:08 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1405260008.92.0.981619099005.issue12067@psf.upfronthosting.co.za> Changes by Andy Maier : Added file: http://bugs.python.org/file35938/try_eq.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 16:00:53 2014 From: report at bugs.python.org (Andy Maier) Date: Sun, 13 Jul 2014 14:00:53 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1405260053.29.0.298643203268.issue12067@psf.upfronthosting.co.za> Changes by Andy Maier : Added file: http://bugs.python.org/file35939/try_eq.out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 16:02:08 2014 From: report at bugs.python.org (Martijn Pieters) Date: Sun, 13 Jul 2014 14:02:08 +0000 Subject: [issue21789] Broken link to PEP 263 in Python 2.7 error message In-Reply-To: <1403010008.76.0.912286060236.issue21789@psf.upfronthosting.co.za> Message-ID: <1405260128.21.0.697269526697.issue21789@psf.upfronthosting.co.za> Martijn Pieters added the comment: Yeah, I should have thought of that in the first place. Done, and thanks, Ned! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 16:17:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 14:17:27 +0000 Subject: [issue16070] Structure and native Structure (LittleEndianStructure on Windows) supports __slots__, but BigEndianStructure doesn't In-Reply-To: <1348802344.39.0.86334855376.issue16070@psf.upfronthosting.co.za> Message-ID: <1405261047.65.0.118666535597.issue16070@psf.upfronthosting.co.za> Mark Lawrence added the comment: @hct I'm very sorry about the delay in getting back to you. The reported bevaviour is the same with 3.4.1 and 3.5.0a0 on Windows 7. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 16:25:48 2014 From: report at bugs.python.org (Thomas Kember) Date: Sun, 13 Jul 2014 14:25:48 +0000 Subject: [issue21973] Can't use Idle In-Reply-To: <1405253736.35.0.379211868876.issue21973@psf.upfronthosting.co.za> Message-ID: <1405261375.94159.YahooMailNeo@web87703.mail.ir2.yahoo.com> Thomas Kember added the comment: I ran what you said. Here's what I got. C:\Python34>c:\python34\python.exe -m idlelib.idle Traceback (most recent call last): ? File "c:\python34\lib\runpy.py", line 170, in _run_module_as_main ??? "__main__", mod_spec) ? File "c:\python34\lib\runpy.py", line 85, in _run_code ??? exec(code, run_globals) ? File "c:\python34\lib\idlelib\idle.py", line 10, in ??? import idlelib.PyShell ? File "c:\python34\lib\idlelib\PyShell.py", line 29, in ??? from idlelib.EditorWindow import EditorWindow, fixwordbreaks ? File "c:\python34\lib\idlelib\EditorWindow.py", line 22, in ??? from idlelib.configHandler import idleConf ? File "c:\python34\lib\idlelib\configHandler.py", line 703, in ??? idleConf=IdleConf() ? File "c:\python34\lib\idlelib\configHandler.py", line 171, in __init__ ??? self.LoadCfgFiles() ? File "c:\python34\lib\idlelib\configHandler.py", line 694, in LoadCfgFiles ??? self.userCfg[key].Load() #same keys ? File "c:\python34\lib\idlelib\configHandler.py", line 68, in Load ??? self.read(self.file) ? File "c:\python34\lib\configparser.py", line 672, in read ??? self._read(fp, filename) ? File "c:\python34\lib\configparser.py", line 1058, in _read ??? raise MissingSectionHeaderError(fpname, lineno, line) configparser.MissingSectionHeaderError: File contains no section headers. file: 'C:\\Users\\Tomk\\.idlerc\\config-extensions.cfg', line: 1 '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0 0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' ________________________________ From: SilentGhost To: t.kember1 at btinternet.com Sent: Sunday, 13 July 2014, 13:15 Subject: [issue21973] Can't use Idle SilentGhost added the comment: This is the normal content of idle.bat Could you run `c:\python34\python.exe -m idlelib.idle` from the command-line and post the output here? ---------- components: +IDLE nosy: +SilentGhost, kbk, roger.serwy, terry.reedy _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 16:26:40 2014 From: report at bugs.python.org (Thomas Kember) Date: Sun, 13 Jul 2014 14:26:40 +0000 Subject: [issue21973] Can't use Idle In-Reply-To: <1405253736.35.0.379211868876.issue21973@psf.upfronthosting.co.za> Message-ID: <1405261375.94159.YahooMailNeo@web87703.mail.ir2.yahoo.com> Thomas Kember added the comment: I ran what you said. Here's what I got. C:\Python34>c:\python34\python.exe -m idlelib.idle Traceback (most recent call last): ? File "c:\python34\lib\runpy.py", line 170, in _run_module_as_main ??? "__main__", mod_spec) ? File "c:\python34\lib\runpy.py", line 85, in _run_code ??? exec(code, run_globals) ? File "c:\python34\lib\idlelib\idle.py", line 10, in ??? import idlelib.PyShell ? File "c:\python34\lib\idlelib\PyShell.py", line 29, in ??? from idlelib.EditorWindow import EditorWindow, fixwordbreaks ? File "c:\python34\lib\idlelib\EditorWindow.py", line 22, in ??? from idlelib.configHandler import idleConf ? File "c:\python34\lib\idlelib\configHandler.py", line 703, in ??? idleConf=IdleConf() ? File "c:\python34\lib\idlelib\configHandler.py", line 171, in __init__ ??? self.LoadCfgFiles() ? File "c:\python34\lib\idlelib\configHandler.py", line 694, in LoadCfgFiles ??? self.userCfg[key].Load() #same keys ? File "c:\python34\lib\idlelib\configHandler.py", line 68, in Load ??? self.read(self.file) ? File "c:\python34\lib\configparser.py", line 672, in read ??? self._read(fp, filename) ? File "c:\python34\lib\configparser.py", line 1058, in _read ??? raise MissingSectionHeaderError(fpname, lineno, line) configparser.MissingSectionHeaderError: File contains no section headers. file: 'C:\\Users\\Tomk\\.idlerc\\config-extensions.cfg', line: 1 '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0 0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' ________________________________ From: SilentGhost To: t.kember1 at btinternet.com Sent: Sunday, 13 July 2014, 13:15 Subject: [issue21973] Can't use Idle SilentGhost added the comment: This is the normal content of idle.bat Could you run `c:\python34\python.exe -m idlelib.idle` from the command-line and post the output here? ---------- components: +IDLE nosy: +SilentGhost, kbk, roger.serwy, terry.reedy _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 16:26:49 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 14:26:49 +0000 Subject: [issue16623] argparse help formatter does not honor non-breaking space In-Reply-To: <1354745001.59.0.580615965604.issue16623@psf.upfronthosting.co.za> Message-ID: <1405261609.47.0.603230615466.issue16623@psf.upfronthosting.co.za> Mark Lawrence added the comment: The example code works fine using 3.4.1 and 3.5.0a0 on Windows 7. ---------- nosy: +BreamoreBoy, paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 16:29:16 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 14:29:16 +0000 Subject: [issue16786] argparse doesn't offer localization interface for "version" action In-Reply-To: <1356527998.28.0.00679479762722.issue16786@psf.upfronthosting.co.za> Message-ID: <1405261756.93.0.90244188201.issue16786@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Thorsten sorry about the delay involved here. ---------- nosy: +BreamoreBoy, paul.j3 versions: +Python 3.4, Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 16:30:13 2014 From: report at bugs.python.org (SilentGhost) Date: Sun, 13 Jul 2014 14:30:13 +0000 Subject: [issue21973] Can't use Idle In-Reply-To: <1405252905.33.0.296703763462.issue21973@psf.upfronthosting.co.za> Message-ID: <1405261813.86.0.412341785603.issue21973@psf.upfronthosting.co.za> SilentGhost added the comment: If you would delete this file: C:\Users\Tomk\.idlerc\config-extensions.cfg (back it up some place else just in case). Does it start? and if not, would you mind re-running the same command again? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 16:30:40 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 14:30:40 +0000 Subject: [issue16807] argparse group nesting lost on inheritance In-Reply-To: <1356745167.13.0.671311915058.issue16807@psf.upfronthosting.co.za> Message-ID: <1405261840.89.0.262631644361.issue16807@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Dougal sorry about the delay in getting back to you. ---------- nosy: +BreamoreBoy, paul.j3 versions: +Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 16:48:39 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 14:48:39 +0000 Subject: [issue16376] wrong type for wintypes.BYTE In-Reply-To: <1351702975.6.0.783969996516.issue16376@psf.upfronthosting.co.za> Message-ID: <1405262919.63.0.690932782973.issue16376@psf.upfronthosting.co.za> Mark Lawrence added the comment: All cbytes tests passed after the change was made but I've no idea as to the impact of this. ---------- keywords: +patch nosy: +BreamoreBoy versions: -Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file35940/Issue16376.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 17:03:19 2014 From: report at bugs.python.org (=?utf-8?q?Fran=C3=A7ois-Ren=C3=A9_Rideau?=) Date: Sun, 13 Jul 2014 15:03:19 +0000 Subject: [issue21972] Bugs in the lexer and parser documentation In-Reply-To: <1405223376.11.0.196375962969.issue21972@psf.upfronthosting.co.za> Message-ID: <1405263799.03.0.724108717148.issue21972@psf.upfronthosting.co.za> Fran?ois-Ren? Rideau added the comment: Actually, my reading was buggy, and the "u" part is well-documented enough. Apologies for this part of the bug report. The lexer documentation is still missing the ellipsis, though Other bug I found in the lexer documentation: missing @= And the parser documentation of <> is probably a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 17:14:11 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Jul 2014 15:14:11 +0000 Subject: [issue21925] ResourceWarning sometimes doesn't display In-Reply-To: <1404614973.3.0.388136336832.issue21925@psf.upfronthosting.co.za> Message-ID: <1405264451.72.0.436671578891.issue21925@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: May be save the timestamp for module importing and then clean up modules them in reversed order? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 17:16:00 2014 From: report at bugs.python.org (Andy Maier) Date: Sun, 13 Jul 2014 15:16:00 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1405264560.3.0.685444737931.issue12067@psf.upfronthosting.co.za> Andy Maier added the comment: Mark: Both are good points! Would you add the cases from your second comment under "symmetry"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 17:24:09 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Jul 2014 15:24:09 +0000 Subject: [issue21861] io class name are hardcoded in reprs In-Reply-To: <1403631418.74.0.109096243494.issue21861@psf.upfronthosting.co.za> Message-ID: <1405265049.54.0.251652301408.issue21861@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I now see that this issue is not so easy from C side. And more, it is very uncommon for either Python or C implementations (especial C implementations) to introspect to figure out their "real" name. Existing cases are rather exceptions. And in many case this is only a side effect of sharing an implementation between several classes (set and frozenset, three buffered file classes in io, etc). In many cases repr's flexibility is limited: hardcoded or omitted module name, used class's __name__ instead of __qualname__, etc. This should be discussed on Python-Dev maillist. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 17:25:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 15:25:14 +0000 Subject: [issue8519] doc: termios and ioctl reference links In-Reply-To: <1272125391.54.0.0119716465224.issue8519@psf.upfronthosting.co.za> Message-ID: <1405265114.96.0.863582508372.issue8519@psf.upfronthosting.co.za> Mark Lawrence added the comment: My understanding is that we can't use the patches as the originator has never signed the CLA. Am I correct or does this only apply to code, or what? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 17:33:12 2014 From: report at bugs.python.org (Thomas Kember) Date: Sun, 13 Jul 2014 15:33:12 +0000 Subject: [issue21973] Can't use Idle In-Reply-To: <1405261813.86.0.412341785603.issue21973@psf.upfronthosting.co.za> Message-ID: <1405265591.81599.YahooMailNeo@web87704.mail.ir2.yahoo.com> Thomas Kember added the comment: Thanks, I backed that file on to a memory stick and deleted it. I made a shortcut to the idle batch file on the desktop. When I click on it, Idle comes up fine. What has happened here? What is config-extensions.cfg for and why has it stopped Idle coming up? And? why can Idle work without it? In any case, I am now able to work on my little programs. Thank you again. Tomk ________________________________ From: SilentGhost To: t.kember1 at btinternet.com made a Sent: Sunday, 13 July 2014, 15:30 Subject: [issue21973] Can't use Idle SilentGhost added the comment: If you would delete this file: C:\Users\Tomk\.idlerc\config-extensions.cfg (back it up some place else just in case). Does it start? and if not, would you mind re-running the same command again? ---------- _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 17:35:33 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 13 Jul 2014 15:35:33 +0000 Subject: [issue20858] Enhancements/fixes to pure-python datetime module In-Reply-To: <1394131058.9.0.404670194335.issue20858@psf.upfronthosting.co.za> Message-ID: <1405265733.63.0.111806084221.issue20858@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Brian, Could you, please update the summary of your changes from your first post? For example, you did not mention caching of the timedelta hashes. This particular chance seems to call for a discussion. Do we cache timedelta hashes in C implementation? What is the general wisdom on this technique? AFAICR, such hashing is done in integer objects, but I vaguely remember an old discussion on whether the same should be done for tuples. Can you remind me what was the outcome for tuples? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 17:36:12 2014 From: report at bugs.python.org (Thomas Kember) Date: Sun, 13 Jul 2014 15:36:12 +0000 Subject: [issue21973] Can't use Idle In-Reply-To: <1405261813.86.0.412341785603.issue21973@psf.upfronthosting.co.za> Message-ID: <1405265591.81599.YahooMailNeo@web87704.mail.ir2.yahoo.com> Thomas Kember added the comment: Thanks, I backed that file on to a memory stick and deleted it. I made a shortcut to the idle batch file on the desktop. When I click on it, Idle comes up fine. What has happened here? What is config-extensions.cfg for and why has it stopped Idle coming up? And? why can Idle work without it? In any case, I am now able to work on my little programs. Thank you again. Tomk ________________________________ From: SilentGhost To: t.kember1 at btinternet.com made a Sent: Sunday, 13 July 2014, 15:30 Subject: [issue21973] Can't use Idle SilentGhost added the comment: If you would delete this file: C:\Users\Tomk\.idlerc\config-extensions.cfg (back it up some place else just in case). Does it start? and if not, would you mind re-running the same command again? ---------- _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 17:41:05 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 13 Jul 2014 15:41:05 +0000 Subject: [issue20858] Enhancements/fixes to pure-python datetime module In-Reply-To: <1394131058.9.0.404670194335.issue20858@psf.upfronthosting.co.za> Message-ID: <1405266065.28.0.298005310749.issue20858@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > Updated patch, now it also caches the result of __hash__ like the C accelerator. I should read your notes! Sorry, Brian. You already answered my questions. Too bad that the latest notes are so far from the entry area. Still, it would be helpful if you could provide a self-contained description that I can copy to the NEWS file. (Don't put it in the patch - NEWS file gets out of date very quickly - put it in a tracker comment.) Also, with your patch, are we in sync with PyPy? If so, with what version? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 17:44:18 2014 From: report at bugs.python.org (SilentGhost) Date: Sun, 13 Jul 2014 15:44:18 +0000 Subject: [issue21973] Can't use Idle In-Reply-To: <1405252905.33.0.296703763462.issue21973@psf.upfronthosting.co.za> Message-ID: <1405266258.38.0.385201325497.issue21973@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- Removed message: http://bugs.python.org/msg222930 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 17:44:33 2014 From: report at bugs.python.org (SilentGhost) Date: Sun, 13 Jul 2014 15:44:33 +0000 Subject: [issue21973] Can't use Idle In-Reply-To: <1405252905.33.0.296703763462.issue21973@psf.upfronthosting.co.za> Message-ID: <1405266273.94.0.230878265184.issue21973@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- Removed message: http://bugs.python.org/msg222943 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 17:44:49 2014 From: report at bugs.python.org (SilentGhost) Date: Sun, 13 Jul 2014 15:44:49 +0000 Subject: [issue21973] Can't use Idle In-Reply-To: <1405252905.33.0.296703763462.issue21973@psf.upfronthosting.co.za> Message-ID: <1405266289.32.0.979632434038.issue21973@psf.upfronthosting.co.za> SilentGhost added the comment: IDLE supports extensions: https://docs.python.org/3/library/idle.html#extensions And that was a user-configuration file that got corrupted somehow. As it's an optional feature, IDLE can work without it. You can use your favourite text editor to compose programs and then use console to run them. It might be more convenient even for smaller programs. ---------- resolution: -> not a bug stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 17:45:09 2014 From: report at bugs.python.org (SilentGhost) Date: Sun, 13 Jul 2014 15:45:09 +0000 Subject: [issue21973] Can't use Idle In-Reply-To: <1405252905.33.0.296703763462.issue21973@psf.upfronthosting.co.za> Message-ID: <1405266309.47.0.792675043928.issue21973@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 17:46:55 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 13 Jul 2014 15:46:55 +0000 Subject: [issue20858] Enhancements/fixes to pure-python datetime module In-Reply-To: <1394131058.9.0.404670194335.issue20858@psf.upfronthosting.co.za> Message-ID: <1405266415.58.0.424603245293.issue20858@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: [Josh Rosenberg] > You've just given me an excuse to open my first bug. Did you open an issue for that? (Use "n" code in date/datetime constructors.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 17:53:56 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 13 Jul 2014 15:53:56 +0000 Subject: [issue20858] Enhancements/fixes to pure-python datetime module In-Reply-To: <1394131058.9.0.404670194335.issue20858@psf.upfronthosting.co.za> Message-ID: <1405266836.77.0.37746324913.issue20858@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Here is the tuple hash caching thread that I mentioned above: https://mail.python.org/pipermail/python-dev/2003-August/037416.html Since the C code uses caching already, I don't think we need to discuss it any further. And the thread on tuples does not give any good reason not to cache anyways. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 18:06:29 2014 From: report at bugs.python.org (R. David Murray) Date: Sun, 13 Jul 2014 16:06:29 +0000 Subject: [issue20328] mailbox: add method to delete mailbox In-Reply-To: <1390304458.71.0.378928457479.issue20328@psf.upfronthosting.co.za> Message-ID: <1405267589.77.0.210226077644.issue20328@psf.upfronthosting.co.za> R. David Murray added the comment: I find it surprising that deleting a mailbox does not delete subfolders. What is the rationale for that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 18:21:49 2014 From: report at bugs.python.org (R. David Murray) Date: Sun, 13 Jul 2014 16:21:49 +0000 Subject: [issue21935] Implement AUTH command in smtpd. In-Reply-To: <1404766823.82.0.391401675174.issue21935@psf.upfronthosting.co.za> Message-ID: <1405268509.74.0.230732044333.issue21935@psf.upfronthosting.co.za> R. David Murray added the comment: I think it would be a good idea to write the documentation. It is much easier to get a feel for the API via docs than it is via code. (That is, when you explain how to use the API, you sometimes find design bugs :) for a/b: so you are thinking of an auth function passed in as opposed to a method overridden in the subclass? That is consistent with how we enable other capabilities, so it has some attraction. I haven't gone over the code in detail yet, but it looks like you need to add a reset of 'self.user' during the applicable state transitions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 18:23:27 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Jul 2014 16:23:27 +0000 Subject: [issue21951] tcl test change crashes AIX In-Reply-To: <1405013926.74.0.877232363604.issue21951@psf.upfronthosting.co.za> Message-ID: <1405268607.11.0.947117064605.issue21951@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is following test passed? check((1,), '1') Is CPython crashes when change signature of testfunc? --- a/Lib/test/test_tcl.py Sat Jul 12 18:26:03 2014 +0300 +++ b/Lib/test/test_tcl.py Sun Jul 13 19:21:55 2014 +0300 @@ -416,7 +416,7 @@ def test_user_command(self): result = None - def testfunc(arg): + def testfunc(arg=None, *args): nonlocal result result = arg return arg ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 18:29:05 2014 From: report at bugs.python.org (R. David Murray) Date: Sun, 13 Jul 2014 16:29:05 +0000 Subject: [issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell In-Reply-To: <1404254403.84.0.153705596072.issue21901@psf.upfronthosting.co.za> Message-ID: <1405268945.74.0.862009542489.issue21901@psf.upfronthosting.co.za> R. David Murray added the comment: The python command just returns. The dmesg was a good call: python invoked oom-killer: gfp_mask=0xd0, order=0, oom_adj=0 python cpuset=pydev mems_allowed=0 [...] Out of memory: kill process python(28623:#112) score 85200 or a child Killed process python(28623:#112) vsz:340800kB, anon-rss:330764kB, file-rss:3864kB I *thought* I had this virtual server configured with the same resources as I do the buildbots, but I could be wrong. It's been quite some time since I set both of them up, and I don't even remember how the resources are set at the moment. Let me know if you want to see the entire dmesg output. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 18:35:17 2014 From: report at bugs.python.org (R. David Murray) Date: Sun, 13 Jul 2014 16:35:17 +0000 Subject: [issue1610654] cgi.py multipart/form-data Message-ID: <1405269317.66.0.599874479324.issue1610654@psf.upfronthosting.co.za> R. David Murray added the comment: To move this issue along we need someone to convert it into our standard patch format (a unified diff against either the 3.4 or the default branch, preferrably produced via an 'hg diff' command without the --git option), with the test included as a unit test added to the appropriate test file (tests/test_cgi.py). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 18:37:16 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 16:37:16 +0000 Subject: [issue16726] expat ParseFile expects bytes, not string In-Reply-To: <1355914609.66.0.723053050254.issue16726@psf.upfronthosting.co.za> Message-ID: <1405269436.44.0.503801467675.issue16726@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Michiel I'm sorry about the delay in replying to you. I can confirm the same behaviour in 3.4.1 on 3.5.0a0 on Windows 7. ---------- nosy: +BreamoreBoy, christian.heimes versions: +Python 3.4, Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 18:42:31 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 16:42:31 +0000 Subject: [issue14094] nt.realpath() should use GetFinalPathNameByHandle() when available In-Reply-To: <1329954470.08.0.180096078595.issue14094@psf.upfronthosting.co.za> Message-ID: <1405269751.31.0.425686701369.issue14094@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm assuming that this should be treated as an enhancement request. ---------- nosy: +BreamoreBoy type: -> enhancement versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 18:48:22 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 16:48:22 +0000 Subject: [issue16561] Windows installer doesn't use UAC, then crashes In-Reply-To: <1353960153.53.0.844150162265.issue16561@psf.upfronthosting.co.za> Message-ID: <1405270102.05.0.346658152302.issue16561@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm assuming that this is still an issue. I've not tested it myself as I've never understood why python gets put in "Program Files" so I don't have such a setup and won't be creating one. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 19:21:00 2014 From: report at bugs.python.org (Jessica McKellar) Date: Sun, 13 Jul 2014 17:21:00 +0000 Subject: [issue1186900] nntplib shouldn't raise generic EOFError Message-ID: <1405272060.52.0.599288638792.issue1186900@psf.upfronthosting.co.za> Changes by Jessica McKellar : ---------- keywords: +needs review stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 19:21:23 2014 From: report at bugs.python.org (Jessica McKellar) Date: Sun, 13 Jul 2014 17:21:23 +0000 Subject: [issue21585] Run Tkinter tests with wantobjects=False In-Reply-To: <1401137639.41.0.24885887123.issue21585@psf.upfronthosting.co.za> Message-ID: <1405272083.12.0.328093383718.issue21585@psf.upfronthosting.co.za> Changes by Jessica McKellar : ---------- keywords: +needs review stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 19:22:21 2014 From: report at bugs.python.org (Jessica McKellar) Date: Sun, 13 Jul 2014 17:22:21 +0000 Subject: [issue6639] turtle: _tkinter.TclError: invalid command name ".10170160" In-Reply-To: <1249344565.24.0.634557720335.issue6639@psf.upfronthosting.co.za> Message-ID: <1405272141.79.0.619970088946.issue6639@psf.upfronthosting.co.za> Changes by Jessica McKellar : ---------- keywords: +needs review stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 19:30:49 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 17:30:49 +0000 Subject: [issue16458] subprocess.py throw "The handle is invalid" error on duplicating the STD_INPUT_HANDLE In-Reply-To: <1352688567.58.0.199976634188.issue16458@psf.upfronthosting.co.za> Message-ID: <1405272649.23.0.0805585120424.issue16458@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is XP under Python support now? I'm sure I've read that it isn't but can't find a reference. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 19:40:31 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 Jul 2014 17:40:31 +0000 Subject: [issue16123] IDLE - deprecate running without a subprocess In-Reply-To: <1349302429.82.0.0807471180715.issue16123@psf.upfronthosting.co.za> Message-ID: <1405273231.86.0.937652178813.issue16123@psf.upfronthosting.co.za> Terry J. Reedy added the comment: It would be nice if we are able to to this in 3.5, because the dependecy is accomplished, but not doing so is not a release blocker. ---------- dependencies: +Idle: use pipes instead of sockets to talk with user subprocess priority: deferred blocker -> normal stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 19:56:23 2014 From: report at bugs.python.org (Berker Peksag) Date: Sun, 13 Jul 2014 17:56:23 +0000 Subject: [issue1186900] nntplib shouldn't raise generic EOFError Message-ID: <1405274183.07.0.164958999594.issue1186900@psf.upfronthosting.co.za> Berker Peksag added the comment: diff -r 8f85262fbe8a Lib/nntplib.py --- a/Lib/nntplib.py Sun Jul 06 02:24:24 2014 -0400 +++ b/Lib/nntplib.py Thu Jul 10 16:10:38 2014 -0700 @@ -122,6 +122,9 @@ """Error in response data""" pass +class NNTPConnectError(NNTPError): + """Error during connection establishment.""" + pass Could you also document the new exception? (See Doc/library/nntplib.rst and please add a versionadded directive) The pass statement is redundant, but we could keep it to be consistent with rest of the library. @@ -435,7 +438,7 @@ raise NNTPDataError('line too long') if self.debugging > 1: print('*get*', repr(line)) - if not line: raise EOFError + if not line: raise NNTPConnectError() if not line: raise NNTPConnectError looks more readable to me. Also, you could add a more descriptive error message. ---------- nosy: +berker.peksag versions: +Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 19:56:43 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 17:56:43 +0000 Subject: [issue17480] pyvenv should be installed someplace more obvious on Windows In-Reply-To: <1363714170.98.0.299571294884.issue17480@psf.upfronthosting.co.za> Message-ID: <1405274203.36.0.566991143379.issue17480@psf.upfronthosting.co.za> Mark Lawrence added the comment: Any thoughts from our Windows gurus? ---------- nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware type: -> enhancement versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 20:04:55 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 13 Jul 2014 18:04:55 +0000 Subject: [issue1186900] nntplib shouldn't raise generic EOFError Message-ID: <1405274695.66.0.176596213799.issue1186900@psf.upfronthosting.co.za> Ezio Melotti added the comment: Wouldn't this be backward incompatible? Even if the EOFError that is raised is not documented explicitly, people might be catching it, and switching to a new exception would break their programs. Maybe NNTPConnectError should inherit from EOFError too? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 20:07:14 2014 From: report at bugs.python.org (Lita Cho) Date: Sun, 13 Jul 2014 18:07:14 +0000 Subject: [issue1186900] nntplib shouldn't raise generic EOFError Message-ID: <1405274834.22.0.690121299292.issue1186900@psf.upfronthosting.co.za> Lita Cho added the comment: That's a good point. I can add that so the NNTPConnectError can inherit the EOFError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 20:32:38 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 Jul 2014 18:32:38 +0000 Subject: [issue21973] Idle should not quit on corrupted user config files In-Reply-To: <1405252905.33.0.296703763462.issue21973@psf.upfronthosting.co.za> Message-ID: <1405276358.47.0.863297616339.issue21973@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Explanation: there are a few config-xy files in lib/idlelib that contain default configuration values. Custom values for a particular user, which override the defaults, are kept in a .idlerc directory placed in a users home directory (here C:/users/Tomk). Config-main and config-keys are edited by Idle in response to entries in the preferences/options dialog. Any can be edited by hand. Since Idle can work without these files, I consider it a bug that it quits when there is a bad one. Instead of raising an uncaught exception, it should display a warning message and continue*. It could also offer to delete or rename the file so the message does not reappear the next time Idle is started. * (Note to myself) This could be done either by replacing the raise statement or by catching the exception further up the call chain, where other errors could be caught too, and all turned into warnings. We are actively working on improving the error handling for config-keys, but I don't know if there is an issue for this particular error. So I am re-opening this issue until this problem is fixed or I know that this is a duplicate report. Thomas, thank you for the report, and in particular for the full traceback. when you reply by email, please delete the message you are responding to except possibly for a line or two that you need to quote. When viewed on the site, your response is placed just beneath the previous one, so bulk quoting is redundant. ---------- resolution: not a bug -> stage: resolved -> test needed status: closed -> open title: Can't use Idle -> Idle should not quit on corrupted user config files versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 20:35:46 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 Jul 2014 18:35:46 +0000 Subject: [issue15962] Windows STDIN/STDOUT Redirection is actually FIXED In-Reply-To: <1347970794.78.0.910609008076.issue15962@psf.upfronthosting.co.za> Message-ID: <1405276546.69.0.763711934727.issue15962@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 20:39:13 2014 From: report at bugs.python.org (Lita Cho) Date: Sun, 13 Jul 2014 18:39:13 +0000 Subject: [issue1186900] nntplib shouldn't raise generic EOFError Message-ID: <1405276753.4.0.0407856822508.issue1186900@psf.upfronthosting.co.za> Lita Cho added the comment: Here is an updated patch. ---------- Added file: http://bugs.python.org/file35941/nntplib_error.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 20:45:54 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 18:45:54 +0000 Subject: [issue15968] Incorporate Tcl/Tk/Tix into the Windows build process In-Reply-To: <1347996983.92.0.069726969781.issue15968@psf.upfronthosting.co.za> Message-ID: <1405277154.36.0.894364023759.issue15968@psf.upfronthosting.co.za> Mark Lawrence added the comment: Anything else to do here, noting the references to #21059 and #20035 ? Great work by the way, things on Windows are far cleaner than they were just a few months ago. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 20:53:03 2014 From: report at bugs.python.org (David Edelsohn) Date: Sun, 13 Jul 2014 18:53:03 +0000 Subject: [issue21951] tcl test change crashes AIX In-Reply-To: <1405013926.74.0.877232363604.issue21951@psf.upfronthosting.co.za> Message-ID: <1405277583.71.0.713570859614.issue21951@psf.upfronthosting.co.za> David Edelsohn added the comment: > Is following test passed? > check((1,), '1') That test succeeds. > Is CPython crashes when change signature of testfunc? --- a/Lib/test/test_tcl.py Sat Jul 12 18:26:03 2014 +0300 +++ b/Lib/test/test_tcl.py Sun Jul 13 19:21:55 2014 +0300 @@ -416,7 +416,7 @@ def test_user_command(self): result = None - def testfunc(arg): + def testfunc(arg=None, *args): nonlocal result result = arg return arg This change does not have any effect on the original failure. The assertion failure and crash continues to occur. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 20:55:43 2014 From: report at bugs.python.org (Brian Curtin) Date: Sun, 13 Jul 2014 18:55:43 +0000 Subject: [issue15968] Incorporate Tcl/Tk/Tix into the Windows build process In-Reply-To: <1347996983.92.0.069726969781.issue15968@psf.upfronthosting.co.za> Message-ID: <1405277743.48.0.894757074226.issue15968@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 20:56:44 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Jul 2014 18:56:44 +0000 Subject: [issue10395] new os.path function to extract common prefix based on path components In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1405277804.3.0.276091446904.issue10395@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is revised patch. The behavior is changed in correspondence with results of Python-ideas discussion, extended tests, fixed several bugs. ---------- keywords: +patch stage: commit review -> patch review Added file: http://bugs.python.org/file35942/ospath_commonpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 21:13:37 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Jul 2014 19:13:37 +0000 Subject: [issue11344] Add os.path.splitpath(path) function In-Reply-To: <1298795208.87.0.771920756626.issue11344@psf.upfronthosting.co.za> Message-ID: <1405278817.7.0.475466036524.issue11344@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch. Added private general implementation in genericpath and specialized implementations are now tested to return the same result as general implementation. ---------- versions: +Python 3.5 -Python 3.4 Added file: http://bugs.python.org/file35943/ospath_splitpath_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 21:18:35 2014 From: report at bugs.python.org (Jessica McKellar) Date: Sun, 13 Jul 2014 19:18:35 +0000 Subject: [issue21914] Create unit tests for Turtle guionly In-Reply-To: <1404442037.11.0.611165319303.issue21914@psf.upfronthosting.co.za> Message-ID: <1405279115.37.0.221162245801.issue21914@psf.upfronthosting.co.za> Changes by Jessica McKellar : ---------- keywords: +needs review stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 21:18:50 2014 From: report at bugs.python.org (Jessica McKellar) Date: Sun, 13 Jul 2014 19:18:50 +0000 Subject: [issue21916] Create unit tests for turtle textonly In-Reply-To: <1404479564.66.0.23163619156.issue21916@psf.upfronthosting.co.za> Message-ID: <1405279130.94.0.463596427837.issue21916@psf.upfronthosting.co.za> Changes by Jessica McKellar : ---------- keywords: +needs review stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 21:26:51 2014 From: report at bugs.python.org (David Edelsohn) Date: Sun, 13 Jul 2014 19:26:51 +0000 Subject: [issue21951] tcl test change crashes AIX In-Reply-To: <1405013926.74.0.877232363604.issue21951@psf.upfronthosting.co.za> Message-ID: <1405279611.41.0.997292290594.issue21951@psf.upfronthosting.co.za> David Edelsohn added the comment: #5 0x1019bb90 in PyCFunction_Call (func=0x30533b5c, arg=0x305d8ab4, kw=0x0) at Objects/methodobject.c:94 #6 0x1012534c in call_function (pp_stack=0x2ff16144, oparg=2) at Python/ceval.c:4269 94 CHECK_RESULT(res); (gdb) print res $9 = (PyObject *) 0x0 (gdb) print meth $10 = (PyCFunction) @0x20380888: 0xd8dd57dc (gdb) print self $11 = (PyObject *) 0x305d44d8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 21:32:33 2014 From: report at bugs.python.org (Brian Curtin) Date: Sun, 13 Jul 2014 19:32:33 +0000 Subject: [issue11344] Add os.path.splitpath(path) function In-Reply-To: <1298795208.87.0.771920756626.issue11344@psf.upfronthosting.co.za> Message-ID: <1405279953.27.0.61780348955.issue11344@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 21:41:08 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 19:41:08 +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: <1405280468.29.0.960945889274.issue20451@psf.upfronthosting.co.za> Mark Lawrence added the comment: I believe the patch on #1576120 is related to this but it was never reviewed. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 21:53:52 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Jul 2014 19:53:52 +0000 Subject: [issue21951] tcl test change crashes AIX In-Reply-To: <1405013926.74.0.877232363604.issue21951@psf.upfronthosting.co.za> Message-ID: <1405281232.02.0.322860342599.issue21951@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: May be this patch will help. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file35944/tkinter_nomemory.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 22:20:15 2014 From: report at bugs.python.org (Wichert Akkerman) Date: Sun, 13 Jul 2014 20:20:15 +0000 Subject: [issue15266] Perform the same checks as PyPI for Description field In-Reply-To: <1341614489.26.0.385769914645.issue15266@psf.upfronthosting.co.za> Message-ID: <1405282815.38.0.370907297684.issue15266@psf.upfronthosting.co.za> Wichert Akkerman added the comment: ?ric is not quite correct: I currently have a package where "python setup.py check" does not show any error, but PyPI still refuses to format my long description. Likewise "python setup.py --long-description | rst2html-2.7.py > /dev/null" also does not reveal any errors or warnings, so I am at a completely loss as to why PyPI refuses to format my documentation. ---------- nosy: +wichert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 23:12:52 2014 From: report at bugs.python.org (Chris Rebert) Date: Sun, 13 Jul 2014 21:12:52 +0000 Subject: [issue21514] update json module docs in light of RFC 7159 & ECMA-404 In-Reply-To: <1400215968.18.0.723032535405.issue21514@psf.upfronthosting.co.za> Message-ID: <1405285972.44.0.226152848295.issue21514@psf.upfronthosting.co.za> Chris Rebert added the comment: Here's a draft patch against the default branch that updates the json module's docs accordingly. Note that under "Implementation Limitations", the statement "This module does not impose any such limits beyond those of the relevant Python datatypes themselves or the Python interpreter itself." is just a guess; I need someone who's familiar with the implementation to verify/correct this. ---------- keywords: +patch Added file: http://bugs.python.org/file35945/json-rfc-7159_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 23:17:33 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 21:17:33 +0000 Subject: [issue15947] Assigning new values to instance of pointer types does not check validity In-Reply-To: <1347720107.38.0.0969129955644.issue15947@psf.upfronthosting.co.za> Message-ID: <1405286253.49.0.866388971595.issue15947@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Facundo please accept our apologies for the delay in getting back to you. ---------- nosy: +BreamoreBoy, amaury.forgeotdarc, belopolsky, meador.inge versions: +Python 3.4, Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 23:20:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 21:20:59 +0000 Subject: [issue15388] SAX parse (ExpatParser) leaks file handle when given filename input In-Reply-To: <1342621050.08.0.170764357594.issue15388@psf.upfronthosting.co.za> Message-ID: <1405286459.29.0.692409104601.issue15388@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Matt I'm sorry that we haven't got back to you on this. ---------- nosy: +BreamoreBoy, christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 23:22:37 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 13 Jul 2014 21:22:37 +0000 Subject: [issue16178] atexit._run_exitfuncs should be a public API In-Reply-To: <1349809372.69.0.332686923103.issue16178@psf.upfronthosting.co.za> Message-ID: <1405286557.67.0.881321963736.issue16178@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Gregory do you intend to follow up on this? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 23:28:26 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Jul 2014 21:28:26 +0000 Subject: [issue18592] Idle: test SearchDialogBase.py In-Reply-To: <1375146770.41.0.774627283078.issue18592@psf.upfronthosting.co.za> Message-ID: <3hBLh93dWVz7LjP@mail.python.org> Roundup Robot added the comment: New changeset b6c5719e0f4e by Terry Jan Reedy in branch '2.7': Issue #18592: Method return signature changes made to SearchDialogBase for http://hg.python.org/cpython/rev/b6c5719e0f4e New changeset 407110796b16 by Terry Jan Reedy in branch '3.4': Issue #18592: Method return signature changes made to SearchDialogBase for http://hg.python.org/cpython/rev/407110796b16 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 23:47:06 2014 From: report at bugs.python.org (Chris Rebert) Date: Sun, 13 Jul 2014 21:47:06 +0000 Subject: [issue10289] Document magic methods called by built-in functions In-Reply-To: <1288655696.94.0.809001507215.issue10289@psf.upfronthosting.co.za> Message-ID: <1405288026.71.0.622433981397.issue10289@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 13 23:49:04 2014 From: report at bugs.python.org (David Edelsohn) Date: Sun, 13 Jul 2014 21:49:04 +0000 Subject: [issue21951] tcl test change crashes AIX In-Reply-To: <1405013926.74.0.877232363604.issue21951@psf.upfronthosting.co.za> Message-ID: <1405288144.95.0.637222296977.issue21951@psf.upfronthosting.co.za> David Edelsohn added the comment: No difference with the patch. The problem is not a a malloc() failure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 00:30:17 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 13 Jul 2014 22:30:17 +0000 Subject: [issue21777] Separate out documentation of binary sequence methods In-Reply-To: <1402918605.38.0.604956966245.issue21777@psf.upfronthosting.co.za> Message-ID: <1405290617.26.0.293384838228.issue21777@psf.upfronthosting.co.za> Nick Coghlan added the comment: v2 patch converts the second category of functions. This conversion highlighted the lack of good examples in the str.split() docs, as well as some over and underspecification in the behaviour of the centering and justification methods (guarantees about object identity that don't hold for bytearray, failure to note that the default fill character is specifically an ASCII space - Unicode has more than one space type), so I also fixed those. Added Guido to the nosy list - Guido, if you could cast your eye over this and at least give a +1 to the general approach, that would be great, otherwise I'll just go ahead and merge it some time after I finish converting the final category (which I expect will be no later than the PyCon AU sprints in early August, and potentially sooner) ---------- nosy: +gvanrossum Added file: http://bugs.python.org/file35946/separate_binary_sequence_docs_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 00:39:38 2014 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sun, 13 Jul 2014 22:39:38 +0000 Subject: [issue21777] Separate out documentation of binary sequence methods In-Reply-To: <1402918605.38.0.604956966245.issue21777@psf.upfronthosting.co.za> Message-ID: <1405291178.15.0.268055963435.issue21777@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Why are you removing guarantees like these from the str docs: "The original string is returned if *width* is less than or equal to ``len(s)``." ? This doesn't seem to have anything to do with documenting bytes and bytearrays. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 01:17:45 2014 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 13 Jul 2014 23:17:45 +0000 Subject: [issue16178] atexit._run_exitfuncs should be a public API In-Reply-To: <1349809372.69.0.332686923103.issue16178@psf.upfronthosting.co.za> Message-ID: <1405293465.22.0.830151550244.issue16178@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I don't currently have a need for this so, no. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 01:58:05 2014 From: report at bugs.python.org (paul j3) Date: Sun, 13 Jul 2014 23:58:05 +0000 Subject: [issue16623] argparse help formatter does not honor non-breaking space In-Reply-To: <1354745001.59.0.580615965604.issue16623@psf.upfronthosting.co.za> Message-ID: <1405295885.7.0.515035597829.issue16623@psf.upfronthosting.co.za> paul j3 added the comment: The issue here is how `textwrap` handles the non-breaking space. That's being address here: http://bugs.python.org/issue20491 textwrap: Non-breaking space not honored Temporarily an `argparse` user can get around it with `formatter_class=argparse.RawTextHelpFormatter`. That suppresses all automatic wrapping, so it's not perfect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 02:01:29 2014 From: report at bugs.python.org (Elizabeth Myers) Date: Mon, 14 Jul 2014 00:01:29 +0000 Subject: [issue21975] Using pickled/unpickled sqlite3.Row results in segfault rather than exception Message-ID: <1405296089.18.0.134297351302.issue21975@psf.upfronthosting.co.za> New submission from Elizabeth Myers: Pickling, unpickling, then using an sqlite3.Row object results in a segfault on at least Python 3.3.5, 3.4.0, and 3.4.1. I have attached a test case and a backtrace below. I know you're not supposed to pickle sqlite3.Row objects, as the given test case below results in an exception to the effect that sqlite3.Row objects cannot be pickled in Python 2.7. I don't think a segfault is the desired behaviour, however... ---------- components: Library (Lib) files: testcase.py messages: 222982 nosy: Elizacat priority: normal severity: normal status: open title: Using pickled/unpickled sqlite3.Row results in segfault rather than exception type: crash versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file35947/testcase.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 02:03:51 2014 From: report at bugs.python.org (Elizabeth Myers) Date: Mon, 14 Jul 2014 00:03:51 +0000 Subject: [issue21975] Using pickled/unpickled sqlite3.Row results in segfault rather than exception In-Reply-To: <1405296089.18.0.134297351302.issue21975@psf.upfronthosting.co.za> Message-ID: <1405296231.5.0.860240852213.issue21975@psf.upfronthosting.co.za> Elizabeth Myers added the comment: The backtrace of the crash, if it helps ---------- Added file: http://bugs.python.org/file35948/trace.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 02:37:52 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 00:37:52 +0000 Subject: [issue21974] Typo in "Set" in PEP 289 In-Reply-To: <1405259205.91.0.354050943878.issue21974@psf.upfronthosting.co.za> Message-ID: <1405298272.45.0.14243698314.issue21974@psf.upfronthosting.co.za> Raymond Hettinger added the comment: To modern eyes, that might look like a typo, but it is correct. It refers to the Set() class in the sets.py module, the pure python implementation of sets which pre-dates the c-implementation of the set() built-in type. ---------- nosy: +rhettinger resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 02:42:07 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 00:42:07 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1405298527.54.0.0925525153613.issue21955@psf.upfronthosting.co.za> Raymond Hettinger added the comment: There also used to be a fast path for binary subscriptions with integer indexes. I would like to see that performance regression fixed if it can be done cleanly. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 02:49:09 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 00:49:09 +0000 Subject: [issue10395] new os.path function to extract common prefix based on path components In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1405298949.41.0.829630586038.issue10395@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This patch looks reasonable except for the doc change to os.path.commonprefix(). Remember, that function IS working as documented and that our policy is to document in an affirmative manner (here is what the function does and how to use it versus being preachy about "broken-by-design" etc.) ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 02:51:54 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 00:51:54 +0000 Subject: [issue16178] atexit._run_exitfuncs should be a public API In-Reply-To: <1349809372.69.0.332686923103.issue16178@psf.upfronthosting.co.za> Message-ID: <1405299114.12.0.384695424436.issue16178@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Closed due to lack on interest. ---------- nosy: +rhettinger resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 03:00:30 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 01:00:30 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1405299630.28.0.396909096392.issue21922@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I agree with all of Mark's objections. Unless there is a compelling win, Python is better-off without the maintenance, portability, and licensing issues. I have vague memories of this having been discussed a long time ago and it is unlikely that there have been any changes to the reasons for not doing it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 03:50:16 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 01:50:16 +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: <1405302616.4.0.160327680998.issue20451@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I believe the problem lies with the way that Windows implements > the 'exec' functions. Yes, that is that cause of the observed behavior. See the first note in the remarks section on the relevant MSDN entry at http://msdn.microsoft.com/en-us/library/431x4c1w.aspx : """ Spaces embedded in strings may cause unexpected behavior; for example, passing _exec the string "hi there" will result in the new process getting two arguments, "hi" and "there". If the intent was to have the new process open a file named "hi there", the process would fail. You can avoid this by quoting the string: "\"hi there\"". """ The 'exec' functions are more low level and more arcane than most people would like. Python exposes that functionality with all its beauty and all its warts. David Murray is right in saying that you likely need one of the higher level modules such as subprocess with shell=True. I looked through the code in Modules/posixmodule.c and didn't any code on our part that exacerbates the behavior. I recommend closing this as just one of the facts-of-life when dealing with low level functionality. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 03:53:55 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 01:53:55 +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: <1405302835.48.0.587778140669.issue20451@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I believe the problem lies with the way that Windows implements > the 'exec' functions. Yes, that is that cause of the observed behavior. See the first note in the remarks section on the relevant MSDN entry at http://msdn.microsoft.com/en-us/library/431x4c1w.aspx : """ Spaces embedded in strings may cause unexpected behavior; for example, passing _exec the string "hi there" will result in the new process getting two arguments, "hi" and "there". If the intent was to have the new process open a file named "hi there", the process would fail. You can avoid this by quoting the string: "\"hi there\"". """ The 'exec' functions are more low level and more arcane than most people would like. Python exposes that functionality with all its beauty and all its warts. David Murray is right in saying that you likely need one of the higher level modules such as subprocess with shell=True. I looked through the code in Modules/posixmodule.c and didn't any code on our part that exacerbates the behavior. Knowing that the cause is the underlying function still leaves the question of whether to apply a patch the mitigates the problem (possibly breaking some code that relies on the existing behavior) or whether to live with the facts-of-life that accompany low level O/S functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 03:54:06 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 01:54:06 +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: <1405302846.59.0.936682108496.issue20451@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- Removed message: http://bugs.python.org/msg222989 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 04:00:39 2014 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 14 Jul 2014 02:00:39 +0000 Subject: [issue21777] Separate out documentation of binary sequence methods In-Reply-To: <1405291178.15.0.268055963435.issue21777@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: On 13 Jul 2014 18:39, "Marc-Andre Lemburg" wrote: > > > Marc-Andre Lemburg added the comment: > > Why are you removing guarantees like these from the str docs: > > "The original string is returned if *width* is less than or equal to ``len(s)``." Because it's untrue for bytearray, and possible object reuse is a general characteristic of immutability for str and bytes. If another implementation makes a copy for some reason, it would still be considered "Python". Since the sentence thus conveys no useful information, I removed it from both the text and binary variants rather than coming up with appropriate wording to indicate that the behaviour of returning a new reference to the existing object when no content changes are needed doesn't apply to the mutable bytearray. > > ? > > This doesn't seem to have anything to do with documenting bytes and bytearrays. > > ---------- > nosy: +lemburg > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 04:07:10 2014 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 14 Jul 2014 02:07:10 +0000 Subject: [issue21777] Separate out documentation of binary sequence methods In-Reply-To: Message-ID: Guido van Rossum added the comment: On Sun, Jul 13, 2014 at 7:00 PM, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > On 13 Jul 2014 18:39, "Marc-Andre Lemburg" wrote: > > > > > > Marc-Andre Lemburg added the comment: > > > > Why are you removing guarantees like these from the str docs: > > > > "The original string is returned if *width* is less than or equal to > ``len(s)``." > > Because it's untrue for bytearray, and possible object reuse is a general > characteristic of immutability for str and bytes. If another implementation > makes a copy for some reason, it would still be considered "Python". > > Since the sentence thus conveys no useful information, I removed it from > both the text and binary variants rather than coming up with appropriate > wording to indicate that the behaviour of returning a new reference to the > existing object when no content changes are needed doesn't apply to the > mutable bytearray. > That feels like overreacting. It *is* useful to know about this guarantee, and it would be better if we could somehow require it rather than claim it doesn't matter. And before you counter with examples of other CPython behaviors that *shouldn't* be guaranteed across implementations, I am talking about this specific case, and every case needs to be examined on its merits separately. It is possible that in the end we'll decide this particular guarantee is not worth having -- but I think that should not be decided by a refactoring of the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 05:30:56 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 03:30:56 +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: <1405308656.26.0.0520587383806.issue20451@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I no longer have a Windows box to test this but any proposed patch needs to make sure it doesn't break code that is already manually escaping the inputs. ---------- nosy: +loewis, steve.dower, tim.golden, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 08:08:07 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Jul 2014 06:08:07 +0000 Subject: [issue17506] Improve IDLE news handling In-Reply-To: <1363852723.03.0.237286956936.issue17506@psf.upfronthosting.co.za> Message-ID: <3hBZCp4Vd5z7LjP@mail.python.org> Roundup Robot added the comment: New changeset aa059a8fb55a by Terry Jan Reedy in branch '2.7': Issue #17506: Synchronize Misc/NEWS and idlelib/NEWS.txt for 2.7. http://hg.python.org/cpython/rev/aa059a8fb55a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 08:09:44 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 14 Jul 2014 06:09:44 +0000 Subject: [issue17506] Improve IDLE news handling In-Reply-To: <1363852723.03.0.237286956936.issue17506@psf.upfronthosting.co.za> Message-ID: <1405318184.14.0.286054968726.issue17506@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The items in Misc/NEWS and idlelib/NEWS.text were mostly disjoint. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 08:15:58 2014 From: report at bugs.python.org (William Orr) Date: Mon, 14 Jul 2014 06:15:58 +0000 Subject: [issue21976] Fix test_ssl.py to handle LibreSSL versioning appropriately Message-ID: <1405318558.48.0.274142597942.issue21976@psf.upfronthosting.co.za> New submission from William Orr: Currently, test_ssl.py requires the version information to match the OpenSSL format exactly, and to be less than 2.0. LibreSSL, a drop-in replacement for OpenSSL, has started its version numbers at 2.0.0, and reports it slightly differently. This patch addresses that. Tested on Exherbo Linux amd64 with LibreSSL portable 2.0.1. ---------- components: Tests files: libressl-tests.diff keywords: patch messages: 222996 nosy: worr priority: normal severity: normal status: open title: Fix test_ssl.py to handle LibreSSL versioning appropriately type: behavior versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file35949/libressl-tests.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 08:15:59 2014 From: report at bugs.python.org (paul j3) Date: Mon, 14 Jul 2014 06:15:59 +0000 Subject: [issue16786] argparse doesn't offer localization interface for "version" action In-Reply-To: <1356527998.28.0.00679479762722.issue16786@psf.upfronthosting.co.za> Message-ID: <1405318559.57.0.115576724478.issue16786@psf.upfronthosting.co.za> paul j3 added the comment: In this patch I added the '_()' localization to the '_VersionAction' default 'help'. While this is a straight forward change, I haven't tested it. It does run test_argparse.py, but that doesn't have any tests for localization. According to the discussion here: https://mail.python.org/pipermail/python-dev/2010-May/100215.html this default help was originally None, and adding this string was seen as a worthwhile convenience. Localization was not considered. Does this use of _() really save the user effort? May be it would if they are already using the depricated version. Otherwise they could just give the version argument their own non default help line. I haven't used localization enough to know. ---------- keywords: +patch Added file: http://bugs.python.org/file35950/patch_1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 08:20:38 2014 From: report at bugs.python.org (Alexandr Nevskiy) Date: Mon, 14 Jul 2014 06:20:38 +0000 Subject: [issue20010] time.strftime('%z') didn't make +HHMM return in windows xp In-Reply-To: <1387319931.23.0.412917689607.issue20010@psf.upfronthosting.co.za> Message-ID: <1405318838.47.0.918072373382.issue20010@psf.upfronthosting.co.za> Alexandr Nevskiy added the comment: The same odd behavior for Windows 7 C:\Python34\python.exe Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.strftime('%z', time.localtime(time.time())) 'Russian Standard Time' >>> time.strftime('%Z', time.localtime(time.time())) 'Russian Standard Time' ---------- nosy: +kepkin versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 08:36:02 2014 From: report at bugs.python.org (Case Van Horsen) Date: Mon, 14 Jul 2014 06:36:02 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1405319762.08.0.419904017919.issue21922@psf.upfronthosting.co.za> Case Van Horsen added the comment: I've successfully tested the patch. The patch works fine but there are a couple of issues: 1) The patch relies on several new low-level functions that were introduced in the latest release of GMP 6.0.0. Most Linux distributions are still providing older versions. 2) The new functions are not available in any version of MPIR so I can't try a Windows build. I've done some basic tests but I'll wait until Hristo updates the patch with his improvements before I run detailed tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 09:23:21 2014 From: report at bugs.python.org (py.user) Date: Mon, 14 Jul 2014 07:23:21 +0000 Subject: [issue21977] In the re's token example OP and SKIP regexes can be improved Message-ID: <1405322601.6.0.312118432344.issue21977@psf.upfronthosting.co.za> New submission from py.user: https://docs.python.org/3/library/re.html#writing-a-tokenizer There are redundant escapes in the regex: ('OP', r'[+*\/\-]'), # Arithmetic operators Sequence -+*/ is sufficient. It makes the loop to do all steps on every 4 spaces: ('SKIP', r'[ \t]'), # Skip over spaces and tabs Sequence [ \t]+ is faster. Applied patch. ---------- assignee: docs at python components: Documentation, Regular Expressions files: re_ex_tok.diff keywords: patch messages: 223000 nosy: docs at python, ezio.melotti, mrabarnett, py.user priority: normal severity: normal status: open title: In the re's token example OP and SKIP regexes can be improved type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file35951/re_ex_tok.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 09:28:15 2014 From: report at bugs.python.org (Claudiu Popa) Date: Mon, 14 Jul 2014 07:28:15 +0000 Subject: [issue21975] Using pickled/unpickled sqlite3.Row results in segfault rather than exception In-Reply-To: <1405296089.18.0.134297351302.issue21975@psf.upfronthosting.co.za> Message-ID: <1405322895.31.0.873745927847.issue21975@psf.upfronthosting.co.za> Claudiu Popa added the comment: Hi, thanks for the report. Here's a patch which implements __setstate__ and __getstate__ for Row objects. ---------- keywords: +patch nosy: +Claudiu.Popa, ghaering stage: -> patch review versions: +Python 3.5 -Python 3.3 Added file: http://bugs.python.org/file35952/issue21975.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 10:32:21 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 08:32:21 +0000 Subject: [issue21977] In the re's token example OP and SKIP regexes can be improved In-Reply-To: <1405322601.6.0.312118432344.issue21977@psf.upfronthosting.co.za> Message-ID: <1405326741.21.0.269335106404.issue21977@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 10:36:32 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Jul 2014 08:36:32 +0000 Subject: [issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell In-Reply-To: <1404254403.84.0.153705596072.issue21901@psf.upfronthosting.co.za> Message-ID: <1405326992.2.0.878788529807.issue21901@psf.upfronthosting.co.za> STINNER Victor added the comment: > Killed process python(28623:#112) vsz:340800kB, anon-rss:330764kB, file-rss:3864kB 340 MB to run test_selectors sounds high. What is the value of NUM_FDS? And what is the result of this command in your vserver? $ python -c 'import resource; print(resource.getrlimit(resource.RLIMIT_NOFILE))' (1024, 4096) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 10:38:22 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 08:38:22 +0000 Subject: [issue21977] In the re's token example OP and SKIP regexes can be improved In-Reply-To: <1405322601.6.0.312118432344.issue21977@psf.upfronthosting.co.za> Message-ID: <1405327102.01.0.699449899901.issue21977@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I will keep the \- because the - at the front of the character range is a non-obvious special case. The other changes look reasonable. ---------- priority: normal -> low stage: -> commit review type: enhancement -> performance versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 10:52:51 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Jul 2014 08:52:51 +0000 Subject: [issue21977] In the re's token example OP and SKIP regexes can be improved In-Reply-To: <1405322601.6.0.312118432344.issue21977@psf.upfronthosting.co.za> Message-ID: <3hBdst56YKz7LjM@mail.python.org> Roundup Robot added the comment: New changeset bb28542af060 by Raymond Hettinger in branch '3.4': Issue 21977: Minor improvements to the regexes in the tokenizer example. http://hg.python.org/cpython/rev/bb28542af060 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 10:53:36 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 08:53:36 +0000 Subject: [issue21977] In the re's token example OP and SKIP regexes can be improved In-Reply-To: <1405322601.6.0.312118432344.issue21977@psf.upfronthosting.co.za> Message-ID: <1405328016.49.0.890977794956.issue21977@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 10:56:48 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 08:56:48 +0000 Subject: [issue21514] update json module docs in light of RFC 7159 & ECMA-404 In-Reply-To: <1400215968.18.0.723032535405.issue21514@psf.upfronthosting.co.za> Message-ID: <1405328208.25.0.603843946912.issue21514@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> bob.ippolito nosy: +bob.ippolito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 11:01:56 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 09:01:56 +0000 Subject: [issue16620] Avoid using private function glob.glob1() in msi module and tools In-Reply-To: <1354736049.23.0.98660459286.issue16620@psf.upfronthosting.co.za> Message-ID: <1405328516.62.0.143651246662.issue16620@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Martin, this patch touches some of your code. Do you care to take a look at it? ---------- assignee: -> loewis nosy: +loewis, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 11:15:03 2014 From: report at bugs.python.org (Ram Rachum) Date: Mon, 14 Jul 2014 09:15:03 +0000 Subject: [issue21978] Support index access on OrderedDict views (e.g. o.keys()[7]) Message-ID: <1405329303.68.0.861089422528.issue21978@psf.upfronthosting.co.za> New submission from Ram Rachum: Implement `__getitem__` on `OrdredDict.keys`, `OrdredDict.values` and `OrdredDict.items`, so the following code snippet wouldn't error: >>> from collections import OrderedDict >>> o = OrderedDict(((1, 2), (3, 4), (5, 6))) >>> o OrderedDict([(1, 2), (3, 4), (5, 6)]) >>> o.keys() KeysView(OrderedDict([(1, 2), (3, 4), (5, 6)])) >>> o.keys()[0] Traceback (most recent call last): File "", line 1, in builtins.TypeError: 'KeysView' object does not support indexing >>> o.values()[0] Traceback (most recent call last): File "", line 1, in builtins.TypeError: 'ValuesView' object does not support indexing >>> o.items()[0] Traceback (most recent call last): File "", line 1, in builtins.TypeError: 'ItemsView' object does not support indexing ---------- components: Library (Lib) messages: 223006 nosy: cool-RR priority: normal severity: normal status: open title: Support index access on OrderedDict views (e.g. o.keys()[7]) versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 11:15:13 2014 From: report at bugs.python.org (wjssz) Date: Mon, 14 Jul 2014 09:15:13 +0000 Subject: [issue21084] IDLE can't deal with characters above the range (U+0000-U+FFFF) In-Reply-To: <1396008065.84.0.00802001667749.issue21084@psf.upfronthosting.co.za> Message-ID: <1405329313.36.0.0810445978354.issue21084@psf.upfronthosting.co.za> wjssz added the comment: I suggest don't change the content of file, just give a message such as: IDLE can't display non-BMP character (codepoint above 0xFFFF). A non-BMP character found in Line 23, position 8 of aaaa.py, please open this file with other editor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 12:12:32 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 10:12:32 +0000 Subject: [issue21978] Support index access on OrderedDict views (e.g. o.keys()[7]) In-Reply-To: <1405329303.68.0.861089422528.issue21978@psf.upfronthosting.co.za> Message-ID: <1405332752.99.0.939028968383.issue21978@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm not sure this would make sense given that the ordered dict itself isn't indexable, given that keys/values/items on regular dicts aren't indexable, and given that keys/items views are set-like rather than sequence-like. The one obvious way to get sequence behavior is to build a list: s = list(od) s = list(od.values()) s = list(od.items()) ---------- assignee: -> rhettinger nosy: +rhettinger priority: normal -> low type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 12:15:09 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 10:15:09 +0000 Subject: [issue21084] IDLE can't deal with characters above the range (U+0000-U+FFFF) In-Reply-To: <1396008065.84.0.00802001667749.issue21084@psf.upfronthosting.co.za> Message-ID: <1405332909.56.0.282696817041.issue21084@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 12:33:46 2014 From: report at bugs.python.org (Mika Eloranta) Date: Mon, 14 Jul 2014 10:33:46 +0000 Subject: [issue21979] SyntaxError not raised on "0xaor 1" Message-ID: <1405334025.99.0.201355184316.issue21979@psf.upfronthosting.co.za> New submission from Mika Eloranta: The following are expected to raise SyntaxError, but they don't: >>> 0xfor python is weird in ways 15 >>> [0xaor 1, 0xbor 1, 0xcor 1, 0xdor 1, 0xeor 1, 0xfor 1] [10, 11, 12, 13, 14, 15] Verified on v2.7.1 and v3.3.2. Probably affects all versions. ---------- components: Interpreter Core messages: 223009 nosy: mel priority: normal severity: normal status: open title: SyntaxError not raised on "0xaor 1" type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 13:18:15 2014 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 14 Jul 2014 11:18:15 +0000 Subject: [issue21979] SyntaxError not raised on "0xaor 1" In-Reply-To: <1405334025.99.0.201355184316.issue21979@psf.upfronthosting.co.za> Message-ID: <1405336695.04.0.524928815128.issue21979@psf.upfronthosting.co.za> Mark Dickinson added the comment: Surprisingly, this is valid syntax. Your first line is parsed as: 0xf or (python is weird in ways) Because `or` is short-circuiting, its right-hand operand (which is also valid syntactically, being a chained comparison) is never evaluated, so we don't see the `NameErrors` that you might expect. >>> python is weird in ways Traceback (most recent call last): File "", line 1, in NameError: name 'python' is not defined Your second example is similar. Closing as 'not a bug'. ---------- nosy: +mark.dickinson resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 13:26:20 2014 From: report at bugs.python.org (Mika Eloranta) Date: Mon, 14 Jul 2014 11:26:20 +0000 Subject: [issue21979] SyntaxError not raised on "0xaor 1" In-Reply-To: <1405334025.99.0.201355184316.issue21979@psf.upfronthosting.co.za> Message-ID: <1405337180.62.0.832457330603.issue21979@psf.upfronthosting.co.za> Mika Eloranta added the comment: Mark, can you explain why the first example is valid syntax, but the second one is not: >>> 0xaor 1 10 >>> 0xaand 1 File "", line 1 0xaand 1 ^ SyntaxError: invalid syntax I do understand how "0xaor 1" is currently parsed, but I'm not still convinced it should be valid syntax ("0xa or 1" or "(0xa)or 1" would be ok). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 13:34:22 2014 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 Jul 2014 11:34:22 +0000 Subject: [issue21979] SyntaxError not raised on "0xaor 1" In-Reply-To: <1405334025.99.0.201355184316.issue21979@psf.upfronthosting.co.za> Message-ID: <1405337662.81.0.0100424574686.issue21979@psf.upfronthosting.co.za> Eric V. Smith added the comment: 0xaand 1 is parsed as 0xaa nd 1 which is not valid syntax. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 13:35:34 2014 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 Jul 2014 11:35:34 +0000 Subject: [issue21979] SyntaxError not raised on "0xaor 1" In-Reply-To: <1405334025.99.0.201355184316.issue21979@psf.upfronthosting.co.za> Message-ID: <1405337734.37.0.100695212253.issue21979@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 13:36:53 2014 From: report at bugs.python.org (Mika Eloranta) Date: Mon, 14 Jul 2014 11:36:53 +0000 Subject: [issue21979] SyntaxError not raised on "0xaor 1" In-Reply-To: <1405334025.99.0.201355184316.issue21979@psf.upfronthosting.co.za> Message-ID: <1405337813.36.0.893782005911.issue21979@psf.upfronthosting.co.za> Mika Eloranta added the comment: OK, I see... "0xfand 1" is ambiguous "(0xfa)nd 1" vs. "(0xf)and 1". So, while a bit weird, the behavior is consistent: >>> 123not in [], 0xfnot in [], 0xfor 1, 0xafor 1, 0xfin [] (True, True, 15, 175, False) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 13:37:51 2014 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 Jul 2014 11:37:51 +0000 Subject: [issue21979] SyntaxError not raised on "0xaor 1" In-Reply-To: <1405334025.99.0.201355184316.issue21979@psf.upfronthosting.co.za> Message-ID: <1405337871.51.0.87512036908.issue21979@psf.upfronthosting.co.za> Eric V. Smith added the comment: To be more clear: the parser takes the longest token that could be valid. Since "n" can't be part of a hex number, parsing stops there, returning "0xaa" as the first token. So: >>> 0xaaif 1 else 0 170 >>> hex(0xaaif 1 else 0) '0xaa' >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 13:44:06 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Jul 2014 11:44:06 +0000 Subject: [issue21975] Using pickled/unpickled sqlite3.Row results in segfault rather than exception In-Reply-To: <1405296089.18.0.134297351302.issue21975@psf.upfronthosting.co.za> Message-ID: <1405338246.83.0.669035698837.issue21975@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The issue is not in pickling/unpickling, but in sqlite3.Row.__new__ which creates object in invalid state. Simple example: >>> import sqlite3 >>> r = sqlite3.Row.__new__(sqlite3.Row) >>> len(r) Segmentation fault (core dumped) ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: patch review -> versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 13:44:45 2014 From: report at bugs.python.org (Ram Rachum) Date: Mon, 14 Jul 2014 11:44:45 +0000 Subject: [issue21980] Implement `logging.LogRecord.__repr__` Message-ID: <1405338285.22.0.129241748219.issue21980@psf.upfronthosting.co.za> Changes by Ram Rachum : ---------- components: Library (Lib) nosy: cool-RR priority: normal severity: normal status: open title: Implement `logging.LogRecord.__repr__` type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 13:52:56 2014 From: report at bugs.python.org (Thomas Kember) Date: Mon, 14 Jul 2014 11:52:56 +0000 Subject: [issue21981] Idle problem Message-ID: <1405338608.49183.YahooMailNeo@web87703.mail.ir2.yahoo.com> New submission from Thomas Kember: Hello Terry, Thank you for your explanation of the bug in Idle. I know Idle has limitations, but it is quite adequate for the programming I want to do. I agree that when this error occurs there should only be a warning, so the user can decide what he wants to do about it. There is however one fault in Idle that would be good if it were fixed. That is, it does not show line numbers. Since errors all indicate the line number the error occured, having the line numbers on the listing would be very useful. One other thing. Now the problem is solved but it is still showing status 'open' on the problem site, how do I change the status? Regards, Thomas ---------- messages: 223016 nosy: Tomk priority: normal severity: normal status: open title: Idle problem _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 14:02:44 2014 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 14 Jul 2014 12:02:44 +0000 Subject: [issue21979] SyntaxError not raised on "0xaor 1" In-Reply-To: <1405334025.99.0.201355184316.issue21979@psf.upfronthosting.co.za> Message-ID: <1405339364.35.0.112322582881.issue21979@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Mark, can you explain why the first example is valid syntax, but the second one is not: Looks like Eric beat me to it! As he explained, it's the "maximal munch" rule at work: the tokenizer matches as much as it can for each token. You see similar effects with integer or float literals followed by a keyword starting with 'e' (or 'j', but I don't think we have any of those). >>> 3if 1else 2 File "", line 1 3if 1else 2 ^ SyntaxError: invalid token >>> 3if 1 else 2 3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 14:19:38 2014 From: report at bugs.python.org (SilentGhost) Date: Mon, 14 Jul 2014 12:19:38 +0000 Subject: [issue21981] Idle problem In-Reply-To: <1405338608.49183.YahooMailNeo@web87703.mail.ir2.yahoo.com> Message-ID: <1405340378.06.0.468395417449.issue21981@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 14:31:26 2014 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 Jul 2014 12:31:26 +0000 Subject: [issue21981] Idle problem In-Reply-To: <1405338608.49183.YahooMailNeo@web87703.mail.ir2.yahoo.com> Message-ID: <1405341086.99.0.231775272709.issue21981@psf.upfronthosting.co.za> Eric V. Smith added the comment: Please respond to the other bug. No need to open a new bug when responding to an existing issue. Thanks. ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 14:49:59 2014 From: report at bugs.python.org (Claudiu Popa) Date: Mon, 14 Jul 2014 12:49:59 +0000 Subject: [issue21975] Using pickled/unpickled sqlite3.Row results in segfault rather than exception In-Reply-To: <1405296089.18.0.134297351302.issue21975@psf.upfronthosting.co.za> Message-ID: <1405342199.54.0.209017573337.issue21975@psf.upfronthosting.co.za> Claudiu Popa added the comment: Using your example, I can't make it to crash using the tip, nor with Python 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 14:51:16 2014 From: report at bugs.python.org (Claudiu Popa) Date: Mon, 14 Jul 2014 12:51:16 +0000 Subject: [issue21975] Using pickled/unpickled sqlite3.Row results in segfault rather than exception In-Reply-To: <1405296089.18.0.134297351302.issue21975@psf.upfronthosting.co.za> Message-ID: <1405342276.04.0.868986991063.issue21975@psf.upfronthosting.co.za> Claudiu Popa added the comment: Nevermind, I didn't see the len call. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 14:56:01 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Jul 2014 12:56:01 +0000 Subject: [issue21975] Using pickled/unpickled sqlite3.Row results in segfault rather than exception In-Reply-To: <1405296089.18.0.134297351302.issue21975@psf.upfronthosting.co.za> Message-ID: <1405342561.69.0.0758701346566.issue21975@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which fixes crash. ---------- stage: -> patch review Added file: http://bugs.python.org/file35953/sqlite3_row_new.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 15:07:22 2014 From: report at bugs.python.org (Claudiu Popa) Date: Mon, 14 Jul 2014 13:07:22 +0000 Subject: [issue21975] Using pickled/unpickled sqlite3.Row results in segfault rather than exception In-Reply-To: <1405296089.18.0.134297351302.issue21975@psf.upfronthosting.co.za> Message-ID: <1405343242.35.0.667489158932.issue21975@psf.upfronthosting.co.za> Claudiu Popa added the comment: It doesn't crash anymore with your patch, but the pickle.load fails: Traceback (most recent call last): File "a.py", line 19, in load = pickle.loads(dump) TypeError: function takes exactly 2 arguments (0 given) ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 15:09:49 2014 From: report at bugs.python.org (R. David Murray) Date: Mon, 14 Jul 2014 13:09:49 +0000 Subject: [issue19806] smtpd crashes when a multi-byte UTF-8 sequence is split between consecutive data packets In-Reply-To: <1385532648.32.0.209027401379.issue19806@psf.upfronthosting.co.za> Message-ID: <1405343389.12.0.162457867268.issue19806@psf.upfronthosting.co.za> R. David Murray added the comment: As Milan said, the problem doesn't arise in 3.5 with decode_data=False, since there's no decoding. His patch doesn't actually fix the bug for the decode_data=True case, though, since the bug is a *valid* utf-8 sequence getting split across tcp buffers. To fix it, we would need to change the implementation of decode_data. Instead of conditionally decoding in collect_data, we'd need to postpone decoding to found_terminator. This would have the undesirable affect of changing what is in the received_lines attribute, which is why we didn't do it in the decode_data patch. Using an incremental decoder won't solve that problem, since it too would change what gets stored in received_lines. Since decode_data=True is really not a legitimate mode for smtpd (it is an historical accident/bug) and we are planning on removing it eventually, I think we should go ahead and apply Milan's patch as is, since it does improve the error reporting. The message would need to be adjusted though, since it can trigger on valid utf-8 data. It should say that smtpd should be run with decode_data=False in order to fix the decode problem. That would leave the bug as-is in 3.4, but a similar patch with an error message suggesting an upgrade to 3.5/decode_data=True could be applied. That feels a little weird, though :). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 15:14:31 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Jul 2014 13:14:31 +0000 Subject: [issue21975] Using pickled/unpickled sqlite3.Row results in segfault rather than exception In-Reply-To: <1405296089.18.0.134297351302.issue21975@psf.upfronthosting.co.za> Message-ID: <1405343671.18.0.0689997851058.issue21975@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: For pickling open other issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 15:15:02 2014 From: report at bugs.python.org (R. David Murray) Date: Mon, 14 Jul 2014 13:15:02 +0000 Subject: [issue8849] python.exe problem with cvxopt In-Reply-To: <4C007915.6020901@internode.on.net> Message-ID: <1405343702.78.0.499141738537.issue8849@psf.upfronthosting.co.za> R. David Murray added the comment: True. Since there was no response from the OP to my question, let's close this. It can be reopened if he's still having a problem, which seems unlikely. ---------- resolution: -> third party stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 15:16:08 2014 From: report at bugs.python.org (hakril) Date: Mon, 14 Jul 2014 13:16:08 +0000 Subject: [issue21964] inconsistency in list-generator comprehension with yield(-from) In-Reply-To: <1405119987.38.0.925003339613.issue21964@psf.upfronthosting.co.za> Message-ID: <1405343768.19.0.182750140352.issue21964@psf.upfronthosting.co.za> hakril added the comment: I found something else, I think it worth mentioning it. This side-effect allows to create generators that return other values that None. And the CPython's behavior is not the same for all versions: >>> {(yield i) : i for i in range(2)} at 0x7f0b98f41410> >>> list(_) # python3.(3,4,5) [0, 1] # python3.2 [0, 1, {None: 1}] # python3.2 appends the generator's return value. ---------- versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 15:16:29 2014 From: report at bugs.python.org (Thomas Kember) Date: Mon, 14 Jul 2014 13:16:29 +0000 Subject: [issue21981] Idle problem In-Reply-To: <1405341086.99.0.231775272709.issue21981@psf.upfronthosting.co.za> Message-ID: <1405343610.93696.YahooMailNeo@web87702.mail.ir2.yahoo.com> Thomas Kember added the comment: Hello Eric V. Smith, I reported only one bug and it has been fixed. I can't find out how I am to reset the status of it to closed. Thomas Kember ________________________________ From: Eric V. Smith To: t.kember1 at btinternet.com Sent: Monday, 14 July 2014, 13:31 Subject: [issue21981] Idle problem Eric V. Smith added the comment: Please respond to the other bug. No need to open a new bug when responding to an existing issue. Thanks. ---------- nosy: +eric.smith resolution:? -> not a bug stage:? -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 15:16:32 2014 From: report at bugs.python.org (Thomas Kember) Date: Mon, 14 Jul 2014 13:16:32 +0000 Subject: [issue21981] Idle problem In-Reply-To: <1405341086.99.0.231775272709.issue21981@psf.upfronthosting.co.za> Message-ID: <1405343610.93696.YahooMailNeo@web87702.mail.ir2.yahoo.com> Thomas Kember added the comment: Hello Eric V. Smith, I reported only one bug and it has been fixed. I can't find out how I am to reset the status of it to closed. Thomas Kember ________________________________ From: Eric V. Smith To: t.kember1 at btinternet.com Sent: Monday, 14 July 2014, 13:31 Subject: [issue21981] Idle problem Eric V. Smith added the comment: Please respond to the other bug. No need to open a new bug when responding to an existing issue. Thanks. ---------- nosy: +eric.smith resolution:? -> not a bug stage:? -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 15:21:25 2014 From: report at bugs.python.org (Claudiu Popa) Date: Mon, 14 Jul 2014 13:21:25 +0000 Subject: [issue21975] Using pickled/unpickled sqlite3.Row results in segfault rather than exception In-Reply-To: <1405296089.18.0.134297351302.issue21975@psf.upfronthosting.co.za> Message-ID: <1405344085.93.0.428859349682.issue21975@psf.upfronthosting.co.za> Claudiu Popa added the comment: Ups, I accidentally removed the patch review stage, sorry for that. ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 16:04:32 2014 From: report at bugs.python.org (Clement Rouault) Date: Mon, 14 Jul 2014 14:04:32 +0000 Subject: [issue21947] `Dis` module doesn't know how to disassemble generators In-Reply-To: <1404916109.31.0.935138955837.issue21947@psf.upfronthosting.co.za> Message-ID: <1405346672.27.0.449484374771.issue21947@psf.upfronthosting.co.za> Clement Rouault added the comment: Updated some docstrings in the new patch after the review comments. Thanks kushou for the code review. ---------- Added file: http://bugs.python.org/file35954/dis_generator3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 16:43:31 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Mon, 14 Jul 2014 14:43:31 +0000 Subject: [issue21982] Idle: Regression introduced in configDialog by rev 91509 Message-ID: <1405349011.77.0.800791635134.issue21982@psf.upfronthosting.co.za> New submission from Saimadhav Heblikar: The concerned part : http://hg.python.org/cpython/rev/b836a0cd68f7#l4.15 "NameError: name 'keySet' is not defined." ---------- messages: 223031 nosy: sahutd, terry.reedy priority: normal severity: normal status: open title: Idle: Regression introduced in configDialog by rev 91509 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 16:43:57 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Mon, 14 Jul 2014 14:43:57 +0000 Subject: [issue21982] Idle: Regression introduced in configDialog by rev 91509 In-Reply-To: <1405349011.77.0.800791635134.issue21982@psf.upfronthosting.co.za> Message-ID: <1405349037.15.0.178987798996.issue21982@psf.upfronthosting.co.za> Changes by Saimadhav Heblikar : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 17:14:24 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 14 Jul 2014 15:14:24 +0000 Subject: [issue16561] bdist_wininst installers don't use UAC, then crash In-Reply-To: <1353960153.53.0.844150162265.issue16561@psf.upfronthosting.co.za> Message-ID: <1405350864.24.0.901000507194.issue16561@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I just noticed that I misread the original issue: it's not about the Python Windows installer, but about bdist_wininst packages. ---------- title: Windows installer doesn't use UAC, then crashes -> bdist_wininst installers don't use UAC, then crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 17:21:16 2014 From: report at bugs.python.org (Berker Peksag) Date: Mon, 14 Jul 2014 15:21:16 +0000 Subject: [issue21976] Fix test_ssl.py to handle LibreSSL versioning appropriately In-Reply-To: <1405318558.48.0.274142597942.issue21976@psf.upfronthosting.co.za> Message-ID: <1405351276.78.0.530960151364.issue21976@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +christian.heimes, dstufft, giampaolo.rodola, pitrou versions: -Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 17:21:24 2014 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Jul 2014 15:21:24 +0000 Subject: [issue16561] bdist_wininst installers don't use UAC, then crash In-Reply-To: <1353960153.53.0.844150162265.issue16561@psf.upfronthosting.co.za> Message-ID: <1405351284.45.0.172642770813.issue16561@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 17:23:42 2014 From: report at bugs.python.org (Berker Peksag) Date: Mon, 14 Jul 2014 15:23:42 +0000 Subject: [issue21977] In the re's token example OP and SKIP regexes can be improved In-Reply-To: <1405322601.6.0.312118432344.issue21977@psf.upfronthosting.co.za> Message-ID: <1405351422.4.0.540453962262.issue21977@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: commit review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 17:25:26 2014 From: report at bugs.python.org (Berker Peksag) Date: Mon, 14 Jul 2014 15:25:26 +0000 Subject: [issue21980] Implement `logging.LogRecord.__repr__` Message-ID: <1405351526.84.0.770076972844.issue21980@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 17:29:54 2014 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Jul 2014 15:29:54 +0000 Subject: [issue17480] pyvenv should be installed someplace more obvious on Windows In-Reply-To: <1363714170.98.0.299571294884.issue17480@psf.upfronthosting.co.za> Message-ID: <1405351794.61.0.952885441753.issue17480@psf.upfronthosting.co.za> Steve Dower added the comment: Automatically quoting arguments is more complicated than simply concatenating quotes, unfortunately, and people are guaranteed to have come up with ways to make it work already. My vote is for leaving this alone and letting the higher level functions be more clever. Changing this function is certain to break existing code in unpredictable ways. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 17:30:09 2014 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Jul 2014 15:30: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: <1405351809.25.0.676231732382.issue20451@psf.upfronthosting.co.za> Steve Dower added the comment: Automatically quoting arguments is more complicated than simply concatenating quotes, unfortunately, and people are guaranteed to have come up with ways to make it work already. My vote is for leaving this alone and letting the higher level functions be more clever. Changing this function is certain to break existing code in unpredictable ways. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 17:31:08 2014 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Jul 2014 15:31:08 +0000 Subject: [issue17480] pyvenv should be installed someplace more obvious on Windows In-Reply-To: <1363714170.98.0.299571294884.issue17480@psf.upfronthosting.co.za> Message-ID: <1405351868.72.0.557266125367.issue17480@psf.upfronthosting.co.za> Steve Dower added the comment: That last message should have been on #20451 :) My thoughts on pyvenv are that it should be in Scripts\ if anywhere, but I'm not desperate to have it on PATH. I would rather not start putting more files alongside python.exe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 17:38:15 2014 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Jul 2014 15:38:15 +0000 Subject: [issue15883] Add Py_errno to work around multiple CRT issue In-Reply-To: <1347111302.92.0.306708953598.issue15883@psf.upfronthosting.co.za> Message-ID: <1405352295.9.0.66871989044.issue15883@psf.upfronthosting.co.za> Steve Dower added the comment: Also agreed with not exposing a side-channel to set errno. I'd expect this to no longer be an issue with the stable CRT, but I'm not 100% confident about saying that yet. In theory, there will only ever be one CRT loaded in the future, but there's probably going to still be situations where explicitly providing errno is necessary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 17:43:12 2014 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Jul 2014 15:43:12 +0000 Subject: [issue17056] Support Visual Studio 2012 In-Reply-To: <1359330739.37.0.839652698697.issue17056@psf.upfronthosting.co.za> Message-ID: <1405352592.53.0.267872047407.issue17056@psf.upfronthosting.co.za> Steve Dower added the comment: msvc9compiler should not look for any versions of MSVC other than 9.0, since extensions built using other versions will be subtly (or dramatically) incompatible with Python unless you also rebuild Python itself with the same MSVC version. You can set DISTUTILS_USE_SDK=1 and run from the VS 2012 Developer Command Prompt (or otherwise configure your environment) if you are willing to accept the risk, but ensure you test the built extension thoroughly. Hopefully, 3.5 will switch to the next version of MSVC (14) and will be able to detect and use all later releases, so this particular problem won't exist in the future. There's nothing we can/will do for 2.x at this stage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 17:49:27 2014 From: report at bugs.python.org (Tim Tisdall) Date: Mon, 14 Jul 2014 15:49:27 +0000 Subject: [issue7687] Bluetooth support untested In-Reply-To: <1263367703.76.0.187821272753.issue7687@psf.upfronthosting.co.za> Message-ID: <1405352967.21.0.793675126385.issue7687@psf.upfronthosting.co.za> Changes by Tim Tisdall : ---------- nosy: +Tim.Tisdall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 17:51:10 2014 From: report at bugs.python.org (Brian Curtin) Date: Mon, 14 Jul 2014 15:51:10 +0000 Subject: [issue7687] Bluetooth support untested In-Reply-To: <1263367703.76.0.187821272753.issue7687@psf.upfronthosting.co.za> Message-ID: <1405353070.35.0.524424863258.issue7687@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 17:53:02 2014 From: report at bugs.python.org (Tim Tisdall) Date: Mon, 14 Jul 2014 15:53:02 +0000 Subject: [issue7834] socket.connect() no longer works with AF_BLUETOOTH L2CAP sockets In-Reply-To: <1265069614.13.0.295096684445.issue7834@psf.upfronthosting.co.za> Message-ID: <1405353182.38.0.767287457917.issue7834@psf.upfronthosting.co.za> Changes by Tim Tisdall : ---------- nosy: +Tim.Tisdall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 17:58:43 2014 From: report at bugs.python.org (Bob Ippolito) Date: Mon, 14 Jul 2014 15:58:43 +0000 Subject: [issue21514] update json module docs in light of RFC 7159 & ECMA-404 In-Reply-To: <1400215968.18.0.723032535405.issue21514@psf.upfronthosting.co.za> Message-ID: <1405353523.71.0.526392638772.issue21514@psf.upfronthosting.co.za> Bob Ippolito added the comment: This patch looks reasonable to me as-is. With regard to "Infinite and NaN number values are accepted and output;" there's an option for that (allow_nan=False in encoding, parse_constant=some_function_that_raises in decoding). Since an exception can't be raised in a lambda there's no simple one-liner to ensure compliant decode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 18:06:46 2014 From: report at bugs.python.org (Niklas Claesson) Date: Mon, 14 Jul 2014 16:06:46 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za> Message-ID: <1405354006.1.0.13108914713.issue15443@psf.upfronthosting.co.za> Niklas Claesson added the comment: I would like to add a use case. Control systems for particle accelerators. We have ns, sometimes ps precision on timestamped data acquisitions and we would like to use Python to do calculations. ---------- nosy: +Niklas.Claesson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 18:14:59 2014 From: report at bugs.python.org (Chris Rebert) Date: Mon, 14 Jul 2014 16:14:59 +0000 Subject: [issue21514] update json module docs in light of RFC 7159 & ECMA-404 In-Reply-To: <1400215968.18.0.723032535405.issue21514@psf.upfronthosting.co.za> Message-ID: <1405354499.64.0.940669742732.issue21514@psf.upfronthosting.co.za> Chris Rebert added the comment: Thanks for the speedy review! Those NaN-related arguments are already mentioned in the docs (see last 2 sentences of https://docs.python.org/3/library/json.html#infinite-and-nan-number-values ), and this patch doesn't touch that subsection. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 18:22:54 2014 From: report at bugs.python.org (Bob Ippolito) Date: Mon, 14 Jul 2014 16:22:54 +0000 Subject: [issue21514] update json module docs in light of RFC 7159 & ECMA-404 In-Reply-To: <1400215968.18.0.723032535405.issue21514@psf.upfronthosting.co.za> Message-ID: <1405354974.65.0.308714927428.issue21514@psf.upfronthosting.co.za> Bob Ippolito added the comment: Good call, I was just doing a quick review of the patch in isolation. Now I don't have anything at all to comment on :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 18:46:38 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 14 Jul 2014 16:46:38 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za> Message-ID: <1405356398.63.0.366284518043.issue15443@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Given that struct timespec defined as struct timespec { time_t tv_sec; /* seconds */ long tv_nsec; /* nanoseconds */ }; is slowly becoming the prevailing standard to represent time in system interfaces, Python's inability to faithfully store it in a high level object will increasingly become a handicap. People are starting to put nanoseconds in their databases not because they really need such precision, but because this is what they get from their devices and at the collection time cannot do anything "smart". The program that collects the events may simply not have time to do anything other than store raw data, or not have the higher level knowledge of what is the proper rounding. The proper rounding is best to be done at the analysis time and by a program written in a higher level language such as Python. ---------- assignee: -> belopolsky stage: -> needs patch versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 19:21:41 2014 From: report at bugs.python.org (Brandon Rhodes) Date: Mon, 14 Jul 2014 17:21:41 +0000 Subject: [issue21956] Doc files deleted from repo are not deleted from docs.python.org. In-Reply-To: <1405105533.16.0.65574478566.issue21956@psf.upfronthosting.co.za> (Mark Lawrence's message of "Fri, 11 Jul 2014 19:05:33 +0000") Message-ID: <871ttng8kc.fsf@asaph.rhodesmill.org> Brandon Rhodes added the comment: Now that I am back at a full keyboard, I see that my previous response to @BreamoreBoy about this issue is too short and too cryptic to really serve as a fair answer to his question. And, with some embarrassment, I note that my words did not even achieve the dignity of forming an actual English sentence. Alas for cramped travel laptop keyboards and airport wi-fi! Might I be allowed another try? If so, then: @BreamoreBoy, I think that your confusion ("How does that translate?") can be blamed squarely on the document in question. Instead of introducing and maintaining a consistent terminology, it manages to burden the reader with two parallel and redundant sets of terms for exactly the same idea. In short, the document title does not match the document itself. The title of the document sets forth the terms "Idiom" and "Anti-idiom" as its subject. But then it completely drops the ball. The terms are not defined in the document itself. They are not clarified anywhere in its text. Nor are they even *used* anywhere in its body, with a single lonely exception buried down somewhere around the middle (second paragraph under "Exceptions"). Instead, the body uses the simpler phrases "Do", "do not", and "should not." It is running in its "do not" / "don't" mode when it reaches the sentence you quote, Mark, about "from...import" statements. So the answer to your "How does that translate" question is that what the title promises as "Idioms" and "Anti-idioms" actually come out verbally in the text as "do" and "don't" instead. When someone jumps into the middle of the document without context, they see only "do" or "don't" and are left wondering where the terminology of "idioms" is even coming from. But it comes directly from the title, as the only possible mapping between the document's terms and those of its title. So when the document says: from module import name1, name2. - This is a "don?t"... the careful reader who has noticed and remembered the title will simultaneously read: from module import name1, name2. - This is an anti-idiom... Which is almost exactly the text of Audrey's tweet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 19:55:34 2014 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 14 Jul 2014 17:55:34 +0000 Subject: [issue21922] PyLong: use GMP In-Reply-To: <1404562944.87.0.0403783440946.issue21922@psf.upfronthosting.co.za> Message-ID: <1405360534.61.0.213494054407.issue21922@psf.upfronthosting.co.za> Mark Dickinson added the comment: > When GMP encounters a memory allocation failure (exceeding the limits above or when running our of scratch space), it will just abort. Ouch; that's not friendly. Seems like this is part of the reason that Armin Rigo abandoned the attempt to use GMP in PyPy. https://bitbucket.org/pypy/pypy/issue/892/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 20:19:06 2014 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 14 Jul 2014 18:19:06 +0000 Subject: [issue21980] Implement `logging.LogRecord.__repr__` Message-ID: <1405361946.16.0.0808006509696.issue21980@psf.upfronthosting.co.za> New submission from Vinay Sajip: LogRecord has a lot of attributes. You can normally show what you want using a Formatter. I could implement something that just shows name and levelName. How does that sound? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 20:32:16 2014 From: report at bugs.python.org (Ram Rachum) Date: Mon, 14 Jul 2014 18:32:16 +0000 Subject: [issue21980] Implement `logging.LogRecord.__repr__` In-Reply-To: <1405361946.16.0.0808006509696.issue21980@psf.upfronthosting.co.za> Message-ID: <1405362736.82.0.839518258248.issue21980@psf.upfronthosting.co.za> Ram Rachum added the comment: Sounds good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 20:53:23 2014 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 14 Jul 2014 18:53:23 +0000 Subject: [issue21041] pathlib.PurePath.parents rejects negative indexes In-Reply-To: <1395613011.22.0.29152070109.issue21041@psf.upfronthosting.co.za> Message-ID: <1405364003.08.0.784283296669.issue21041@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 20:53:52 2014 From: report at bugs.python.org (paul j3) Date: Mon, 14 Jul 2014 18:53:52 +0000 Subject: [issue16807] argparse group nesting lost on inheritance In-Reply-To: <1356745167.13.0.671311915058.issue16807@psf.upfronthosting.co.za> Message-ID: <1405364032.47.0.372138069448.issue16807@psf.upfronthosting.co.za> paul j3 added the comment: To put this issue in perspective: - There's nothing in the documentation about nesting a mutually exclusive group in an argument group. - There are prominent notes in the documentation about MEGs not taking title and description. The '_add_container_actions' code has a warning that something needs to change if they do acquire such attributes. - However there is a class in test_argparse.py that does nest an MEG in an argument group, which in effect gives it a title. TestMutuallyExclusiveInGroup That's the pattern that Dougal is using. - http://bugs.python.org/issue17218 support title and description in argparse add_mutually_exclusive_group proposes adding these attributes to MEG. There I proposed doing so via this nested group mechanism. So that patch requires this one to work correctly with parents. - http://bugs.python.org/issue11588 I am exploring the implementation of UsageGroups, a generalization of MEG that allow other group tests, and nesting. There too title and description come via nesting in an ArgumentGroup. - Groups and parents are confusing to beginning users. In StackOverflow questions 'argparse' users often confuse argument groups and mutually exclusive groups, expecting to be able to nest one inside the other. Currently that nesting only works one way, and for the limited purpose illustrated here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 20:55:58 2014 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 14 Jul 2014 18:55:58 +0000 Subject: [issue21041] pathlib.PurePath.parents rejects negative indexes In-Reply-To: <1395613011.22.0.29152070109.issue21041@psf.upfronthosting.co.za> Message-ID: <1405364158.45.0.923548653985.issue21041@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Aren't negative indexes well defined in Python? E.g. >>> p = Path('/tmp/tmp123/foo/bar/baz.xz') >>> p.parents[len(p.parents)-2] PosixPath('/tmp') p.parents[-2] should == p.parents[len(p.parents)-2] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 21:14:32 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 14 Jul 2014 19:14:32 +0000 Subject: [issue2698] Extension module build fails for MinGW: missing vcvarsall.bat In-Reply-To: <1209230424.66.0.154562223128.issue2698@psf.upfronthosting.co.za> Message-ID: <1405365272.73.0.0690538122944.issue2698@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 21:31:34 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Jul 2014 19:31:34 +0000 Subject: [issue21645] test_read_all_from_pipe_reader() of test_asyncio hangs on FreeBSD 9 In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <3hBw2s4gdsz7LjR@mail.python.org> Roundup Robot added the comment: New changeset a0e6a370755f by Victor Stinner in branch 'default': Issue #21645: Add debug code to analyze a failure on FreeBSD 9 http://hg.python.org/cpython/rev/a0e6a370755f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 21:31:58 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Jul 2014 19:31:58 +0000 Subject: [issue21976] Fix test_ssl.py to handle LibreSSL versioning appropriately In-Reply-To: <1405318558.48.0.274142597942.issue21976@psf.upfronthosting.co.za> Message-ID: <1405366318.19.0.408413286088.issue21976@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 21:43:01 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 14 Jul 2014 19:43:01 +0000 Subject: [issue21981] Idle problem In-Reply-To: <1405338608.49183.YahooMailNeo@web87703.mail.ir2.yahoo.com> Message-ID: <1405366981.78.0.284658688349.issue21981@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thomas, PLEASE stop quoting messages when you post by email. Use your mouse selection and delete key. There is an open issue for adding lines numbers in the editor: #17535. It has a patch waiting for review. The bug you reported has not been fixed. Silent Ghost showed you how to work around the problem. Other people have reported the the same problem before, and have been given the same workaround (delete the file), and the problem forgotten about until the next person runs into it. This time the 'next person' was you. But the problem has never been fixed. There should not be a 'next person'. The issue should stay open until the bug is fixed (or I fine a duplicate open issue). The headers are mostly for Python developers. After users make an initial report, they should usually leave them alone. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 21:48:10 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Jul 2014 19:48:10 +0000 Subject: [issue21514] update json module docs in light of RFC 7159 & ECMA-404 In-Reply-To: <1400215968.18.0.723032535405.issue21514@psf.upfronthosting.co.za> Message-ID: <1405367290.15.0.908886897083.issue21514@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks Bob. If you want me to apply the patch, just assign this back to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 21:53:23 2014 From: report at bugs.python.org (Bob Ippolito) Date: Mon, 14 Jul 2014 19:53:23 +0000 Subject: [issue21514] update json module docs in light of RFC 7159 & ECMA-404 In-Reply-To: <1400215968.18.0.723032535405.issue21514@psf.upfronthosting.co.za> Message-ID: <1405367603.88.0.258326631426.issue21514@psf.upfronthosting.co.za> Changes by Bob Ippolito : ---------- assignee: bob.ippolito -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 22:04:32 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Jul 2014 20:04:32 +0000 Subject: [issue21645] test_read_all_from_pipe_reader() of test_asyncio hangs on FreeBSD 9 In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <3hBwmw16WGz7LkK@mail.python.org> Roundup Robot added the comment: New changeset dbf991650441 by Victor Stinner in branch 'default': Issue #21645: test_asyncio, log debug trace into sys.__stderr__, not in http://hg.python.org/cpython/rev/dbf991650441 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 22:05:19 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Jul 2014 20:05:19 +0000 Subject: [issue21645] test_read_all_from_pipe_reader() of test_asyncio hangs on FreeBSD 9 In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <1405368319.41.0.602681036515.issue21645@psf.upfronthosting.co.za> STINNER Victor added the comment: Buildbot where the issue occurs: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 22:11:12 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 14 Jul 2014 20:11:12 +0000 Subject: [issue12955] urllib.request example should use "with ... as:" In-Reply-To: <1315650628.73.0.673162910121.issue12955@psf.upfronthosting.co.za> Message-ID: <1405368672.79.0.265952049162.issue12955@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 22:16:46 2014 From: report at bugs.python.org (akira) Date: Mon, 14 Jul 2014 20:16:46 +0000 Subject: [issue21041] pathlib.PurePath.parents rejects negative indexes In-Reply-To: <1395613011.22.0.29152070109.issue21041@psf.upfronthosting.co.za> Message-ID: <1405369006.89.0.109782192632.issue21041@psf.upfronthosting.co.za> akira added the comment: > Aren't negative indexes well defined in Python? yes. I've provided the link to Python docs [1] in msg214642 that explicitly defines the behavior: > If i or j is negative, the index is relative to the end of the string: > len(s) + i or len(s) + j is substituted. But note that -0 is still 0. [1]: https://docs.python.org/3/library/stdtypes.html#sequence-types-list-tuple-range ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 22:28:00 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 14 Jul 2014 20:28:00 +0000 Subject: [issue14379] Several traceback docs improvements In-Reply-To: <1332328007.08.0.704590425302.issue14379@psf.upfronthosting.co.za> Message-ID: <1405369680.81.0.185705717425.issue14379@psf.upfronthosting.co.za> Mark Lawrence added the comment: As nobody has even commented on this, let alone proposed a patch, I'd be inclined to close as "won't fix" or "out of date". ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 22:31:30 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 14 Jul 2014 20:31:30 +0000 Subject: [issue15117] Please document top-level sqlite3 module variables In-Reply-To: <1340205684.94.0.46461654189.issue15117@psf.upfronthosting.co.za> Message-ID: <1405369890.12.0.133300968207.issue15117@psf.upfronthosting.co.za> Mark Lawrence added the comment: @wchlm sorry about the delay in responding, but would you like to propose a patch for this? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 22:38:09 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 14 Jul 2014 20:38:09 +0000 Subject: [issue17250] argparse: Issue 15906 patch; positional with nargs='*' and string default In-Reply-To: <1361336297.12.0.955168493515.issue17250@psf.upfronthosting.co.za> Message-ID: <1405370289.78.0.618382335105.issue17250@psf.upfronthosting.co.za> Mark Lawrence added the comment: Slipped under the radar? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 22:45:38 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 14 Jul 2014 20:45:38 +0000 Subject: [issue15552] gettext: if looking for .mo in default locations, also look in locale-bundle location In-Reply-To: <1344021068.11.0.875930388835.issue15552@psf.upfronthosting.co.za> Message-ID: <1405370738.71.0.632778882686.issue15552@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Dominique please accept our apologies for the delay in replying. Can someone please review the attached patch as it's only five extra lines. I'd do it myself but I know nothing about openSUSE, internationalization or gettext. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 22:59:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 14 Jul 2014 20:59:14 +0000 Subject: [issue21041] pathlib.PurePath.parents rejects negative indexes In-Reply-To: <1395613011.22.0.29152070109.issue21041@psf.upfronthosting.co.za> Message-ID: <1405371554.21.0.00615617163153.issue21041@psf.upfronthosting.co.za> Mark Lawrence added the comment: #7951 has an interesting debate on negative indexes that is possibly applicable here. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 23:08:47 2014 From: report at bugs.python.org (Zachary Ware) Date: Mon, 14 Jul 2014 21:08:47 +0000 Subject: [issue16895] Batch file to mimic 'make' on Windows In-Reply-To: <1357677821.21.0.151237367429.issue16895@psf.upfronthosting.co.za> Message-ID: <1405372127.51.0.624254698155.issue16895@psf.upfronthosting.co.za> Zachary Ware added the comment: Still relevant, but the current patch is overkill (Brian was right, it's just way more batch than is healthy to check in). Things are changing rapidly, though; I'll close it as "postponed" for now, with the expectation of reopening someday. ---------- assignee: -> zach.ware components: +Build resolution: -> postponed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 23:33:02 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 14 Jul 2014 21:33:02 +0000 Subject: [issue18397] Python with MinGW In-Reply-To: <1373227373.99.0.371478249642.issue18397@psf.upfronthosting.co.za> Message-ID: <1405373582.52.0.897382268332.issue18397@psf.upfronthosting.co.za> Mark Lawrence added the comment: Nothing has been done with #17605 or the associated issues to my knowledge. I've no idea as to whether or not the originator will be picking them up again or if he is open to another user picking them up. I do know that there are 56 open issues with mingw in the title. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 23:53:26 2014 From: report at bugs.python.org (Anthony LaTorre) Date: Mon, 14 Jul 2014 21:53:26 +0000 Subject: [issue21983] segfault in ctypes.cast Message-ID: <1405374806.18.0.56272254378.issue21983@psf.upfronthosting.co.za> New submission from Anthony LaTorre: I get a segfault when trying to cast a string to a structure. >>> import ctypes >>> class Struct(ctypes.Structure): ... _fields_ = [('a', ctypes.c_uint32)] ... >>> s = '0'*100 >>> ctypes.cast(s,Struct) Segmentation fault The docs (https://docs.python.org/2/library/ctypes.html#ctypes.cast) say that `obj` "must be an object that can be interpreted as a pointer", so I assume this should return the same exception you get when trying to cast a list: >>> ctypes.cast(range(10),Struct) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.4/ctypes/__init__.py", line 488, in cast return _cast(obj, obj, typ) ctypes.ArgumentError: argument 1: : wrong type ---------- messages: 223062 nosy: Anthony.LaTorre priority: normal severity: normal status: open title: segfault in ctypes.cast type: crash versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 14 23:54:05 2014 From: report at bugs.python.org (Anthony LaTorre) Date: Mon, 14 Jul 2014 21:54:05 +0000 Subject: [issue21983] segfault in ctypes.cast In-Reply-To: <1405374806.18.0.56272254378.issue21983@psf.upfronthosting.co.za> Message-ID: <1405374845.73.0.0458234707492.issue21983@psf.upfronthosting.co.za> Changes by Anthony LaTorre : ---------- components: +ctypes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 00:01:00 2014 From: report at bugs.python.org (James Paget) Date: Mon, 14 Jul 2014 22:01:00 +0000 Subject: [issue21984] list(itertools.repeat(1)) causes the system to hang Message-ID: <1405375260.64.0.424779344541.issue21984@psf.upfronthosting.co.za> New submission from James Paget: In Python 3.4, type: >>> import itertools >>> list(itertools.repeat(1)) The system will hang, and a cold reboot is necessary (at least on Windows). I expected some sort of "infinite list" exception to be thrown. ---------- components: Extension Modules messages: 223063 nosy: James.Paget priority: normal severity: normal status: open title: list(itertools.repeat(1)) causes the system to hang type: crash versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 00:32:32 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 14 Jul 2014 22:32:32 +0000 Subject: [issue17390] display python version on idle title bar In-Reply-To: <1362920194.83.0.464215113749.issue17390@psf.upfronthosting.co.za> Message-ID: <1405377152.59.0.307505851215.issue17390@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree that the repeated 'Python x.y.z: " in the listing is too much. #21588 has a patch but I am not ready to push it or do the review and revision needed . So I propose to reduce the current prefix to the minimum needed to know what version F5 will run the file with, x.y with minimal dressing, and put it in the middle or at the end. Your example Windows listing would then look like *Python 2.7.7 Shell* demo.py (2.7) /Users/raymond/class/demo.py download.py (2.7) /Users/raymond/class/download.py or *Python 2.7.7 Shell* demo.py - /Users/raymond/class/demo.py (2.7) download.py - /Users/raymond/class/download.py (2.7) or *Python 2.7.7 Shell* demo.py - /Users/raymond/class/demo.py | 2.7 download.py - /Users/raymond/class/download.py | 2.7 Which do you like best? I am trying out the second one in my 3.4 installation, and will switch to the third later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 00:32:57 2014 From: report at bugs.python.org (Lita Cho) Date: Mon, 14 Jul 2014 22:32:57 +0000 Subject: [issue21815] imaplib truncates some untagged responses In-Reply-To: <1403275196.37.0.409307454531.issue21815@psf.upfronthosting.co.za> Message-ID: <1405377177.13.0.79348632446.issue21815@psf.upfronthosting.co.za> Changes by Lita Cho : ---------- nosy: +Lita.Cho, jesstess _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 01:02:23 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 14 Jul 2014 23:02:23 +0000 Subject: [issue21984] list(itertools.repeat(1)) causes the system to hang In-Reply-To: <1405375260.64.0.424779344541.issue21984@psf.upfronthosting.co.za> Message-ID: <1405378943.67.0.798387318483.issue21984@psf.upfronthosting.co.za> Josh Rosenberg added the comment: It's unlikely to have hung the system entirely. It will slow down a lot though, as it will consume ridiculous amounts of RAM, and occasionally involve copying the existing data due to reallocation. The cost of performing this pointless work may consume enough system resources that the OS responsiveness becomes intermittent, messages drop, etc. That's an inevitable consequence of running a program without a quota that intentionally consumes system resources indefinitely. Python has no mechanism for identifying the difference between an infinitely long generator and a long but finite generator. Eventually, if you left the code running, it should eventually exhaust physical memory and the page file, then die with a MemoryError. But how long it takes to die is going to depend on the OS, page file configuration, etc. ---------- nosy: +josh.rosenberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 01:47:33 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Jul 2014 23:47:33 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za> Message-ID: <1405381653.41.0.97564001278.issue15443@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For the record, numpy's datetime and timedelta types have theoretical support for attoseconds. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 01:51:01 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Jul 2014 23:51:01 +0000 Subject: [issue21976] Fix test_ssl.py to handle LibreSSL versioning appropriately In-Reply-To: <1405318558.48.0.274142597942.issue21976@psf.upfronthosting.co.za> Message-ID: <1405381861.64.0.596181653485.issue21976@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't have LibreSSL to test but the patch sounds fine to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 02:08:48 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 15 Jul 2014 00:08:48 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za> Message-ID: <1405382928.76.0.510092268407.issue15443@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: numpy's datetime64 and timedelta64 types are so utterly broken that I would only recommend studying them as a negative example of how not to design a date-time library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 02:15:55 2014 From: report at bugs.python.org (eryksun) Date: Tue, 15 Jul 2014 00:15:55 +0000 Subject: [issue21983] segfault in ctypes.cast In-Reply-To: <1405374806.18.0.56272254378.issue21983@psf.upfronthosting.co.za> Message-ID: <1405383355.7.0.0460803758644.issue21983@psf.upfronthosting.co.za> eryksun added the comment: You need to cast to a pointer type, i.e. POINTER(Struct). Trying to cast to just Struct should raise a TypeError. Instead this revealed a bug in cast_check_pointertype (3.4.1): http://hg.python.org/cpython/file/c0e311e010fc/Modules/_ctypes/_ctypes.c#l5225 dict->proto is NULL in the Struct type's stgdict, so PyUnicode_Check(dict->proto) segfaults. A simple fix is to add a check for this on line 5235: if (dict && dict->proto) { Then cast will raise the expected TypeError from line 5242 on return from line 5255. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 02:41:47 2014 From: report at bugs.python.org (Lita Cho) Date: Tue, 15 Jul 2014 00:41:47 +0000 Subject: [issue21815] imaplib truncates some untagged responses In-Reply-To: <1403275196.37.0.409307454531.issue21815@psf.upfronthosting.co.za> Message-ID: <1405384907.74.0.301521184541.issue21815@psf.upfronthosting.co.za> Lita Cho added the comment: I was reading the RFC spec, and it looks like it doesn't specificy '[' and ']' are not allowed in the PERNANENTFLAGS names. I can try to add a fix for this. But if anyone else knows if you are not allowed to have '[' or ']' in flag names, please let me know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 03:00:26 2014 From: report at bugs.python.org (Tim Peters) Date: Tue, 15 Jul 2014 01:00:26 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za> Message-ID: <1405386026.61.0.0502329965396.issue15443@psf.upfronthosting.co.za> Tim Peters added the comment: A note from Guido, from about 2 years ago: https://mail.python.org/pipermail/python-dev/2012-July/121127.html """ TBH, I think that adding nanosecond precision to the datetime type is not unthinkable. You'll have to come up with some clever backward compatibility in the API though, and that will probably be a bit ugly (you'd have a microsecond parameter with a range of 0-1000000 and a nanosecond parameter with a range of 0-1000). Also the space it takes in memory would probably increase (there's no room for an extra 10 bits in the carefully arranged 8-byte internal representation). """ Add pickle, etc. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 03:24:42 2014 From: report at bugs.python.org (eryksun) Date: Tue, 15 Jul 2014 01:24:42 +0000 Subject: [issue20117] subprocess on Windows: wrong return code with shell=True In-Reply-To: <1388787639.9.0.977617126521.issue20117@psf.upfronthosting.co.za> Message-ID: <1405387482.95.0.386582371526.issue20117@psf.upfronthosting.co.za> eryksun added the comment: For what it's worth, an explicit "exit" will set the return code to the last error. >>> subprocess.call("nonex & exit", shell=True, stderr=subprocess.DEVNULL) 9009 ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 03:37:38 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 15 Jul 2014 01:37:38 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za> Message-ID: <1405388258.52.0.113863626436.issue15443@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > (there's no room for an extra 10 bits in the > carefully arranged 8-byte internal representation) According to a comment on top of Include/datetime.h, the internal representation of datetime is 10, not 8 bytes. /* Fields are packed into successive bytes, each viewed as unsigned and * big-endian, unless otherwise noted: * * byte offset * 0 year 2 bytes, 1-9999 * 2 month 1 byte, 1-12 * 3 day 1 byte, 1-31 * 4 hour 1 byte, 0-23 * 5 minute 1 byte, 0-59 * 6 second 1 byte, 0-59 * 7 usecond 3 bytes, 0-999999 * 10 */ (if you don't trust the comments check the definitions a few lines below) #define _PyDateTime_DATETIME_DATASIZE 10 AFAIK, Python objects are allocated with at least 32-bit alignment, so we have at least 2 unused bytes at the end of each datetime object. Furthermore, out of 24 bits allocated for microseconds, only 20 are used, so nanoseconds can be accommodated by adding a single byte to DATETIME_DATASIZE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 03:48:22 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 Jul 2014 01:48:22 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1405388258.52.0.113863626436.issue15443@psf.upfronthosting.co.za> Message-ID: <53C48861.9060205@free.fr> Antoine Pitrou added the comment: Le 14/07/2014 21:37, Alexander Belopolsky a ?crit : > > AFAIK, Python objects are allocated with at least 32-bit alignment, 64 bits, actually, when using obmalloc.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 03:51:21 2014 From: report at bugs.python.org (Tim Peters) Date: Tue, 15 Jul 2014 01:51:21 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za> Message-ID: <1405389081.12.0.773660597485.issue15443@psf.upfronthosting.co.za> Tim Peters added the comment: Yup, it's definitely more than 8 bytes. In addition to the comments you quoted, an in-memory datetime object also has a full Python object header, a member to cache the hash code, and a byte devoted to saying whether or not a tzinfo member is present. Guessing Guido was actually thinking about the pickle size - but that's 10 bytes (for a "naive" datetime object). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 04:03:21 2014 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 15 Jul 2014 02:03:21 +0000 Subject: [issue8519] doc: termios and ioctl reference links In-Reply-To: <1272125391.54.0.0119716465224.issue8519@psf.upfronthosting.co.za> Message-ID: <1405389801.27.0.511095725512.issue8519@psf.upfronthosting.co.za> Guido van Rossum added the comment: In this case I think there is no legal issue. All you have to do is take the link from the patch and come up with a fresh patch of your own. (However I think Georg's objection against a Linux-specific link stands. You can probably find a POSIX link that would be acceptable.) ---------- nosy: +Guido.van.Rossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 04:04:41 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 15 Jul 2014 02:04:41 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za> Message-ID: <1405389881.55.0.890194521135.issue15443@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > Guessing Guido was actually thinking about the pickle size No, pickle also comes with an overhead >>> from datetime import * >>> import pickle >>> t = datetime.now() >>> len(pickle.dumps(t)) 70 For the present discussion, DATETIME_DATASIZE is the only relevant number because we are not going to change anything other than the payload layout in the datetime object or its pickle serialization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 04:53:41 2014 From: report at bugs.python.org (Tim Peters) Date: Tue, 15 Jul 2014 02:53:41 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za> Message-ID: <1405392821.23.0.851273600966.issue15443@psf.upfronthosting.co.za> Tim Peters added the comment: Of course pickles come with overheads too - don't be tedious ;-) The point is that the guts of the datetime pickling is this: basestate = PyBytes_FromStringAndSize((char *)self->data, _PyDateTime_DATETIME_DATASIZE); That consumes exactly 10 bytes today. Add nanoseconds, and it will take at least 11 (if 4 bits are insanely squashed into the bytes currently devoted to microseconds), and more likely 12 (if nanoseconds are sanely given their own 2 bytes). I suppose another possibility is to get rid of microseconds internally, and work with a single 4-byte nanosecond member. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 05:08:33 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 15 Jul 2014 03:08:33 +0000 Subject: [issue21982] Idle: Regression introduced in configDialog by rev 91509 In-Reply-To: <1405349011.77.0.800791635134.issue21982@psf.upfronthosting.co.za> Message-ID: <3hC6B83vKTz7Lkx@mail.python.org> Roundup Robot added the comment: New changeset af1351800c7a by Terry Jan Reedy in branch '2.7': Issue #21982: Add minimal unittest for configDialog with 46% coverage. http://hg.python.org/cpython/rev/af1351800c7a New changeset 681979c6e6b2 by Terry Jan Reedy in branch '3.4': Issue #21982: Add minimal unittest for configDialog with 46% coverage. http://hg.python.org/cpython/rev/681979c6e6b2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 05:19:14 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 15 Jul 2014 03:19:14 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za> Message-ID: <1405394354.27.0.0782846331519.issue15443@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The following code demonstrates that we can pack year through second fields in 40 bits: #include struct dt { unsigned year :14; /* 1-9999 of 0-16,383 */ unsigned month :4; /* 1-12 of 0-16 */ unsigned day :5; /* 1-31 of 0-31 */ unsigned hour :5; /* 0-23 of 0-31 */ unsigned minute:6; /* 0-59 of 0-63 */ unsigned second:6; /* 0-59 of 0-63 */ /* total : 40 bits */ }; int main() { struct dt t; t.year = 9999; t.month = 12; t.day = 31; t.hour = 24; t.minute = 59; t.second = 59; printf("%d-%d-%dT%d:%d:%d in %d bytes\n", t.year, t.month, t.day, t.hour, t.minute, t.second, (int)sizeof(t)); } $ ./a.out 9999-12-31T24:59:59 in 8 bytes Assuming 64-bit alignment, this leaves 64*2 - 40 = 88 bits for the sub-second field. In 88 bits you can pack yoctoseconds (yocto = 1e-24) without breaking a sweat: >>> 2**88 309485009821345068724781056 >>> 10**24 1000000000000000000000000 The practical choice is between 32-bit nanoseconds (nano = 1e-9) and 64-bit attoseconds (atto = 1e-18). Given that the current the world record for shortest controllable time is 12 attoseconds [1], it may not be an absurd choice to go to 64 bits of sub-second precision. On the other hand, if we manage to go from micro- to nano-seconds now, I don't think it will be hard to go to higher resolution when users start asking for it some 40 years into the future. [1] http://phys.org/news192909576.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 05:20:39 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Jul 2014 03:20:39 +0000 Subject: [issue21982] Idle configDialog: fix regression and add minimal unittest In-Reply-To: <1405349011.77.0.800791635134.issue21982@psf.upfronthosting.co.za> Message-ID: <1405394439.69.0.612729211364.issue21982@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thanks for catching this. Either I misread pyflakes output or it has a bug. In either case, I should have searched this one like I did some others. The htest caught this. I added a minimal unittest that initially failed, covers half the module, and now passes. 2.7 did not have the error, but the rest of the changes apply. --- More info on a recurring 'nuisance': Start Idle on Windows from debug build interpreter. After ConfigDialog(), test termination causes the following to be printed in the interpreter window. can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure "ttk::ThemeChanged" line 6) invoked from within "ttk::ThemeChanged" This happens *after* tearDownClass runs. I determined this by adding def tearDownModule(): input('mod') to pause. Changing to "d = ConfigDialog(...); d.destroy()" has no effect. Commenting out parts of dialog construction might narrow down the responsible component. ---------- resolution: -> fixed stage: -> resolved status: open -> closed title: Idle: Regression introduced in configDialog by rev 91509 -> Idle configDialog: fix regression and add minimal unittest versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 05:24:32 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 15 Jul 2014 03:24:32 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za> Message-ID: <1405394672.28.0.158917585853.issue15443@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > I suppose another possibility is to get rid of microseconds > internally, and work with a single 4-byte nanosecond member. Yes, that is what I think we should do. I would also split it from the packed fields to give it a 32-bit alignment which should improve performance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 05:39:55 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 15 Jul 2014 03:39:55 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za> Message-ID: <1405395595.02.0.617987038275.issue15443@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: If alignment is not required (as is the case in pickle), we can pack year through second + nanosecond fields in 9 bytes. For backwards compatibility we should continue accepting 10-byte pickles, but we can write in a new 9-byte format. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 06:15:31 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 Jul 2014 04:15:31 +0000 Subject: [issue21984] list(itertools.repeat(1)) causes the system to hang In-Reply-To: <1405375260.64.0.424779344541.issue21984@psf.upfronthosting.co.za> Message-ID: <1405397731.94.0.418370835535.issue21984@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Python has no mechanism for identifying the difference > between an infinitely long generator and a long but finite generator. > Eventually, if you left the code running, it should eventually > exhaust physical memory and the page file, then die with a MemoryError This is exactly the case. ---------- nosy: +rhettinger resolution: -> not a bug status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 06:28:01 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 Jul 2014 04:28:01 +0000 Subject: [issue21978] Support index access on OrderedDict views (e.g. o.keys()[7]) In-Reply-To: <1405329303.68.0.861089422528.issue21978@psf.upfronthosting.co.za> Message-ID: <1405398481.02.0.397787384853.issue21978@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Closing this. The premise is flawed. Guido designed mapping views to be a pass-through to the underlying mapping. As such, they would only have sequence behavior if the underlying mapping had sequence behavior. The implementation of both regular dicts and OrderedDicts don't support reasonable ways to index by position. Guido essentially decided on the current behavior this when he decided to do away the Python's dict.items() being a list and replacing it with a mapping view. See PEP 3016 for his rationale and the related discussion. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 07:07:53 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Jul 2014 05:07:53 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1405400873.66.0.44875297644.issue17535@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I tried v2 and it works, subject to the following comments. 1. (The biggest issue) For me, the 'obvious' implementation would be a narrow text window using the same font and size as the main window. The canvas introduces the problem of having to calculate the number position instead of letting tk do it for free. On my screen, they are two pixel too low. The fixed size for numbers can be a problem also. If someone with super eyesight (or a system that displays chars larger than nominal) uses 8 pt type, the bigger numbers are jammed together. If someone with poor eyesight uses a bigger font, the numbers will be too small. (This applies to dialogs too, but that is another issue.) Breakpoint symbols, for the few people who use them, could be selected from ascii ('|', '>', or '+') or non-ascii symbols. I do not think we need a canvas just to have a graphic for this. I am also interested in a marginal Text_strip class because I think one might be a possible solution to some of the problems with the Shell. 2. Roger claimed "IDLE does not have a method to broadcast that a font was changed". Roger, as extension writer, had to take Idle as given, whereas we can add a 'font-changed' virtual event. This seems like a good idea. So would be a 'highlights-changed' event. It appears that editor windows get poked (notified) whenever the preferences Apply or Ok button are hit. Text is blackened and re-colorized even if there is no option change. (Edit a large file like EditorWindow.py to see this.) Adding this event should be a separate issue that this one depends on. 3. To me, the default background for line numbers is way too dark. Easily changed. 4. There should be a way to toggle line numbers in individual editor windows independently of the default setting for a user. (I agree that the delivered default should be off.) I would add this to the Format menu. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 07:15:05 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Jul 2014 05:15:05 +0000 Subject: [issue21588] Idle: make editor title bar user configurable In-Reply-To: <1401167354.94.0.454935095166.issue21588@psf.upfronthosting.co.za> Message-ID: <1405401305.32.0.315264957446.issue21588@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I decided that it would be better to try to quickly solve Raymond's issue with editor windows in a simpler fashion and not rush this. Once we add a new configuration option, the cross-version nature of user config files means we are more or less stuck with the decision. I agree that the current title code is hackish and should be refactored somehow. I am just not sure how yet. I want to take the in-process CheckerWindows and future ExternalWindows into account too. ---------- priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 07:30:19 2014 From: report at bugs.python.org (Demian Brecht) Date: Tue, 15 Jul 2014 05:30:19 +0000 Subject: [issue21793] httplib client/server status refactor In-Reply-To: <1403031756.71.0.442697149496.issue21793@psf.upfronthosting.co.za> Message-ID: <1405402219.41.0.922361076073.issue21793@psf.upfronthosting.co.za> Demian Brecht added the comment: Bump for a follow-up review or merge ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 08:14:44 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 Jul 2014 06:14:44 +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: <1405404884.5.0.643584162652.issue20451@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > My vote is for leaving this alone and letting the higher level > functions be more clever. Changing this function is certain to > break existing code in unpredictable ways. That is sensible. Marking this as closed. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 08:54:24 2014 From: report at bugs.python.org (Claudiu Popa) Date: Tue, 15 Jul 2014 06:54:24 +0000 Subject: [issue19776] Provide expanduser() on Path objects In-Reply-To: <1385409778.55.0.842571848249.issue19776@psf.upfronthosting.co.za> Message-ID: <1405407264.76.0.3082962738.issue19776@psf.upfronthosting.co.za> Claudiu Popa added the comment: Since all the comments have been addressed, it would be nice if this gets committed. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 08:56:40 2014 From: report at bugs.python.org (Claudiu Popa) Date: Tue, 15 Jul 2014 06:56:40 +0000 Subject: [issue18615] sndhdr.whathdr could return a namedtuple In-Reply-To: <1375370275.79.0.808837089288.issue18615@psf.upfronthosting.co.za> Message-ID: <1405407400.74.0.953982571034.issue18615@psf.upfronthosting.co.za> Claudiu Popa added the comment: Serhiy, if there's no actual gain in changing this, should we close the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 09:28:57 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 Jul 2014 07:28:57 +0000 Subject: [issue18615] sndhdr.whathdr could return a namedtuple In-Reply-To: <1375370275.79.0.808837089288.issue18615@psf.upfronthosting.co.za> Message-ID: <1405409337.59.0.306391458742.issue18615@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This is a reasonable improvement. It was what named tuples were intended to be used for. ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 09:56:20 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 Jul 2014 07:56:20 +0000 Subject: [issue18974] Use argparse in the diff script In-Reply-To: <1378654081.42.0.0708536053784.issue18974@psf.upfronthosting.co.za> Message-ID: <1405410980.05.0.180739739466.issue18974@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Approved. Go ahead and apply this. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 10:06:28 2014 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 15 Jul 2014 08:06:28 +0000 Subject: [issue21984] list(itertools.repeat(1)) causes the system to hang In-Reply-To: <1405375260.64.0.424779344541.issue21984@psf.upfronthosting.co.za> Message-ID: <1405411588.19.0.988268127492.issue21984@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Library (Lib) -Extension Modules stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 10:20:33 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 Jul 2014 08:20:33 +0000 Subject: [issue20663] Introduce exception argument to iter In-Reply-To: <1392659027.56.0.320916972318.issue20663@psf.upfronthosting.co.za> Message-ID: <1405412433.7.0.975309420739.issue20663@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The recipe has been in the docs for a good while and as far as I can tell, no one ever uses this in real-code. That suggests that it should remain as a recipe and not become part of the core language (feature creep is not good for learnability or maintainability). I also don't see people writing simple generators that exhibit this functionality. It just doesn't seem to come-up in real code. [Josh] > I've had several cases where I'd have used something like this Please post concrete examples so we can actually assess whether code is better-off with or without the feature. FWIW, the standard for expanding the API complexity of built-in functions is very high. It is not enough to say, "I might have used this a couple of times". Unnecessary API expansion is not cost free and can make the language worse off on the balance (does the time spent learning, remembering, and teaching the function payoff warrant the rare occasion where it will save a couple of lines of code? is code harder to customize or debug with hard-wired functionality rather than general purpose try-excepts? Do we even want people to write code like this? If heaps, deques, dicts and queues really needed to be destructively iterated, we would have long since had a feature request for them. But we haven't and destructive for-loops would be unusual and unexpected for Python. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 10:43:46 2014 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 15 Jul 2014 08:43:46 +0000 Subject: [issue21970] Broken code for handling file://host in urllib.request.FileHandler.file_open In-Reply-To: <1405216161.05.0.3363234179.issue21970@psf.upfronthosting.co.za> Message-ID: <1405413826.73.0.140759117654.issue21970@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Thanks for the report. Point 2 is definitely a bug (and an overlook by me), I will fix it. I think, the url[:2] == '//' check was present for ftp case which supported file:// protocol. I can't see a clear requirement to change here. The scenarios you encounter when giving a two different paths are interesting because, in one the path stat('/invalid/path') and in the other it is the path '/' that is stat and only late is the hostname verified if it coming from localhost (http://hg.python.org/cpython/file/ddfcaeb1c56b/Lib/urllib/request.py#l1353). Since both presence of file locally and then ensuring the host is localhost needs to be done, the current order gives faster failures for most common use-cases. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 10:50:14 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 Jul 2014 08:50:14 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1405414214.42.0.587201628409.issue12067@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 12:21:02 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 15 Jul 2014 10:21:02 +0000 Subject: [issue20663] Introduce exception argument to iter In-Reply-To: <1392659027.56.0.320916972318.issue20663@psf.upfronthosting.co.za> Message-ID: <1405419662.12.0.396829187699.issue20663@psf.upfronthosting.co.za> Josh Rosenberg added the comment: The main example that comes to mind was a variant of functools.lru_cache I wrote that expired cache entries after they reached a staleness threshold. The details elude me (this was a work project from a year ago), but it was basically what I was describing; a case where I wanted to efficiently, destructively iterate a collections.deque, and it would have been nice to be able to do so without needing a lock (at least for that operation) and without (IMO) ugly infinite loops terminated by an exception. (Caveat: Like I said, this was a while ago; iter_except might only have simplified the code a bit, not saved me the lock) No, it's not critical. But for a lot of stuff like this, the recipe saves nothing over inlining a while True: inside a try/except, and people have to know the recipe is there to even look for it. The only reason my particular example came to mind is that the atomic aspect was mildly important in that particular case, so it stuck in my head (normally I'm not trying to squeeze cycles out of Python, but performance oriented decorators are a special case). I do stuff that would be simplified by this more often, it's just cases where I currently do something else would all be made a little nicer if I could have a single obvious way to accomplish it that didn't feel oddly verbose/ugly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 12:23:55 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 15 Jul 2014 10:23:55 +0000 Subject: [issue18974] Use argparse in the diff script In-Reply-To: <1378654081.42.0.0708536053784.issue18974@psf.upfronthosting.co.za> Message-ID: <3hCHrV5RKYz7LjX@mail.python.org> Roundup Robot added the comment: New changeset 08b3ee523577 by Serhiy Storchaka in branch 'default': Issue #18974: Tools/scripts/diff.py now uses argparse instead of optparse. http://hg.python.org/cpython/rev/08b3ee523577 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 12:25:21 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Jul 2014 10:25:21 +0000 Subject: [issue18974] Use argparse in the diff script In-Reply-To: <1378654081.42.0.0708536053784.issue18974@psf.upfronthosting.co.za> Message-ID: <1405419921.64.0.67749102219.issue18974@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Raymond. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 12:38:02 2014 From: report at bugs.python.org (Nikolay Bogoychev) Date: Tue, 15 Jul 2014 10:38:02 +0000 Subject: [issue16099] robotparser doesn't support request rate and crawl delay parameters In-Reply-To: <1349096305.17.0.983395980337.issue16099@psf.upfronthosting.co.za> Message-ID: <1405420682.69.0.650485290533.issue16099@psf.upfronthosting.co.za> Nikolay Bogoychev added the comment: Hey, Just a friendly reminder that there has been no activity for a month and a half and v3 is pending for review (: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 13:07:41 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 11:07:41 +0000 Subject: [issue21983] segfault in ctypes.cast In-Reply-To: <1405374806.18.0.56272254378.issue21983@psf.upfronthosting.co.za> Message-ID: <1405422461.19.0.677274275922.issue21983@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'll provide a patch but I don't know which test file to use, can somebody please advise. ---------- nosy: +BreamoreBoy, amaury.forgeotdarc, belopolsky, meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 13:24:01 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Jul 2014 11:24:01 +0000 Subject: [issue18615] sndhdr.whathdr could return a namedtuple In-Reply-To: <1375370275.79.0.808837089288.issue18615@psf.upfronthosting.co.za> Message-ID: <1405423441.65.0.990617682871.issue18615@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If Raymond found this feature helpful, I have no strong objection. Only several comments: * A named tuple is documented as having fields: type, sampling_rate, channels, frames, bits_per_sample. * User tests in existing code return tuples. what() and whathdr() should convert result to named tuple. Changing standard tests after this is redundant. * If we guarantee pickleability, we will stick with nametuple's name. It is not more implementation detail which we can change in any moment, all future versions of Python should have sndhdr._SndHeaders. Is it good to use underscored name? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 14:09:45 2014 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Tue, 15 Jul 2014 12:09:45 +0000 Subject: [issue21968] 'abort' object is not callable In-Reply-To: <1405196813.11.0.369629706677.issue21968@psf.upfronthosting.co.za> Message-ID: <1405426185.04.0.508632747216.issue21968@psf.upfronthosting.co.za> Walter D?rwald added the comment: The problem seems to be in that line: except imaplib.IMAP4_SSL.abort, imaplib.IMAP4.abort: This does *not* catch both exception classes, but catches only IMAP4_SSL.abort and stores the exception object in imaplib.IMAP4.abort. What you want is: except (imaplib.IMAP4_SSL.abort, imaplib.IMAP4.abort): ---------- nosy: +doerwalter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 14:41:42 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 12:41:42 +0000 Subject: [issue14414] xmlrpclib leaves connection in broken state if server returns error without content-length In-Reply-To: <1332778465.08.0.819519448389.issue14414@psf.upfronthosting.co.za> Message-ID: <1405428102.71.0.746694973952.issue14414@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Joachim I'm sorry about the delay in replying to you. Can someone take a look at this please as it's out of my league. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 14:44:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 12:44:15 +0000 Subject: [issue14730] Implementation of the PEP 419: Protecting cleanup statements from interruptions In-Reply-To: <1336228306.65.0.183212928475.issue14730@psf.upfronthosting.co.za> Message-ID: <1405428255.57.0.732249912612.issue14730@psf.upfronthosting.co.za> Mark Lawrence added the comment: FTR PEP 419 has been deferred as there's no champion. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 15:00:38 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 13:00:38 +0000 Subject: [issue16182] readline: Wrong tab completion scope indices in Unicode terminals In-Reply-To: <1349813384.06.0.615857426211.issue16182@psf.upfronthosting.co.za> Message-ID: <1405429238.09.0.587992287874.issue16182@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Kaarle please accept our apologies for the delay in getting back to you. Can one of our unicode gurus comment please. ---------- components: +Unicode nosy: +BreamoreBoy, ezio.melotti, lemburg, loewis versions: +Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 15:26:27 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 Jul 2014 13:26:27 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1405392821.23.0.851273600966.issue15443@psf.upfronthosting.co.za> Message-ID: <53C52C00.40700@free.fr> Antoine Pitrou added the comment: Le 14/07/2014 22:53, Tim Peters a ?crit : > > That consumes exactly 10 bytes today. Add nanoseconds, and it will take at least 11 (if 4 bits are insanely squashed into the bytes currently devoted to microseconds), and more likely 12 (if nanoseconds are sanely given their own 2 bytes). That doesn't have to be. For example you could use the MSB of the microseconds field to store a "datetime pickle flags" byte, which could tell the unserializer whether a nanoseconds (or attoseconds :-)) field follows or not. Remember that existing pickles must remain readable, so there must be some kind of version field anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 15:28:38 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 13:28:38 +0000 Subject: [issue16185] include path in subprocess.Popen() file not found error messages on Windows In-Reply-To: <1349871682.42.0.803066776149.issue16185@psf.upfronthosting.co.za> Message-ID: <1405430918.83.0.98042305951.issue16185@psf.upfronthosting.co.za> Mark Lawrence added the comment: Slipped under the radar? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 15:44:36 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 13:44:36 +0000 Subject: [issue16232] curses.textpad.Textbox backtrace support In-Reply-To: <1350225485.82.0.832122533952.issue16232@psf.upfronthosting.co.za> Message-ID: <1405431876.16.0.514040044783.issue16232@psf.upfronthosting.co.za> Mark Lawrence added the comment: @emeaudroid please accept our apologies for the delay in getting back to you. Can someone take a look at this please as I don't have a *nix box to play with. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 15:52:17 2014 From: report at bugs.python.org (Dima Tisnek) Date: Tue, 15 Jul 2014 13:52:17 +0000 Subject: [issue7946] Convoy effect with I/O bound threads and New GIL In-Reply-To: <1266353325.38.0.278549753357.issue7946@psf.upfronthosting.co.za> Message-ID: <1405432337.92.0.743374464936.issue7946@psf.upfronthosting.co.za> Dima Tisnek added the comment: What happened to this bug and patch? ---------- nosy: +Dima.Tisnek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 15:53:32 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 Jul 2014 13:53:32 +0000 Subject: [issue7946] Convoy effect with I/O bound threads and New GIL In-Reply-To: <1405432337.92.0.743374464936.issue7946@psf.upfronthosting.co.za> Message-ID: <53C53259.6020705@free.fr> Antoine Pitrou added the comment: Not much :) The patch is complex and the issue hasn't proved to be significant in production code. Do you have a (real-world) workload where this shows up? Le 15/07/2014 09:52, Dima Tisnek a ?crit : > > Dima Tisnek added the comment: > > What happened to this bug and patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 16:23:51 2014 From: report at bugs.python.org (Claudiu Popa) Date: Tue, 15 Jul 2014 14:23:51 +0000 Subject: [issue19776] Provide expanduser() on Path objects In-Reply-To: <1385409778.55.0.842571848249.issue19776@psf.upfronthosting.co.za> Message-ID: <1405434231.86.0.723660200136.issue19776@psf.upfronthosting.co.za> Claudiu Popa added the comment: This new patch fixes some comments from Serhiy. Thanks for the review! ---------- stage: commit review -> patch review Added file: http://bugs.python.org/file35955/issue19776_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 16:40:20 2014 From: report at bugs.python.org (Apple Grew) Date: Tue, 15 Jul 2014 14:40:20 +0000 Subject: [issue21968] 'abort' object is not callable In-Reply-To: <1405196813.11.0.369629706677.issue21968@psf.upfronthosting.co.za> Message-ID: <1405435220.13.0.13199719997.issue21968@psf.upfronthosting.co.za> Apple Grew added the comment: Oops. I totally missed this. Thanks for pointing this out. I would have never found this. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 16:53:26 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 Jul 2014 14:53:26 +0000 Subject: [issue21968] 'abort' object is not callable In-Reply-To: <1405196813.11.0.369629706677.issue21968@psf.upfronthosting.co.za> Message-ID: <1405436006.97.0.827278813351.issue21968@psf.upfronthosting.co.za> R. David Murray added the comment: That's why we made the syntax require the 'as' keyword in 3.x :) ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 17:07:00 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 15:07:00 +0000 Subject: [issue16242] Pickle and __getattr__ In-Reply-To: <1350324673.62.0.567343854306.issue16242@psf.upfronthosting.co.za> Message-ID: <1405436820.72.0.11212093212.issue16242@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Joseph please accept our apologies for the delay in getting back to you. ---------- nosy: +BreamoreBoy, alexandre.vassalotti, pitrou versions: +Python 3.4, Python 3.5 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 17:09:41 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 15:09:41 +0000 Subject: [issue16237] bdist_rpm SPEC files created with distutils may be distro specific In-Reply-To: <1350267871.71.0.392371801371.issue16237@psf.upfronthosting.co.za> Message-ID: <1405436981.94.0.716234421241.issue16237@psf.upfronthosting.co.za> Mark Lawrence added the comment: Who is best placed to produce a patch for this? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 17:13:22 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 15:13:22 +0000 Subject: [issue8843] urllib2 Digest Authorization uri must match request URI In-Reply-To: <1275046398.81.0.158910525846.issue8843@psf.upfronthosting.co.za> Message-ID: <1405437202.14.0.192181509879.issue8843@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Andrew we're sorry about the delay in getting back to you. @Senthil can you comment on this please. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 17:59:49 2014 From: report at bugs.python.org (Berker Peksag) Date: Tue, 15 Jul 2014 15:59:49 +0000 Subject: [issue21793] httplib client/server status refactor In-Reply-To: <1403031756.71.0.442697149496.issue21793@psf.upfronthosting.co.za> Message-ID: <1405439989.61.0.117302726556.issue21793@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 18:08:11 2014 From: report at bugs.python.org (Demian Brecht) Date: Tue, 15 Jul 2014 16:08:11 +0000 Subject: [issue8843] urllib2 Digest Authorization uri must match request URI In-Reply-To: <1275046398.81.0.158910525846.issue8843@psf.upfronthosting.co.za> Message-ID: <1405440491.75.0.183568020067.issue8843@psf.upfronthosting.co.za> Changes by Demian Brecht : ---------- nosy: +dbrecht _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 18:15:14 2014 From: report at bugs.python.org (Steve Dower) Date: Tue, 15 Jul 2014 16:15:14 +0000 Subject: [issue18016] subprocess should open stdin in mode w+b on windows In-Reply-To: <1368995353.89.0.988630901542.issue18016@psf.upfronthosting.co.za> Message-ID: <1405440914.11.0.0785422955662.issue18016@psf.upfronthosting.co.za> Steve Dower added the comment: With 2.7 and 3.4 (same for 32- and 64-bit): >>> f = open('test.bin', 'wb') >>> f.write(b' ' * (1024*1024*100)) 104857600 >>> f.close() >>> import os >>> os.stat('test.bin').st_size 104857600 The linked KB only applies to VS 2003 and VS 2005 (VC7 and VC8), so I'm not entirely surprised that this doesn't repro with VC9 or VC10. For the subprocess case (on 3.4): >>> import sys, subprocess >>> p=subprocess.Popen([sys.executable, '-c', 'print(len(input()))'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) >>> p.communicate(b' ' * (1024*1024*100)) (b'104857600\r\n', b'') I'm inclined to close this as no repro unless we get an actual repro. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 18:22:24 2014 From: report at bugs.python.org (Steve Dower) Date: Tue, 15 Jul 2014 16:22:24 +0000 Subject: [issue19450] Bug in sqlite in Windows binaries In-Reply-To: <1383131558.55.0.853606379194.issue19450@psf.upfronthosting.co.za> Message-ID: <1405441344.56.0.10901472287.issue19450@psf.upfronthosting.co.za> Steve Dower added the comment: I don't know enough about the SQLite API to determine whether we can safely upgrade from 3.6.21 in Python 2.7, but since this doesn't appear to be a security issue I don't see any solid justification for doing it anyway. If someone else does it, I'll build it, but I'm not taking responsibility for the change :) ---------- nosy: +ghaering _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 19:00:41 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 17:00:41 +0000 Subject: [issue16652] socket.getfqdn docs are not explicit enough about the algorithm. In-Reply-To: <1355089481.55.0.645096435972.issue16652@psf.upfronthosting.co.za> Message-ID: <1405443641.85.0.167671350971.issue16652@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm assuming that this still needs doing. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 19:02:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 17:02:27 +0000 Subject: [issue16663] Poor documentation for METH_KEYWORDS In-Reply-To: <1355242591.45.0.999993608815.issue16663@psf.upfronthosting.co.za> Message-ID: <1405443747.95.0.605912246848.issue16663@psf.upfronthosting.co.za> Mark Lawrence added the comment: @r3m0t we're sorry about the delay in getting back to you. Could you write a patch that covers this? ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 2.6, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 19:05:54 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 17:05:54 +0000 Subject: [issue16729] Document how to provide defaults for setup.py commands options In-Reply-To: <1355924641.52.0.160418711028.issue16729@psf.upfronthosting.co.za> Message-ID: <1405443954.28.0.607380188694.issue16729@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Eric could you comment on this please. ---------- components: -Distutils2 nosy: +BreamoreBoy, dstufft versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 19:12:13 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 Jul 2014 17:12:13 +0000 Subject: [issue21928] Incorrect reference to partial() in functools.wraps documentation In-Reply-To: <1404691551.32.0.43724066382.issue21928@psf.upfronthosting.co.za> Message-ID: <1405444333.04.0.344559355003.issue21928@psf.upfronthosting.co.za> R. David Murray added the comment: I would rewrite it as: This is a convenience function for invoking update_wrapper() as a function decorator when defining a wrapper function. It is equivalent to partial(update_wrapper, wrapped=wrapped, assigned=assigned, updated=updated). For example: ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 19:18:02 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 17:18:02 +0000 Subject: [issue16834] ioctl mutate_flag behavior in regard to the buffer size limit In-Reply-To: <1357052189.92.0.352175087043.issue16834@psf.upfronthosting.co.za> Message-ID: <1405444682.05.0.484297254061.issue16834@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Yuval sorry about the delay in replying. Can a *nix person comment on this please as I stick with Windows. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 19:19:44 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 Jul 2014 17:19:44 +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: <1405444784.52.0.839969788554.issue19954@psf.upfronthosting.co.za> R. David Murray added the comment: Originally I didn't respond because I wanted to report it to Gentoo first, but I've never managed to do so and there's no reason to keep the issue here open when it is clearly third party. ---------- resolution: -> third party stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 19:20:30 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 17:20:30 +0000 Subject: [issue16859] tarfile.TarInfo.fromtarfile does not check read() return value In-Reply-To: <1357286122.2.0.304851627332.issue16859@psf.upfronthosting.co.za> Message-ID: <1405444830.46.0.96494330774.issue16859@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Lars can we have a comment on this please. ---------- nosy: +BreamoreBoy type: -> behavior versions: +Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 19:23:58 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 17:23:58 +0000 Subject: [issue14326] IDLE - allow shell to support different locales In-Reply-To: <1331838921.21.0.772661396628.issue14326@psf.upfronthosting.co.za> Message-ID: <1405445038.08.0.429996502672.issue14326@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Terry one that appears to have escaped your eagle eye :) ---------- nosy: +BreamoreBoy, terry.reedy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 19:24:44 2014 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Jul 2014 17:24:44 +0000 Subject: [issue19450] Bug in sqlite in Windows binaries In-Reply-To: <1383131558.55.0.853606379194.issue19450@psf.upfronthosting.co.za> Message-ID: <1405445084.18.0.617380961831.issue19450@psf.upfronthosting.co.za> Ned Deily added the comment: IMO, what third-party libraries are included with the Windows and OS X binary installers, what versions of them, and when to update them are questions without firm established policy answers, say in a PEP. In many ways, for the installers we are performing the role of a third-party distributor / integrator. In many other such situations, the third-party libraries would be dynamically linked from the platform OS's or distributor's version and would be independently updated, assuming ABI compatibility is maintained. For the python.org installers, I think the updating has been mostly at the discretion of the installer developers with occasional instigation by the release managers or other core developers in the cases of security issues. FWIW, the most recent 2.7.x installers for OS X ship with SQLite 3.8.3.1. The current version of SQLite is 3.8.5 and that project has a very good reputation for its well-tested, regression-free releases. So I would not see a problem in upgrading the library but I would get a pronouncement from the release manager. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 19:33:05 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 Jul 2014 17:33:05 +0000 Subject: [issue8972] subprocess.list2cmdline doesn't quote the & character In-Reply-To: <1276261868.23.0.953588591338.issue8972@psf.upfronthosting.co.za> Message-ID: <1405445585.23.0.356055226957.issue8972@psf.upfronthosting.co.za> R. David Murray added the comment: The problem pointed to by this report was resolved by the revert. The issue of what to do about a list passed with shell=True is addressed (with no consensus) by issue 7839. A proposal to add a windows equivalent of shlex.quote has been floated, but no takers have come forward to implement one, as far as I know. There's nothing left to do here in this issue, as far as I can see. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 19:37:31 2014 From: report at bugs.python.org (Steve Dower) Date: Tue, 15 Jul 2014 17:37:31 +0000 Subject: [issue19450] Bug in sqlite in Windows binaries In-Reply-To: <1383131558.55.0.853606379194.issue19450@psf.upfronthosting.co.za> Message-ID: <1405445851.11.0.345756772608.issue19450@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 19:40:19 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 Jul 2014 17:40:19 +0000 Subject: [issue21927] BOM appears in stdin when using Powershell In-Reply-To: <1404657562.39.0.323212380566.issue21927@psf.upfronthosting.co.za> Message-ID: <1405446019.79.0.145298089944.issue21927@psf.upfronthosting.co.za> R. David Murray added the comment: I find it amusing that the complaint is that Python isn't detecting the BOM and using the info when powershell produces it, but when python produces the BOM, it is powershell that isn't detecting it and using the information. So it looks like there's a bug here in powershell no matter how you look at it ;) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 19:58:38 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 17:58:38 +0000 Subject: [issue17783] run the testsuite in batched mode In-Reply-To: <1366227480.23.0.0819092121273.issue17783@psf.upfronthosting.co.za> Message-ID: <1405447118.24.0.019467586.issue17783@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm assuming that this classifies as an enhancement and that the whole world ought to be interested in regrtest. ---------- nosy: +BreamoreBoy type: -> enhancement versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 20:04:02 2014 From: report at bugs.python.org (Claudiu Popa) Date: Tue, 15 Jul 2014 18:04:02 +0000 Subject: [issue18615] sndhdr.whathdr could return a namedtuple In-Reply-To: <1375370275.79.0.808837089288.issue18615@psf.upfronthosting.co.za> Message-ID: <1405447442.1.0.824938402711.issue18615@psf.upfronthosting.co.za> Claudiu Popa added the comment: Thanks, Serhiy, for the review. Here's the updated version. ---------- Added file: http://bugs.python.org/file35956/issue18615.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 20:07:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 18:07:59 +0000 Subject: [issue17605] mingw-meta: build interpeter core In-Reply-To: <1364762524.12.0.901415822586.issue17605@psf.upfronthosting.co.za> Message-ID: <1405447679.45.0.772361414258.issue17605@psf.upfronthosting.co.za> Mark Lawrence added the comment: There are a pile of mingw enhancement requests with this and #18653, #18654 and #19245 being meta issues. What is the official status of mingw within Python? Is the originator of these issues solely responsible for taking them forward? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 20:10:47 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 18:10:47 +0000 Subject: [issue17695] _sysconfigdata broken with universal builds on OSX In-Reply-To: <1365659948.17.0.458530957334.issue17695@psf.upfronthosting.co.za> Message-ID: <1405447847.08.0.29094133247.issue17695@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can our OSX gurus comment on this please. ---------- nosy: +BreamoreBoy, ned.deily versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 20:30:42 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Jul 2014 18:30:42 +0000 Subject: [issue18615] sndhdr.whathdr could return a namedtuple In-Reply-To: <1375370275.79.0.808837089288.issue18615@psf.upfronthosting.co.za> Message-ID: <1405449042.43.0.0524194070364.issue18615@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: A namedtuple is still wrongly documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 20:32:57 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 18:32:57 +0000 Subject: [issue9390] Error in sys.excepthook on windows when redirecting output of the script In-Reply-To: <1280235089.13.0.870066677678.issue9390@psf.upfronthosting.co.za> Message-ID: <1405449177.42.0.405908448355.issue9390@psf.upfronthosting.co.za> Mark Lawrence added the comment: I can't reproduce this with 3.4.1 or 3.5.0a0. I don't have a 2.7.x to test on, can it still be reproduced with later versions of 2.7? Does the introduction of pylauncher impact all on this wrt registry keys? ---------- nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 20:41:17 2014 From: report at bugs.python.org (Zachary Ware) Date: Tue, 15 Jul 2014 18:41:17 +0000 Subject: [issue21918] Convert test_tools to directory In-Reply-To: <1404499693.28.0.512453806731.issue21918@psf.upfronthosting.co.za> Message-ID: <1405449677.01.0.979750084096.issue21918@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's a new version of the patch in response to review comments. Patch is in --git format, which means no Rietveld link for this one. Changes from the first patch: - Remove Tools/parser/test_unparse.py entirely (moved to Lib/test/test_tools/) - Remove tearDownClass from the pdeps test - Fix (remove) test_main from test_unparse - Add test_md5sum (new since first patch) ---------- versions: -Python 2.7 Added file: http://bugs.python.org/file35957/test_tools.v2.diff--git _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 20:53:07 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Jul 2014 18:53:07 +0000 Subject: [issue19776] Provide expanduser() on Path objects In-Reply-To: <1385409778.55.0.842571848249.issue19776@psf.upfronthosting.co.za> Message-ID: <1405450387.2.0.907930465424.issue19776@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Doc example is still looks confusing. Is your home directory /home? There is a question. What should pathlib's expanduser() do in case when user directory can't be determined (or user does not exist)? Perhaps unlike to os.path.expanduser() it should raise an exception (as in many other pathlib's methods). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 20:56:17 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Jul 2014 18:56:17 +0000 Subject: [issue21084] IDLE can't deal with characters above the range (U+0000-U+FFFF) In-Reply-To: <1396008065.84.0.00802001667749.issue21084@psf.upfronthosting.co.za> Message-ID: <1405450577.67.0.234061737659.issue21084@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 21:28:41 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Jul 2014 19:28:41 +0000 Subject: [issue20663] Introduce exception argument to iter In-Reply-To: <1392659027.56.0.320916972318.issue20663@psf.upfronthosting.co.za> Message-ID: <1405452521.96.0.710155945012.issue20663@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ram, your opening post here is essentially a copy of your opening post on python-ideas, as if the long discussion there, involving about 6 serious discussants other than you, never happened. Instead of restarting the discussion from scratch, you need to summarize the previous discussion, including a proposed python equivalent for the revised iter() (to exactly pin down the api) and how much support the proposal got. A couple of notes that might be additions to what I said before: If a collection is fixed during an iteration, then destructive iteration might as well be done, when possible, by normal iteration followed by deletion of the collection. That leaves as use cases iterations where the collection is mutated during the iteration, as in breadth-first search. For many collections, like deques and hashables, mutation means that direct (normal) iteration with for is prohibited. The current solution is to interleave exception-raising access and mutation within a try and while-True loop. The following example is similar to a 'breadth-first search'. It uses a deque rather than a list to limit the maximum length of the collection to the maximum number of live candidates rather than the total number of candidates. from collections import deque d = deque((0,)) try: while True: n = d.popleft() print(n, len(d)) if n < 5: d.extend((n+1, n+2)) except IndexError: pass This prints 25 items, with a max len before the pop of 11. Under one variation of the proposal, the try-while block would be replaced by for n in iter(d.popleft, None, IndexError): print(n, len(d)) if n < 5: d.extend((n+1, n+2)) Is the difference enough to add a parameter to iter? Perhaps so. It reduces boilerplate and is a little easier to get right. It eliminates there question of whether the try should be inside or outside the loop. It also matches d = [0] for n in d: print(n, len(d)) if n < 5: d.extend((n+1, n+2)) which processes the same items in the same order, but extends the list to 25 rather than a max of 11 items. It makes deques and sets look more like direct replacements for lists. Ram: If you program in Python, you should be able to write a test. To start, replace the prints above with out = [] ... out.append((n, len(d))) and assert that the out lists of the current and proposed deque loops are the same. Raymond: I started this post with a recommendation to close but changed my mind after actually writing out the two deque examples. The fact that people rarely relegate the try - while True loop to a separate function (which would often be used just once) does not mean that the pattern itself is rare. Just yesterday or so, someone asked on python-list about how to search a graph when the set of candidate nodes got additions and 'for item in set' would not work. He was given the try - while True pattern as the answer. I think iter(func, ... exception) would be more useful than iter(func, sentinel) is now. The problem with the latter is that for general collections, the sentinel needs to be a hidden instance of object() so that it cannot be placed in the collection and become a non-special legal return value. It is then inaccessible to pass to iter. To signal 'no return', Python often raises an exception instead of returning a special object. ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 21:34:44 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 19:34:44 +0000 Subject: [issue12020] Attribute error with flush on stdout,stderr In-Reply-To: <1304703877.7.0.898555574271.issue12020@psf.upfronthosting.co.za> Message-ID: <1405452884.06.0.578336876574.issue12020@psf.upfronthosting.co.za> Mark Lawrence added the comment: With 3.4.1 and similarly with 3.5.0a0 I get Testing python 3.4 C:\python34\python.exe: can't open file 'attributeError.py': [Errno 2] No such file or directory Traceback (most recent call last): File "C:\Users\Mark\MyPython\mytest.py", line 34, in output = subprocess.check_output("%s %s -output" % (python34loc, myname)); File "c:\python34\lib\subprocess.py", line 620, in check_output raise CalledProcessError(retcode, process.args, output=output) subprocess.CalledProcessError: Command 'C:\python34\python.exe attributeError.py -output' returned non-zero exit status 2 Exception ignored in: <__main__.FlushFile object at 0x015E3EB0> AttributeError: 'FlushFile' object has no attribute 'flush' ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 21:44:29 2014 From: report at bugs.python.org (Ram Rachum) Date: Tue, 15 Jul 2014 19:44:29 +0000 Subject: [issue20663] Introduce exception argument to iter In-Reply-To: <1392659027.56.0.320916972318.issue20663@psf.upfronthosting.co.za> Message-ID: <1405453469.23.0.28055164789.issue20663@psf.upfronthosting.co.za> Ram Rachum added the comment: Terry: Thanks for your example use case. I hope that Raymond would be convinced. I take your point regarding summarizing the discussion, sorry about that. Regarding me writing a test: I'm only willing to write code for a feature for Python if there's general interest from python-dev in getting said feature into Python. If there's general agreement from core python-dev members that this feature should be implemented, I'll be happy to do my part and write the test. But otherwise... I really have better things to do than spending my time writing code that will never be used, especially when it'll take me 10x more time to write it than a python-dev member because 90% of the work would be making the test case comply to the development practices of CPython, and only 10% of it would be to write the actual simple logic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 21:47:43 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Tue, 15 Jul 2014 19:47:43 +0000 Subject: [issue21935] Implement AUTH command in smtpd. In-Reply-To: <1404766823.82.0.391401675174.issue21935@psf.upfronthosting.co.za> Message-ID: <1405453663.05.0.860450325588.issue21935@psf.upfronthosting.co.za> Milan Oberkirch added the comment: There is no real API in the current patch and authenticating has no effect (other then preventing you from authenticating again and storing the username). I am wondering how the user should turn AUTH on/off. Solution 1: add a keyword argument 'enable_AUTH' and require the programmer to override _verify_user_credentials. This function could 1.1 raise NotImplementedError 1.2 deny access by default. Solution 2: add a keyword argument 'authentication_function' which turns AUTH support on when given and provides the function used to verify user credentials. Solution 3: enable AUTH if self has the _verify_user_credentials-function as attribute (and leave it undefined in the base class) I think solution 1 is the most explicit so I'll implement that so we have something to discuss :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 21:56:10 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 Jul 2014 19:56:10 +0000 Subject: [issue21935] Implement AUTH command in smtpd. In-Reply-To: <1404766823.82.0.391401675174.issue21935@psf.upfronthosting.co.za> Message-ID: <1405454170.63.0.971181733425.issue21935@psf.upfronthosting.co.za> R. David Murray added the comment: Describing how a programmer would implement authentication is exactly the API I was referring to, and that includes the signature and semantics of _verify_user_credentials. I agree that (1) seems the cleanest. I'd favor 1.1, NotImplemented, which lets the programmer see immediately what they did wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 22:03:24 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Jul 2014 20:03:24 +0000 Subject: [issue21918] Convert test_tools to directory In-Reply-To: <1404499693.28.0.512453806731.issue21918@psf.upfronthosting.co.za> Message-ID: <1405454604.34.0.609540657773.issue21918@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: About load_tests() -- look at Lib/test/test_email/__init__.py. Otherwise LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 22:04:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 20:04:14 +0000 Subject: [issue11702] dir on return value of msilib.OpenDatabase() crashes python In-Reply-To: <1301325222.81.0.910767875041.issue11702@psf.upfronthosting.co.za> Message-ID: <1405454654.46.0.706064134624.issue11702@psf.upfronthosting.co.za> Mark Lawrence added the comment: The attached patch is short and sweet and looks okay to my untrained eye. I believe it should apply cleanly as there've been very few changes to _msi.c. Can we have a formal patch review please. ---------- nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 22:10:26 2014 From: report at bugs.python.org (Brian Curtin) Date: Tue, 15 Jul 2014 20:10:26 +0000 Subject: [issue11702] dir on return value of msilib.OpenDatabase() crashes python In-Reply-To: <1301325222.81.0.910767875041.issue11702@psf.upfronthosting.co.za> Message-ID: <1405455026.02.0.425696768386.issue11702@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 22:29:04 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Jul 2014 20:29:04 +0000 Subject: [issue21645] test_read_all_from_pipe_reader() of test_asyncio hangs on FreeBSD 9 In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <1405456144.71.0.301613357339.issue21645@psf.upfronthosting.co.za> STINNER Victor added the comment: I created a new repository just for this issue: http://hg.python.org/sandbox/issue21645 I added a lot of debug. It looks like a race condition: the SIGCHLD signal is handled in a thread B (a C thread, not a Python), whereas the asyncio event loop is running in a thread A (the main thread, a Python thread). Debug of the test which blocks: --- PIPE: (7, 8) threads [<_MainThread(MainThread, started 34384933888)>] [pid 78351] _run_once: thread=34384933888 Execute [pid 78351] _run_once: thread=34384933888 Execute ) created at /usr/home/buildbot/buildarea/custom.krah-freebsd/build/Lib/asyncio/unix_events.py:287> Execute [pid 78351] _run_once: thread=34384933888 Execute ) created at /usr/home/buildbot/buildarea/custom.krah-freebsd/build/Lib/asyncio/futures.py:239> Read pipe 7 connected: (<_UnixReadPipeTransport fd=7 polling>, ) [pid 78351] _run_once: thread=34384933888 Execute created at /usr/home/buildbot/buildarea/custom.krah-freebsd/build/Lib/asyncio/base_events.py:258 result=(<_UnixReadPipeTransport fd=7 polling>, )>) at /usr/home/buildbot/buildarea/custom.krah-freebsd/build/Lib/asyncio/base_events.py:95 created at /usr/home/buildbot/buildarea/custom.krah-freebsd/build/Lib/asyncio/futures.py:239> Execute created at /usr/home/buildbot/buildarea/custom.krah-freebsd/build/Lib/asyncio/base_events.py:258 result=(<_UnixReadPipeTransport fd=7 polling>, )>) at /usr/home/buildbot/buildarea/custom.krah-freebsd/build/Lib/asyncio/base_events.py:95 created at /usr/home/buildbot/buildarea/custom.krah-freebsd/build/Lib/asyncio/futures.py:239>: FAIL! _StopError() add_signal_handler(Signals.SIGCHLD, >, ()) PY signal.signal(Signals.SIGCHLD) [pid 78351] _run_once: thread=34384933888 Execute execute program '/usr/home/buildbot/buildarea/custom.krah-freebsd/build/python' process '/usr/home/buildbot/buildarea/custom.krah-freebsd/build/python' created: pid 78390 execute program '/usr/home/buildbot/buildarea/custom.krah-freebsd/build/python': <_UnixSubprocessTransport pid=78390> [pid 78351] _run_once: thread=34384933888 Execute ) created at /usr/home/buildbot/buildarea/custom.krah-freebsd/build/Lib/asyncio/base_subprocess.py:121> [pid 78351] _run_once: thread=34384933888 Execute ) created at /usr/home/buildbot/buildarea/custom.krah-freebsd/build/Lib/asyncio/futures.py:239> [pid 78351] _run_once: thread=34384933888 Execute created at /usr/home/buildbot/buildarea/custom.krah-freebsd/build/Lib/asyncio/base_events.py:258 result=>) at /usr/home/buildbot/buildarea/custom.krah-freebsd/build/Lib/asyncio/base_events.py:95 created at /usr/home/buildbot/buildarea/custom.krah-freebsd/build/Lib/asyncio/futures.py:239> Execute created at /usr/home/buildbot/buildarea/custom.krah-freebsd/build/Lib/asyncio/base_events.py:258 result=>) at /usr/home/buildbot/buildarea/custom.krah-freebsd/build/Lib/asyncio/base_events.py:95 created at /usr/home/buildbot/buildarea/custom.krah-freebsd/build/Lib/asyncio/futures.py:239>: FAIL! _StopError() [pid 78351] _run_once: thread=34384933888 Execute [pid 78351] _run_once: thread=34384933888 select(None) (1) import (2) dump traceback select(None) -> [(SelectorKey(fileobj=7, fd=7, events=1, data=(, None)), 1)] poll took 25.964 ms: [(SelectorKey(fileobj=7, fd=7, events=1, data=(, None)), 1)] Execute [pid 78351] _run_once: thread=34384933888 select(None) (3) write into 8 (4) close 8 (5) exit [pid=78351] main_thread=34384933888 [78351] C signal.signal(20) [78351] C signal_handler: sig_num=20, thread=34468857856 C signal_handler: trip signal (tripped=0) [78351] trip_signal(20) trip_signal(20); write() select(None) -> [(SelectorKey(fileobj=5, fd=5, events=1, data=(, None)), 1)] poll took 4.902 ms: [(SelectorKey(fileobj=5, fd=5, events=1, data=(, None)), 1)] Execute [thread=34384933888] _read_from_self _read_from_self -> b'\x14' [thread=34384933888] _read_from_self _read_from_self -> blocking, stop [pid 78351] _run_once: thread=34384933888 select(None) trip_signal(20); write() -> 1 [78351] Py_AddPendingCall(checksignals_witharg), thread=34468857856 --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 22:29:42 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Jul 2014 20:29:42 +0000 Subject: [issue21645] test_read_all_from_pipe_reader() of test_asyncio hangs on FreeBSD 9 In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <1405456182.49.0.498357371733.issue21645@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm running tests on the buildbot "AMD64 FreeBSD 9.0 custom": http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20custom/builds/27/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 22:36:18 2014 From: report at bugs.python.org (Claudiu Popa) Date: Tue, 15 Jul 2014 20:36:18 +0000 Subject: [issue18615] sndhdr.whathdr could return a namedtuple In-Reply-To: <1375370275.79.0.808837089288.issue18615@psf.upfronthosting.co.za> Message-ID: <1405456578.25.0.764932383119.issue18615@psf.upfronthosting.co.za> Claudiu Popa added the comment: Here's a new version. It adds versionchanged directive for 'whathdr' and 'what'. Serhiy, I hope that now I got right the documentation of the return type. I didn't understand at first what was wrong. ---------- Added file: http://bugs.python.org/file35958/issue18615_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 22:54:03 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Jul 2014 20:54:03 +0000 Subject: [issue21645] test_read_all_from_pipe_reader() of test_asyncio hangs on FreeBSD 9 In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <1405457643.55.0.112883233397.issue21645@psf.upfronthosting.co.za> STINNER Victor added the comment: (1) the thread B gets the SIGCHLD signal: it writes a byte into the "self" pipe of the event loop C signal_handler: sig_num=20, thread=34468857856 trip_signal(20): write() (2) in the main thread, the event loop is awaken by the write in the pipe... but there is nothing to do _read_from_self -> b'\x14', thread=34384933888 (3) the thread B schedules the callback Py_AddPendingCall(checksignals_witharg), thread=34468857856 (I modified the output a little bit for readability.) IMO the problem is that asyncio relies on two events: * signal number written in the "self" pipe of the event loop * callback scheduled by the C handler A solution would be to schedule the callback in the event loop. Since Python 3.3, the C signal handler writes the signal number, which should be enough to find and schedule the Python callback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 23:08:26 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 21:08:26 +0000 Subject: [issue9699] invalid call of Windows API _popen() generating The input line is too long error message In-Reply-To: <1282909340.45.0.225876683414.issue9699@psf.upfronthosting.co.za> Message-ID: <1405458506.27.0.918555799089.issue9699@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Tim can you pick this up? ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 23:26:55 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 15 Jul 2014 21:26:55 +0000 Subject: [issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers. In-Reply-To: <1402787574.99.0.986548729035.issue21765@psf.upfronthosting.co.za> Message-ID: <1405459615.88.0.0791300814637.issue21765@psf.upfronthosting.co.za> Tal Einat added the comment: I'm attaching a patch which really fixes this issue, along with additional tests for idlelib.HyperParser. I did indeed have to fix PyParse as well. I got it working with re.subn() as Martin suggested, but the performance was much worse (between 100x and 1000x slower according to my timings). So I came up with the clever solution of passing a defaultdict to str.translate(), with the default value being ord('x'). That works as expected and is much faster than the regexp. Finally, since the defaultdict is kept around as long as IDLE is running, I decided to avoid having it grow continually and consume memory unnecessarily. So I wrote a simple Mapping class, which wraps a normal dict and uses a custom default value instead of None, ord('x') in this case. Works like a charm :) I haven't written tests for PyParse since it currently doesn't have any tests at all. But from the HyperParser tests and from some manual testing, it seems to be working as expected. ---------- Added file: http://bugs.python.org/file35959/taleinat.20140716.IDLE_HyperParser_unicode_ids.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 23:34:56 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 21:34:56 +0000 Subject: [issue9099] multiprocessing/win32: WindowsError: [Error 0] Success on Pipe() In-Reply-To: <1277729700.77.0.590017326086.issue9099@psf.upfronthosting.co.za> Message-ID: <1405460096.44.0.296507054517.issue9099@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm not sure how we take this forward as the code was changed via #11750, can somebody please advise. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 23:37:03 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Jul 2014 21:37:03 +0000 Subject: [issue20663] Introduce exception argument to iter In-Reply-To: <1392659027.56.0.320916972318.issue20663@psf.upfronthosting.co.za> Message-ID: <1405460223.37.0.00134256260724.issue20663@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Here is a test that now fails. ------------ from collections import deque d = deque((0,)) old = [] try: while True: n = d.popleft() old.append((n, len(d))) if n < 5: d.extend((n+1, n+2)) except IndexError: pass d = deque((0,)) new = [] for n in iter(d.popleft, exception=IndexError): new.append((n, len(d))) if n < 5: d.extend((n+1, n+2)) assert new == old -------- Here is Python code, partly from my python-ideas comments, that makes the test pass. This version allows stopping on both a sentinel value and an exception (or tuple thereof, I believe). ------- __sentinel = object() class callable_iterator: class stop_exception: pass def __init__(self, func, sentinel, exception): self.func = func self.sentinel = sentinel if exception is not None: self.stop_exception = exception def __iter__(self): return self def __next__(self): try: x = self.func() except self.stop_exception: raise StopIteration from None if x == self.sentinel: raise StopIteration else: return x def iter(it_func, sentinel=__sentinel, exception=None): if sentinel == __sentinel and exception == None: pass # do as at present else: return callable_iterator(it_func, sentinel, exception) ---------- stage: test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 23:43:52 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 21:43:52 +0000 Subject: [issue6820] Redefinition of HAVE_STRFTIME can cause compiler errors. In-Reply-To: <1251884386.05.0.339554390546.issue6820@psf.upfronthosting.co.za> Message-ID: <1405460632.44.0.327522265418.issue6820@psf.upfronthosting.co.za> Mark Lawrence added the comment: There is no way that I'm commenting on the patch as it's against pyconfig.h, what do our experts think of this? ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 23:50:54 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Jul 2014 21:50:54 +0000 Subject: [issue21645] Race condition in signal handling on FreeBSD In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <1405461054.07.0.415513551137.issue21645@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_read_all_from_pipe_reader() of test_asyncio hangs on FreeBSD 9 -> Race condition in signal handling on FreeBSD _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 23:54:12 2014 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 15 Jul 2014 21:54:12 +0000 Subject: [issue12480] urllib2 doesn't use proxy (fieddler2), configed the proxy with ProxyHandler In-Reply-To: <1309706172.79.0.961224445373.issue12480@psf.upfronthosting.co.za> Message-ID: <1405461252.64.0.352958768185.issue12480@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Senthil what if anything can we do with this issue? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 23:56:36 2014 From: report at bugs.python.org (Brian Curtin) Date: Tue, 15 Jul 2014 21:56:36 +0000 Subject: [issue9099] multiprocessing/win32: WindowsError: [Error 0] Success on Pipe() In-Reply-To: <1277729700.77.0.590017326086.issue9099@psf.upfronthosting.co.za> Message-ID: <1405461396.84.0.572863978252.issue9099@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 15 23:56:51 2014 From: report at bugs.python.org (Brian Curtin) Date: Tue, 15 Jul 2014 21:56:51 +0000 Subject: [issue9699] invalid call of Windows API _popen() generating The input line is too long error message In-Reply-To: <1282909340.45.0.225876683414.issue9699@psf.upfronthosting.co.za> Message-ID: <1405461411.84.0.328673889112.issue9699@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 00:03:42 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 15 Jul 2014 22:03:42 +0000 Subject: [issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers. In-Reply-To: <1402787574.99.0.986548729035.issue21765@psf.upfronthosting.co.za> Message-ID: <1405461822.4.0.913720640089.issue21765@psf.upfronthosting.co.za> Changes by Tal Einat : Removed file: http://bugs.python.org/file35959/taleinat.20140716.IDLE_HyperParser_unicode_ids.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 00:04:04 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 15 Jul 2014 22:04:04 +0000 Subject: [issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers. In-Reply-To: <1402787574.99.0.986548729035.issue21765@psf.upfronthosting.co.za> Message-ID: <1405461844.76.0.512463981027.issue21765@psf.upfronthosting.co.za> Changes by Tal Einat : Added file: http://bugs.python.org/file35960/taleinat.20140716.IDLE_HyperParser_unicode_ids_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 00:52:41 2014 From: report at bugs.python.org (paul j3) Date: Tue, 15 Jul 2014 22:52:41 +0000 Subject: [issue9341] allow argparse subcommands to be grouped In-Reply-To: <1279887451.34.0.723880615782.issue9341@psf.upfronthosting.co.za> Message-ID: <1405464761.72.0.295953194526.issue9341@psf.upfronthosting.co.za> paul j3 added the comment: This patch probably won't work with [parents]. see http://bugs.python.org/issue16807 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 01:04:27 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 Jul 2014 23:04:27 +0000 Subject: [issue21985] test_asyncio prints some junk Message-ID: <1405465467.27.0.383120820673.issue21985@psf.upfronthosting.co.za> New submission from Antoine Pitrou: It could be nice if it could stay silent (at least in non-verbose mode). [ 24/390] test_asyncio Task was destroyed but it is pending! task: .coro() running at /home/antoine/cpython/default/Lib/test/test_asyncio/test_tasks.py:1862> cb=[gather.._done_callback(2)() at /home/antoine/cpython/default/Lib/asyncio/tasks.py:577] wait_for=> Task was destroyed but it is pending! task: .coro() running at /home/antoine/cpython/default/Lib/test/test_asyncio/test_tasks.py:1862> cb=[gather.._done_callback(3)() at /home/antoine/cpython/default/Lib/asyncio/tasks.py:577] wait_for=> Task was destroyed but it is pending! task: .coro() running at /home/antoine/cpython/default/Lib/test/test_asyncio/test_tasks.py:1862> cb=[gather.._done_callback(4)() at /home/antoine/cpython/default/Lib/asyncio/tasks.py:577] wait_for=> Task was destroyed but it is pending! task: wait_for=> Read pipe 9 connected: (<_UnixReadPipeTransport fd=9 polling>, ) execute program '/home/antoine/cpython/default/python' process '/home/antoine/cpython/default/python' created: pid 4233 execute program '/home/antoine/cpython/default/python': <_UnixSubprocessTransport pid=4233> poll took 36.605 ms: 1 events poll took 6.615 ms: 0 events process 4233 exited with returncode 0 <_UnixSubprocessTransport pid=4233> exited with return code 0 poll took 0.032 ms: 1 events <_UnixReadPipeTransport fd=9 polling> was closed by peer ---------- components: Tests messages: 223156 nosy: giampaolo.rodola, gvanrossum, haypo, pitrou, yselivanov priority: normal severity: normal status: open title: test_asyncio prints some junk type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 01:12:26 2014 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 15 Jul 2014 23:12:26 +0000 Subject: [issue21927] BOM appears in stdin when using Powershell In-Reply-To: <1404657562.39.0.323212380566.issue21927@psf.upfronthosting.co.za> Message-ID: <1405465946.65.0.149640053154.issue21927@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I agree there appears to be an inconsistency in how Powershell handles pipes between child processes and between itself and child processes. I'm not complaining about Python, but rather trying to find the best practice here. I'm currently using PYTHONIOENCODING='utf-8-sig' and I've been mostly satisfied with the results. I get the spurious BOM appearing on output, but at least as you say that doesn't seem like a Python problem (at least that has been identified). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 01:44:32 2014 From: report at bugs.python.org (paul j3) Date: Tue, 15 Jul 2014 23:44:32 +0000 Subject: [issue16807] argparse group nesting lost on inheritance In-Reply-To: <1356745167.13.0.671311915058.issue16807@psf.upfronthosting.co.za> Message-ID: <1405467872.24.0.682591879554.issue16807@psf.upfronthosting.co.za> paul j3 added the comment: The subcommands grouping mechanism proposed in http://bugs.python.org/issue9341 probably does not work with [parents] either. This _add_container_actions method is brittle. It has to know too much about the structure of a parser and its groups. Any change to that structure could break this [parents] mechanism. In a refactoring, each 'add_xxx' method would have a 'copy_xxx' companion method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 01:51:21 2014 From: report at bugs.python.org (paul j3) Date: Tue, 15 Jul 2014 23:51:21 +0000 Subject: [issue17250] argparse: Issue 15906 patch; positional with nargs='*' and string default In-Reply-To: <1361336297.12.0.955168493515.issue17250@psf.upfronthosting.co.za> Message-ID: <1405468281.37.0.817100890356.issue17250@psf.upfronthosting.co.za> paul j3 added the comment: Positionals with '*' are discussed in more detail in: http://bugs.python.org/issue9625 - argparse: Problem with defaults for variable nargs when using choices http://bugs.python.org/issue16878 - argparse: positional args with nargs='*' defaults to [] http://bugs.python.org/issue18943 - argparse: default args in mutually exclusive groups I would suggest closing this issue, and refining the documentation patch in 16878 to note that a '*' positional default does not get evaluated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 01:53:48 2014 From: report at bugs.python.org (paul j3) Date: Tue, 15 Jul 2014 23:53:48 +0000 Subject: [issue16878] argparse: positional args with nargs='*' defaults to [] In-Reply-To: <1357465299.57.0.35284685768.issue16878@psf.upfronthosting.co.za> Message-ID: <1405468428.48.0.434959665045.issue16878@psf.upfronthosting.co.za> paul j3 added the comment: The documentation patch here should note that a positional '*' string default is not parsed (i.e. does not pass through _get_value). (see http://bugs.python.org/issue17250) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 02:13:44 2014 From: report at bugs.python.org (ppperry) Date: Wed, 16 Jul 2014 00:13:44 +0000 Subject: [issue21986] Pickleability of code objects is inconsistent Message-ID: <1405469623.84.0.281722062447.issue21986@psf.upfronthosting.co.za> New submission from ppperry: In IDLE: >>> code = compile("dummy_code", "", "exec") >>> pickle.dumps(code) "cidlelib.rpc\nunpickle_code\np0\n(S'c\\x00\\x00\\x00\\x00\\x00\\x00 \\x00\\x00\\x01\\x00\\x00\\x00@\\x00\\x00\\x00s\\x08\\x00\\x00\\x00e\\x00\\x00\\x01d\\x00\\x00S(\\x01\\x00\\x00\\x00N(\\x01\\x00\\x00\\x00t\\n\\x00\\x00\\x00dummy_code(\\x00\\x00\\x00\\x00(\\x00\\x00\\x00\\x00(\\x00\\x00\\x00\\x00s\\x06\\x00\\x00\\x00t\\x08\\x00\\x00\\x00\\x01\\x00\\x00\\x00s\\x00\\x00\\x00\\x00'\np1\ntp2\nRp3\n." Outside of IDLE: >>> code = compile("dummy_code", "", "exec") >>> pickle.dumps(code) Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\pickle.py", line 1374, in dumps Pickler(file, protocol).dump(obj) File "C:\Python27\lib\pickle.py", line 224, in dump self.save(obj) File "C:\Python27\lib\pickle.py", line 306, in save rv = reduce(self.proto) File "C:\Python27\lib\copy_reg.py", line 70, in _reduce_ex raise TypeError, "can't pickle %s objects" % base.__name__ TypeError: can't pickle code objects Also, the error probably should be a pickle.PicklingError, not a TypeError. ---------- components: IDLE messages: 223161 nosy: ppperry priority: normal severity: normal status: open title: Pickleability of code objects is inconsistent _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 02:29:28 2014 From: report at bugs.python.org (Zach Byrne) Date: Wed, 16 Jul 2014 00:29:28 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1405470568.09.0.772744022141.issue21955@psf.upfronthosting.co.za> Zach Byrne added the comment: So I'm trying something pretty similar to Victor's pseudo-code and just using timeit to look for speedups timeit('x+x', 'x=10', number=10000000) before: 1.1934231410000393 1.1988609210002323 1.1998214110003573 1.206968028999654 1.2065417159997196 after: 1.1698650090002047 1.1705158909999227 1.1752884750003432 1.1744818619999933 1.1741297110002051 1.1760422649999782 Small improvement. Haven't looked at optimizing BINARY_SUBSCR yet. ---------- keywords: +patch nosy: +zbyrne Added file: http://bugs.python.org/file35961/21955.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 02:43:46 2014 From: report at bugs.python.org (Martin Panter) Date: Wed, 16 Jul 2014 00:43:46 +0000 Subject: [issue21793] httplib client/server status refactor In-Reply-To: <1403031756.71.0.442697149496.issue21793@psf.upfronthosting.co.za> Message-ID: <1405471426.35.0.641774220462.issue21793@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 02:47:19 2014 From: report at bugs.python.org (ppperry) Date: Wed, 16 Jul 2014 00:47:19 +0000 Subject: [issue21986] Pickleability of code objects is inconsistent In-Reply-To: <1405469623.84.0.281722062447.issue21986@psf.upfronthosting.co.za> Message-ID: <1405471639.66.0.256635275305.issue21986@psf.upfronthosting.co.za> Changes by ppperry : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 03:05:46 2014 From: report at bugs.python.org (Lita Cho) Date: Wed, 16 Jul 2014 01:05:46 +0000 Subject: [issue21815] imaplib truncates some untagged responses In-Reply-To: <1403275196.37.0.409307454531.issue21815@psf.upfronthosting.co.za> Message-ID: <1405472746.13.0.0689885113342.issue21815@psf.upfronthosting.co.za> Lita Cho added the comment: I have a patch for this. With my patch, the debug output is fixed. ---------- keywords: +patch Added file: http://bugs.python.org/file35962/imap_regex.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 03:06:02 2014 From: report at bugs.python.org (Lita Cho) Date: Wed, 16 Jul 2014 01:06:02 +0000 Subject: [issue21815] imaplib truncates some untagged responses In-Reply-To: <1403275196.37.0.409307454531.issue21815@psf.upfronthosting.co.za> Message-ID: <1405472762.65.0.626208264762.issue21815@psf.upfronthosting.co.za> Lita Cho added the comment: Here is a log of the output. ---------- Added file: http://bugs.python.org/file35963/imaplib_log_with_patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 03:25:53 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Jul 2014 01:25:53 +0000 Subject: [issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell In-Reply-To: <1404254403.84.0.153705596072.issue21901@psf.upfronthosting.co.za> Message-ID: <1405473953.65.0.121027963528.issue21901@psf.upfronthosting.co.za> R. David Murray added the comment: rdmurray at pydev:~/python/p34>python -c 'import resource; print(resource.getrlimit(resource.RLIMIT_NOFILE))' (1024L, 1048576L) Unfortunately the buildbot box is offline at the moment and it may be a bit before I can get it back, so I can't compare the results above with that VM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 04:15:26 2014 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 16 Jul 2014 02:15:26 +0000 Subject: [issue16237] bdist_rpm SPEC files created with distutils may be distro specific In-Reply-To: <1350267871.71.0.392371801371.issue16237@psf.upfronthosting.co.za> Message-ID: <1405476926.63.0.254675995964.issue16237@psf.upfronthosting.co.za> Nick Coghlan added the comment: Actually, with RHEL and CentOS 7 out the door, I believe we could potentially just rip the whole mess out of the upstream project. Slavek, this is about a hack Dave and I put into bdist_rpm to get Python 3 packages building correctly on RHEL 6. I believe the underlying issue with not specifying the interpreter version has been fixed for 7,so can we just get rid of the workaround now? Or at least double check the non-portability issue only affects 6 and close this as wontfix? ---------- nosy: +bkabrda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 05:06:29 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 16 Jul 2014 03:06:29 +0000 Subject: [issue21986] Pickleability of code objects is inconsistent In-Reply-To: <1405469623.84.0.281722062447.issue21986@psf.upfronthosting.co.za> Message-ID: <1405479989.84.0.156331083847.issue21986@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +kbk, roger.serwy, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 05:40:59 2014 From: report at bugs.python.org (Brendan Moloney) Date: Wed, 16 Jul 2014 03:40:59 +0000 Subject: [issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars Message-ID: <1405482059.28.0.321220843423.issue21987@psf.upfronthosting.co.za> New submission from Brendan Moloney: If a directory path is under 100 char you have to omit the trailing slash from the name passed to 'getmember'. If it is over 100 you have to include the trailing slash. As a work around I can use the private '_getmember' with 'normalize=True'. I tested on 2.7.2 and searched the release notes looking for a related fix since then. I couldn't find anything there, or here in the issue tracker. ---------- components: Library (Lib) messages: 223167 nosy: moloney priority: normal severity: normal status: open title: TarFile.getmember on directory requires trailing slash iff over 100 chars type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 05:55:39 2014 From: report at bugs.python.org (Jessica McKellar) Date: Wed, 16 Jul 2014 03:55:39 +0000 Subject: [issue21815] imaplib truncates some untagged responses In-Reply-To: <1403275196.37.0.409307454531.issue21815@psf.upfronthosting.co.za> Message-ID: <1405482939.31.0.779310459862.issue21815@psf.upfronthosting.co.za> Jessica McKellar added the comment: Thanks for the patch, Lita! Lita: I have some patch feedback for you at the end of this message. -- Lita and I talked about this a bit via email; here's some additional context from that conversation: There were a couple of questions to answer before working on a patch: 1. Are brackets allowed in flag names according to the RFC? 2. If brackets aren't allowed, do other popular IMAP services permit them anyway? If so, we should consider allowing them even though this deviates from the RFC. To answer (1), my read of http://tools.ietf.org/html/rfc3501 is as follows: a. Look at http://tools.ietf.org/html/rfc3501, search for PERMANENTFLAGS definition. Note use of "flag-perm" variable. b. Search for "flag-perm". Find it on page 85, in section 9, Formal Syntax. This is describing the formal syntax in Backus-Naur Form (BNF). c. flag-perm = flag / "\*" d. flag = "\Answered" / "\Flagged" / "\Deleted" / "\Seen" / "\Draft" / flag-keyword / flag-extension ; Does not include "\Recent" e. flag-keyword = atom f. atom = 1*ATOM-CHAR g. ATOM-CHAR = h. atom-specials = "(" / ")" / "{" / SP / CTL / list-wildcards / quoted-specials / resp-specials i. resp-specials = "]" My reading of this series of definitions is that "]" is not allowed in flag names. To answer (2), Lita ran some tests against GMail's IMAP service and found that it does let you create flags containing "]". -- Patch feedback: 1. Can you attach the script you used to probe GMail's IMAP service for what flag names were permitted? 2. Since this patch causes us to violate the RFC (but with good reason!), can you add a comment above the regex noting the violation and stating what characters we allow for flags and why? 3. This change need tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 06:28:35 2014 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 16 Jul 2014 04:28:35 +0000 Subject: [issue21815] imaplib truncates some untagged responses In-Reply-To: <1403275196.37.0.409307454531.issue21815@psf.upfronthosting.co.za> Message-ID: <1405484915.82.0.622319209953.issue21815@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 06:29:50 2014 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 16 Jul 2014 04:29:50 +0000 Subject: [issue16729] Document how to provide defaults for setup.py commands options In-Reply-To: <1355924641.52.0.160418711028.issue16729@psf.upfronthosting.co.za> Message-ID: <1405484990.39.0.869712176013.issue16729@psf.upfronthosting.co.za> ?ric Araujo added the comment: In my opinion it's easier and more common to put default options in a setup.cfg file, rather than in the Python code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 06:53:32 2014 From: report at bugs.python.org (Lita Cho) Date: Wed, 16 Jul 2014 04:53:32 +0000 Subject: [issue21815] imaplib truncates some untagged responses In-Reply-To: <1403275196.37.0.409307454531.issue21815@psf.upfronthosting.co.za> Message-ID: <1405486412.42.0.158331366009.issue21815@psf.upfronthosting.co.za> Lita Cho added the comment: Yes! I agree, this change will need tests. I will start working on creating those now. Here is test I did to create a flag with brackets. import imaplib mail = imaplib.IMAP4_SSL('imap.gmail.com') mail.login('username at gmail.com', 'password') # Enter your login here mail.select('test') # Mailbox selection. I have a test inbox with 6 # messages in it. code, [msg_ids] = mail.search(None, 'ALL') first_id = msg_ids.split()[0] mail.store(first_id, "+FLAGS", "[test]") typ, response = mail.fetch(first_id, '(FLAGS)') print("Flags: %s" % response) mail.close() mail.logout() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 06:53:36 2014 From: report at bugs.python.org (Andrew Garner) Date: Wed, 16 Jul 2014 04:53:36 +0000 Subject: [issue12800] 'tarfile.StreamError: seeking backwards is not allowed' when extract symlink In-Reply-To: <1313881060.54.0.449889075101.issue12800@psf.upfronthosting.co.za> Message-ID: <1405486416.32.0.338272008709.issue12800@psf.upfronthosting.co.za> Andrew Garner added the comment: This seems to be a similar to issue10761 where symlinks are not being overwritten by TarFile.extract but is only an issue in streaming mode and only in python3. To reproduce, attempt to extract a symlink from a tarfile opened with 'r|' and overwrite an existing file. Here's a simple scripts that demonstrates this behavior adapted from Aur?lien's. #!/usr/bin/python import os import shutil import sys import tempfile import tarfile def main(): tmpdir = tempfile.mkdtemp() try: os.chdir(tmpdir) source = 'source' link = 'link' temparchive = 'issue12800' # create source with open(source, 'wb'): pass os.symlink(source, link) with tarfile.open(temparchive, 'w') as tar: tar.add(source, arcname=os.path.basename(source)) tar.add(link, arcname=os.path.basename(link)) with open(temparchive, 'rb') as fileobj: with tarfile.open(fileobj=fileobj, mode='r|') as tar: tar.extractall(path=tmpdir) finally: shutil.rmtree(tmpdir) if __name__ == '__main__': sys.exit(main()) On python 3.3.2 I get the following results: $ python3.3 issue12800.py Traceback (most recent call last): File "issue12800.py", line 32, in sys.exit(main()) File "issue12800.py", line 27, in main tar.extractall(path=tmpdir) File "/usr/lib64/python3.3/tarfile.py", line 1984, in extractall self.extract(tarinfo, path, set_attrs=not tarinfo.isdir()) File "/usr/lib64/python3.3/tarfile.py", line 2023, in extract set_attrs=set_attrs) File "/usr/lib64/python3.3/tarfile.py", line 2100, in _extract_member self.makelink(tarinfo, targetpath) File "/usr/lib64/python3.3/tarfile.py", line 2181, in makelink os.symlink(tarinfo.linkname, targetpath) FileExistsError: [Errno 17] File exists: '/tmp/tmpt0u1pn/link' On python 3.4.1 I get the following results: $ python3.4 issue12800.py Traceback (most recent call last): File "/usr/lib64/python3.4/tarfile.py", line 2176, in makelink os.symlink(tarinfo.linkname, targetpath) FileExistsError: [Errno 17] File exists: 'source' -> '/tmp/tmp3b96k5f0/link' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "issue12800.py", line 32, in sys.exit(main()) File "issue12800.py", line 27, in main tar.extractall(path=tmpdir) File "/usr/lib64/python3.4/tarfile.py", line 1979, in extractall self.extract(tarinfo, path, set_attrs=not tarinfo.isdir()) File "/usr/lib64/python3.4/tarfile.py", line 2018, in extract set_attrs=set_attrs) File "/usr/lib64/python3.4/tarfile.py", line 2095, in _extract_member self.makelink(tarinfo, targetpath) File "/usr/lib64/python3.4/tarfile.py", line 2187, in makelink targetpath) File "/usr/lib64/python3.4/tarfile.py", line 2087, in _extract_member self.makefile(tarinfo, targetpath) File "/usr/lib64/python3.4/tarfile.py", line 2126, in makefile source.seek(tarinfo.offset_data) File "/usr/lib64/python3.4/tarfile.py", line 518, in seek raise StreamError("seeking backwards is not allowed") tarfile.StreamError: seeking backwards is not allowed ---------- nosy: +andrew.garner versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 07:09:45 2014 From: report at bugs.python.org (Lita Cho) Date: Wed, 16 Jul 2014 05:09:45 +0000 Subject: [issue21815] imaplib truncates some untagged responses In-Reply-To: <1403275196.37.0.409307454531.issue21815@psf.upfronthosting.co.za> Message-ID: <1405487385.28.0.884670724002.issue21815@psf.upfronthosting.co.za> Lita Cho added the comment: Here is the code in order to see the bug. imaplib.Debug = 5 mail = imaplib.IMAP4_SSL('imap.gmail.com') mail.login(username, password) # Enter your login here mail.select('test') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 07:42:24 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 16 Jul 2014 05:42:24 +0000 Subject: [issue21986] Pickleability of code objects is inconsistent In-Reply-To: <1405469623.84.0.281722062447.issue21986@psf.upfronthosting.co.za> Message-ID: <1405489344.99.0.990437848231.issue21986@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Code is really a code object, so the compile does not seem to be the problem. In 2.7, on Win7, I get exactly the same output after removing the possibly spurious space in the string posted. (ppperry), what system (OS) are you using. (In the future, please report both system and Python version). 3.4 gives a mild variation b'\x80\x03cidlelib.rpc\nunpickle_code\nq\x00CZ\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00@\x00\x00\x00s\x08\x00\x00\x00e\x00\x00\x01d\x00\x00S)\x01N)\x01Z\ndummy_code\xa9\x00r\x01\x00\x00\x00r\x01\x00\x00\x00z\x06\xda\x08\x01\x00\x00\x00s\x00\x00\x00\x00q\x01\x85q\x02Rq\x03.' I ran both test_pickle and test_pickletools from both the command line >python -m test -v test_pickletools and from an Idle editor with F5, with no errors and apparently identical output. import pickle code = compile("dummy_code", "this is a file name", "exec") print(type(code)) print('pickle: ', pickle.dumps(code)) >>> produces pickle: b'\x80\x03cidlelib.rpc ... \x13this is a file name\...' which shows that the bytes come from picke, not from a garbled traceback. Since the bytes look like an actual pickle, I tried unpickling and it works: import pickle code = compile("'a string'", "", "eval") pick = pickle.dumps(code) code2 = pickle.loads(pick) print(eval(code), eval(code2)) >>> a string a string import pickle code1 = compile("print('a string')", "", "exec") pick = pickle.dumps(code1) code2 = pickle.loads(pick) exec(code1) exec(code2) >>> a string a string I do not see any Idle bug here, so this might be closed unless you want to make this a pickle enhancement issue to work on code objects in the standard interpreter. The 3.4 interpreter traceback gives more info on why the pickle fails there. >>> code0 = compile("'abc'", '', 'eval') >>> pick = pickle.dumps(code0) Traceback (most recent call last): File "", line 1, in _pickle.PicklingError: Can't pickle : attribute lookup code on builtins failed In Idle, __builtins__.code fails, just as in the interpreter, so pickle is doing something different, and more successful, in the slightly altered Idle user-process execution environment. ---------- components: +Library (Lib) -IDLE nosy: +pitrou stage: -> needs patch versions: +Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 07:50:13 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Jul 2014 05:50:13 +0000 Subject: [issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars In-Reply-To: <1405482059.28.0.321220843423.issue21987@psf.upfronthosting.co.za> Message-ID: <1405489813.48.0.557766620737.issue21987@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you please provide an example? ---------- nosy: +lars.gustaebel, serhiy.storchaka stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 08:07:10 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Jul 2014 06:07:10 +0000 Subject: [issue21927] BOM appears in stdin when using Powershell In-Reply-To: <1404657562.39.0.323212380566.issue21927@psf.upfronthosting.co.za> Message-ID: <1405490830.09.0.0294046144768.issue21927@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > - when stdin is a pipe (ex: echo "abc"|python ...), the stdin encoding becomes cp1252 (ANSI code page) because os.device_encoding(0) returns None; cp1252 is the result of locale.getpreferredencoding(False) (ANSI code page). sys.stdin.readline() does not contain a BOM. What if echo non-ascii characters? How they are encoded? Perhaps Python should detect when it is ran under PowerShell in a pipe and set stdin (and/or stdout and stderr) encoding to CP65001). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 08:10:40 2014 From: report at bugs.python.org (Claudiu Popa) Date: Wed, 16 Jul 2014 06:10:40 +0000 Subject: [issue21986] Pickleability of code objects is inconsistent In-Reply-To: <1405469623.84.0.281722062447.issue21986@psf.upfronthosting.co.za> Message-ID: <1405491040.44.0.173698958965.issue21986@psf.upfronthosting.co.za> Claudiu Popa added the comment: It works in IDLE because it registers a custom pickling for code objects, in idlelib.rpc: copyreg.pickle(types.CodeType, pickle_code, unpickle_code) where pickle_code / unpickle_code calls marshal.dumps/loads. Although, I admit that this is weird. If idlelib.rpc is using this for transferring data between RPC instances, that's okay, but leaking the behaviour in the IDLE's interactive interpreter is not that okay, because leads to different results and expectancies between IDLE and Python's interactive interpreter. ---------- nosy: +Claudiu.Popa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 08:23:25 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Jul 2014 06:23:25 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1405491805.74.0.488213535637.issue21955@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Zach. I found even small regression. Before: $ ./python -m timeit -s "x = 10" "x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x" 1000000 loops, best of 3: 1.51 usec per loop After: $ ./python -m timeit -s "x = 10" "x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x" 1000000 loops, best of 3: 1.6 usec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 09:09:53 2014 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Wed, 16 Jul 2014 07:09:53 +0000 Subject: [issue16237] bdist_rpm SPEC files created with distutils may be distro specific In-Reply-To: <1350267871.71.0.392371801371.issue16237@psf.upfronthosting.co.za> Message-ID: <1405494593.31.0.516209062582.issue16237@psf.upfronthosting.co.za> Bohuslav "Slavek" Kabrda added the comment: Hi, so I'm not sure I understand this correctly. AFAICS there are two patches in issue 14443 that are, to certain degree, independent. As for the patch that overrides __os_install_post [1], that is no longer needed in RHEL 7, since the line /usr/lib/rpm/brp-python-bytecompile \ in RHEL 6 RPM has been replaced by /usr/lib/rpm/brp-python-bytecompile %{__python} %{?_python_bytecompile_errors_terminate_build} \ in RHEL 7 RPM. The other patch referenced from that issue that defines macro __python to self.python (meaning either sys.executable or "python3") [2] is still needed, I believe. I hope that this answers the question. [1] http://hg.python.org/cpython/rev/a9a12ad553f0 [2] http://hg.python.org/cpython/rev/3d61e27cc570 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 10:13:14 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Jul 2014 08:13:14 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1405498394.73.0.876804145678.issue21955@psf.upfronthosting.co.za> STINNER Victor added the comment: bench_long.py: micro-benchmark for x+y. I confirm a slow down with 21955.patch. IMO you should at least inline PyLong_AsLong() which can be simplified if the number has 0 or 1 digit. Here is my patch "inline.patch" which is 21955.patch with PyLong_AsLong() inlined. Benchmark result (patch=21955.patch, inline=inline.patch): Common platform: Timer precision: 40 ns CFLAGS: -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes Timer info: namespace(adjustable=False, implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, resolution=1e-09) Bits: int=32, long=64, long long=64, size_t=64, void*=64 Timer: time.perf_counter Python unicode implementation: PEP 393 CPU model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz Platform: Linux-3.14.8-200.fc20.x86_64-x86_64-with-fedora-20-Heisenbug Platform of campaign orig: Date: 2014-07-16 10:04:27 Python version: 3.5.0a0 (default:08b3ee523577, Jul 16 2014, 10:04:23) [GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] SCM: hg revision=08b3ee523577 tag=tip branch=default date="2014-07-15 13:23 +0300" Platform of campaign patch: Date: 2014-07-16 10:04:01 Python version: 3.5.0a0 (default:08b3ee523577+, Jul 16 2014, 10:02:12) [GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] SCM: hg revision=08b3ee523577+ tag=tip branch=default date="2014-07-15 13:23 +0300" --------------------+-------------+-------------- Tests?????????????? | ???????orig | ????????patch --------------------+-------------+-------------- 1+2???????????????? | ??23 ns (*) | ????????24 ns "1+2" ran 100 times | 1.61 us (*) | 1.74 us (+7%) --------------------+-------------+-------------- Total?????????????? | 1.64 us (*) | 1.76 us (+7%) --------------------+-------------+-------------- ---------- Added file: http://bugs.python.org/file35964/bench_long.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 10:13:29 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Jul 2014 08:13:29 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1405498409.12.0.0538924897028.issue21955@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file35965/inline.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 10:13:51 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Jul 2014 08:13:51 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1405498431.38.0.617516641088.issue21955@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- Removed message: http://bugs.python.org/msg223179 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 10:14:29 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Jul 2014 08:14:29 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1405498469.85.0.0609405793369.issue21955@psf.upfronthosting.co.za> STINNER Victor added the comment: bench_long.py: micro-benchmark for x+y. I confirm a slow down with 21955.patch. IMO you should at least inline PyLong_AsLong() which can be simplified if the number has 0 or 1 digit. Here is my patch "inline.patch" which is 21955.patch with PyLong_AsLong() inlined. Benchmark result (patch=21955.patch, inline=inline.patch): Common platform: Platform: Linux-3.14.8-200.fc20.x86_64-x86_64-with-fedora-20-Heisenbug CPU model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz Bits: int=32, long=64, long long=64, size_t=64, void*=64 CFLAGS: -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes Timer info: namespace(adjustable=False, implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, resolution=1e-09) Python unicode implementation: PEP 393 Timer: time.perf_counter Platform of campaign orig: Date: 2014-07-16 10:04:27 Python version: 3.5.0a0 (default:08b3ee523577, Jul 16 2014, 10:04:23) [GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] SCM: hg revision=08b3ee523577 tag=tip branch=default date="2014-07-15 13:23 +0300" Timer precision: 40 ns Platform of campaign patch: Timer precision: 40 ns Date: 2014-07-16 10:04:01 Python version: 3.5.0a0 (default:08b3ee523577+, Jul 16 2014, 10:02:12) [GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] SCM: hg revision=08b3ee523577+ tag=tip branch=default date="2014-07-15 13:23 +0300" Platform of campaign inline: Timer precision: 31 ns Date: 2014-07-16 10:11:21 Python version: 3.5.0a0 (default:08b3ee523577+, Jul 16 2014, 10:10:48) [GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] SCM: hg revision=08b3ee523577+ tag=tip branch=default date="2014-07-15 13:23 +0300" --------------------+-------------+---------------+--------------- Tests?????????????? | ???????orig | ????????patch | ????????inline --------------------+-------------+---------------+--------------- 1+2???????????????? | ??23 ns (*) | ????????24 ns | ??21 ns (-12%) "1+2" ran 100 times | 1.61 us (*) | 1.74 us (+7%) | 1.39 us (-14%) --------------------+-------------+---------------+--------------- Total?????????????? | 1.64 us (*) | 1.76 us (+7%) | 1.41 us (-14%) --------------------+-------------+---------------+--------------- (I removed my message because I posted the wrong benchmark output, inline column was missing.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 10:20:13 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Jul 2014 08:20:13 +0000 Subject: [issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell In-Reply-To: <1404254403.84.0.153705596072.issue21901@psf.upfronthosting.co.za> Message-ID: <1405498813.74.0.584718927576.issue21901@psf.upfronthosting.co.za> STINNER Victor added the comment: > rdmurray at pydev:~/python/p34>python -c 'import resource; print(resource.getrlimit(resource.RLIMIT_NOFILE))' > (1024L, 1048576L) Oh, 1 million files is much bigger than 4 thousand files (4096). The test should only test FD_SETSIZE + 10 files, the problem is to get FD_SETSITE: # A scalable implementation should have no problem with more than # FD_SETSIZE file descriptors. Since we don't know the value, we just # try to set the soft RLIMIT_NOFILE to the hard RLIMIT_NOFILE ceiling. For example, on my Linux FD_SETSIZE is 1024, whereas the hard limit of RLIMIT_NOFILE is 4096. /usr/include/linux/posix_types.h:#define __FD_SETSIZE 1024 Maybe we can simply expose the FD_SETSIZE constant in the select module? The constant is useful when you use select.select(), which is still heavily used on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 10:24:03 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Jul 2014 08:24:03 +0000 Subject: [issue21985] test_asyncio prints some junk In-Reply-To: <1405465467.27.0.383120820673.issue21985@psf.upfronthosting.co.za> Message-ID: <1405499043.45.0.830020968096.issue21985@psf.upfronthosting.co.za> STINNER Victor added the comment: "Task was destroyed but it is pending!" messages come from the issue #21163, I know that I have to make these messages quiet and I don't know yet how to fix this. "Read pipe 9 connected: ... " output was specific to the issue #21645. I created a dedicated repository to investigate this issue. It looks like a severe race condition in signal handling when there are more than 1 thread on FreeBSD. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 10:24:46 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 16 Jul 2014 08:24:46 +0000 Subject: [issue21985] test_asyncio prints some junk In-Reply-To: <1405465467.27.0.383120820673.issue21985@psf.upfronthosting.co.za> Message-ID: <3hCs8Z1brjz7Ljp@mail.python.org> Roundup Robot added the comment: New changeset 1ff9ce2204ee by Victor Stinner in branch 'default': Issue #21645, #21985: Remove debug code http://hg.python.org/cpython/rev/1ff9ce2204ee ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 10:24:47 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 16 Jul 2014 08:24:47 +0000 Subject: [issue21645] Race condition in signal handling on FreeBSD In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <3hCs8Z6nqdz7Ljp@mail.python.org> Roundup Robot added the comment: New changeset 1ff9ce2204ee by Victor Stinner in branch 'default': Issue #21645, #21985: Remove debug code http://hg.python.org/cpython/rev/1ff9ce2204ee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 10:25:41 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Jul 2014 08:25:41 +0000 Subject: [issue21985] test_asyncio prints some junk In-Reply-To: <1405465467.27.0.383120820673.issue21985@psf.upfronthosting.co.za> Message-ID: <1405499141.55.0.996839357425.issue21985@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +asyncio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 10:35:09 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Jul 2014 08:35:09 +0000 Subject: [issue21645] asyncio: Race condition in signal handling on FreeBSD In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <1405499709.87.0.597301088784.issue21645@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Race condition in signal handling on FreeBSD -> asyncio: Race condition in signal handling on FreeBSD _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 11:06:24 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Jul 2014 09:06:24 +0000 Subject: [issue21988] Decrease iterating overhead it timeit Message-ID: <1405501584.54.0.115556422233.issue21988@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Currently timeit has significant iterating overhead when tests fast statements. Such overhead makes hard to measure effects of microoptimizations. To decrease overhead and get more precise results we should repeat tested statement many times: $ ./python -m timeit -s "x=10" "x+x" 1000000 loops, best of 3: 0.2 usec per loop $ ./python -m timeit -s "x=10" "x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x" 100000 loops, best of 3: 14.6 usec per loop Proposed patch makes it automatically for user. It unrolls and vectorize the loop, and decreases iterating overhead 1000 times: $ ./python -m timeit -s "x=10" "x+x" 10000000 loops, best of 3: 0.141 usec per loop An user gets precision value without explicit cumbersome repeating. ---------- components: Library (Lib) files: timeit_unroll_loops.patch keywords: patch messages: 223185 nosy: georg.brandl, haypo, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Decrease iterating overhead it timeit type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file35966/timeit_unroll_loops.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 11:28:43 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Jul 2014 09:28:43 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1405502923.78.0.3016866027.issue21955@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Confirmed speed up about 20%. Surprisingly it affects even integers outside of the of preallocated small integers (-5...255). Before: $ ./python -m timeit -s "x=10" "x+x" 10000000 loops, best of 3: 0.143 usec per loop $ ./python -m timeit -s "x=1000" "x+x" 1000000 loops, best of 3: 0.247 usec per loop After: $ ./python -m timeit -s "x=10" "x+x" 10000000 loops, best of 3: 0.117 usec per loop $ ./python -m timeit -s "x=1000" "x+x" 1000000 loops, best of 3: 0.209 usec per loop All measures are made with modified timeit (issue21988). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 11:31:18 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Jul 2014 09:31:18 +0000 Subject: [issue21988] Decrease iterating overhead in timeit In-Reply-To: <1405501584.54.0.115556422233.issue21988@psf.upfronthosting.co.za> Message-ID: <1405503078.56.0.375671557441.issue21988@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: Decrease iterating overhead it timeit -> Decrease iterating overhead in timeit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 13:06:36 2014 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 16 Jul 2014 11:06:36 +0000 Subject: [issue21988] Decrease iterating overhead in timeit In-Reply-To: <1405501584.54.0.115556422233.issue21988@psf.upfronthosting.co.za> Message-ID: <1405508795.99.0.92759212663.issue21988@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Looks good, but I think it is better to have an "unroll" option rather than do it automatically. I'm okay with the default being to unroll, but sometimes I want to compare the speed between different versions of Python, and having unroll=False to ensure the same behaviour between versions would be good. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 13:17:44 2014 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 16 Jul 2014 11:17:44 +0000 Subject: [issue16237] bdist_rpm SPEC files created with distutils may be distro specific In-Reply-To: <1350267871.71.0.392371801371.issue16237@psf.upfronthosting.co.za> Message-ID: <1405509464.51.0.621240983324.issue16237@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks Slavek. That means this bug doesn't affect RHEL 7 or CentOS 7, and if it affects the Python 3 software collections on RHEL/CentOS 6, we can potentially deal with it on the collection side of things. Accordingly, closing this as a problem for downstream to deal with. Thanks for the prompt, Mark. ---------- resolution: -> wont fix stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 13:32:17 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Jul 2014 11:32:17 +0000 Subject: [issue21965] Add support for Memory BIO to _ssl In-Reply-To: <1405156134.57.0.513965198344.issue21965@psf.upfronthosting.co.za> Message-ID: <1405510337.38.0.4024417788.issue21965@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 13:43:31 2014 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 16 Jul 2014 11:43:31 +0000 Subject: [issue21927] BOM appears in stdin when using Powershell In-Reply-To: <1404657562.39.0.323212380566.issue21927@psf.upfronthosting.co.za> Message-ID: <1405511011.48.0.337439259104.issue21927@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Here I use the british pound symbol to attempt to answer that question. I've disabled the environment variable PYTHONIOENCODING and not set any code page or loaded any other Powershell profile settings. PS C:\Users\jaraco> echo ? ? PS C:\Users\jaraco> chcp Active code page: 437 PS C:\Users\jaraco> echo ? | py -3 -c "import sys; print(repr(sys.stdin.read()))" '?\n' PS C:\Users\jaraco> chcp 65001 Active code page: 65001 PS C:\Users\jaraco> echo ? | py -3 -c "import sys; print(repr(sys.stdin.read()))" '?\n' PS C:\Users\jaraco> echo ? | py -3 -c "import sys; print(repr(sys.stdin.buffer.read()))" b'?\r\n' Curiously, it appears as if powershell is actually receiving a question mark from the pipe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 13:51:56 2014 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 16 Jul 2014 11:51:56 +0000 Subject: [issue21965] Add support for Memory BIO to _ssl In-Reply-To: <1405156134.57.0.513965198344.issue21965@psf.upfronthosting.co.za> Message-ID: <1405511516.74.0.326116253443.issue21965@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Extension Modules nosy: +ezio.melotti stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 13:59:50 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 16 Jul 2014 11:59:50 +0000 Subject: [issue21988] Decrease iterating overhead in timeit In-Reply-To: <1405501584.54.0.115556422233.issue21988@psf.upfronthosting.co.za> Message-ID: <1405511990.7.0.369301280523.issue21988@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed, what's good for CPython may be quite annoying for e.g. a JIT-enabled Python implementation. I wonder what the PyPy developers think about this. ---------- nosy: +alex, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 14:02:01 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 16 Jul 2014 12:02:01 +0000 Subject: [issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers. In-Reply-To: <1402787574.99.0.986548729035.issue21765@psf.upfronthosting.co.za> Message-ID: <1405512121.83.0.66423825192.issue21765@psf.upfronthosting.co.za> Martin v. L?wis added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 14:07:05 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Jul 2014 12:07:05 +0000 Subject: [issue21927] BOM appears in stdin when using Powershell In-Reply-To: <1405511011.48.0.337439259104.issue21927@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Please use ascii() instead of repr() in your test to identify who replaces characters with question marks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 14:09:48 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 16 Jul 2014 12:09:48 +0000 Subject: [issue21986] Pickleability of code objects is inconsistent In-Reply-To: <1405469623.84.0.281722062447.issue21986@psf.upfronthosting.co.za> Message-ID: <1405512588.18.0.850630271656.issue21986@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I agree with Claudiu. IDLE should pickle with a private dispatch_table. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 14:30:54 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Jul 2014 12:30:54 +0000 Subject: [issue21927] BOM appears in stdin when using Powershell In-Reply-To: <1404657562.39.0.323212380566.issue21927@psf.upfronthosting.co.za> Message-ID: <1405513854.65.0.301347611886.issue21927@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Bytes repr doesn't contains non-ascii characters, therefore Python is actually receiving a question mark from the pipe. What are results of following commands? py -3 -c "import sys; sys.stdout.buffer.write(bytes(range(128, 256)))" py -3 -c "import sys; sys.stdout.buffer.write(bytes(range(128, 256)))" | py -3 -c "import sys; b = sys.stdin.buffer.read(); print(len(b), b)" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 14:40:19 2014 From: report at bugs.python.org (SylvainDe) Date: Wed, 16 Jul 2014 12:40:19 +0000 Subject: [issue21989] Missing (optional) argument `start` and `end` in documentation for list.index Message-ID: <1405514419.16.0.727549411971.issue21989@psf.upfronthosting.co.za> New submission from SylvainDe: >From : https://docs.python.org/2/tutorial/datastructures.html and https://docs.python.org/3.4/tutorial/datastructures.html (and all other versions) : ---------------------------- list.index(x) Return the index in the list of the first item whose value is x. It is an error if there is no such item. ---------------------------- >From `help(list)` : ---------------------------- | index(...) | L.index(value, [start, [stop]]) -> integer -- return first index of value. | Raises ValueError if the value is not present. ---------------------------- Thus, second and third parameter are undocumented. ---------- assignee: docs at python components: Documentation files: list_index_start_end.patch keywords: patch messages: 223195 nosy: SylvainDe, docs at python priority: normal severity: normal status: open title: Missing (optional) argument `start` and `end` in documentation for list.index type: enhancement versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file35967/list_index_start_end.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 15:09:35 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 13:09:35 +0000 Subject: [issue13023] argparse should allow displaying argument default values in addition to setting a formatter class In-Reply-To: <1316557707.22.0.0719652961871.issue13023@psf.upfronthosting.co.za> Message-ID: <1405516175.98.0.761105572529.issue13023@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +paul.j3 versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 15:27:28 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 Jul 2014 13:27:28 +0000 Subject: [issue9390] Error in sys.excepthook on windows when redirecting output of the script In-Reply-To: <1280235089.13.0.870066677678.issue9390@psf.upfronthosting.co.za> Message-ID: <1405517248.09.0.67511128309.issue9390@psf.upfronthosting.co.za> Zachary Ware added the comment: This appears to me to be a well-documented Windows bug with a clear, documented fix, and I am not able to reproduce it so I'm not sure if it's even still relevant. Closing the issue. ---------- resolution: -> third party stage: -> resolved status: open -> closed versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 15:34:09 2014 From: report at bugs.python.org (ppperry) Date: Wed, 16 Jul 2014 13:34:09 +0000 Subject: [issue21986] Pickleability of code objects is inconsistent In-Reply-To: <1405469623.84.0.281722062447.issue21986@psf.upfronthosting.co.za> Message-ID: <1405517649.62.0.410492985804.issue21986@psf.upfronthosting.co.za> Changes by ppperry : ---------- components: +Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 15:36:56 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 13:36:56 +0000 Subject: [issue12284] argparse.ArgumentParser: usage example option In-Reply-To: <1307540382.34.0.477677451975.issue12284@psf.upfronthosting.co.za> Message-ID: <1405517816.1.0.922228494132.issue12284@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Jonas do you wish to follow up on this? ---------- nosy: +BreamoreBoy, paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 15:40:00 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 13:40:00 +0000 Subject: [issue9399] Provide a 'print' action for argparse In-Reply-To: <1280329840.94.0.288179215378.issue9399@psf.upfronthosting.co.za> Message-ID: <1405518000.14.0.332875899662.issue9399@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Paul what is your take on this, other opinions seem positive? ---------- nosy: +BreamoreBoy, paul.j3 versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 15:46:33 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 16 Jul 2014 13:46:33 +0000 Subject: [issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers. In-Reply-To: <1402787574.99.0.986548729035.issue21765@psf.upfronthosting.co.za> Message-ID: <3hD0Hr3Kmjz7Ljv@mail.python.org> Roundup Robot added the comment: New changeset 8b3f7aecdf85 by Tal Einat in branch '3.4': Issue #21765: Add support for non-ascii identifiers to HyperParser http://hg.python.org/cpython/rev/8b3f7aecdf85 New changeset 73a8c614af4d by Tal Einat in branch 'default': Issue #21765: Add support for non-ascii identifiers to HyperParser http://hg.python.org/cpython/rev/73a8c614af4d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 15:47:44 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 13:47:44 +0000 Subject: [issue16283] ctypes.util.find_library does not find all DLLs anymore In-Reply-To: <1350636778.52.0.107234052838.issue16283@psf.upfronthosting.co.za> Message-ID: <1405518464.85.0.540590058235.issue16283@psf.upfronthosting.co.za> Mark Lawrence added the comment: Works fine for me. Python build: 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)] Path 'C:\Windows\system32' exists in $PATH: True File 'C:\Windows\system32\acledit.dll' exists: True ctypes says for 'acledit.dll': C:\Windows\system32\acledit.dll ctypes says for 'acledit': C:\Windows\system32\acledit.dll ---------- components: +Windows nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 15:53:40 2014 From: report at bugs.python.org (Claudiu Popa) Date: Wed, 16 Jul 2014 13:53:40 +0000 Subject: [issue21986] Pickleability of code objects is inconsistent In-Reply-To: <1405469623.84.0.281722062447.issue21986@psf.upfronthosting.co.za> Message-ID: <1405518820.29.0.00109180590727.issue21986@psf.upfronthosting.co.za> Claudiu Popa added the comment: Maybe something like the attached patch. It doesn't have tests, though, I didn't find any tests for the idlelib.rpc anyway. ---------- keywords: +patch Added file: http://bugs.python.org/file35968/idlelib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 15:55:54 2014 From: report at bugs.python.org (Tal Einat) Date: Wed, 16 Jul 2014 13:55:54 +0000 Subject: [issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers. In-Reply-To: <1402787574.99.0.986548729035.issue21765@psf.upfronthosting.co.za> Message-ID: <1405518954.64.0.724756381253.issue21765@psf.upfronthosting.co.za> Tal Einat added the comment: Fix committed to 3.4 and merged to default. (My first commit!) Not back-porting this to 2.7 despite PEP 434, because support for non-ASCII identifiers only exists in 3.x. Close this issue as fixed! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 15:58:13 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 13:58:13 +0000 Subject: [issue16892] Windows bug picking up stdin from a pipe In-Reply-To: <1357652664.69.0.880454684679.issue16892@psf.upfronthosting.co.za> Message-ID: <1405519093.61.0.528075153754.issue16892@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Robert we're sorry about the delay in getting back to you. Sorry Windows gurus this is over my head :( ---------- nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:07:25 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Jul 2014 14:07:25 +0000 Subject: [issue21815] imaplib truncates some untagged responses In-Reply-To: <1403275196.37.0.409307454531.issue21815@psf.upfronthosting.co.za> Message-ID: <1405519645.76.0.742545975205.issue21815@psf.upfronthosting.co.za> R. David Murray added the comment: Just to make sure I understand: the issue is that gmail may produce flags with [] in them, and imaplib currently fails to process such flags when it receives them from gmail? In principle I think we would not want to allow imaplib to be used to create such flags unless the user specifies some sort of "I want to violate the RFC" flag (which they might want to do, for example, to run tests against gmail :) But currently it looks like it can? (I haven't looked at this in enough detail to be sure.) If that's true we probably have to continue to allow it for backward compatibility reasons, but we should document the RFC violation and possible consequences (an IMAP server rejecting such flags). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:12:19 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Jul 2014 14:12:19 +0000 Subject: [issue21986] Pickleability of code objects is inconsistent In-Reply-To: <1405469623.84.0.281722062447.issue21986@psf.upfronthosting.co.za> Message-ID: <1405519939.77.0.908322551068.issue21986@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Instead of copying dispatch_table, use ChainMap. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:16:56 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Jul 2014 14:16:56 +0000 Subject: [issue21931] Nonsense errors reported by msilib.FCICreate for bad argument In-Reply-To: <1404737590.72.0.85327158616.issue21931@psf.upfronthosting.co.za> Message-ID: <1405520216.26.0.890951670416.issue21931@psf.upfronthosting.co.za> R. David Murray added the comment: mslib doesn't have many tests, but it looks like it would be easy enough to add one for this? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:18:04 2014 From: report at bugs.python.org (=?utf-8?b?UmFmYcWCIFN0b8W8ZWs=?=) Date: Wed, 16 Jul 2014 14:18:04 +0000 Subject: [issue21815] imaplib truncates some untagged responses In-Reply-To: <1405519645.76.0.742545975205.issue21815@psf.upfronthosting.co.za> Message-ID: Rafa? Sto?ek added the comment: Yeah, basically. The flags with [] characters are added to gmail (in my case) by OtherInbox's Organizer app. I contacted them but haven't heard back yet. On Wed, Jul 16, 2014 at 4:07 PM, R. David Murray wrote: > > R. David Murray added the comment: > > Just to make sure I understand: the issue is that gmail may produce flags > with [] in them, and imaplib currently fails to process such flags when it > receives them from gmail? > > In principle I think we would not want to allow imaplib to be used to > create such flags unless the user specifies some sort of "I want to violate > the RFC" flag (which they might want to do, for example, to run tests > against gmail :) But currently it looks like it can? (I haven't looked at > this in enough detail to be sure.) If that's true we probably have to > continue to allow it for backward compatibility reasons, but we should > document the RFC violation and possible consequences (an IMAP server > rejecting such flags). > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:18:29 2014 From: report at bugs.python.org (Claudiu Popa) Date: Wed, 16 Jul 2014 14:18:29 +0000 Subject: [issue21986] Pickleability of code objects is inconsistent In-Reply-To: <1405469623.84.0.281722062447.issue21986@psf.upfronthosting.co.za> Message-ID: <1405520309.84.0.314984748176.issue21986@psf.upfronthosting.co.za> Claudiu Popa added the comment: Thanks, Serhiy. ---------- Added file: http://bugs.python.org/file35969/issue21986.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:28:48 2014 From: report at bugs.python.org (Alex Gaynor) Date: Wed, 16 Jul 2014 14:28:48 +0000 Subject: [issue21990] saxutils defines an inner class where a normal one would do Message-ID: <1405520928.93.0.195566496029.issue21990@psf.upfronthosting.co.za> New submission from Alex Gaynor: This makes things slower than they need to be (yes, even on CPython :-)), and is slightly confusing since usually inner classes are only used when a closure is needed. Attached patch simply moves the class definition. ---------- components: Library (Lib) files: sax.diff keywords: patch messages: 223209 nosy: alex priority: normal severity: normal status: open title: saxutils defines an inner class where a normal one would do versions: Python 2.7 Added file: http://bugs.python.org/file35970/sax.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:29:53 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 14:29:53 +0000 Subject: [issue12806] argparse: Hybrid help text formatter In-Reply-To: <1313973978.37.0.422477813424.issue12806@psf.upfronthosting.co.za> Message-ID: <1405520993.95.0.18957610811.issue12806@psf.upfronthosting.co.za> Mark Lawrence added the comment: Apparently #13923 is related to this. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:29:58 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Jul 2014 14:29:58 +0000 Subject: [issue21991] The new email API should use MappingProxyType instead of returning new dicts. Message-ID: <1405520998.88.0.739114728398.issue21991@psf.upfronthosting.co.za> New submission from R. David Murray: There are a few places in the new email API where dicts are returned containing what is conceptually static information. Currently this is done by returning a copy of the dict from the object, so that user code modifying the dict won't break the object invariants. It would be better to change these to MappingProxyType objects instead, before the API moves out of provisional status. This issue is mostly a note to myself, since I'm the most likely to be able to figure out which places in the code need changing, but if anyone else wants to look at it feel free, since it will probably be a while before I get to it. ---------- components: email keywords: easy messages: 223211 nosy: barry, r.david.murray priority: normal severity: normal stage: needs patch status: open title: The new email API should use MappingProxyType instead of returning new dicts. type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:30:19 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 14:30:19 +0000 Subject: [issue13923] new formatter for argparse In-Reply-To: <1328133272.3.0.771637871025.issue13923@psf.upfronthosting.co.za> Message-ID: <1405521019.74.0.269778960029.issue13923@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +paul.j3 versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:39:31 2014 From: report at bugs.python.org (Alex Gaynor) Date: Wed, 16 Jul 2014 14:39:31 +0000 Subject: [issue21988] Decrease iterating overhead in timeit In-Reply-To: <1405501584.54.0.115556422233.issue21988@psf.upfronthosting.co.za> Message-ID: <1405521571.89.0.889044897195.issue21988@psf.upfronthosting.co.za> Alex Gaynor added the comment: I think this is likely to make timeit less representative of how code actually performs in the real world on systems with a JIT. This is because of the cost of sequential operations is not strictly "additive" on PyPy. If you have statements `a` and `b`, and you run `a; b` on PyPy, the performance of `a; b` is usually faster than the sum of `a`, `b`, assuming they are not 100% independent. This is because the JIT will be able to remove type checks that were already performed. Since this just repeats the same statement, the cost of the unrolled iterations beyond the first will be massively lower in many cases, producing confusing results. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:40:24 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 16 Jul 2014 14:40:24 +0000 Subject: [issue21988] Decrease iterating overhead in timeit In-Reply-To: <1405501584.54.0.115556422233.issue21988@psf.upfronthosting.co.za> Message-ID: <1405521624.49.0.451569059632.issue21988@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks, then I guess I'm -1 on the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:40:57 2014 From: report at bugs.python.org (Zach Byrne) Date: Wed, 16 Jul 2014 14:40:57 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1405521657.45.0.746507159596.issue21955@psf.upfronthosting.co.za> Zach Byrne added the comment: Well, dont' I feel silly. I confirmed both my regression and the inline speedup using the benchmark Victor added. I wonder if I got my binaries backwards in my first test... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:47:25 2014 From: report at bugs.python.org (Armin Rigo) Date: Wed, 16 Jul 2014 14:47:25 +0000 Subject: [issue21988] Decrease iterating overhead in timeit In-Reply-To: <1405501584.54.0.115556422233.issue21988@psf.upfronthosting.co.za> Message-ID: <1405522045.67.0.738844279119.issue21988@psf.upfronthosting.co.za> Armin Rigo added the comment: The opposite argument might be relevant too: in some cases, a tracing JIT compiler seeing a long block of code might perform artificially worse. If each repeated line creates a branching path with two outcomes of roughly equal likeliness, then if the line is repeated 20 times, the JIT will need to compile 2**20 different paths before it has fully warmed up. In practice, it will never fully warm up and will run with the constant huge overhead of finding and compiling more paths. ---------- nosy: +arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:49:31 2014 From: report at bugs.python.org (Armin Rigo) Date: Wed, 16 Jul 2014 14:49:31 +0000 Subject: [issue21988] Decrease iterating overhead in timeit In-Reply-To: <1405501584.54.0.115556422233.issue21988@psf.upfronthosting.co.za> Message-ID: <1405522171.24.0.400964708161.issue21988@psf.upfronthosting.co.za> Armin Rigo added the comment: ...but I don't think PyPy should be by itself a good enough reason to reject this patch. It would be fine if timeit detects which interpreter it runs on, and only tries to unroll on CPython, for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:56:15 2014 From: report at bugs.python.org (Andy Maier) Date: Wed, 16 Jul 2014 14:56:15 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1405522575.88.0.513720779634.issue12067@psf.upfronthosting.co.za> Andy Maier added the comment: Uploaded v9 of the patch for 3.4 and default. It reflects Marc's comment, plus the result of the recent discussion on python-dev since v8 of th epatch, up to 2014-07-15 (subject: == on object tests identity in 3.x). -> Please review the patch. ---------- Added file: http://bugs.python.org/file35971/issue12067-expressions-py34_v9.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:56:39 2014 From: report at bugs.python.org (Sebastian Kreft) Date: Wed, 16 Jul 2014 14:56:39 +0000 Subject: [issue21899] Futures are not marked as completed In-Reply-To: <1404224967.0.0.623746440602.issue21899@psf.upfronthosting.co.za> Message-ID: <1405522599.78.0.273820828522.issue21899@psf.upfronthosting.co.za> Sebastian Kreft added the comment: After more testing I finally found that in fact the process is not being killed. That means that there is no problem with the futures. But instead it is probably related with subprocess deadlocking, as the problematic process does not consume any CPU. Sorry for the false report. ---------- nosy: -bquinlan status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 16:57:48 2014 From: report at bugs.python.org (Sebastian Kreft) Date: Wed, 16 Jul 2014 14:57: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: <1405522668.48.0.824338206459.issue20319@psf.upfronthosting.co.za> Sebastian Kreft added the comment: Disregard the last messages, It seems to be a deadblocking due to subprocess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 17:00:47 2014 From: report at bugs.python.org (Andy Maier) Date: Wed, 16 Jul 2014 15:00:47 +0000 Subject: [issue11945] Adopt and document consistent semantics for handling NaN values in containers In-Reply-To: <1303962145.0.0.00759154980454.issue11945@psf.upfronthosting.co.za> Message-ID: <1405522847.93.0.745175906965.issue11945@psf.upfronthosting.co.za> Changes by Andy Maier : ---------- nosy: +andymaier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 17:20:40 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 15:20:40 +0000 Subject: [issue10991] trace fails when test imported a temporary file In-Reply-To: <1295825472.67.0.685273364418.issue10991@psf.upfronthosting.co.za> Message-ID: <1405524040.15.0.632066147888.issue10991@psf.upfronthosting.co.za> Mark Lawrence added the comment: Knowing the platform this occurred on would be useful, but given the age do we care? ---------- nosy: +BreamoreBoy versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 17:23:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 15:23:01 +0000 Subject: [issue16961] No regression tests for -E and individual environment vars In-Reply-To: <1358164994.53.0.497203238771.issue16961@psf.upfronthosting.co.za> Message-ID: <1405524181.0.0.482687285722.issue16961@psf.upfronthosting.co.za> Mark Lawrence added the comment: Consider yourself reminded :) ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 17:29:44 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 15:29:44 +0000 Subject: [issue13041] argparse: terminal width is not detected properly In-Reply-To: <1316902039.33.0.744560309521.issue13041@psf.upfronthosting.co.za> Message-ID: <1405524584.93.0.584325307954.issue13041@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Paul the attached patch is extremely simple and follows the work on #13609. Is it okay with you if the patch was committed? ---------- nosy: +BreamoreBoy, paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 17:38:34 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 15:38:34 +0000 Subject: [issue14149] argparse: Document how to use argument names that are not Python identifiers In-Reply-To: <1330431835.85.0.549489798388.issue14149@psf.upfronthosting.co.za> Message-ID: <1405525114.43.0.131873587007.issue14149@psf.upfronthosting.co.za> Mark Lawrence added the comment: #11076 was closed as a duplicate of #8982 which was closed as fixed so can this also be closed as a duplicate? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 17:43:28 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 15:43:28 +0000 Subject: [issue15994] memoryview to freed memory can cause segfault In-Reply-To: <1348173441.91.0.841080415833.issue15994@psf.upfronthosting.co.za> Message-ID: <1405525408.76.0.156328794415.issue15994@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can someone follow this up noting it refers to #15903. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 17:48:19 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 15:48:19 +0000 Subject: [issue15903] Make rawiobase_read() read directly to bytes object In-Reply-To: <1347279783.86.0.217898740398.issue15903@psf.upfronthosting.co.za> Message-ID: <1405525699.16.0.278077211653.issue15903@psf.upfronthosting.co.za> Mark Lawrence added the comment: Please note this is also referred to from #15994. ---------- nosy: +BreamoreBoy versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 17:52:13 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 15:52:13 +0000 Subject: [issue16965] 2to3 should rewrite execfile() to open in 'rb' mode In-Reply-To: <1358187846.57.0.700535378161.issue16965@psf.upfronthosting.co.za> Message-ID: <1405525933.76.0.81365424454.issue16965@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we have a response to this please. ---------- nosy: +BreamoreBoy, benjamin.peterson type: -> behavior versions: +Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 17:53:35 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Jul 2014 15:53:35 +0000 Subject: [issue21645] asyncio: Race condition in signal handling on FreeBSD In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <1405526015.87.0.605435731937.issue21645@psf.upfronthosting.co.za> STINNER Victor added the comment: "A solution would be to schedule the callback in the event loop. Since Python 3.3, the C signal handler writes the signal number, which should be enough to find and schedule the Python callback." I wrote a patch implementing this idea to fix the issue: https://code.google.com/p/tulip/issues/detail?id=192 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 18:01:35 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 16 Jul 2014 16:01:35 +0000 Subject: [issue4972] context management support in imaplib, smtplib, ftplib In-Reply-To: <1232213338.37.0.108210239108.issue4972@psf.upfronthosting.co.za> Message-ID: <1405526495.23.0.937619185957.issue4972@psf.upfronthosting.co.za> Berker Peksag added the comment: Updated Serhiy's patch to 3.5. I also added a whatsnew entry. ---------- Added file: http://bugs.python.org/file35972/issue4972_imaplib.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 18:08:05 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Jul 2014 16:08:05 +0000 Subject: [issue4972] context management support in imaplib, smtplib, ftplib In-Reply-To: <1232213338.37.0.108210239108.issue4972@psf.upfronthosting.co.za> Message-ID: <1405526885.38.0.733825067818.issue4972@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 18:09:25 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 16 Jul 2014 16:09:25 +0000 Subject: [issue21989] Missing (optional) argument `start` and `end` in documentation for list.index In-Reply-To: <1405514419.16.0.727549411971.issue21989@psf.upfronthosting.co.za> Message-ID: <1405526965.55.0.0770838099876.issue21989@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +ezio.melotti versions: -Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 18:10:50 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 16 Jul 2014 16:10:50 +0000 Subject: [issue9399] Provide a 'print' action for argparse In-Reply-To: <1280329840.94.0.288179215378.issue9399@psf.upfronthosting.co.za> Message-ID: <1405527050.22.0.557264347971.issue9399@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 18:13:48 2014 From: report at bugs.python.org (Igor Bronshteyn) Date: Wed, 16 Jul 2014 16:13:48 +0000 Subject: [issue21992] New AST node Else() should be introduced Message-ID: <1405527228.32.0.961029538035.issue21992@psf.upfronthosting.co.za> New submission from Igor Bronshteyn: Quoting Collin Winter: "I'd like there to be an Else() node for If.orelse, While.orelse, etc. My motivation is that I need the lineno and col_offset values of the "else" statement for a code-coverage utility; as it is, I have to find the last lineno of the if/while/etc suite and the first lineno of the "else" suite and then search between those two for the "else" statement." from: http://bugs.python.org/issue1659410 Lack of position for "else" token hampers implementing of even simple static analysis checker that calculates NCNB (non-comment non-blank) lines (e.g. in a function). ---------- components: Interpreter Core messages: 223229 nosy: Igor.Bronshteyn priority: normal severity: normal status: open title: New AST node Else() should be introduced type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 18:17:27 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Jul 2014 16:17:27 +0000 Subject: [issue21992] New AST node Else() should be introduced In-Reply-To: <1405527228.32.0.961029538035.issue21992@psf.upfronthosting.co.za> Message-ID: <1405527447.89.0.761216897397.issue21992@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo, nedbat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 18:38:40 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 16 Jul 2014 16:38:40 +0000 Subject: [issue21163] asyncio doesn't warn if a task is destroyed during its execution In-Reply-To: <1396732231.93.0.182409018223.issue21163@psf.upfronthosting.co.za> Message-ID: <3hD46R6kn9z7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 6d5a76214166 by Victor Stinner in branch '3.4': Issue #21163, asyncio: Ignore "destroy pending task" warnings for private tasks http://hg.python.org/cpython/rev/6d5a76214166 New changeset fbd3e9f635b6 by Victor Stinner in branch 'default': (Merge 3.4) Issue #21163, asyncio: Ignore "destroy pending task" warnings for http://hg.python.org/cpython/rev/fbd3e9f635b6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 18:43:00 2014 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 16 Jul 2014 16:43:00 +0000 Subject: [issue21988] Decrease iterating overhead in timeit In-Reply-To: <1405522171.24.0.400964708161.issue21988@psf.upfronthosting.co.za> Message-ID: <20140716164253.GG9112@ando> Steven D'Aprano added the comment: On Wed, Jul 16, 2014 at 02:49:31PM +0000, Armin Rigo wrote: > ...but I don't think PyPy should be by itself a good enough reason to > reject this patch. It would be fine if timeit detects which > interpreter it runs on, and only tries to unroll on CPython, for > example. I would *much* rather a parameter to timeit which controls whether or not to unroll, rather than timeit trying to guess whether you want it to unroll or not. PyPy can default to off, CPython to on, and other implementations can choose whichever default makes sense for them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 18:52:10 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 16 Jul 2014 16:52:10 +0000 Subject: [issue21163] asyncio doesn't warn if a task is destroyed during its execution In-Reply-To: <1396732231.93.0.182409018223.issue21163@psf.upfronthosting.co.za> Message-ID: <3hD4Q16DB1z7Lk2@mail.python.org> Roundup Robot added the comment: New changeset e4fe6706b7b4 by Victor Stinner in branch '3.4': Issue #21163: Fix "destroy pending task" warning in test_wait_errors() http://hg.python.org/cpython/rev/e4fe6706b7b4 New changeset a627b23f57d4 by Victor Stinner in branch 'default': (Merge 3.4) Issue #21163: Fix "destroy pending task" warning in test_wait_errors() http://hg.python.org/cpython/rev/a627b23f57d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 18:57:08 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Jul 2014 16:57:08 +0000 Subject: [issue21163] asyncio doesn't warn if a task is destroyed during its execution In-Reply-To: <1396732231.93.0.182409018223.issue21163@psf.upfronthosting.co.za> Message-ID: <1405529828.65.0.449492372072.issue21163@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, I fixed the last warnings emitted in unit tests ran in debug mode. I close the issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 18:57:40 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Jul 2014 16:57:40 +0000 Subject: [issue21985] test_asyncio prints some junk In-Reply-To: <1405465467.27.0.383120820673.issue21985@psf.upfronthosting.co.za> Message-ID: <1405529860.48.0.748852240027.issue21985@psf.upfronthosting.co.za> STINNER Victor added the comment: I fixed last warnings in tests ran in debug mode. I close the issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 19:07:03 2014 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Jul 2014 17:07:03 +0000 Subject: [issue21247] test_asyncio: test_subprocess_send_signal hangs on Fedora builders In-Reply-To: <1397597632.61.0.772376521638.issue21247@psf.upfronthosting.co.za> Message-ID: <1405530423.68.0.954883452755.issue21247@psf.upfronthosting.co.za> STINNER Victor added the comment: Here is a patch implementing a basic synchronization between the parent and the child processing, to wait until the child is sleeping. Can you please try this patch? If it doesn't work, we might add a small sleep of 500 ms after the readline(). ---------- keywords: +patch Added file: http://bugs.python.org/file35973/test_send_signal.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 19:37:50 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 17:37:50 +0000 Subject: [issue10048] urllib.request documentation confusing In-Reply-To: <1286535990.46.0.129844190964.issue10048@psf.upfronthosting.co.za> Message-ID: <1405532270.96.0.428774102431.issue10048@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Senthil do you still intend to run with this or could somebody else pick it up? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 19:40:16 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 17:40:16 +0000 Subject: [issue17026] pdb frames accessible after the termination occurs on uncaught exception In-Reply-To: <1359047913.36.0.999891280978.issue17026@psf.upfronthosting.co.za> Message-ID: <1405532416.6.0.478891583062.issue17026@psf.upfronthosting.co.za> Mark Lawrence added the comment: Nosy list set according to experts page. ---------- nosy: +BreamoreBoy, georg.brandl versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 19:43:08 2014 From: report at bugs.python.org (eryksun) Date: Wed, 16 Jul 2014 17:43:08 +0000 Subject: [issue21927] BOM appears in stdin when using Powershell In-Reply-To: <1404657562.39.0.323212380566.issue21927@psf.upfronthosting.co.za> Message-ID: <1405532588.04.0.277423657798.issue21927@psf.upfronthosting.co.za> eryksun added the comment: > PS C:\Users\jaraco> echo ? | py -3 -c "import sys; print(repr(sys.stdin.buffer.read()))" > b'?\r\n' > Curiously, it appears as if powershell is actually receiving > a question mark from the pipe. PowerShell calls ReadConsoleW to read the console input buffer, i.e. it reads "?" as a wide character from the command line. The default encoding when writing to the pipe should be ASCII [*]. If that's the case it explains the question mark that Python reads from stdin. It's the default replacement character (WC_DEFAULTCHAR) used by WideCharToMultiByte. [*] http://blogs.msdn.com/b/powershell/archive/2006/12/11/outputencoding-to-the-rescue.aspx You can change PowerShell's output encoding to match the console: $OutputEncoding = [Console]::OutputEncoding If the console codepage is 65001, the above is equivalent to setting $OutputEncoding = [System.Text.Encoding]::UTF8 http://msdn.microsoft.com/en-us/library/system.text.encoding.utf8 As Victor mentioned, this setting always writes a BOM, and under codepage 65001 it actually writes 2 BOMs (at least in PowerShell 2). Victor also mentioned that you can avoid the BOM by passing $False to the constructor: $OutputEncoding = New-Object System.Text.UTF8Encoding($False) http://msdn.microsoft.com/en-us/library/system.text.utf8encoding There's still a BOM under codepage 65001, but maybe that's fixed in PowerShell 3. I avoid setting the console to codepage 65001 anyway. ReadFile/WriteFile incorrectly return the number of characters read/written instead of the number of bytes because the call is actually handled by ReadConsoleA/WriteConsoleA. Maybe that's finally fixed in Windows 8. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 19:43:37 2014 From: report at bugs.python.org (Lita Cho) Date: Wed, 16 Jul 2014 17:43:37 +0000 Subject: [issue21815] imaplib truncates some untagged responses In-Reply-To: <1405519645.76.0.742545975205.issue21815@psf.upfronthosting.co.za> Message-ID: Lita Cho added the comment: > > R. David Murray added the comment: > > Just to make sure I understand: the issue is that gmail may produce flags > with [] in them, and imaplib currently fails to process such flags when it > receives them from gmail? > > This is correct. Gmail allows you to create flags with [], and the Response_code regex doesn't process them properly. > In principle I think we would not want to allow imaplib to be used to > create such flags unless the user specifies some sort of "I want to violate > the RFC" flag (which they might want to do, for example, to run tests > against gmail :) But currently it looks like it can? (I haven't looked at > this in enough detail to be sure.) If that's true we probably have to > continue to allow it for backward compatibility reasons, but we should > document the RFC violation and possible consequences (an IMAP server > rejecting such flags). > > Yes, currently we can. I've posted the code in order to do this. This is basically the result. >>> first_id = msg_ids.split()[0] >>> mail.store(first_id, "+FLAGS", "[test]") ('OK', [b'1 (FLAGS (\\Seen Answered [test] NotJunk $NotJunk [Brackets] [testing2]))']) However, I would think it would be the server's job to uphold this rule, not the library. The server should return with a BAD response, but right now, Gmail allows you to do this. Should we throw a warning in the "store" method? Otherwise, I can update the documenation in the "store" method stating that having '[]' is allowed but violates the RFC protocol. > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 19:43:38 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 16 Jul 2014 17:43:38 +0000 Subject: [issue21988] Decrease iterating overhead in timeit In-Reply-To: <20140716164253.GG9112@ando> Message-ID: <53C6B9C5.5000508@free.fr> Antoine Pitrou added the comment: Le 16/07/2014 12:43, Steven D'Aprano a ?crit : > > I would *much* rather a parameter to timeit which controls whether or > not to unroll, rather than timeit trying to guess whether you want it to > unroll or not. PyPy can default to off, CPython to on, and other > implementations can choose whichever default makes sense for them. I think it is overkill. Apart from rather silly microbenchmarks, there isn't much point in adding the loop unrolling facility. In real world, even cheap operations such as "x = x + 1" will be surrounded by less cheap operations, so if an improvement cannot yield tangible benefits inside a simple for loop, then it doesn't deserve to be committed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 19:43:56 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 17:43:56 +0000 Subject: [issue13540] Document the Action API in argparse In-Reply-To: <1323183395.55.0.489132691311.issue13540@psf.upfronthosting.co.za> Message-ID: <1405532636.92.0.388364453285.issue13540@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Paul what is your opinion of this documentation patch? ---------- nosy: +BreamoreBoy, paul.j3 versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 19:44:40 2014 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 Jul 2014 17:44:40 +0000 Subject: [issue21990] saxutils defines an inner class where a normal one would do In-Reply-To: <1405520928.93.0.195566496029.issue21990@psf.upfronthosting.co.za> Message-ID: <1405532680.74.0.445834059852.issue21990@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 19:45:17 2014 From: report at bugs.python.org (Alex Gaynor) Date: Wed, 16 Jul 2014 17:45:17 +0000 Subject: [issue21990] saxutils defines an inner class where a normal one would do In-Reply-To: <1405520928.93.0.195566496029.issue21990@psf.upfronthosting.co.za> Message-ID: <1405532717.31.0.594557584832.issue21990@psf.upfronthosting.co.za> Changes by Alex Gaynor : ---------- keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 19:51:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 17:51:15 +0000 Subject: [issue17057] Data model documentation grammar In-Reply-To: <1359332657.03.0.048046509713.issue17057@psf.upfronthosting.co.za> Message-ID: <1405533075.54.0.724475900847.issue17057@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm not particularly interested in 2.7 documentation but is there anybody out there who could review this please. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 19:52:35 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 16 Jul 2014 17:52:35 +0000 Subject: [issue21986] Pickleability of code objects is inconsistent In-Reply-To: <1405469623.84.0.281722062447.issue21986@psf.upfronthosting.co.za> Message-ID: <1405533155.32.0.895153914201.issue21986@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There is no unittest module for rpc yet. Should the pickle test include a test that pickling a code object fails, and with the proper exception? Is ppperry correct about PicklingError? Chainmap is new in 3.3 so 2.7 would need the copy version of the patch. ---------- components: +IDLE -Library (Lib), Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 19:55:40 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 16 Jul 2014 17:55:40 +0000 Subject: [issue21986] Pickleability of code objects is inconsistent In-Reply-To: <1405469623.84.0.281722062447.issue21986@psf.upfronthosting.co.za> Message-ID: <1405533340.15.0.31648006492.issue21986@psf.upfronthosting.co.za> Terry J. Reedy added the comment: ppperry: Component Windows (or Macintosh) means Windows (or Mac) specific. The rpc code is general to all systems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 19:57:41 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 16 Jul 2014 17:57:41 +0000 Subject: [issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers. In-Reply-To: <1402787574.99.0.986548729035.issue21765@psf.upfronthosting.co.za> Message-ID: <1405533461.47.0.783874916192.issue21765@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 20:22:34 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 18:22:34 +0000 Subject: [issue16509] sqlite3 docs do not explain check_same_thread In-Reply-To: <1353310851.97.0.745365364193.issue16509@psf.upfronthosting.co.za> Message-ID: <1405534954.68.0.697889415301.issue16509@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Daniel could you provide a patch for this? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 20:28:02 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Wed, 16 Jul 2014 18:28:02 +0000 Subject: [issue21935] Implement AUTH command in smtpd. In-Reply-To: <1404766823.82.0.391401675174.issue21935@psf.upfronthosting.co.za> Message-ID: <1405535282.82.0.60686400374.issue21935@psf.upfronthosting.co.za> Milan Oberkirch added the comment: Done. I added the keyarg 'enable_AUTH' and two abstract methods to the server: process_auth(user, password) for authentication and accept_recipient(user, mailfrom, rcptto) for authorization. ---------- Added file: http://bugs.python.org/file35974/smtpd_AUTH_full.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 20:30:35 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 18:30:35 +0000 Subject: [issue17101] __main__.py Multiprocessing on Windows In-Reply-To: <1359737656.57.0.323890943093.issue17101@psf.upfronthosting.co.za> Message-ID: <1405535435.61.0.122200887992.issue17101@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is it possible to backport the fix from #10845 to 2.7? Is it actually worth doing? ---------- components: +Library (Lib) nosy: +BreamoreBoy versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 20:30:41 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 16 Jul 2014 18:30:41 +0000 Subject: [issue10818] pydoc: Remove old server and tk panel In-Reply-To: <1294071441.53.0.907267492881.issue10818@psf.upfronthosting.co.za> Message-ID: <3hD6bh4zq0z7LnY@mail.python.org> Roundup Robot added the comment: New changeset 2e578b80c2f3 by Zachary Ware in branch '3.4': Remove Tools/scripts/pydocgui.pyw. http://hg.python.org/cpython/rev/2e578b80c2f3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 20:31:45 2014 From: report at bugs.python.org (Case Van Horsen) Date: Wed, 16 Jul 2014 18:31:45 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1405535505.8.0.923869527784.issue21955@psf.upfronthosting.co.za> Changes by Case Van Horsen : ---------- nosy: +casevh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 20:42:35 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Jul 2014 18:42:35 +0000 Subject: [issue20394] Coverity complains on audioop In-Reply-To: <1390721721.09.0.648062700512.issue20394@psf.upfronthosting.co.za> Message-ID: <1405536155.18.0.029812494629.issue20394@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Christian, what about 2.7? ---------- status: open -> pending versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 20:48:44 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 18:48:44 +0000 Subject: [issue13850] Summary tables for argparse add_argument options In-Reply-To: <1327384498.23.0.981832544617.issue13850@psf.upfronthosting.co.za> Message-ID: <1405536524.02.0.799181567756.issue13850@psf.upfronthosting.co.za> Mark Lawrence added the comment: At a quick glance the patch looks okay to me so as there's been a lot of positive comments can we have a formal patch review please. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 20:52:42 2014 From: report at bugs.python.org (Olaf Hartmann) Date: Wed, 16 Jul 2014 18:52:42 +0000 Subject: [issue15119] ctypes mixed-types bitfield layout nonsensical; doesn't match compiler. In-Reply-To: <1340270015.73.0.680065532366.issue15119@psf.upfronthosting.co.za> Message-ID: <1405536762.24.0.579757488984.issue15119@psf.upfronthosting.co.za> Olaf Hartmann added the comment: I just run into this issue, so i'll bump it with another test case: import ctypes class Struct(ctypes.Structure): _fields_ = [ ("uint8_0", ctypes.c_uint8, 8), ("uint8_1", ctypes.c_uint8, 8), ("uint16_0", ctypes.c_uint16, 1), ("uint16_1", ctypes.c_uint16, 15), ] for f in Struct._fields_: print f[0], getattr(Struct, f[0]) > python bitfield.py uint8_0 uint8_1 uint16_0 uint16_1 Originally tested with Python 2.7.3, but also confirmed with later versions. Is there any workaround by specifying ofs and bits manually? ---------- nosy: +wbu versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 20:53:55 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 18:53:55 +0000 Subject: [issue17243] The changes made for issue 4074 should be documented In-Reply-To: <1361305487.48.0.247163585293.issue17243@psf.upfronthosting.co.za> Message-ID: <1405536835.31.0.873285593063.issue17243@psf.upfronthosting.co.za> Mark Lawrence added the comment: Presumably the responsibility for this lies with the person who made the changes for #4074 ? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 20:58:53 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 18:58:53 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1405537133.91.0.145265236549.issue17750@psf.upfronthosting.co.za> Mark Lawrence added the comment: How do we stand with eight outstanding issues here? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 21:22:37 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Jul 2014 19:22:37 +0000 Subject: [issue21815] imaplib truncates some untagged responses In-Reply-To: <1403275196.37.0.409307454531.issue21815@psf.upfronthosting.co.za> Message-ID: <1405538557.3.0.332562881761.issue21815@psf.upfronthosting.co.za> R. David Murray added the comment: Postel's Law says: be conservative in what you do, be liberal in what you accept from others. So the client should not violate the RFC when sending data to the server. The server, on the other hand, by that law could accept "dirty" data if it can do something reasonable with it...except that in general the IMAP RFC in particular says "don't do that". IMAP servers are supposed to be IMAP RFC sticklers, even when accepting input. So gmail is broken for some definition of broken, and so is imaplib. Since the code has been this way for a long time, and gmail does in fact accept it, I think a doc warning about []s violating the RFC should be sufficient; a warning would probably just be annoying to little real benefit. ---------- versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 21:26:51 2014 From: report at bugs.python.org (Claudiu Popa) Date: Wed, 16 Jul 2014 19:26:51 +0000 Subject: [issue21986] Pickleability of code objects is inconsistent In-Reply-To: <1405469623.84.0.281722062447.issue21986@psf.upfronthosting.co.za> Message-ID: <1405538811.91.0.490286378921.issue21986@psf.upfronthosting.co.za> Claudiu Popa added the comment: TypeError is raised only in Python 2, in Python 3 it's PicklingError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 21:30:16 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Jul 2014 19:30:16 +0000 Subject: [issue18144] FD leak in urllib2 In-Reply-To: <1370459423.62.0.313188871142.issue18144@psf.upfronthosting.co.za> Message-ID: <1405539016.28.0.869015926039.issue18144@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> duplicate status: open -> closed superseder: -> test_urllib2net is triggering a ResourceWarning _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 21:30:20 2014 From: report at bugs.python.org (Olaf Hartmann) Date: Wed, 16 Jul 2014 19:30:20 +0000 Subject: [issue15119] ctypes mixed-types bitfield layout nonsensical; doesn't match compiler. In-Reply-To: <1340270015.73.0.680065532366.issue15119@psf.upfronthosting.co.za> Message-ID: <1405539020.61.0.0604752170793.issue15119@psf.upfronthosting.co.za> Olaf Hartmann added the comment: Answering my own question, here is a workaround, that also produces reasonable results for the original test case. Basically just inserting an empty struct: import ctypes class Empty(ctypes.Structure): _fields_ = [] class Struct(ctypes.Structure): _fields_ = [ ("uint8_0", ctypes.c_uint8, 8), ("uint8_1", ctypes.c_uint8, 8), ("_ignore", Empty), ("uint16_0", ctypes.c_uint16, 1), ("uint16_1", ctypes.c_uint16, 15), ] for f in Struct._fields_: print f[0], getattr(Struct, f[0]) > python bitfield.py uint8_0 uint8_1 _ignore uint16_0 uint16_1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 21:33:18 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Jul 2014 19:33:18 +0000 Subject: [issue19524] ResourceWarning when urlopen() forgets the HTTPConnection object In-Reply-To: <1383882317.08.0.635493267684.issue19524@psf.upfronthosting.co.za> Message-ID: <1405539198.25.0.809481790765.issue19524@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. Do you want to write a test for the case when an invalid response is received? ---------- versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 21:33:57 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Jul 2014 19:33:57 +0000 Subject: [issue19524] ResourceWarning when urlopen() forgets the HTTPConnection object In-Reply-To: <1383882317.08.0.635493267684.issue19524@psf.upfronthosting.co.za> Message-ID: <1405539237.37.0.876298988535.issue19524@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 21:33:58 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 16 Jul 2014 19:33:58 +0000 Subject: [issue21918] Convert test_tools to directory In-Reply-To: <1404499693.28.0.512453806731.issue21918@psf.upfronthosting.co.za> Message-ID: <3hD80j4QBCz7Lk6@mail.python.org> Roundup Robot added the comment: New changeset e69f037332a6 by Zachary Ware in branch '3.4': Issue #21918: Convert test_tools.py to a sub-package of test. http://hg.python.org/cpython/rev/e69f037332a6 New changeset 1d0ca204c36f by Zachary Ware in branch 'default': Issue #21918: Convert test_tools.py to a sub-package of test. http://hg.python.org/cpython/rev/1d0ca204c36f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 21:37:02 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 Jul 2014 19:37:02 +0000 Subject: [issue21918] Convert test_tools to directory In-Reply-To: <1404499693.28.0.512453806731.issue21918@psf.upfronthosting.co.za> Message-ID: <1405539422.19.0.331271669521.issue21918@psf.upfronthosting.co.za> Zachary Ware added the comment: Committed, thanks for the reviews! I had modeled load_tests after test_json's load_tests. The idiom used in test_email causes a warning from regrtest about sys.path being modified, so I modified the idiom slightly and used that. I have declined to backport the patch to 2.7; it's more trouble than it's worth to me. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 21:38:04 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Jul 2014 19:38:04 +0000 Subject: [issue21044] tarfile does not handle file .name being an int In-Reply-To: <1395624777.51.0.277506799413.issue21044@psf.upfronthosting.co.za> Message-ID: <1405539484.63.0.288322619139.issue21044@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 21:40:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 19:40:01 +0000 Subject: [issue17391] _cursesmodule Fails to Build on GCC 2.95 (static) In-Reply-To: <1362925103.81.0.892590106021.issue17391@psf.upfronthosting.co.za> Message-ID: <1405539601.83.0.447334377757.issue17391@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we have a review of the one line patch please. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 21:44:04 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 19:44:04 +0000 Subject: [issue17924] Deprecate stat.S_IF* integer constants In-Reply-To: <1367928320.73.0.37418131168.issue17924@psf.upfronthosting.co.za> Message-ID: <1405539844.81.0.922535623241.issue17924@psf.upfronthosting.co.za> Mark Lawrence added the comment: Should this have the same nosy list as #11016 ? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 21:46:42 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 Jul 2014 19:46:42 +0000 Subject: [issue17480] pyvenv should be installed someplace more obvious on Windows In-Reply-To: <1363714170.98.0.299571294884.issue17480@psf.upfronthosting.co.za> Message-ID: <1405540002.22.0.680678523775.issue17480@psf.upfronthosting.co.za> Zachary Ware added the comment: I think a pyvenv.exe would be overkill, but I think it would be reasonable to install the pyvenv script to \Scripts rather than \Tools\Scripts, possibly as both 'pyvenv.py' and 'pyvenv-X.Y.py'. Personally, I still prefer 'py -3 -m venv', but I understand the argument that that's not enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 21:56:13 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Wed, 16 Jul 2014 19:56:13 +0000 Subject: [issue19806] smtpd crashes when a multi-byte UTF-8 sequence is split between consecutive data packets In-Reply-To: <1385532648.32.0.209027401379.issue19806@psf.upfronthosting.co.za> Message-ID: <1405540573.9.0.90160415958.issue19806@psf.upfronthosting.co.za> Milan Oberkirch added the comment: Note that in this (and my previous) patch the message is sent to the client (the idea was not to raise an exception). Maybe it would be better to raise an exception with the information you mentioned? ---------- Added file: http://bugs.python.org/file35975/smtpd_undecodable_data_does_not_raiseV2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 21:57:48 2014 From: report at bugs.python.org (Brendan Moloney) Date: Wed, 16 Jul 2014 19:57:48 +0000 Subject: [issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars In-Reply-To: <1405482059.28.0.321220843423.issue21987@psf.upfronthosting.co.za> Message-ID: <1405540668.25.0.721637545669.issue21987@psf.upfronthosting.co.za> Brendan Moloney added the comment: Here is a script illustrating the issue. ---------- Added file: http://bugs.python.org/file35976/tarfile_issue.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 22:15:50 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 16 Jul 2014 20:15:50 +0000 Subject: [issue13041] argparse: terminal width is not detected properly In-Reply-To: <1316902039.33.0.744560309521.issue13041@psf.upfronthosting.co.za> Message-ID: <1405541750.16.0.86552237759.issue13041@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag type: behavior -> enhancement versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 22:23:42 2014 From: report at bugs.python.org (Lita Cho) Date: Wed, 16 Jul 2014 20:23:42 +0000 Subject: [issue21815] imaplib truncates some untagged responses In-Reply-To: <1403275196.37.0.409307454531.issue21815@psf.upfronthosting.co.za> Message-ID: <1405542222.26.0.33861448912.issue21815@psf.upfronthosting.co.za> Lita Cho added the comment: Okay, sounds good. I will also create a patch in the documentation that explains this, as well as comment on the regex patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 22:29:35 2014 From: report at bugs.python.org (Jeffrey Armstrong) Date: Wed, 16 Jul 2014 20:29:35 +0000 Subject: [issue19355] Initial modernization of OpenWatcom support In-Reply-To: <1382490807.69.0.90112979514.issue19355@psf.upfronthosting.co.za> Message-ID: <1405542575.35.0.268207343263.issue19355@psf.upfronthosting.co.za> Jeffrey Armstrong added the comment: This patch is so old at this point, it doesn't apply. Obviously its contents are of no interest to anyone. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 22:30:12 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Jul 2014 20:30:12 +0000 Subject: [issue19806] smtpd crashes when a multi-byte UTF-8 sequence is split between consecutive data packets In-Reply-To: <1385532648.32.0.209027401379.issue19806@psf.upfronthosting.co.za> Message-ID: <1405542612.33.0.889362287303.issue19806@psf.upfronthosting.co.za> R. David Murray added the comment: No, I think the error return is better. Crashing the server on bad input data (which, worse, could be perfectly valid if the server were standards compliant) is a bad thing, I think. That is, if someone has an application that actually works with decode_data=True, I think it is better if it doesn't crash just because of different input data or TCP packet boundaries, as long as the error is reported. I'm willing to be convinced otherwise, but that's how I'm leaning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 22:33:11 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 Jul 2014 20:33:11 +0000 Subject: [issue15968] Incorporate Tcl/Tk/Tix into the Windows build process In-Reply-To: <1347996983.92.0.069726969781.issue15968@psf.upfronthosting.co.za> Message-ID: <1405542791.0.0.439492610284.issue15968@psf.upfronthosting.co.za> Zachary Ware added the comment: Terry: the difference you saw between using regrtest and using unittest.main from the interactive prompt was because of regrtest.saved_test_environment: tkinter._fix sets environment variables at the beginning of one test which are cleared at the end by saved_test_environment, and not reset at the beginning of the next. #20035 has my preferred fix for that situation. Mark: Glad this helped, and thanks for the ping. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 22:33:13 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 16 Jul 2014 20:33:13 +0000 Subject: [issue21992] New AST node Else() should be introduced In-Reply-To: <1405527228.32.0.961029538035.issue21992@psf.upfronthosting.co.za> Message-ID: <1405542793.55.0.907429954442.issue21992@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 22:39:39 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 20:39:39 +0000 Subject: [issue14945] Setup & Usage documentation for selected stdlib modules In-Reply-To: <1338256259.22.0.129056676976.issue14945@psf.upfronthosting.co.za> Message-ID: <1405543179.17.0.484061578565.issue14945@psf.upfronthosting.co.za> Mark Lawrence added the comment: Where do we stand with this and #11260 ? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 22:39:55 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 20:39:55 +0000 Subject: [issue11260] smtpd-as-a-script feature should be documented and should use argparse In-Reply-To: <1298232231.08.0.088023732748.issue11260@psf.upfronthosting.co.za> Message-ID: <1405543195.63.0.819442651327.issue11260@psf.upfronthosting.co.za> Mark Lawrence added the comment: Where do we stand with this and #14945 ? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 22:39:58 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 16 Jul 2014 20:39:58 +0000 Subject: [issue13850] Summary tables for argparse add_argument options In-Reply-To: <1327384498.23.0.981832544617.issue13850@psf.upfronthosting.co.za> Message-ID: <1405543198.79.0.135175232666.issue13850@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 22:42:47 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 20:42:47 +0000 Subject: [issue18355] Merge super() guide into documentation In-Reply-To: <1372901200.41.0.725969821731.issue18355@psf.upfronthosting.co.za> Message-ID: <1405543367.03.0.919978071627.issue18355@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Raymond what is your opinion on this proposal? ---------- nosy: +BreamoreBoy type: -> enhancement versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 22:43:09 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 Jul 2014 20:43:09 +0000 Subject: [issue21059] idle_test.test_warning failure In-Reply-To: <1395735174.52.0.231038807129.issue21059@psf.upfronthosting.co.za> Message-ID: <1405543389.98.0.605481409152.issue21059@psf.upfronthosting.co.za> Zachary Ware added the comment: I believe I eventually figured out the reason for the failure, it had to do with the fact that the Tcl/Tk DLLs were copied into PCbuild to avoid adding ..\tcltk[64]\bin to PATH and the persistent issue that tkinter._fix changes environment variables to make init.tcl findable, while regrtest unsets those variables at the end of each test. The issue is successfully worked around in test[-amd64].bat, and should be fixed by #20035 (once reviewed :)). Closing this issue. ---------- dependencies: -Clean up Tcl library discovery in Tkinter on Windows resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Clean up Tcl library discovery in Tkinter on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 22:54:04 2014 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 16 Jul 2014 20:54:04 +0000 Subject: [issue13540] Document the Action API in argparse In-Reply-To: <1323183395.55.0.489132691311.issue13540@psf.upfronthosting.co.za> Message-ID: <1405544044.34.0.648322350706.issue13540@psf.upfronthosting.co.za> Jason R. Coombs added the comment: That's interesting that there's activity on this again. I had forgotten I'd filed it. It's particularly timely, as I just yesterday had this experience again. I looked at the documentation and found it inadequate for me to understand how to implement a custom action, so I went to the source to figure it out. The action I ended up creating was this one: class SandboxAction(argparse.Action): def __init__(self, *args, **kwargs): super().__init__(*args, nargs=0, **kwargs) def __call__(self, *args, **kwargs): cls.use() Where 'cls' is defined in the same scope where SandboxAction was defined. I'm not sure if my documentation patch would have been sufficient to allow me to write that Action without consulting the source, but this example represents another case where that should be possible. I haven't made any tweaks to the patch as a result of Steven's comments, so I probably could do that. I don't now when I'll have the time to do that, but I'll keep a tab to remind me to revisit the issue again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 23:04:20 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Wed, 16 Jul 2014 21:04:20 +0000 Subject: [issue19806] smtpd crashes when a multi-byte UTF-8 sequence is split between consecutive data packets In-Reply-To: <1385532648.32.0.209027401379.issue19806@psf.upfronthosting.co.za> Message-ID: <1405544660.83.0.733931121809.issue19806@psf.upfronthosting.co.za> Milan Oberkirch added the comment: Agreed. It just feels a bit weird to send programming instructions for the server to the client (but it's probably the best we can do here). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 23:06:59 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 16 Jul 2014 21:06:59 +0000 Subject: [issue21044] tarfile does not handle file .name being an int In-Reply-To: <1395624777.51.0.277506799413.issue21044@psf.upfronthosting.co.za> Message-ID: <3hDB422ShXz7LjT@mail.python.org> Roundup Robot added the comment: New changeset 308f3c1e36d3 by Serhiy Storchaka in branch '2.7': Issue 21044: tarfile.open() now handles fileobj with an integer 'name' http://hg.python.org/cpython/rev/308f3c1e36d3 New changeset d6b71971b228 by Serhiy Storchaka in branch '3.4': Issue 21044: tarfile.open() now handles fileobj with an integer 'name' http://hg.python.org/cpython/rev/d6b71971b228 New changeset 4c2f3240ad65 by Serhiy Storchaka in branch 'default': Issue 21044: tarfile.open() now handles fileobj with an integer 'name' http://hg.python.org/cpython/rev/4c2f3240ad65 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 23:08:42 2014 From: report at bugs.python.org (Claudiu Popa) Date: Wed, 16 Jul 2014 21:08:42 +0000 Subject: [issue21992] New AST node Else() should be introduced In-Reply-To: <1405527228.32.0.961029538035.issue21992@psf.upfronthosting.co.za> Message-ID: <1405544922.76.0.443260553964.issue21992@psf.upfronthosting.co.za> Changes by Claudiu Popa : ---------- nosy: +Claudiu.Popa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 23:11:05 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 21:11:05 +0000 Subject: [issue18320] idle, pydoc search python on wrong path at make altinstall with different exec- and prefix e.g. $HOME In-Reply-To: <1372404539.33.0.335439360663.issue18320@psf.upfronthosting.co.za> Message-ID: <1405545065.94.0.257279268747.issue18320@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Terry is this something you can comment on please? ---------- nosy: +BreamoreBoy, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 23:15:36 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Jul 2014 21:15:36 +0000 Subject: [issue21918] Convert test_tools to directory In-Reply-To: <1405539422.19.0.331271669521.issue21918@psf.upfronthosting.co.za> Message-ID: <1571358.gBk5q3ynhl@raxxla> Serhiy Storchaka added the comment: Thanks for your patch. Do you want to correct test_json's and others load_tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 23:17:09 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Jul 2014 21:17:09 +0000 Subject: [issue19806] smtpd crashes when a multi-byte UTF-8 sequence is split between consecutive data packets In-Reply-To: <1385532648.32.0.209027401379.issue19806@psf.upfronthosting.co.za> Message-ID: <1405545429.36.0.512593362594.issue19806@psf.upfronthosting.co.za> R. David Murray added the comment: Oh, that's a good point, I hadn't thought of that. Maybe I can come up with a better wording. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 23:17:33 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 Jul 2014 21:17:33 +0000 Subject: [issue21918] Convert test_tools to directory In-Reply-To: <1571358.gBk5q3ynhl@raxxla> Message-ID: Zachary Ware added the comment: Sure, I'll work on that some time this week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 23:18:49 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Jul 2014 21:18:49 +0000 Subject: [issue21044] tarfile does not handle file .name being an int In-Reply-To: <1395624777.51.0.277506799413.issue21044@psf.upfronthosting.co.za> Message-ID: <1405545529.87.0.922397820259.issue21044@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Committed with rewritten tests. Thank you for your contribution Martin. > I ran into a related issue with the gettarinfo() method. Would that fall under the scope of this bug, or should I raise a separate one? Yes, this looks as a separate bug. ---------- resolution: -> fixed stage: test needed -> resolved status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 23:20:29 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 21:20:29 +0000 Subject: [issue18330] Fix idlelib.PyShell.build_subprocess_arglist use of __import__ In-Reply-To: <1372543764.27.0.834894616208.issue18330@psf.upfronthosting.co.za> Message-ID: <1405545629.26.0.0087926537248.issue18330@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Terry just a reminder for yourself and your band of merry men and women. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 23:24:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 21:24:01 +0000 Subject: [issue18392] Doc: PyObject_Malloc() is not documented In-Reply-To: <1373156816.39.0.0842066311974.issue18392@psf.upfronthosting.co.za> Message-ID: <1405545841.19.0.0706241609566.issue18392@psf.upfronthosting.co.za> Mark Lawrence added the comment: Any volunteers to document what appears to be a relatively obscure function :) ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 23:25:01 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Wed, 16 Jul 2014 21:25:01 +0000 Subject: [issue21935] Implement AUTH command in smtpd. In-Reply-To: <1404766823.82.0.391401675174.issue21935@psf.upfronthosting.co.za> Message-ID: <1405545901.06.0.0962496476207.issue21935@psf.upfronthosting.co.za> Milan Oberkirch added the comment: We could solve issue 8503 at the same time by always calling 'accept_recipient(mailfrom, rcptto, user=None)' and providing a default implementation for backwards compatibility. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 23:43:37 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Wed, 16 Jul 2014 21:43:37 +0000 Subject: [issue21993] counterintuitive behavior of list.index with boolean values Message-ID: <1405547017.25.0.264801773086.issue21993@psf.upfronthosting.co.za> New submission from Wolfgang Maier: >>> l = [False, True] >>> l.index(True) 1 >>> l.index(False) 0 good, but: >>> l = ['a', '', {}, 2.7, 1, 0, False, True] >>> l.index(True) 4 >>> l.index(False) 5 Apparently, True and False get converted to int in comparisons to ints. I would expect items to be compared either by: a) object identity or b) __eq__ but not this inconsistently. Best, Wolfgang ---------- components: Interpreter Core messages: 223284 nosy: wolma priority: normal severity: normal status: open title: counterintuitive behavior of list.index with boolean values type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 23:51:55 2014 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 16 Jul 2014 21:51:55 +0000 Subject: [issue21993] counterintuitive behavior of list.index with boolean values In-Reply-To: <1405547017.25.0.264801773086.issue21993@psf.upfronthosting.co.za> Message-ID: <1405547515.54.0.00282732729165.issue21993@psf.upfronthosting.co.za> Ezio Melotti added the comment: It's using __eq__: >>> l = [3, 1.0, 5, True, 7, 1] >>> l.index(1) 1 >>> l.index(True) 1 >>> l.index(1.0) 1 >>> True == 1 == 1.0 True ---------- nosy: +ezio.melotti resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 16 23:55:22 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Wed, 16 Jul 2014 21:55:22 +0000 Subject: [issue21993] counterintuitive behavior of list.index with boolean values In-Reply-To: <1405547017.25.0.264801773086.issue21993@psf.upfronthosting.co.za> Message-ID: <1405547722.3.0.495147611574.issue21993@psf.upfronthosting.co.za> Wolfgang Maier added the comment: No, it's not that simple and I don't think this should be closed: In my example: >>> l = ['a', '', {}, 2.7, 1, 0, False, True] >>> l.index(True) 4 >>> l.index(False) 5 if using __eq__ consistently, you'd expect the first call to return 0 and the second 1 (since the empty string evaluates to False). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 00:04:15 2014 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 16 Jul 2014 22:04:15 +0000 Subject: [issue21993] counterintuitive behavior of list.index with boolean values In-Reply-To: <1405547017.25.0.264801773086.issue21993@psf.upfronthosting.co.za> Message-ID: <1405548255.88.0.300599204506.issue21993@psf.upfronthosting.co.za> Ezio Melotti added the comment: 'a' evaluates to true, but it's not equal to True: >>> bool('a') True >>> 'a' == True False but 1 and True are equal (for historical reasons): >>> 1 == True True Similarly '' evaluates to false, but it's not equal to False: >>> bool('') False >>> '' == False False whereas 0 is equal to False: >>> 0 == False True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 00:09:44 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Wed, 16 Jul 2014 22:09:44 +0000 Subject: [issue21993] counterintuitive behavior of list.index with boolean values In-Reply-To: <1405547017.25.0.264801773086.issue21993@psf.upfronthosting.co.za> Message-ID: <1405548584.01.0.222709111334.issue21993@psf.upfronthosting.co.za> Wolfgang Maier added the comment: Right, forgot about that. The consequence for the example is still far from satisfying, I think, but you can't change it without breaking compatibility then. Thanks for the quick reply, Wolfgang ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 00:16:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 22:16:01 +0000 Subject: [issue14285] Traceback wrong on ImportError while executing a package In-Reply-To: <1331621436.28.0.000669565075438.issue14285@psf.upfronthosting.co.za> Message-ID: <1405548961.82.0.463105466702.issue14285@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've no idea what having a file called __main__.py is likely to do so can someone comment please. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 00:19:56 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 22:19:56 +0000 Subject: [issue14689] make PYTHONWARNINGS variable work in libpython In-Reply-To: <1335606965.58.0.412104204254.issue14689@psf.upfronthosting.co.za> Message-ID: <1405549196.84.0.186839933528.issue14689@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we have a patch review please, I'm not touching C code at that level within Python. Are people happy with the concept of moving code from main.c to pythonrun.c ? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 00:46:59 2014 From: report at bugs.python.org (Alex Gaynor) Date: Wed, 16 Jul 2014 22:46:59 +0000 Subject: [issue21994] Syntax error in the ssl module documentation Message-ID: <1405550819.52.0.585557894887.issue21994@psf.upfronthosting.co.za> New submission from Alex Gaynor: This can be seen at https://docs.python.org/3.4/library/ssl.html#ssl.SSLContext.check_hostname It looks like the colon should be omitted, and the next line un-indented. ---------- assignee: docs at python components: Documentation keywords: easy messages: 223291 nosy: alex, christian.heimes, docs at python, dstufft, giampaolo.rodola, janssen, pitrou priority: normal severity: normal status: open title: Syntax error in the ssl module documentation versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 00:47:30 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 16 Jul 2014 22:47:30 +0000 Subject: [issue21995] Idle: pseudofiles have no buffer attribute. Message-ID: <1405550850.77.0.279876996055.issue21995@psf.upfronthosting.co.za> New submission from Terry J. Reedy: sys.stdin on 3.4.1 is also 'missing' (among public names) 'line_buffering' (True) and 'mode' ('r'). It seems that these could be trivially added, so the focus of this issue is 'buffer'. The associated .detach method is a no-op, (It is also a bit dangerous for interactive operation.) 3.4.1 Console interpreter: >>> import sys; b = sys.stdin.buffer.readline() a line >>> b b'a line\r\n' 3.4.1 Idle: >>> import sys; b = sys.stdin.buffer.readline() Traceback (most recent call last): File "", line 1, in import sys; b = sys.stdin.buffer.readline() AttributeError: 'PseudoInputFile' object has no attribute 'buffer' https://docs.python.org/3/library/sys.html#sys.stdin presents the idiom. It also warns (too narrowly -- 'if you are writing a library ...') that it might not. As far as I could find, the Idle doc does not mention the standard streams, let alone Idle specific limitations. I intentionally wrote the title as a statement of a problematical situation, rather than as a proposed solution, as there are two: change code and change doc. Code: add .buffer as a bytes-oriented Pseudofile. Doc: at least mention that standard streams are replaced by objects that ship text between processes, and use gui for input and display, and the consiquences of this. ---------- assignee: docs at python components: Documentation, IDLE messages: 223292 nosy: docs at python, terry.reedy priority: normal severity: normal stage: test needed status: open title: Idle: pseudofiles have no buffer attribute. type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 01:08:23 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 16 Jul 2014 23:08:23 +0000 Subject: [issue18320] idle, pydoc search python on wrong path at make altinstall with different exec- and prefix e.g. $HOME In-Reply-To: <1372404539.33.0.335439360663.issue18320@psf.upfronthosting.co.za> Message-ID: <1405552103.29.0.960859584097.issue18320@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 3.3 only gets security fixes. This looks to be a linux altinstall installation problem rather than an idle problem. Idle and pydoc only start if Python starts first. One way to start idle is to start Python and then enter 'import idlelib.idle'. How did you start python that worked. How did you try to start idle or pydoc that failed. ---------- components: +Installation -IDLE versions: +Python 3.4, Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 01:12:02 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 16 Jul 2014 23:12:02 +0000 Subject: [issue18330] Fix idlelib.PyShell.build_subprocess_arglist use of __import__ In-Reply-To: <1372543764.27.0.834894616208.issue18330@psf.upfronthosting.co.za> Message-ID: <1405552322.36.0.142488205502.issue18330@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The problem with touching this stuff is that there is not only not an automatec test, there is not even a script for a manual test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 01:12:15 2014 From: report at bugs.python.org (ingrid) Date: Wed, 16 Jul 2014 23:12:15 +0000 Subject: [issue21941] Clean up turtle TPen class In-Reply-To: <1404873989.47.0.448854632734.issue21941@psf.upfronthosting.co.za> Message-ID: <1405552335.66.0.546428870196.issue21941@psf.upfronthosting.co.za> ingrid added the comment: Ah, I think I was mistaken about some things when I made the first patch but it looks like TPen have a few methods that don't work as you'd expect. Since _colorstr isn't implemented on TPen fillcolor and pencolor pen don't work as intended when you call them directly from TPen. Jesstess suggested raising a NotImplementedError on these functions. Would that be a good change to make? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 01:22:38 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 23:22:38 +0000 Subject: [issue10305] Cleanup up ResourceWarnings in multiprocessing In-Reply-To: <1288832616.21.0.291852483251.issue10305@psf.upfronthosting.co.za> Message-ID: <1405552958.16.0.756934781884.issue10305@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've looked at managers.py and can't see any evidence that the sockets are ever closed. Please check this out as I can't believe that a technical problem like this could have been around for so long without someone else spotting it during testing, thus meaning that my eyesight is deficient. ---------- nosy: +BreamoreBoy, jnoller, sbt versions: +Python 2.7, Python 3.4, Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 01:29:27 2014 From: report at bugs.python.org (Lita Cho) Date: Wed, 16 Jul 2014 23:29:27 +0000 Subject: [issue21815] imaplib truncates some untagged responses In-Reply-To: <1403275196.37.0.409307454531.issue21815@psf.upfronthosting.co.za> Message-ID: <1405553367.63.0.0185554980667.issue21815@psf.upfronthosting.co.za> Lita Cho added the comment: Here is a patch for test_imaplib.py, adding the test for brackets. It should fail with the current version of imaplib, but should pass with the imap_regex.patch. ---------- Added file: http://bugs.python.org/file35977/test_imaplib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 01:30:18 2014 From: report at bugs.python.org (paul j3) Date: Wed, 16 Jul 2014 23:30:18 +0000 Subject: [issue13041] argparse: terminal width is not detected properly In-Reply-To: <1316902039.33.0.744560309521.issue13041@psf.upfronthosting.co.za> Message-ID: <1405553418.24.0.0648998860604.issue13041@psf.upfronthosting.co.za> paul j3 added the comment: The latest patch, using _shutil.get_terminal_size(), looks fine. It lets environ['COLUMNS'] have priority over the end user's terminal width, as demonstrated by the change to test_argparse. test_argparse doesn't test changing the actual terminal size, but I imagine that would be a pain to implement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 01:46:44 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 23:46:44 +0000 Subject: [issue9949] os.path.realpath on Windows does not follow symbolic links In-Reply-To: <1285426994.28.0.192028764756.issue9949@psf.upfronthosting.co.za> Message-ID: <1405554404.96.0.788927485695.issue9949@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Zach can you do a patch review on this as it's holding up #13837 ? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 01:52:37 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 23:52:37 +0000 Subject: [issue15411] os.chmod() does not follow symlinks on Windows In-Reply-To: <1342859484.11.0.980886642738.issue15411@psf.upfronthosting.co.za> Message-ID: <1405554757.16.0.518712185041.issue15411@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we have a patch review on this please as it's holding up #13837. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 01:54:16 2014 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 16 Jul 2014 23:54:16 +0000 Subject: [issue13837] test_shutil fails with symlinks enabled under Windows In-Reply-To: <1327255807.39.0.63998442373.issue13837@psf.upfronthosting.co.za> Message-ID: <1405554856.19.0.981588884283.issue13837@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've asked for patch reviews on #9949 and #15411. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 02:13:35 2014 From: report at bugs.python.org (Lita Cho) Date: Thu, 17 Jul 2014 00:13:35 +0000 Subject: [issue21815] imaplib truncates some untagged responses In-Reply-To: <1403275196.37.0.409307454531.issue21815@psf.upfronthosting.co.za> Message-ID: <1405556015.07.0.743505547894.issue21815@psf.upfronthosting.co.za> Lita Cho added the comment: Updated the documentation in imaplib.rst to describe the RFC violation. ---------- versions: -Python 3.4, Python 3.5 Added file: http://bugs.python.org/file35978/imap_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 02:14:18 2014 From: report at bugs.python.org (Lita Cho) Date: Thu, 17 Jul 2014 00:14:18 +0000 Subject: [issue21815] imaplib truncates some untagged responses In-Reply-To: <1403275196.37.0.409307454531.issue21815@psf.upfronthosting.co.za> Message-ID: <1405556058.15.0.197115134514.issue21815@psf.upfronthosting.co.za> Lita Cho added the comment: Updated my regex patch to include a comment about how we are violating the RFC and allowing all characters rather thane excluding the ] character. ---------- Added file: http://bugs.python.org/file35979/imap_regex.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 02:26:27 2014 From: report at bugs.python.org (Thomas Kluyver) Date: Thu, 17 Jul 2014 00:26:27 +0000 Subject: [issue16509] sqlite3 docs do not explain check_same_thread In-Reply-To: <1353310851.97.0.745365364193.issue16509@psf.upfronthosting.co.za> Message-ID: <1405556787.93.0.0665483615049.issue16509@psf.upfronthosting.co.za> Thomas Kluyver added the comment: The module docs do mention "Older SQLite versions had issues with sharing connections between threads." Presumably that means that sharing the connection between threads is safe so long as you're not using 'older versions', but it would be nice to have some more clarity about how old those versions are. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 02:29:03 2014 From: report at bugs.python.org (Thomas Kluyver) Date: Thu, 17 Jul 2014 00:29:03 +0000 Subject: [issue16509] sqlite3 docs do not explain check_same_thread In-Reply-To: <1353310851.97.0.745365364193.issue16509@psf.upfronthosting.co.za> Message-ID: <1405556943.56.0.861631064406.issue16509@psf.upfronthosting.co.za> Thomas Kluyver added the comment: This page also looks relevant: sqlite can be compiled or used in three different threading modes. Presumably Python compiles/initialises it in the serialised mode, which makes it safe to use a connection from different threads. http://www.sqlite.org/threadsafe.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 02:35:04 2014 From: report at bugs.python.org (Ned Deily) Date: Thu, 17 Jul 2014 00:35:04 +0000 Subject: [issue18320] python installation is broken if prefix is overridden on an install target In-Reply-To: <1372404539.33.0.335439360663.issue18320@psf.upfronthosting.co.za> Message-ID: <1405557304.24.0.117219781517.issue18320@psf.upfronthosting.co.za> Ned Deily added the comment: The problem you see is being caused by trying to override "prefix" on the "altinstall" or "install" targets. While Makefiles for many products will let you do that successfully, you really can't do that with Python's. Unfortunately, the values for "prefix" and "exec_prefix" specified (or defaulted) on ./configure are used during the main make build targets. This includes the customization of the shebangs lines for the scripts like "idle" and "pydoc". If you change the "prefix" value for the "install" phase, most files do get installed at the changed location but there are various places where the original, configured values remain. You can see this if you run "python -m sysconfig" and examine the prefix values. One result is that any scripts installed via Distutils (including using pip) will get installed to the configured location, e.g. default /usr/local/bin. This also affects ensurepip (new in 3.4): the pip and easy_install scripts are installed in the configured value of prefix, e.g. /usr/local/bin, rather than the overridden value. That's not good. Changing prefix on the install targets seems like a fairly esoteric use case and one with an easy workaround: don't do that, use ./configure --prefix=/path/to instead. I don't think it's worth trying to support since it may require some major Makefile work to get all the right dependencies. But, at a minimum, it would be worth adding a test to the various install targets that would check and abort if prefix is attempted to be changed so you don't end up with a silently broken installation. ---------- components: +Build keywords: +easy nosy: +ned.deily stage: -> needs patch title: idle, pydoc search python on wrong path at make altinstall with different exec- and prefix e.g. $HOME -> python installation is broken if prefix is overridden on an install target _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 02:47:38 2014 From: report at bugs.python.org (Lita Cho) Date: Thu, 17 Jul 2014 00:47:38 +0000 Subject: [issue1598] unexpected response in imaplib In-Reply-To: <1197427257.83.0.419655228027.issue1598@psf.upfronthosting.co.za> Message-ID: <1405558058.0.0.779402854843.issue1598@psf.upfronthosting.co.za> Lita Cho added the comment: Has this been determine as a server bug or a bug with imaplib? I am not able to reproduce this bug with Gmail. Do I need to use it with Lotus Server to recreate it? ---------- nosy: +Lita.Cho _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 04:01:46 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Jul 2014 02:01:46 +0000 Subject: [issue21994] Syntax error in the ssl module documentation In-Reply-To: <1405550819.52.0.585557894887.issue21994@psf.upfronthosting.co.za> Message-ID: <3hDJc960cqz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset 0045eec1e247 by Berker Peksag in branch '3.4': Issue #21994: Fix SyntaxError in the SSLContext.check_hostname documentation. http://hg.python.org/cpython/rev/0045eec1e247 New changeset 8039a20b18cc by Berker Peksag in branch 'default': Issue #21994: Merge with 3.4. http://hg.python.org/cpython/rev/8039a20b18cc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 04:03:15 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 17 Jul 2014 02:03:15 +0000 Subject: [issue21994] Syntax error in the ssl module documentation In-Reply-To: <1405550819.52.0.585557894887.issue21994@psf.upfronthosting.co.za> Message-ID: <1405562595.02.0.440054173536.issue21994@psf.upfronthosting.co.za> Berker Peksag added the comment: Fixed. Thanks for the report. ---------- assignee: docs at python -> berker.peksag nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 04:49:53 2014 From: report at bugs.python.org (Ned Deily) Date: Thu, 17 Jul 2014 02:49:53 +0000 Subject: [issue17101] __main__.py Multiprocessing on Windows In-Reply-To: <1359737656.57.0.323890943093.issue17101@psf.upfronthosting.co.za> Message-ID: <1405565393.22.0.312098074731.issue17101@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 04:56:08 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 17 Jul 2014 02:56:08 +0000 Subject: [issue18355] Merge super() guide into documentation In-Reply-To: <1372901200.41.0.725969821731.issue18355@psf.upfronthosting.co.za> Message-ID: <1405565768.49.0.167115185347.issue18355@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'll translate it into a How-to guide when I get a chance. Right now, the content is in great shape, but the tone is somewhat "blog-posty". For now, the external link will have to suffice. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 04:56:20 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 17 Jul 2014 02:56:20 +0000 Subject: [issue18355] Merge super() guide into documentation In-Reply-To: <1372901200.41.0.725969821731.issue18355@psf.upfronthosting.co.za> Message-ID: <1405565780.76.0.932729215066.issue18355@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 05:01:17 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 17 Jul 2014 03:01:17 +0000 Subject: [issue21988] Decrease iterating overhead in timeit In-Reply-To: <1405501584.54.0.115556422233.issue21988@psf.upfronthosting.co.za> Message-ID: <1405566077.31.0.14391801198.issue21988@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +gvanrossum, rhettinger, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 05:10:49 2014 From: report at bugs.python.org (Tim Peters) Date: Thu, 17 Jul 2014 03:10:49 +0000 Subject: [issue21988] Decrease iterating overhead in timeit In-Reply-To: <1405501584.54.0.115556422233.issue21988@psf.upfronthosting.co.za> Message-ID: <1405566649.52.0.970942728997.issue21988@psf.upfronthosting.co.za> Tim Peters added the comment: I'm afraid "microoptimizations" aren't worth measuring to begin with, since, well, they're "micro" ;-) Seriously, switch compilers, compilation flags, or move to a new release of a single compiler, and a micro-optimization often turns into a micro-pessimization. If I _want_ to measure something unrolled, I'll unroll it myself. But since I almost never want to measure something unrolled anyway, an option to do so would just be "yet another attractive nuisance" to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 05:24:09 2014 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 17 Jul 2014 03:24:09 +0000 Subject: [issue21988] Decrease iterating overhead in timeit In-Reply-To: <1405501584.54.0.115556422233.issue21988@psf.upfronthosting.co.za> Message-ID: <1405567449.96.0.0916997413693.issue21988@psf.upfronthosting.co.za> Guido van Rossum added the comment: I don't see the value in this complication. Please close as won't fix. ---------- nosy: +Guido.van.Rossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 05:30:19 2014 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 17 Jul 2014 03:30:19 +0000 Subject: [issue21988] Decrease iterating overhead in timeit In-Reply-To: <1405501584.54.0.115556422233.issue21988@psf.upfronthosting.co.za> Message-ID: <1405567819.1.0.753142049222.issue21988@psf.upfronthosting.co.za> Guido van Rossum added the comment: (Had to switch identities to close it.) ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 05:41:58 2014 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 17 Jul 2014 03:41:58 +0000 Subject: [issue21988] Decrease iterating overhead in timeit In-Reply-To: <1405501584.54.0.115556422233.issue21988@psf.upfronthosting.co.za> Message-ID: <1405568518.46.0.435518104523.issue21988@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 06:39:06 2014 From: report at bugs.python.org (Jessica McKellar) Date: Thu, 17 Jul 2014 04:39:06 +0000 Subject: [issue21868] Tbuffer in turtle allows negative size In-Reply-To: <1403680225.27.0.922926576552.issue21868@psf.upfronthosting.co.za> Message-ID: <1405571946.49.0.945500133684.issue21868@psf.upfronthosting.co.za> Changes by Jessica McKellar : ---------- keywords: +needs review stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 07:57:41 2014 From: report at bugs.python.org (Tal Einat) Date: Thu, 17 Jul 2014 05:57:41 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1405576661.67.0.52638417042.issue3068@psf.upfronthosting.co.za> Tal Einat added the comment: Bah, my original message was truncated! I could use some help figuring out how to test with various Tk versions. I have a Mac with OSX 10.8, and I've found the "IDLE and tkinter with Tcl/Tk on Mac OS X" page[1], but I'm still not sure how to actually go about installing and running IDLE with the different versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 08:22:09 2014 From: report at bugs.python.org (Ned Deily) Date: Thu, 17 Jul 2014 06:22:09 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1405578129.76.0.324496852709.issue3068@psf.upfronthosting.co.za> Ned Deily added the comment: Tal, I'm working on something to make that easier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 08:47:28 2014 From: report at bugs.python.org (Martin Panter) Date: Thu, 17 Jul 2014 06:47:28 +0000 Subject: [issue19524] ResourceWarning when urlopen() forgets the HTTPConnection object In-Reply-To: <1383882317.08.0.635493267684.issue19524@psf.upfronthosting.co.za> Message-ID: <1405579648.23.0.623929052877.issue19524@psf.upfronthosting.co.za> Changes by Martin Panter : Added file: http://bugs.python.org/file35980/test2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 08:58:20 2014 From: report at bugs.python.org (Martin Panter) Date: Thu, 17 Jul 2014 06:58:20 +0000 Subject: [issue19524] ResourceWarning when urlopen() forgets the HTTPConnection object In-Reply-To: <1383882317.08.0.635493267684.issue19524@psf.upfronthosting.co.za> Message-ID: <1405580300.34.0.544870099585.issue19524@psf.upfronthosting.co.za> Martin Panter added the comment: Added a new test for the invalid response case. Now both tests are included in test2.patch. I separated the actual fix into a separate close3.4.patch (refreshed for the 3.4 branch). This way it is easier for me to make sure the tests work before applying the fix, but it should be easy to combine the patches again if you prefer it that way. ---------- Added file: http://bugs.python.org/file35981/close3.4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 09:00:27 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Thu, 17 Jul 2014 07:00:27 +0000 Subject: [issue21939] IDLE - Test Percolator In-Reply-To: <1404829186.29.0.812778916434.issue21939@psf.upfronthosting.co.za> Message-ID: <1405580427.96.0.000333944288421.issue21939@psf.upfronthosting.co.za> Changes by Saimadhav Heblikar : Added file: http://bugs.python.org/file35982/test_percolator-34-v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 09:25:34 2014 From: report at bugs.python.org (Martin Panter) Date: Thu, 17 Jul 2014 07:25:34 +0000 Subject: [issue14285] Traceback wrong on ImportError while executing a package In-Reply-To: <1331621436.28.0.000669565075438.issue14285@psf.upfronthosting.co.za> Message-ID: <1405581934.08.0.763933346184.issue14285@psf.upfronthosting.co.za> Martin Panter added the comment: A file called ?package/__main__.py? is executed as a script by ?python -m package?. See . I?ve came across this issue myself. You don?t even need the __main__.py file to be doing anything special, as long as the __init__.py raises an ImportError, I think. On Python 3.4 the report is even more convoluted: /sbin/python3: Error while finding spec for 'package.__main__' (: No module named 'missing_module'); 'package' is a package and cannot be directly executed I dunno what ?finding spec? means, and packages _can_ be directly executed if they have a __main__ module, so at least the last bit is definitely wrong. ---------- nosy: +vadmium versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 09:52:08 2014 From: report at bugs.python.org (Martin Panter) Date: Thu, 17 Jul 2014 07:52:08 +0000 Subject: [issue21996] gettarinfo method does not handle files without text string names Message-ID: <1405583528.37.0.553699872308.issue21996@psf.upfronthosting.co.za> New submission from Martin Panter: It looks like if you pass a ?fileobj? argument to ?gettarinfo?, it assumes it can use the ?name? as a text string. >>> import tarfile >>> with tarfile.open("/dev/null", "w") as tar, open("/bin/sh", "rb") as file: tar.gettarinfo(fileobj=file) ... >>> with tarfile.open("/dev/null", "w") as tar, open(b"/bin/sh", "rb") as file: tar.gettarinfo(fileobj=file) ... Traceback (most recent call last): File "", line 1, in File "/media/disk/home/proj/python/cpython/Lib/tarfile.py", line 1767, in gettarinfo arcname = arcname.replace(os.sep, "/") TypeError: expected bytes, bytearray or buffer compatible object >>> with tarfile.open("/dev/null", "w") as tar, open(0, "rb", closefd=False) as file: tar.gettarinfo(fileobj=file) ... Traceback (most recent call last): File "", line 1, in File "/media/disk/home/proj/python/cpython/Lib/tarfile.py", line 1766, in gettarinfo drv, arcname = os.path.splitdrive(arcname) File "Lib/posixpath.py", line 133, in splitdrive return p[:0], p TypeError: 'int' object is not subscriptable In my case, my code always sets the final TarInfo.name attribute later on, so the initial name does not matter. Perhaps at least the documentation should say that ?fileobj.name? must be a real unencoded file name string unless ?arcname? is also given. My workaround was to add a dummy arcname argument, a bit like this: # Explicit dummy name to avoid using file name of bytes tarinfo = self.tar.gettarinfo(fileobj=file, arcname="") # . . . tarinfo.name = "{}/{}".format(self.pkgname, name) ---------- components: Library (Lib) messages: 223318 nosy: vadmium priority: normal severity: normal status: open title: gettarinfo method does not handle files without text string names versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 09:56:51 2014 From: report at bugs.python.org (Martin Panter) Date: Thu, 17 Jul 2014 07:56:51 +0000 Subject: [issue21044] tarfile does not handle file .name being an int In-Reply-To: <1395624777.51.0.277506799413.issue21044@psf.upfronthosting.co.za> Message-ID: <1405583811.23.0.99262224164.issue21044@psf.upfronthosting.co.za> Martin Panter added the comment: Opened Issue 21996 for the ?gettarinfo? method. Also, Serhiy, I think you may have got me mixed up with someone else. I don?t think I did any patches here, so I probably shouldn?t be credited for them :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 10:13:03 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 17 Jul 2014 08:13:03 +0000 Subject: [issue18320] python installation is broken if prefix is overridden on an install target In-Reply-To: <1372404539.33.0.335439360663.issue18320@psf.upfronthosting.co.za> Message-ID: <1405584783.03.0.515540304188.issue18320@psf.upfronthosting.co.za> Martin v. L?wis added the comment: -1 on adding such a test. Some people may rely on the current behaviour, and use that to put the installation into some intermediate location (although DESTDIR would be a better approach for that). Also, how many variables would you want to protect from being changed? People may come up with ideas of changing arbitrary other Makefile variables, and guarding all of them is just not feasible. I propose to close this as "won't fix". ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 10:30:33 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Jul 2014 08:30:33 +0000 Subject: [issue21645] asyncio: Race condition in signal handling on FreeBSD In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <1405585833.39.0.638878730057.issue21645@psf.upfronthosting.co.za> STINNER Victor added the comment: I ran test_asyncio on my own FreeBSD VM, with the sandbox/issue21645 repository and I got a new (different) error on signal handling: RuntimeError('reentrant call inside') when writing into sys.stderr. To be fair: this bug was introduced by my changes in this repository adding debug traces ("logger.error("handle signal %s" % sig)"). IMO the Py_AddPendingCall() function in Python is dangerous: the callback should be "signal-safe" but this concept is not defined Python. In the C language, there is a strict list of allowed functions, in Python it's unclear: the reentrant call is just an example. It's probably easy to deadlock if you call the "wrong" function". Py_AddPendingCall() injects arbitrary Python code between *any* other Python bytecode, it's like the evil greenlet with greenthreads. That's why I consider that it would be safer to call _handle_signal() from the event loop, not using Py_AddPendingCall(): https://code.google.com/p/tulip/issues/detail?id=192 Output of the new bug on FreeBSD: ----------- [1085] C signal_handler: sig_num=20, thread=34380739584 C signal_handler: trip signal (tripped=0) [1085] trip_signal(20) trip_signal(20); write() trip_signal(20); write() -> 1 [1085] Py_AddPendingCall(checksignals_witharg), thread=34380739584 --- Logging error --- Traceback (most recent call last): File "/usr/home/haypo/prog/python/default/Lib/logging/__init__.py", line 980, in emit stream.write(self.terminator) RuntimeError: reentrant call inside <_io.BufferedWriter name=''> During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/home/haypo/prog/python/default/Lib/logging/__init__.py", line 980, in emit stream.write(self.terminator) File "/usr/home/haypo/prog/python/default/Lib/asyncio/unix_events.py", line 95, in _handle_signal logger.error("handle signal %s" % sig) File "/usr/home/haypo/prog/python/default/Lib/logging/__init__.py", line 1302, in error self._log(ERROR, msg, args, **kwargs) File "/usr/home/haypo/prog/python/default/Lib/logging/__init__.py", line 1408, in _log self.handle(record) File "/usr/home/haypo/prog/python/default/Lib/logging/__init__.py", line 1418, in handle self.callHandlers(record) File "/usr/home/haypo/prog/python/default/Lib/logging/__init__.py", line 1480, in callHandlers hdlr.handle(record) File "/usr/home/haypo/prog/python/default/Lib/logging/__init__.py", line 852, in handle self.emit(record) File "/usr/home/haypo/prog/python/default/Lib/logging/__init__.py", line 983, in emit self.handleError(record) File "/usr/home/haypo/prog/python/default/Lib/logging/__init__.py", line 904, in handleError sys.stderr.write('--- Logging error ---\n') RuntimeError: reentrant call inside <_io.BufferedWriter name=''> Call stack: File "/usr/home/haypo/prog/python/default/Lib/runpy.py", line 170, in _run_module_as_main "__main__", mod_spec) File "/usr/home/haypo/prog/python/default/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/home/haypo/prog/python/default/Lib/test/__main__.py", line 3, in regrtest.main_in_temp_cwd() File "/usr/home/haypo/prog/python/default/Lib/test/regrtest.py", line 1562, in main_in_temp_cwd main() File "/usr/home/haypo/prog/python/default/Lib/test/regrtest.py", line 763, in main match_tests=ns.match_tests) File "/usr/home/haypo/prog/python/default/Lib/test/regrtest.py", line 978, in runtest display_failure=not verbose) File "/usr/home/haypo/prog/python/default/Lib/test/regrtest.py", line 1278, in runtest_inner test_runner() File "/usr/home/haypo/prog/python/default/Lib/test/test_asyncio/__init__.py", line 29, in test_main run_unittest(suite()) File "/usr/home/haypo/prog/python/default/Lib/test/support/__init__.py", line 1758, in run_unittest _run_suite(suite) File "/usr/home/haypo/prog/python/default/Lib/test/support/__init__.py", line 1724, in _run_suite result = runner.run(suite) File "/usr/home/haypo/prog/python/default/Lib/unittest/runner.py", line 168, in run test(result) File "/usr/home/haypo/prog/python/default/Lib/unittest/suite.py", line 87, in __call__ return self.run(*args, **kwds) File "/usr/home/haypo/prog/python/default/Lib/unittest/suite.py", line 125, in run test(result) File "/usr/home/haypo/prog/python/default/Lib/unittest/suite.py", line 87, in __call__ return self.run(*args, **kwds) File "/usr/home/haypo/prog/python/default/Lib/unittest/suite.py", line 125, in run test(result) File "/usr/home/haypo/prog/python/default/Lib/unittest/suite.py", line 87, in __call__ return self.run(*args, **kwds) File "/usr/home/haypo/prog/python/default/Lib/unittest/suite.py", line 125, in run test(result) File "/usr/home/haypo/prog/python/default/Lib/unittest/case.py", line 625, in __call__ return self.run(*args, **kwds) File "/usr/home/haypo/prog/python/default/Lib/unittest/case.py", line 577, in run testMethod() File "/usr/home/haypo/prog/python/default/Lib/test/test_asyncio/test_streams.py", line 647, in test_read_all_from_pipe_reader self.loop.run_until_complete(proc.wait()) File "/usr/home/haypo/prog/python/default/Lib/asyncio/base_events.py", line 265, in run_until_complete self.run_forever() File "/usr/home/haypo/prog/python/default/Lib/asyncio/base_events.py", line 238, in run_forever self._run_once() File "/usr/home/haypo/prog/python/default/Lib/asyncio/base_events.py", line 984, in _run_once logger.error("[pid %s] _run_once: thread=%s" % (os.getpid(), threading.get_ident())) Message: '[pid 1085] _run_once: thread=34380739584' ----------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 10:31:39 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 17 Jul 2014 08:31:39 +0000 Subject: [issue21935] Implement AUTH command in smtpd. In-Reply-To: <1404766823.82.0.391401675174.issue21935@psf.upfronthosting.co.za> Message-ID: <1405585899.28.0.633222412516.issue21935@psf.upfronthosting.co.za> Martin v. L?wis added the comment: RFC 4954 states Note: A server implementation MUST implement a configuration in which it does NOT permit any plaintext password mechanisms, unless either the STARTTLS [SMTP-TLS] command has been negotiated or some other mechanism that protects the session from password snooping has been provided. Server sites SHOULD NOT use any configuration which permits a plaintext password mechanism without such a protection mechanism against password snooping. So I'm -1 on this patch, and also on the feature until STARTTLS is implemented (and then this patch needs to be updated to conform to this requirement). ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 10:34:54 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 17 Jul 2014 08:34:54 +0000 Subject: [issue17243] The changes made for issue 4074 should be documented In-Reply-To: <1361305487.48.0.247163585293.issue17243@psf.upfronthosting.co.za> Message-ID: <1405586094.57.0.721528386355.issue17243@psf.upfronthosting.co.za> Martin v. L?wis added the comment: No. There is no "responsibility" to do anything in an open source project. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 10:54:41 2014 From: report at bugs.python.org (Carol Willing) Date: Thu, 17 Jul 2014 08:54:41 +0000 Subject: [issue18392] Doc: PyObject_Malloc() is not documented In-Reply-To: <1373156816.39.0.0842066311974.issue18392@psf.upfronthosting.co.za> Message-ID: <1405587281.5.0.540705008638.issue18392@psf.upfronthosting.co.za> Carol Willing added the comment: Looks as if there is a patch for this on Issue 20064. http://bugs.python.org/issue20064 ---------- nosy: +willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 11:02:15 2014 From: report at bugs.python.org (Tal Einat) Date: Thu, 17 Jul 2014 09:02:15 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1405587735.29.0.350968653441.issue3068@psf.upfronthosting.co.za> Tal Einat added the comment: @Ned: Great! Please keep me posted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 11:26:54 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Jul 2014 09:26:54 +0000 Subject: [issue21645] asyncio: Race condition in signal handling on FreeBSD In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <1405589214.86.0.305357484165.issue21645@psf.upfronthosting.co.za> STINNER Victor added the comment: IMO we must handle signals correctly when there are more than one thread. On Linux, it looks like the C signal handler is always called from the main thread. On FreeBSD, it looks like the C signal handler can be called in any thread, C thread, Python thread holding the GIL, Python thread not holding the GIL. I found why test_read_all_from_pipe_reader() is running with more than one thread. I reproduced the issue on my FreeBSD VM. run_test_server() and run_test_unix_server() functions of test_utils create Python threads, these functions are used in the test_asyncio. The problem is that the PyThreadState_DeleteCurrent() function (called from t_bootstrap() of _threadmodule.c) may yield the CPU to another thread. Other Python threads are running when the line "MUTEX_UNLOCK(gil_mutex);" is executed in the drop_gil() function, before drop_gil() exits. t_bootstrap() -> PyThreadState_DeleteCurrent() -> PyEval_ReleaseLock() -> drop_gil(NULL) It means that Python threads are not deleted immediatly, but may be deleted "later". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 12:31:03 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Thu, 17 Jul 2014 10:31:03 +0000 Subject: [issue21935] Implement AUTH command in smtpd. In-Reply-To: <1404766823.82.0.391401675174.issue21935@psf.upfronthosting.co.za> Message-ID: <1405593063.6.0.440580833955.issue21935@psf.upfronthosting.co.za> Milan Oberkirch added the comment: My interpretation of this paragraph is the following (English is not my native language so please correct me if I'm wrong): The requirement is to provide a configuration where plain auth is disabled if password snooping would be possible otherwise not to forbid such configurations generally. An admin SHOULD provide security measures to prevent password snooping. Setting enable_AUTH=False is a configuration where plain authentication is not permitted. The admin should provide a STARTTLS (or any other encrypted) tunnel if enabling AUTH (stunnel would be a common solution on Linux). Maybe we should explicitly mention that in the docs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 12:50:07 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 10:50:07 +0000 Subject: [issue20064] PyObject_Malloc is not documented In-Reply-To: <1387913960.58.0.680621486861.issue20064@psf.upfronthosting.co.za> Message-ID: <1405594207.11.0.574759216059.issue20064@psf.upfronthosting.co.za> Mark Lawrence added the comment: As the patch is short can we have a commit review please. Can we also close issue 18392 as a duplicate of this. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 13:43:55 2014 From: report at bugs.python.org (Floris Bruynooghe) Date: Thu, 17 Jul 2014 11:43:55 +0000 Subject: [issue15617] FAIL: test_create_connection (test.test_socket.NetworkConnectionNoServer) In-Reply-To: <1344603652.0.0.278766609424.issue15617@psf.upfronthosting.co.za> Message-ID: <1405597435.78.0.506742724519.issue15617@psf.upfronthosting.co.za> Floris Bruynooghe added the comment: Oops, I've kicked the bruynooghe-solaris-csw buildslave and it should now be building again. A bit disappointed that buildbot/twisted doesn't reconnect automatically though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 13:58:42 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 11:58:42 +0000 Subject: [issue7247] test_fcntl_64_bit from test_fcntl.py fails in Python 2.6.4 In-Reply-To: <1257103206.04.0.134413608226.issue7247@psf.upfronthosting.co.za> Message-ID: <1405598322.51.0.386456942158.issue7247@psf.upfronthosting.co.za> Mark Lawrence added the comment: The patch LGTM at a quick glance so can we have a formal review please. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 14:08:39 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 12:08:39 +0000 Subject: [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1405598919.7.0.148482156646.issue15629@psf.upfronthosting.co.za> Mark Lawrence added the comment: It appears, especially from the later messages, that this is not wanted. However noting msg170616 should we close this with #10967 to supersede it? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 15:06:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 13:06:59 +0000 Subject: [issue11551] test_dummy_thread.py test coverage improvement In-Reply-To: <1300167076.06.0.564640850905.issue11551@psf.upfronthosting.co.za> Message-ID: <1405602419.75.0.473862099593.issue11551@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Denver are you still interested in working on this as a week or two has passed? :) ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 15:56:18 2014 From: report at bugs.python.org (Brian Curtin) Date: Thu, 17 Jul 2014 13:56:18 +0000 Subject: [issue11551] test_dummy_thread.py test coverage improvement In-Reply-To: <1300167076.06.0.564640850905.issue11551@psf.upfronthosting.co.za> Message-ID: <1405605378.68.0.966690860784.issue11551@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 15:57:58 2014 From: report at bugs.python.org (Brian Curtin) Date: Thu, 17 Jul 2014 13:57:58 +0000 Subject: [issue10305] Cleanup up ResourceWarnings in multiprocessing In-Reply-To: <1288832616.21.0.291852483251.issue10305@psf.upfronthosting.co.za> Message-ID: <1405605478.56.0.828002456827.issue10305@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 15:58:08 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 13:58:08 +0000 Subject: [issue19756] test_nntplib: sporadic failures, network isses? server down? In-Reply-To: <1385316451.32.0.948186129781.issue19756@psf.upfronthosting.co.za> Message-ID: <1405605488.39.0.211161128031.issue19756@psf.upfronthosting.co.za> Mark Lawrence added the comment: Are these sporadic failures still happening? I've glanced over the logs and only found failures due to recent code changes. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 15:58:08 2014 From: report at bugs.python.org (Brian Curtin) Date: Thu, 17 Jul 2014 13:58:08 +0000 Subject: [issue9949] os.path.realpath on Windows does not follow symbolic links In-Reply-To: <1285426994.28.0.192028764756.issue9949@psf.upfronthosting.co.za> Message-ID: <1405605488.99.0.532949449314.issue9949@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 15:58:18 2014 From: report at bugs.python.org (Brian Curtin) Date: Thu, 17 Jul 2014 13:58:18 +0000 Subject: [issue15411] os.chmod() does not follow symlinks on Windows In-Reply-To: <1342859484.11.0.980886642738.issue15411@psf.upfronthosting.co.za> Message-ID: <1405605498.96.0.377363418199.issue15411@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 15:58:31 2014 From: report at bugs.python.org (Brian Curtin) Date: Thu, 17 Jul 2014 13:58:31 +0000 Subject: [issue13837] test_shutil fails with symlinks enabled under Windows In-Reply-To: <1327255807.39.0.63998442373.issue13837@psf.upfronthosting.co.za> Message-ID: <1405605511.37.0.418969640699.issue13837@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 16:13:56 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Jul 2014 14:13:56 +0000 Subject: [issue1598] unexpected response in imaplib In-Reply-To: <1197427257.83.0.419655228027.issue1598@psf.upfronthosting.co.za> Message-ID: <1405606436.27.0.924448357503.issue1598@psf.upfronthosting.co.za> R. David Murray added the comment: I'm guessing you do. On the other hand, I fixed a get_response bug a few months ago...it doesn't sound related from the description, but if someone can arrange to test against a Lotus server and can't reproduce the bug, testing again with an older version of imaplib might then reproduce it, and prove that it was fixed. ---------- assignee: pierslauder -> stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 16:17:18 2014 From: report at bugs.python.org (Antoine Pietri) Date: Thu, 17 Jul 2014 14:17:18 +0000 Subject: [issue21044] tarfile does not handle file .name being an int In-Reply-To: <1395624777.51.0.277506799413.issue21044@psf.upfronthosting.co.za> Message-ID: <1405606638.53.0.547183251362.issue21044@psf.upfronthosting.co.za> Antoine Pietri added the comment: > Also, Serhiy, I think you may have got me mixed up with someone else. I don?t think I did any patches here, so I probably shouldn?t be credited for them :) Yeah, but I don't mind if I'm not in the ACKS file for a one-line patch though :P ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 16:19:10 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Jul 2014 14:19:10 +0000 Subject: [issue21935] Implement AUTH command in smtpd. In-Reply-To: <1404766823.82.0.391401675174.issue21935@psf.upfronthosting.co.za> Message-ID: <1405606750.2.0.918388412023.issue21935@psf.upfronthosting.co.za> R. David Murray added the comment: Providing starttls support would be the preferred solution, but that is a Hard Problem. We probably need to rewrite smtpd using asyncio in order to provide starttls. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 16:22:18 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Jul 2014 14:22:18 +0000 Subject: [issue15617] FAIL: test_create_connection (test.test_socket.NetworkConnectionNoServer) In-Reply-To: <1344603652.0.0.278766609424.issue15617@psf.upfronthosting.co.za> Message-ID: <1405606938.08.0.914775985325.issue15617@psf.upfronthosting.co.za> R. David Murray added the comment: buildbot does normally reconnect automatically, so something must be wrong somewhere if it didn't. I do seem to remember a bug that caused the slave to occasionally get confused about its current status in certain unusual circumstances...perhaps that bug has not been fixed yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 16:32:01 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 17 Jul 2014 14:32:01 +0000 Subject: [issue21044] tarfile does not handle file .name being an int In-Reply-To: <1395624777.51.0.277506799413.issue21044@psf.upfronthosting.co.za> Message-ID: <1405607521.38.0.372607028675.issue21044@psf.upfronthosting.co.za> Zachary Ware added the comment: This change appears to have broken 2.7 on Windows: http://buildbot.python.org/all/builders/x86%20Windows7%202.7/builds/2707/steps/test/logs/stdio ---------- nosy: +zach.ware resolution: fixed -> stage: resolved -> commit review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 16:35:50 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Jul 2014 14:35:50 +0000 Subject: [issue21946] 'python -u' yields trailing carriage return '\r' (Python2 for Windows) In-Reply-To: <1404910318.13.0.0636532194943.issue21946@psf.upfronthosting.co.za> Message-ID: <1405607750.9.0.303865314683.issue21946@psf.upfronthosting.co.za> R. David Murray added the comment: This is the documented behavior of the -u option. It puts the streams in binary mode "on systems where it matters", which would be windows. That is, universal newline processing is disabled when you use -u. Note that this is no longer an issue in python3: there, -u only affects buffering, and not the binary/text mode (because in python3 there is always a distinction between binary and text mode, regardless of platform). ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 17:13:38 2014 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 17 Jul 2014 15:13:38 +0000 Subject: [issue21645] asyncio: Race condition in signal handling on FreeBSD In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <1405610018.11.0.0977943297821.issue21645@psf.upfronthosting.co.za> Guido van Rossum added the comment: I did my meditation. I now understand the race: - main thread is blocked in select() (or poll() etc.) - C-level signal handler is called in thread B and writes a byte to self-pipe - kernel immediately switches threads - main thread wakes up, reads data from self-pipe, goes back to block - C-level signal handles calls Py_AddPendingCall() to schedule Python-level signal handler - however the main thread is already back asleep The intention if the code was that the Py_AddPendingCall() would complete before the thread switch. Perhaps a CPython fix could be to call it before writing a byte to the pipe??? But that would require someone else to meditate more on the C code. I think your patch to Tulip is fine. I wouldn't worry about missing a signal when things are busy -- AFAIK the child process reaper will reap multiple processes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 17:42:08 2014 From: report at bugs.python.org (eryksun) Date: Thu, 17 Jul 2014 15:42:08 +0000 Subject: [issue16892] Windows bug picking up stdin from a pipe In-Reply-To: <1357652664.69.0.880454684679.issue16892@psf.upfronthosting.co.za> Message-ID: <1405611728.27.0.443213406497.issue16892@psf.upfronthosting.co.za> eryksun added the comment: Doskey is a command-line interface for a subset of the Win32 console API. Macros are implemented as console input aliases by calling AddConsoleAlias. http://msdn.microsoft.com/en-us/library/ms681935 You can load macros from a text file that defines aliases for multiple EXEs: doskey /macrofile=doskey.cfg Create this file from your current macros: doskey /macros:all > doskey.cfg You can also use ctypes to add an alias. #!python3 import ctypes import subprocess AddConsoleAliasW = ctypes.windll.kernel32.AddConsoleAliasW AddConsoleAliasW.argtypes = [ctypes.c_wchar_p] * 3 # $db => import builtins;dir(builtins) AddConsoleAliasW("$db", "import builtins;dir(builtins)", "python.exe") #subprocess.call("doskey") subprocess.call("stdintest.exe", shell=True) The "bug" occurs if I uncomment the line to run doskey. When stdin is a file, calling sys.stdin.tell() before and after running doskey shows that it's reading standard input, for whatever reason. That's its prerogative, not a bug. Calling sys.stdin.seek(0) after running doskey works, but that's not a possibility when doskey is run via the cmd shell's AutoRun. By the way, redirection to a file is not a pipe. It actually works for a pipe such as type mytxtfile.txt | testsubproc.py The good news is that you only need to load doskey macros once for a given console window. You can use an AutoRun script that tests and sets an environment variable: @echo off if "%AUTORUN_DOSKEY%"=="No" goto end echo %0: setting doskey macros "%SystemRoot%\System32\doskey.exe" /macrofile="%AppData%\doskey.cfg" set AUTORUN_DOSKEY=No :end This should take care of cases where you're redirecting standard input to a file, assuming the shell wasn't started with the /d option to skip AutoRun. On Posix systems /bin/sh -c doesn't execute .profile, .bashrc, etc. So maybe on Windows Popen should use %ComSpec% /d /c. You'd still have this problem with os.system, however. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 17:52:11 2014 From: report at bugs.python.org (ppperry) Date: Thu, 17 Jul 2014 15:52:11 +0000 Subject: [issue21997] Pdb.set_trace debugging does not end correctly in IDLE Message-ID: <1405612331.63.0.402043795388.issue21997@psf.upfronthosting.co.za> New submission from ppperry: In IDLE: >>>def dodebug(): pdb.set_trace() >>>dodebug() --Return-- > (2)dodebug()->None (Pdb) s --Return-- > (1)()->None (Pdb) s PDB should exit, but it doesn't > c:\python27\lib\idlelib\run.py(308)runcode() -> interruptable = False (Pdb)s > c:\python27\lib\idlelib\run.py(322)runcode() -> flush_stdout() Quitting from this state raises an error: (Pdb)q Traceback (most recent call last): ** IDLE Internal Exception: File "C:\Python27\lib\idlelib\run.py", line 100, in main ret = method(*args, **kwargs) File "C:\Python27\lib\idlelib\run.py", line 322, in runcode flush_stdout() File "C:\Python27\lib\idlelib\run.py", line 322, in runcode flush_stdout() File "C:\Python27\lib\bdb.py", line 49, in trace_dispatch return self.dispatch_line(frame) File "C:\Python27\lib\bdb.py", line 68, in dispatch_line if self.quitting: raise BdbQuit BdbQuit The same example outside of IDLE: >>>def dodebug(): pdb.set_trace() >>>dodebug() --Return-- > (1)dodebug()->None (Pdb) s --Return-- > (1)()->None (Pdb) s [clean pbd exit] >>> Note: this bug does not occur with pdb.run(). OS: Windows XP ---------- components: IDLE, Library (Lib) messages: 223342 nosy: ppperry priority: normal severity: normal status: open title: Pdb.set_trace debugging does not end correctly in IDLE versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 18:04:21 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Jul 2014 16:04:21 +0000 Subject: [issue21645] asyncio: Race condition in signal handling on FreeBSD In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <1405613061.1.0.867586211418.issue21645@psf.upfronthosting.co.za> STINNER Victor added the comment: > The intention if the code was that the Py_AddPendingCall() would complete before the thread switch. In fact I also expected Py_AddPendingCall() to be called *before* writing the signal number into the "wakeup fd". I guess that before nobody was relying on the "wakeup fd" *and* and the callback. > Perhaps a CPython fix could be to call it before writing a byte to the pipe??? But that would require someone else to meditate more on the C code. It doesn't work for Tulip which targets Python 3.3. Oh... I just saw that Python 2.7 calls Py_AddPendingCall() and *then* writes "\0" into wakeup fd... So Python 2.7 does not have the issue! But yes, we may change the C signal handler in Python 3.5 because it makes more sense to call Py_AddPendingCall() to avoid this specific race condition. > I think your patch to Tulip is fine. Good :) I will test it on FreeBSD. If it fixes the issue, I will apply it. We will see if it makes all buildbots happy. > I wouldn't worry about missing a signal when things are busy -- AFAIK the child process reaper will reap multiple processes. Well, Py_AddPendingCall() also has a limit which is smaller and it does *not* warn when signals are dropped :-( -- I don't know if it can be useful, but there is also the signal.pthread_sigmask() which can be used to "queue" pending signals. Unblocking signals will flush the queue. It might help to mitigate burst of signals in a short window.... I don't know if signal.pthread_sigmask() has a longer queue than Python. And it may be tricky to decide when and where the signals should be blocked and unblocked. If a signal is blocked and the process gets the signal more than once, the signal is only raised once when the signal is unblocked. I don't know if it is an issue or not if asyncio only calls the signal handler once in this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 18:10:45 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Jul 2014 16:10:45 +0000 Subject: [issue21998] asyncio: a new self-pipe should be created in the child process after fork Message-ID: <1405613445.85.0.0173565539891.issue21998@psf.upfronthosting.co.za> New submission from STINNER Victor: It looks like asyncio does not suppport fork() currently: on fork(), the event loop of the parent and the child process share the same "self pipe". Example: --- import asyncio, os loop = asyncio.get_event_loop() pid = os.fork() if pid: print("parent", loop._csock.fileno(), loop._ssock.fileno()) else: print("child", loop._csock.fileno(), loop._ssock.fileno()) --- Output: --- parent 6 5 child 6 5 --- I'm not sure that it's revelant to use asyncio with fork, but I wanted to open an issue at least as a reminder. I found the "self pipe" + fork issue when reading the issue #12060, while working on a fix for the signal handling race condition on FreeBSD: issue #21645. ---------- components: asyncio messages: 223344 nosy: gvanrossum, haypo, yselivanov priority: normal severity: normal status: open title: asyncio: a new self-pipe should be created in the child process after fork versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 18:14:23 2014 From: report at bugs.python.org (ppperry) Date: Thu, 17 Jul 2014 16:14:23 +0000 Subject: [issue21997] Pdb.set_trace debugging does not end correctly in IDLE In-Reply-To: <1405612331.63.0.402043795388.issue21997@psf.upfronthosting.co.za> Message-ID: <1405613663.48.0.0501673647672.issue21997@psf.upfronthosting.co.za> Changes by ppperry : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 18:16:53 2014 From: report at bugs.python.org (Antoine Pietri) Date: Thu, 17 Jul 2014 16:16:53 +0000 Subject: [issue21044] tarfile does not handle file .name being an int In-Reply-To: <1395624777.51.0.277506799413.issue21044@psf.upfronthosting.co.za> Message-ID: <1405613813.7.0.0781517716109.issue21044@psf.upfronthosting.co.za> Antoine Pietri added the comment: This change does not need to be merged on 2.7 anyway, as the os.fdopen sets the name attribute to '' and not to the fd, this check is not required prior to python 3. Still, it would be interesting to investigate why this breaks 2.7 though. ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 18:17:29 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Jul 2014 16:17:29 +0000 Subject: [issue21645] asyncio: Race condition in signal handling on FreeBSD In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <1405613849.63.0.0136901015498.issue21645@psf.upfronthosting.co.za> STINNER Victor added the comment: > I don't know if it can be useful, but there is also the signal.pthread_sigmask() which can be used to "queue" pending signals. (...) Oh, I didn't remember that I opened the issue #12060 to discuss "real time signals". The summary is that the wakeup fd should be used... Which is nice because it is the choice made by asyncio ;-) FYI I also opened the issue #21998: "asyncio: a new self-pipe should be created in the child process after fork" which is somehow related to this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 18:24:01 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 17 Jul 2014 16:24:01 +0000 Subject: [issue14285] Traceback wrong on ImportError while executing a package In-Reply-To: <1331621436.28.0.000669565075438.issue14285@psf.upfronthosting.co.za> Message-ID: <1405614241.01.0.85624530879.issue14285@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 18:24:14 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Jul 2014 16:24:14 +0000 Subject: [issue21946] 'python -u' yields trailing carriage return '\r' (Python2 for Windows) In-Reply-To: <1404910318.13.0.0636532194943.issue21946@psf.upfronthosting.co.za> Message-ID: <1405614254.78.0.170178544605.issue21946@psf.upfronthosting.co.za> STINNER Victor added the comment: The bug is not on print, but raw_input(). In Python 3, I worked on the following issues to support fully binary standard streams: - #10841: "binary stdio" - #11272: "input() has trailing carriage return on windows", fixed in Python 3.2.1 - #11395: "print(s) fails on Windows with long strings", fixed in Python 3.2.1 - #13119: "Newline for print() is \n on Windows, and not \r\n as expected", will be fixed in Python 3.2.4 and 3.3 (not released yet) It looks like this issue is the same than #11272: input() removes '\n' but not '\r'. ---------- resolution: not a bug -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 18:26:26 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 17 Jul 2014 16:26:26 +0000 Subject: [issue21996] gettarinfo method does not handle files without text string names In-Reply-To: <1405583528.37.0.553699872308.issue21996@psf.upfronthosting.co.za> Message-ID: <1405614386.69.0.271043059241.issue21996@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +serhiy.storchaka versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 18:37:00 2014 From: report at bugs.python.org (Martin Morrison) Date: Thu, 17 Jul 2014 16:37:00 +0000 Subject: [issue21999] shlex: bug in posix more handling of empty strings Message-ID: <1405615020.91.0.261812812224.issue21999@psf.upfronthosting.co.za> New submission from Martin Morrison: Minimal testcase of the problem situation is tokenising (with posix mode on): ''), Specifically, an empty string, followed by a non-word character, followed by a non-space character. In this case, the token buffer is empty and due to a missing check for (self.posix and quoted), an extra token is consumed and returned in the wrong order: >>> s = shlex.shlex("'')abc", posix=True) >>> s.get_token() 'abc' >>> s.get_token() ')' >>> s.get_token() >>> I have patches to fix this issue in both default and 2.7. I've also checked there are no other occurrences of the same typo. ---------- files: shlex.default.patch keywords: patch messages: 223348 nosy: isoschiz priority: normal severity: normal status: open title: shlex: bug in posix more handling of empty strings versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file35983/shlex.default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 18:37:09 2014 From: report at bugs.python.org (Martin Morrison) Date: Thu, 17 Jul 2014 16:37:09 +0000 Subject: [issue21999] shlex: bug in posix more handling of empty strings In-Reply-To: <1405615020.91.0.261812812224.issue21999@psf.upfronthosting.co.za> Message-ID: <1405615029.08.0.677236847451.issue21999@psf.upfronthosting.co.za> Changes by Martin Morrison : Added file: http://bugs.python.org/file35984/shlex.2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 19:13:08 2014 From: report at bugs.python.org (Orion Poplawski) Date: Thu, 17 Jul 2014 17:13:08 +0000 Subject: [issue21247] test_asyncio: test_subprocess_send_signal hangs on Fedora builders In-Reply-To: <1397597632.61.0.772376521638.issue21247@psf.upfronthosting.co.za> Message-ID: <1405617188.03.0.184142955969.issue21247@psf.upfronthosting.co.za> Orion Poplawski added the comment: That appears to work. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 19:43:34 2014 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 17 Jul 2014 17:43:34 +0000 Subject: [issue21645] asyncio: Race condition in signal handling on FreeBSD In-Reply-To: <1405613849.63.0.0136901015498.issue21645@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: The more esoteric system calls you use the more you end up debugging it on esoteric platforms. :-( On Thu, Jul 17, 2014 at 9:17 AM, STINNER Victor wrote: > > STINNER Victor added the comment: > > > I don't know if it can be useful, but there is also the > signal.pthread_sigmask() which can be used to "queue" pending signals. (...) > > Oh, I didn't remember that I opened the issue #12060 to discuss "real time > signals". The summary is that the wakeup fd should be used... Which is nice > because it is the choice made by asyncio ;-) > > FYI I also opened the issue #21998: "asyncio: a new self-pipe should be > created in the child process after fork" which is somehow related to this > issue. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 20:05:58 2014 From: report at bugs.python.org (Ingolf Becker) Date: Thu, 17 Jul 2014 18:05:58 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <1405620357.99.0.665275160141.issue21907@psf.upfronthosting.co.za> Ingolf Becker added the comment: A couple of issues: PCbuild/build_pgo.bat: - there a quite a few incorrect "" which break the call to rmpyc.py - some paths were not cwd-agnostic - all paths should now be whitespace aware - The PGI python.exe requires the pgodb100.dll to be in the PATH when executed. vcvarsall.bat sets the path correctly. PCbuild/build_pgo.bat: - incorrect parameter for vcvarsall.bat for x64: x86_amd64 == x86!! With these changes build_pgo.bat works. ---------- nosy: +ibecker Added file: http://bugs.python.org/file35985/fix_pgo_vcvarsall.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 20:09:14 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 17 Jul 2014 18:09:14 +0000 Subject: [issue21935] Implement AUTH command in smtpd. In-Reply-To: <1404766823.82.0.391401675174.issue21935@psf.upfronthosting.co.za> Message-ID: <1405620554.41.0.735109585572.issue21935@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Milan: Your interpretation of the MUST requirement is correct. However, we still cannot support the SHOULD NOT requirement: A server operator SHOULD NOT accept unencrypted passwords. RFC 2119 explains This phrase, or the phrase "NOT RECOMMENDED" mean that there may exist valid reasons in particular circumstances when the particular behavior is acceptable or even useful, but the full implications should be understood and the case carefully weighed before implementing any behavior described with this label. I cannot see any particular circumstances where unencrypted passwords for smtpd would be acceptable, given that there are perfectly established technologies. So I remain -1 on this patch. A (not recommended) STARTTLS alternative is SMTPS (port 465). I would be -0 if there was an SMTPS implementation in smtpd, and the documentation would discuss that AUTH is best used with SMTPS until STARTTLS is implemented. I don't understand why STARTTLS would require asyncio. Wouldn't wrap_socket solve the problem? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 20:38:32 2014 From: report at bugs.python.org (Jim Jewett) Date: Thu, 17 Jul 2014 18:38:32 +0000 Subject: [issue22000] cross type comparisons clarification Message-ID: <1405622312.02.0.49093151571.issue22000@psf.upfronthosting.co.za> New submission from Jim Jewett: https://docs.python.org/3.5/library/stdtypes.html says "Objects of different types, except different numeric types, never compare equal." Despite the location, this seems to strong a statement, because of subclasses and classes which define __eq__. A first attempt at rewording: Existing: """ Objects of different types, except different numeric types, never compare equal. Furthermore, some types (for example, function objects) support only a degenerate notion of comparison where any two objects of that type are unequal. The <, <=, > and >= operators will raise a TypeError exception when comparing a complex number with another built-in numeric type, when the objects are of different types that cannot be compared, or in other cases where there is no defined ordering. Non-identical instances of a class normally compare as non-equal unless the class defines the __eq__() method. Instances of a class cannot be ordered with respect to other instances of the same class, or other types of object, unless the class defines enough of the methods __lt__(), __le__(), __gt__(), and __ge__() (in general, __lt__() and __eq__() are sufficient, if you want the conventional meanings of the comparison operators). The behavior of the is and is not operators cannot be customized; also they can be applied to any two objects and never raise an exception. Two more operations with the same syntactic priority, in and not in, are supported only by sequence types (below). """ --> """ The is and is not operators can be applied to any pair of objects, and will never raise an exception. They cannot be customized, as they refer to implementation details. (For example, "abc" is "abc" may or may not be true.) Other comparisons refer to an object's meaning, and therefore must be defined by the object's own class. "abc" == "abc" is always True, because the str class defines equality that way. The default implementation uses is (object identity) for equality and raises a TypeError for the ordering comparisons. Defining the __eq__ method allows different instances to be equivalent; also defining the __lt__ method allows them to be ordered in the normal way. Some classes will also define __le__, __ne__, __ge__, and __gt__, either for efficiency or to provide unusual behavior. Except for numbers, instances of two different standard classes will be unequal, and will raise a TypeError when compared for ordering. Two more operations with the same syntactic priority, in and not in, are supported only by sequence types (below). """ ---------- assignee: docs at python components: Documentation messages: 223353 nosy: Jim.Jewett, docs at python priority: normal severity: normal status: open title: cross type comparisons clarification type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 20:55:32 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Jul 2014 18:55:32 +0000 Subject: [issue21935] Implement AUTH command in smtpd. In-Reply-To: <1404766823.82.0.391401675174.issue21935@psf.upfronthosting.co.za> Message-ID: <1405623332.85.0.392664935801.issue21935@psf.upfronthosting.co.za> R. David Murray added the comment: I haven't looked at the problem myself. Someone (Giampaolo?) told me that wrap_socket wouldn't work because of the fact that smtpd uses asynchat. As for the 'particular circumstances' clause, I would suggest that one of the primary use cases for smtpd is in testing infrastructure (and that is in fact the motivation for this issue, for stdlib testing), and in that situation unencrypted passwords would not be an issue. However, if wrap_socket/SMTPDS would work, it would make the feature useful beyond the testing arena. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 21:06:38 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 17 Jul 2014 19:06:38 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <1405623998.16.0.773569442609.issue21907@psf.upfronthosting.co.za> Zachary Ware added the comment: As you can probably tell, I wasn't on a machine where I could test build_pgo.bat before I committed changes to it (oops). It looks like your patch is reversed, would you mind fixing it? I can tell you it will need to change, though; build.bat needs to use 'x86_amd64' for the argument to vcvarsall.bat for building 64-bit to support cross-compiling on 32-bit Windows. It may work out easiest for build_pgo.bat to just not use build.bat. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 21:06:45 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Jul 2014 19:06:45 +0000 Subject: [issue21950] import sqlite3 not running after configure --prefix=/alt/path; make; make install In-Reply-To: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> Message-ID: <1405624005.11.0.0414683065588.issue21950@psf.upfronthosting.co.za> R. David Murray added the comment: If the headers are missing, you will get a complaint at the end of the make process that it couldn't build the _sqlite module. It should also have tried to import the sqlite3 module and complained if there was an error. So, pre-install, everything looked fine to the build process. Can you attach your 'make install' log? (Berker: a key difference in your test is that OP specified an alternate --prefix) ---------- nosy: +r.david.murray resolution: works for me -> status: closed -> open title: import sqlite3 not running -> import sqlite3 not running after configure --prefix=/alt/path; make; make install _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 21:18:16 2014 From: report at bugs.python.org (Ned Deily) Date: Thu, 17 Jul 2014 19:18:16 +0000 Subject: [issue18320] python installation is broken if prefix is overridden on an install target In-Reply-To: <1372404539.33.0.335439360663.issue18320@psf.upfronthosting.co.za> Message-ID: <1405624696.26.0.705046468495.issue18320@psf.upfronthosting.co.za> Ned Deily added the comment: "Also, how many variables would you want to protect from being changed? People may come up with ideas of changing arbitrary other Makefile variables, and guarding all of them is just not feasible." I certainly wasn't contemplating guarding *all* of them. I'm concerned about those that are documented and conventionally used in standard Makefiles, e.g. https://www.gnu.org/software/make/manual/make.html#Directory-Variables. Of those, the only ones that appear to be overridable in the Python top-level Makefile are "prefix", "exec_prefix", and "datarootdir" (the latter does not seem to be used directly in the top-level Makefile but is used in ctypes libffi Makefile). And "prefix" is the one that causes the problems. If you really think someone is currently using this productively somehow, even with producing a broken Python, we could just issue a warning. I just think we should not allow people to shoot themselves in the foot so easily without warning: when I do "make install", I expect everything to be installed under prefix, not partially under another prefix, and I expect subsequent installations using Distutils to work properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 21:23:21 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 19:23:21 +0000 Subject: [issue17113] argparse.RawDescriptionHelpFormatter should not delete blank lines In-Reply-To: <1359899140.94.0.20575006786.issue17113@psf.upfronthosting.co.za> Message-ID: <1405625001.67.0.218586867552.issue17113@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we have this followed up please. ---------- nosy: +BreamoreBoy, paul.j3 versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 21:24:53 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 19:24:53 +0000 Subject: [issue13819] _warnings settings are process-wide In-Reply-To: <1326919817.29.0.252163037725.issue13819@psf.upfronthosting.co.za> Message-ID: <1405625093.95.0.866320633351.issue13819@psf.upfronthosting.co.za> Mark Lawrence added the comment: Just a gentle reminder. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 21:29:34 2014 From: report at bugs.python.org (Roy Hyunjin Han) Date: Thu, 17 Jul 2014 19:29:34 +0000 Subject: [issue1598] unexpected response in imaplib In-Reply-To: <1197427257.83.0.419655228027.issue1598@psf.upfronthosting.co.za> Message-ID: <1405625374.38.0.84944849651.issue1598@psf.upfronthosting.co.za> Roy Hyunjin Han added the comment: Is imaplib choking on the IBM-specific X-MIMETrack header? Is Lotus Notes properly formatting the multi-line headers? Can RFC822 headers contain the PIPE | symbol? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 21:37:28 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 19:37:28 +0000 Subject: [issue15485] CROSS: append gcc library search paths In-Reply-To: <1343555717.99.0.825702829621.issue15485@psf.upfronthosting.co.za> Message-ID: <1405625848.79.0.395041210874.issue15485@psf.upfronthosting.co.za> Mark Lawrence added the comment: My reading of msg166737 is that the type should be behaviour. The patch is only five lines of actual code so can we have a review please. ---------- nosy: +BreamoreBoy type: -> behavior versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 21:39:21 2014 From: report at bugs.python.org (Jim Jewett) Date: Thu, 17 Jul 2014 19:39:21 +0000 Subject: [issue22001] containers "same" does not always mean "__eq__". Message-ID: <1405625961.78.0.30088981548.issue22001@psf.upfronthosting.co.za> New submission from Jim Jewett: https://docs.python.org/3.5/reference/expressions.html#not-in Containers are permitted to (and generally do) read "same as" as "is or __eq__), which can be confusing -- particularly in the section defining __eq__. Several suggested changes: """ The values float('NaN') and Decimal('NaN') are special. The are identical to themselves, x is x but are not equal to themselves, x != x. Additionally, comparing any value to a not-a-number value will return False. For example, both 3 < float('NaN') and float('NaN') < 3 will return False. """ --> ("the" -> "they"; add a comma; add a final sentence) --> """ The values float('NaN') and Decimal('NaN') are special. They are identical to themselves, x is x, but are not equal to themselves, x != x. Additionally, comparing any value to a not-a-number value will return False. For example, both 3 < float('NaN') and float('NaN') < 3 will return False. Note, however, that containers will normally implement item equality as "a is b or a==b", so that [f]==[f] and f in [f] may be true even when f!=f. """ also: """ Tuples and lists are compared lexicographically using comparison of corresponding elements. This means that to compare equal, each element must compare equal and the two sequences must be of the same type and have the same length. """ --> (re-order; add the NaN workaround) --> """ Tuples and lists are compared lexicographically using comparison of corresponding elements. This means that to compare equal, two sequences must be of the same type and have the same length, and each pair of corresponding elements must be identical or compare equal. (Sequences can assume that identical elements are equal, despite odd cases like float('NaN').) """ I *think* it is OK to leave that caveat out of the mapping case, because "have the same (key, value) pairs" would now refer to the above. ---------- assignee: docs at python components: Documentation messages: 223362 nosy: Jim.Jewett, docs at python priority: normal severity: normal status: open title: containers "same" does not always mean "__eq__". type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 21:47:37 2014 From: report at bugs.python.org (Ingolf Becker) Date: Thu, 17 Jul 2014 19:47:37 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <1405626457.86.0.208250750034.issue21907@psf.upfronthosting.co.za> Ingolf Becker added the comment: This should now be the correct way. I did not need to touch build.bat indeed. I got confused by all the different combinations! I have removed the calls from build_pgo.bat to build.bat and changed the it to a native x64 build - the PGO requires the code to be run natively, so cross compiling makes no sense. There was also one \ too many in the pginstrument.props file, which caused a path to end on a \\, which broke the build process. ---------- Added file: http://bugs.python.org/file35986/fix_pgo_vcvarsall_rightway.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 21:48:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 19:48:27 +0000 Subject: [issue17127] multiprocessing.dummy.Pool does not accept maxtasksperchild argument In-Reply-To: <1360002513.52.0.4376358205.issue17127@psf.upfronthosting.co.za> Message-ID: <1405626507.0.0.359551962472.issue17127@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've confirmed that the behaviour is identical in 3.4.1 on Windows. ---------- nosy: +BreamoreBoy, jnoller, sbt versions: +Python 3.4, Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 21:56:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 19:56:27 +0000 Subject: [issue17131] subprocess.Popen.terminate can raise exception on Posix In-Reply-To: <1360058099.4.0.320628892834.issue17131@psf.upfronthosting.co.za> Message-ID: <1405626987.8.0.349998874384.issue17131@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Siona sorry about the delay in getting back to you. Can someone try this please as I've only got Windows. ---------- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 2.6, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 22:09:20 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 17 Jul 2014 20:09:20 +0000 Subject: [issue22002] Make full use of test discovery in test subpackages Message-ID: <1405627760.3.0.397447180395.issue22002@psf.upfronthosting.co.za> New submission from Zachary Ware: Here's a patch against 3.4 implementing Serhiy's suggestion in msg223277 and taking it a step further, actually using test discovery in all of the test.test_* subpackages. To reduce duplication, the patch adds a 'load_package_tests' function to test.support, which is then used in each of the subpackages' load_tests function. test_json and test_tools should have no visible changes from this patch. test_asyncio and test_email do have slight differences, but only in verbosity level: pre-patch, `python -m test.test_(asyncio|email)` runs at verbosity=2 (support.run_unittest default); with patch, they run at verbosity=1 (unittest default). test_asyncio also reports one more skipped test on Windows, due to a module that raises SkipTest on import. @Brett: test_importlib sees the most changes, and I'd like to be sure that things are as you expect them to be. It looks like all of the test_suite() stuff is unused leftovers from when "test_importlib" was "importlib.test" and that test_importlib has actually been relying on unittest discovery (but bypassing load_tests and thereby not working with `python -m unittest test.test_importlib`), but I'd like confirmation on that. A nice bonus with this patch is that (for example) `python -m test.test_importlib.source` works, testing just the named test_importlib subpackage. ---------- components: Tests files: package_discovery.diff keywords: patch messages: 223366 nosy: berker.peksag, brett.cannon, ezio.melotti, serhiy.storchaka, zach.ware priority: normal severity: normal stage: patch review status: open title: Make full use of test discovery in test subpackages type: enhancement versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file35987/package_discovery.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 22:16:04 2014 From: report at bugs.python.org (Ned Deily) Date: Thu, 17 Jul 2014 20:16:04 +0000 Subject: [issue17131] subprocess.Popen.terminate can raise exception on Posix In-Reply-To: <1360058099.4.0.320628892834.issue17131@psf.upfronthosting.co.za> Message-ID: <1405628164.95.0.265823022442.issue17131@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 22:20:59 2014 From: report at bugs.python.org (=?utf-8?q?Uwe_Kleine-K=C3=B6nig?=) Date: Thu, 17 Jul 2014 20:20:59 +0000 Subject: [issue12970] os.walk() consider some symlinks as dirs instead of non-dirs In-Reply-To: <1315918932.02.0.810529185276.issue12970@psf.upfronthosting.co.za> Message-ID: <1405628459.1.0.827845109344.issue12970@psf.upfronthosting.co.za> Uwe Kleine-K?nig added the comment: I like the function as it is documented, i.e. "filenames is a list of the names of the non-directory files in dirpath.". This includes all symlinks (in the followlinks=False cast at least). I'd say not including symlinks to directories but symlinks to files is a magnitude more surprising than treating a symlink to a directory as a file. And if you consider this as a short comming of the documentation this isn't (IMHO) a subtlety. The (my?) intuition says: all entries of a root (apart from . and .. as documented) are included in either dirnames or filenames. Yes, changing behaviour here might break some code, but this applies to all changes. For some usecases it might be right to just skip over symlinks-to-dirs, but if it's not you have to opendir + read all root entries again in the loop to find all symlinks which effectively means reimplementing os.walk. ---------- nosy: +ukl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 22:32:10 2014 From: report at bugs.python.org (Francis MB) Date: Thu, 17 Jul 2014 20:32:10 +0000 Subject: [issue2091] file accepts 'rU+' as a mode In-Reply-To: <1202856909.89.0.801927341292.issue2091@psf.upfronthosting.co.za> Message-ID: <1405629130.96.0.714123639494.issue2091@psf.upfronthosting.co.za> Francis MB added the comment: > On the other hand, the documentation *does* mention that > 'U' is for backwards compatibility and shouldn't be used > with new code. Shouldn't be some deprecation warning somewhere? ---------- nosy: +francismb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 22:49:24 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Jul 2014 20:49:24 +0000 Subject: [issue21645] asyncio: Race condition in signal handling on FreeBSD In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <3hDndH3Fq6z7Lkv@mail.python.org> Roundup Robot added the comment: New changeset c4f053f1b47f by Victor Stinner in branch '3.4': Python issue #21645, Tulip issue 192: Rewrite signal handling http://hg.python.org/cpython/rev/c4f053f1b47f New changeset 2176496951a4 by Victor Stinner in branch 'default': (Merge 3.4) Python issue #21645, Tulip issue 192: Rewrite signal handling http://hg.python.org/cpython/rev/2176496951a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 22:52:52 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Jul 2014 20:52:52 +0000 Subject: [issue21959] msi product code for 2.7.8150 not in Tools/msi/uuids.py In-Reply-To: <1405103126.17.0.536868582268.issue21959@psf.upfronthosting.co.za> Message-ID: <1405630372.77.0.445427367327.issue21959@psf.upfronthosting.co.za> R. David Murray added the comment: It looks like this issue can be closed? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 22:55:43 2014 From: report at bugs.python.org (paul j3) Date: Thu, 17 Jul 2014 20:55:43 +0000 Subject: [issue17113] argparse.RawDescriptionHelpFormatter should not delete blank lines In-Reply-To: <1359899140.94.0.20575006786.issue17113@psf.upfronthosting.co.za> Message-ID: <1405630543.64.0.233950300844.issue17113@psf.upfronthosting.co.za> paul j3 added the comment: I suspect fixing this isn't going to be easy. Extra lines are removed by the top most `formatter` function: def format_help(self): help = self._root_section.format_help() if help: help = self._long_break_matcher.sub('\n\n', help) help = help.strip('\n') + '\n' return help RawDescriptionHelpFormatter on the other hand just changes one deeply embedded function: def _fill_text(self, text, width, indent): return ''.join(indent + line for line in text.splitlines(keepends=True)) That `format_help` function has no way of distinguishing between '\n' that were part of the raw text, and which were added while assembling the various parts. It could be instructive to try this version of format_help and see just how many \n are being removed: def format_help(self): help = self._root_section.format_help() return help ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 23:01:43 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Jul 2014 21:01:43 +0000 Subject: [issue21645] asyncio: Race condition in signal handling on FreeBSD In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <1405630903.11.0.234677736118.issue21645@psf.upfronthosting.co.za> STINNER Victor added the comment: I commited the patch into Tulip (c149370c8027), Python 3.4 (c4f053f1b47f), Python 3.5 (2176496951a4). I'm now waiting for the buildbot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 23:03:22 2014 From: report at bugs.python.org (Steve Dower) Date: Thu, 17 Jul 2014 21:03:22 +0000 Subject: [issue21959] msi product code for 2.7.8150 not in Tools/msi/uuids.py In-Reply-To: <1405103126.17.0.536868582268.issue21959@psf.upfronthosting.co.za> Message-ID: <1405631002.27.0.576979217534.issue21959@psf.upfronthosting.co.za> Steve Dower added the comment: Yes. I don't have permission to close issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 23:05:47 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Jul 2014 21:05:47 +0000 Subject: [issue21959] msi product code for 2.7.8150 not in Tools/msi/uuids.py In-Reply-To: <1405103126.17.0.536868582268.issue21959@psf.upfronthosting.co.za> Message-ID: <1405631147.49.0.483231682027.issue21959@psf.upfronthosting.co.za> R. David Murray added the comment: Well, that's a bit of an oversight :) Now you do. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 23:08:07 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 21:08:07 +0000 Subject: [issue17182] signal.default_int_handler should set signal number on the raised exception In-Reply-To: <1360591190.95.0.210480467275.issue17182@psf.upfronthosting.co.za> Message-ID: <1405631287.39.0.426565697735.issue17182@psf.upfronthosting.co.za> Mark Lawrence added the comment: Just a gentle reminder. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 23:48:47 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 21:48:47 +0000 Subject: [issue17148] mingw: nt thread model detection In-Reply-To: <1360190170.63.0.398498965196.issue17148@psf.upfronthosting.co.za> Message-ID: <1405633727.43.0.809958854365.issue17148@psf.upfronthosting.co.za> Mark Lawrence added the comment: Guys I asked on IRC and was advised to add you to the nosy list to see if you can help out on this. Please be aware that there are plenty more where this came from. ---------- nosy: +BreamoreBoy, loewis, steve.dower, tim.golden, zach.ware versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 23:51:17 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Jul 2014 21:51:17 +0000 Subject: [issue21247] test_asyncio: test_subprocess_send_signal hangs on Fedora builders In-Reply-To: <1397597632.61.0.772376521638.issue21247@psf.upfronthosting.co.za> Message-ID: <3hDq0h64rZz7Ljc@mail.python.org> Roundup Robot added the comment: New changeset 651475d67225 by Victor Stinner in branch '3.4': Issue #21247: Fix a race condition in test_send_signal() of asyncio http://hg.python.org/cpython/rev/651475d67225 New changeset 45e8eb53edbc by Victor Stinner in branch 'default': (Merge 3.4) Issue #21247: Fix a race condition in test_send_signal() of asyncio http://hg.python.org/cpython/rev/45e8eb53edbc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 23:51:47 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Jul 2014 21:51:47 +0000 Subject: [issue21247] test_asyncio: test_subprocess_send_signal hangs on Fedora builders In-Reply-To: <1397597632.61.0.772376521638.issue21247@psf.upfronthosting.co.za> Message-ID: <1405633907.57.0.600306105419.issue21247@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 17 23:52:04 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Jul 2014 21:52:04 +0000 Subject: [issue21247] test_asyncio: test_subprocess_send_signal hangs on Fedora builders In-Reply-To: <1397597632.61.0.772376521638.issue21247@psf.upfronthosting.co.za> Message-ID: <1405633924.33.0.360471861989.issue21247@psf.upfronthosting.co.za> STINNER Victor added the comment: > That appears to work. Thanks! Cool, I commited my enhancement of the unit test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 00:17:36 2014 From: report at bugs.python.org (Lita Cho) Date: Thu, 17 Jul 2014 22:17:36 +0000 Subject: [issue1598] unexpected response in imaplib In-Reply-To: <1197427257.83.0.419655228027.issue1598@psf.upfronthosting.co.za> Message-ID: <1405635456.02.0.318851419545.issue1598@psf.upfronthosting.co.za> Lita Cho added the comment: I spent the last 2 hours trying to setup a Lotus Server, which is ending up to be a lot more work then I thought in order to test this bug. Is there anyway I can get a test Lotus account on a Lotus Server to test this bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 00:20:00 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 22:20:00 +0000 Subject: [issue17185] unittest mock create_autospec doesn't correctly replace mocksignature In-Reply-To: <1360621900.03.0.519438692167.issue17185@psf.upfronthosting.co.za> Message-ID: <1405635600.72.0.827355402664.issue17185@psf.upfronthosting.co.za> Mark Lawrence added the comment: Just curiosity why such a name change? ---------- components: +Tests nosy: +BreamoreBoy title: create_autospec -> unittest mock create_autospec doesn't correctly replace mocksignature type: -> behavior versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 00:22:03 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 22:22:03 +0000 Subject: [issue17210] documentation of PyUnicode_Format() states wrong argument type requirements In-Reply-To: <1360934426.3.0.547345278452.issue17210@psf.upfronthosting.co.za> Message-ID: <1405635723.55.0.40103890791.issue17210@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Stefan could you provide a patch for this? ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 2.6, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 00:25:12 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 22:25:12 +0000 Subject: [issue17274] distutils silently omits relative symlinks In-Reply-To: <1361525653.88.0.944877368203.issue17274@psf.upfronthosting.co.za> Message-ID: <1405635912.21.0.101651575212.issue17274@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Florian can you provide a patch for this? ---------- nosy: +BreamoreBoy type: -> behavior versions: +Python 2.7, Python 3.4, Python 3.5 -Python 2.6, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 00:25:38 2014 From: report at bugs.python.org (David Wilson) Date: Thu, 17 Jul 2014 22:25:38 +0000 Subject: [issue22003] BytesIO copy-on-write Message-ID: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za> New submission from David Wilson: This is a followup to the thread at https://mail.python.org/pipermail/python-dev/2014-July/135543.html , discussing the existing behaviour of BytesIO copying its source object, and how this regresses compared to cStringIO.StringI. The goal of posting the patch on list was to try and stimulate discussion around the approach. The patch itself obviously isn't ready for review, and I'm not in a position to dedicate time to it just now (although in a few weeks I'd love to give it full attention!). Ignoring this quick implementation, are there any general comments around the approach? My only concern is that it might keep large objects alive in a non-intuitive way in certain circumstances, though I can't think of any obvious ones immediately. Also interested in comments on the second half of that thread: "a natural extension of this is to do something very similar on the write side: instead of generating a temporary private heap allocation, generate (and freely resize) a private PyBytes object until it is exposed to the user, at which point, _getvalue() returns it, and converts its into an IO_SHARED buffer." There are quite a few interactions with making that work correctly, in particular: * How BytesIO would implement the buffers interface without causing the under-construction Bytes to become readonly * Avoiding redundant copies and resizes -- we can't simply tack 25% slack on the end of the Bytes and then truncate it during getvalue() without likely triggering a copy and move, however with careful measurement of allocator behavior there are various tradeoffs that could be made - e.g. obmalloc won't move a <500 byte allocation if it shrinks by <25%. glibc malloc's rules are a bit more complex though. Could also add a private _PyBytes_SetSize() API to allow truncation to the final size during getvalue() without informing the allocator. Then we'd simply overallocate by up to 10% or 1-2kb, and write off the loss of the slack space. Notably, this approach completely differs from the one documented in http://bugs.python.org/issue15381 .. it's not clear to me which is better. ---------- components: Library (Lib) files: cow.patch keywords: patch messages: 223383 nosy: dw priority: normal severity: normal status: open title: BytesIO copy-on-write type: performance versions: Python 3.5 Added file: http://bugs.python.org/file35988/cow.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 00:27:29 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 22:27:29 +0000 Subject: [issue17286] Make subprocess handling text output with universal_newlines more obious In-Reply-To: <1361708455.88.0.426093416103.issue17286@psf.upfronthosting.co.za> Message-ID: <1405636049.34.0.301492774278.issue17286@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Baptiste can you provide a patch for this? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 00:30:55 2014 From: report at bugs.python.org (David Wilson) Date: Thu, 17 Jul 2014 22:30:55 +0000 Subject: [issue22003] BytesIO copy-on-write In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za> Message-ID: <1405636255.66.0.986066568193.issue22003@psf.upfronthosting.co.za> David Wilson added the comment: Submitted contributor agreement. Please consider the demo patch licensed under the Apache 2 licence. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 00:36:49 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 17 Jul 2014 22:36:49 +0000 Subject: [issue22003] BytesIO copy-on-write In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za> Message-ID: <1405636609.44.0.947820756324.issue22003@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson, hynek, pitrou, stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 00:46:37 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 17 Jul 2014 22:46:37 +0000 Subject: [issue22003] BytesIO copy-on-write In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za> Message-ID: <1405637197.66.0.842975366189.issue22003@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Be careful what happens when the original object is mutable: >>> b = bytearray(b"abc") >>> bio = io.BytesIO(b) >>> b[:] = b"defghi" >>> bio.getvalue() b'abc' I don't know what your patch does in this case. ---------- nosy: +serhiy.storchaka stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 00:50:59 2014 From: report at bugs.python.org (cosmicduck) Date: Thu, 17 Jul 2014 22:50:59 +0000 Subject: [issue18320] python installation is broken if prefix is overridden on an install target In-Reply-To: <1372404539.33.0.335439360663.issue18320@psf.upfronthosting.co.za> Message-ID: <1405637459.43.0.893529013054.issue18320@psf.upfronthosting.co.za> cosmicduck added the comment: Hi, this is a problem for all users which have to want to use python on there own home directory. I wonder me, how did some other projects could install python to different directories e.g. OpenCSW it did on /opt/csw/... My most problem is, that I can do many but without root access, which is denied. In this case a installation/build to a different path is very helpfull. The situation was, that python and there most modules are working well also post installed ones. Only the problem with the shebang to the scripts was the major problems which I've fixed by a line change on all scripts. But to build python on a different root path e.g. my home folder, this should be changed simply by make itself and not by hand as I did it. I'm unsure that other problems with my steps exists, but only the shebang problem is found by me. This problem could also exists on later releases than 3.3. So for me it's ok to close this issue for 3.3. But for later releases, e.g. 3.4 it should checked and fixed, please. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 00:53:23 2014 From: report at bugs.python.org (paul j3) Date: Thu, 17 Jul 2014 22:53:23 +0000 Subject: [issue17113] argparse.RawDescriptionHelpFormatter should not delete blank lines In-Reply-To: <1359899140.94.0.20575006786.issue17113@psf.upfronthosting.co.za> Message-ID: <1405637603.91.0.455373003608.issue17113@psf.upfronthosting.co.za> paul j3 added the comment: A user could preserve blank lines by including a space (or more) in each. That is, instead of ending with '\n', end with '\n \n'. epilog = 'Epilog: No wrap text %(prog)s\n\tNext line\n \n' --------------- I just checked a simple help. The description and epilog get an extra blank line during assembly. If 'epilog=None', there are 2 blank lines, which normally get reduced to one \n. So the philosophy of the formatter is to freely add \n between sections, regardless of whether they are empty (None) or not, and then deal with excess \n at the end. Preserving blank lines during Raw requires rethinking that underlying philosophy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 00:56:41 2014 From: report at bugs.python.org (Ned Deily) Date: Thu, 17 Jul 2014 22:56:41 +0000 Subject: [issue18320] python installation is broken if prefix is overridden on an install target In-Reply-To: <1372404539.33.0.335439360663.issue18320@psf.upfronthosting.co.za> Message-ID: <1405637801.26.0.63590681592.issue18320@psf.upfronthosting.co.za> Ned Deily added the comment: cosmicduck, the recommended and supported way to do this is by specifying the installation prefix at the configure step, not at the "make install" step: ./configure --prefix=${HOME}/scripts/tools/python/python-3.3.2 make make install If done this way, the installed scripts will have the correct shebang lines and Distutils will install properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 01:38:54 2014 From: report at bugs.python.org (Thomas Kluyver) Date: Thu, 17 Jul 2014 23:38:54 +0000 Subject: [issue18395] Make _Py_char2wchar() and _Py_wchar2char() public In-Reply-To: <1373205636.55.0.562779126658.issue18395@psf.upfronthosting.co.za> Message-ID: <1405640334.16.0.344418122907.issue18395@psf.upfronthosting.co.za> Changes by Thomas Kluyver : ---------- nosy: +takluyver _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 01:46:45 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 23:46:45 +0000 Subject: [issue17293] uuid.getnode() MAC address on AIX In-Reply-To: <1361777348.15.0.791534887595.issue17293@psf.upfronthosting.co.za> Message-ID: <1405640805.78.0.518865987105.issue17293@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Aivars sorry about the delay in getting back to you. ---------- nosy: +BreamoreBoy, David.Edelsohn type: -> behavior versions: +Python 3.4, Python 3.5 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 01:52:44 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 23:52:44 +0000 Subject: [issue17308] Dialog.py crashes when putty Window resized In-Reply-To: <1361976724.1.0.943033425333.issue17308@psf.upfronthosting.co.za> Message-ID: <1405641164.59.0.30232512047.issue17308@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm sorry but this site is for reporting bugs on Python itself, not on third party packages. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 01:56:49 2014 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 17 Jul 2014 23:56:49 +0000 Subject: [issue17362] enable-new-dtags only for GNU ELF linker In-Reply-To: <1362522162.88.0.5476696865.issue17362@psf.upfronthosting.co.za> Message-ID: <1405641409.48.0.244541667137.issue17362@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can someone comment on this please as I haven't got a clue, sorry :( ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 02:12:09 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 18 Jul 2014 00:12:09 +0000 Subject: [issue18395] Make _Py_char2wchar() and _Py_wchar2char() public In-Reply-To: <1373205636.55.0.562779126658.issue18395@psf.upfronthosting.co.za> Message-ID: <1405642329.61.0.408419922016.issue18395@psf.upfronthosting.co.za> Josh Rosenberg added the comment: How often do people need to convert to do platform independent locale encoding before Python is initialized? Encouraging use of platform dependent wchar_t's seems like a bad idea when PyUnicode abstracts away the difference ever since 3.3 released. ---------- nosy: +josh.rosenberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 02:19:00 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 18 Jul 2014 00:19:00 +0000 Subject: [issue17127] multiprocessing.dummy.Pool does not accept maxtasksperchild argument In-Reply-To: <1360002513.52.0.4376358205.issue17127@psf.upfronthosting.co.za> Message-ID: <1405642740.05.0.614603012112.issue17127@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Note: To my knowledge there is little or no benefit to using maxtasksperchild when the implementation is using threads. Cleaning up worker processes intermittently will guarantee that memory, handles, etc., are returned to the OS. But memory and handles allocated in a thread are not freed when the thread exits (with the exception of explicitly thread local stuff, which isn't common); it's all using the same heap, and memory allocated by thread 1 is indistinguishable from memory allocated by thread 2. It's not a bad idea to keep the interface consistent, but I'm not sure it's a good idea to offer and implement a behavior that isn't actually accomplishing anything. Anyone else have any thoughts? ---------- nosy: +josh.rosenberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 02:22:25 2014 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 18 Jul 2014 00:22:25 +0000 Subject: [issue17127] multiprocessing.dummy.Pool does not accept maxtasksperchild argument In-Reply-To: <1360002513.52.0.4376358205.issue17127@psf.upfronthosting.co.za> Message-ID: <1405642945.61.0.19611440683.issue17127@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Actually, now that I think about, most thread local stuff wouldn't be freed automatically either, since it's still allocated from a common pool of memory, and interleaved allocations would still prevent memory blocks from being returned to the OS. As far as behavior goes, assuming you aren't explicitly checking thread IDs (which should be meaningless to worker threads anyway; the tasks are assigned arbitrarily), clearing out the thread local storage when a thread exits would be equivalent to ending one worker thread and starting a new one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 02:45:41 2014 From: report at bugs.python.org (Thomas Kluyver) Date: Fri, 18 Jul 2014 00:45:41 +0000 Subject: [issue18395] Make _Py_char2wchar() and _Py_wchar2char() public In-Reply-To: <1373205636.55.0.562779126658.issue18395@psf.upfronthosting.co.za> Message-ID: <1405644341.4.0.147092088505.issue18395@psf.upfronthosting.co.za> Thomas Kluyver added the comment: You seem to need wchar_t to call Py_Main and Py_SetProgramName. I think there's an example in the docs which is wrong, because it appears to pass a char* to Py_SetProgramName: https://docs.python.org/3.4/extending/embedding.html#very-high-level-embedding ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 03:39:51 2014 From: report at bugs.python.org (ppperry) Date: Fri, 18 Jul 2014 01:39:51 +0000 Subject: [issue21997] Pdb.set_trace debugging does not end correctly in IDLE In-Reply-To: <1405612331.63.0.402043795388.issue21997@psf.upfronthosting.co.za> Message-ID: <1405647591.0.0.279944697782.issue21997@psf.upfronthosting.co.za> Changes by ppperry : ---------- hgrepos: +264 nosy: +georg.brandl, terry.reedy -ppperry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 03:40:19 2014 From: report at bugs.python.org (ppperry) Date: Fri, 18 Jul 2014 01:40:19 +0000 Subject: [issue21997] Pdb.set_trace debugging does not end correctly in IDLE In-Reply-To: <1405612331.63.0.402043795388.issue21997@psf.upfronthosting.co.za> Message-ID: <1405647619.73.0.777333123836.issue21997@psf.upfronthosting.co.za> Changes by ppperry : ---------- hgrepos: -264 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 04:04:40 2014 From: report at bugs.python.org (Berker Peksag) Date: Fri, 18 Jul 2014 02:04:40 +0000 Subject: [issue17308] Dialog.py crashes when putty Window resized In-Reply-To: <1361976724.1.0.943033425333.issue17308@psf.upfronthosting.co.za> Message-ID: <1405649080.97.0.0326349448168.issue17308@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> third party stage: -> resolved status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 05:33:15 2014 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 18 Jul 2014 03:33:15 +0000 Subject: [issue22001] containers "same" does not always mean "__eq__". In-Reply-To: <1405625961.78.0.30088981548.issue22001@psf.upfronthosting.co.za> Message-ID: <20140718033203.GI9112@ando> Steven D'Aprano added the comment: On Thu, Jul 17, 2014 at 07:39:21PM +0000, Jim Jewett wrote: > Note, however, that containers will normally implement item equality > as "a is b or a==b" We can't say "will normally", since we don't know about the infinite number of possible container types that people might create. The most we can say is that *builtin* container types will [assuming that this is the intent] or that general containers *may*. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 08:25:17 2014 From: report at bugs.python.org (Andrew Barnert) Date: Fri, 18 Jul 2014 06:25:17 +0000 Subject: [issue22004] io documentation refers to newline as newlines Message-ID: <1405664717.39.0.472140939197.issue22004@psf.upfronthosting.co.za> New submission from Andrew Barnert: In at least one place in the io module documentation (io.IOBase.readline), and in the corresponding docstring, the newline parameter to open (and io.open, and io.Foo.__init__) is referred to as "newlines": > The line terminator is always b'\n' for binary files; for text files, > the newlines argument to open() can be used to select the line > terminator(s) recognized. (The newline parameter is closely related to the newlines attribute of the TextIOWrapper that gets created by the open call, but they're not the same thing, and I think were named differently intentionally.) ---------- assignee: docs at python components: Documentation messages: 223398 nosy: abarnert, docs at python priority: normal severity: normal status: open title: io documentation refers to newline as newlines type: behavior 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 Fri Jul 18 08:28:19 2014 From: report at bugs.python.org (Andrew Barnert) Date: Fri, 18 Jul 2014 06:28:19 +0000 Subject: [issue22004] io documentation refers to newline as newlines In-Reply-To: <1405664717.39.0.472140939197.issue22004@psf.upfronthosting.co.za> Message-ID: <1405664899.55.0.622933131228.issue22004@psf.upfronthosting.co.za> Andrew Barnert added the comment: Searching the source and the help page, it looks like the one example I gave is the only place it's wrong in each of the two, not one of multiple places. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 09:05:23 2014 From: report at bugs.python.org (Alejandro) Date: Fri, 18 Jul 2014 07:05:23 +0000 Subject: [issue21950] import sqlite3 not running after configure --prefix=/alt/path; make; make install In-Reply-To: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> Message-ID: <1405667123.08.0.474481809079.issue21950@psf.upfronthosting.co.za> Alejandro added the comment: Here you have make_install.log Thanks ---------- Added file: http://bugs.python.org/file35989/make_install.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 09:12:03 2014 From: report at bugs.python.org (David Wilson) Date: Fri, 18 Jul 2014 07:12:03 +0000 Subject: [issue22003] BytesIO copy-on-write In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za> Message-ID: <1405667523.88.0.300758634107.issue22003@psf.upfronthosting.co.za> David Wilson added the comment: Good catch :( There doesn't seem to be way a to ask for an immutable buffer, so perhaps it could just be a little more selective. I think the majority of use cases would still be covered if the sharing behaviour was restricted only to BytesType. In that case "Py_buffer initialdata" could become a PyObject*, saving a small amount of memory, and allowing reuse of the struct member if BytesIO was also modified to directly write into a private BytesObject ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 10:42:32 2014 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 18 Jul 2014 08:42:32 +0000 Subject: [issue22003] BytesIO copy-on-write In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za> Message-ID: <1405672952.58.0.29807572761.issue22003@psf.upfronthosting.co.za> Stefan Behnel added the comment: Even if there is no way to explicitly request a RO buffer, the Py_buffer struct that you get back actually tells you if it's read-only or not. Shouldn't that be enough to enable this optimisation? Whether or not implementors of the buffer protocol set this flag correctly is another question, but if not then they need fixing on their side anyway. (And in the vast majority of cases, the implementor will be either CPython or NumPy.) Also, generally speaking, I think such an optimisation would be nice, even if it only catches some common cases (and doesn't break the others :). It could still copy data if necessary, but try to avoid it if possible. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 10:43:44 2014 From: report at bugs.python.org (Phil Connell) Date: Fri, 18 Jul 2014 08:43:44 +0000 Subject: [issue21999] shlex: bug in posix more handling of empty strings In-Reply-To: <1405615020.91.0.261812812224.issue21999@psf.upfronthosting.co.za> Message-ID: <1405673024.26.0.726127470578.issue21999@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 11:04:06 2014 From: report at bugs.python.org (Drekin) Date: Fri, 18 Jul 2014 09:04:06 +0000 Subject: [issue1602] windows console doesn't print or input Unicode In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1405674246.97.0.970150633909.issue1602@psf.upfronthosting.co.za> Drekin added the comment: I have made some updates in the streams code. Better error handling (getting errno by GetLastError() and raising exception when zero bytes are written on non-zero input). This prevents the infinite loop in BufferedIOWriter.flush() when there is odd number of bytes (WriteConsoleW accepts UTF-16-LE so only even number of bytes is written). It also prevents the same infinite loop when the buffer is too big to write at once (see http://bugs.python.org/issue11395 ). The limit of 32767 bytes was added to raw write. ---------- Added file: http://bugs.python.org/file35990/win_unicode_console.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 11:14:01 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Jul 2014 09:14:01 +0000 Subject: [issue1602] windows console doesn't print or input Unicode In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1405674841.31.0.330963179964.issue1602@psf.upfronthosting.co.za> STINNER Victor added the comment: @Drekin: Please don't send ZIP files to the bug tracker. It would be much better to have a project on github, Mercurial or something else, to have the history of the source code. You may try tp list all people who contributed to this code. You may also create a project on pypi.python.org to share your code. This bug tracker is not the best place for that. When the code will be consider mature (well tested, widely used), we can try to integrate it into Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 12:16:47 2014 From: report at bugs.python.org (Michael Foord) Date: Fri, 18 Jul 2014 10:16:47 +0000 Subject: [issue17185] unittest mock create_autospec doesn't correctly replace mocksignature In-Reply-To: <1360621900.03.0.519438692167.issue17185@psf.upfronthosting.co.za> Message-ID: <1405678607.4.0.177822851822.issue17185@psf.upfronthosting.co.za> Michael Foord added the comment: It was a functionality change, not just a name change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 13:49:00 2014 From: report at bugs.python.org (Stefan Krah) Date: Fri, 18 Jul 2014 11:49:00 +0000 Subject: [issue7063] Memory errors in array.array In-Reply-To: <1254730349.27.0.71088310024.issue7063@psf.upfronthosting.co.za> Message-ID: <1405684140.16.0.181467369686.issue7063@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: -skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 13:51:56 2014 From: report at bugs.python.org (Stefan Krah) Date: Fri, 18 Jul 2014 11:51:56 +0000 Subject: [issue15994] memoryview to freed memory can cause segfault In-Reply-To: <1348173441.91.0.841080415833.issue15994@psf.upfronthosting.co.za> Message-ID: <1405684316.65.0.504475540121.issue15994@psf.upfronthosting.co.za> Stefan Krah added the comment: We deal with it when we have time. IMO there is little value in bumping up issues this way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 14:45:16 2014 From: report at bugs.python.org (Brett Cannon) Date: Fri, 18 Jul 2014 12:45:16 +0000 Subject: [issue22002] Make full use of test discovery in test subpackages In-Reply-To: <1405627760.3.0.397447180395.issue22002@psf.upfronthosting.co.za> Message-ID: <1405687516.24.0.673194684024.issue22002@psf.upfronthosting.co.za> Brett Cannon added the comment: I can confirm everything you said is accurate, Zachary. And I very much look forward to the results of the patch. =) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 14:49:52 2014 From: report at bugs.python.org (Edward Oubrayrie) Date: Fri, 18 Jul 2014 12:49:52 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle Message-ID: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> New submission from Edward Oubrayrie: pickle.loads raises a TypeError when calling the datetime constructor, (then a UnicodeEncodeError in the load_reduce function). A short test program & the log, including dis output of both PY2 and PY3 pickles, are available in this gist; and extract on stackoverflow: https://gist.github.com/eddy-geek/191f15871c1b9f801b76 http://stackoverflow.com/questions/24805105/ I am using pickle.dumps(reply, protocol=2) in PY2 then pickle._loads(pickled, fix_imports=True, encoding='latin1') in PY3 (tried None and utf-8 without success) Native cPickle loads decoding fails too, I am only using pure python's _loads for debugging. Sorry if this is misguided (first time here) Regards, Edward ---------- components: Library (Lib) messages: 223408 nosy: eddygeek priority: normal severity: normal status: open title: datetime.__setstate__ fails decoding python2 pickle type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 15:32:36 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 18 Jul 2014 13:32:36 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1405690356.11.0.829651728207.issue22005@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +belopolsky, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 15:37:50 2014 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 18 Jul 2014 13:37:50 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1405690670.44.0.76192905143.issue22005@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +alexandre.vassalotti, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 16:15:49 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Jul 2014 14:15:49 +0000 Subject: [issue22004] io documentation refers to newline as newlines In-Reply-To: <1405664717.39.0.472140939197.issue22004@psf.upfronthosting.co.za> Message-ID: <3hFDrh5RNyz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 4c98086194d5 by Zachary Ware in branch '2.7': Issue #22004: Correct an argument name. http://hg.python.org/cpython/rev/4c98086194d5 New changeset 252cd056d1cf by Zachary Ware in branch '3.4': Issue #22004: Correct an argument name. http://hg.python.org/cpython/rev/252cd056d1cf New changeset f83adc06f486 by Zachary Ware in branch 'default': Closes #22004: Merge with 3.4 http://hg.python.org/cpython/rev/f83adc06f486 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 16:16:45 2014 From: report at bugs.python.org (Zachary Ware) Date: Fri, 18 Jul 2014 14:16:45 +0000 Subject: [issue22004] io documentation refers to newline as newlines In-Reply-To: <1405664717.39.0.472140939197.issue22004@psf.upfronthosting.co.za> Message-ID: <1405693005.06.0.798737313063.issue22004@psf.upfronthosting.co.za> Zachary Ware added the comment: Fixed! Thanks for the report. ---------- nosy: +zach.ware versions: -Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 16:29:05 2014 From: report at bugs.python.org (David Halter) Date: Fri, 18 Jul 2014 14:29:05 +0000 Subject: [issue12855] linebreak sequences should be better documented In-Reply-To: <1314654150.68.0.797504547224.issue12855@psf.upfronthosting.co.za> Message-ID: <1405693745.14.0.520643674509.issue12855@psf.upfronthosting.co.za> David Halter added the comment: I would vote for the inclusion of that patch. I just stumbled over this. ---------- nosy: +davidhalter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 16:30:48 2014 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Fri, 18 Jul 2014 14:30:48 +0000 Subject: [issue16859] tarfile.TarInfo.fromtarfile does not check read() return value In-Reply-To: <1357286122.2.0.304851627332.issue16859@psf.upfronthosting.co.za> Message-ID: <1405693848.39.0.715272805032.issue16859@psf.upfronthosting.co.za> Lars Gust?bel added the comment: The size of the buffer returned by TarInfo.fromtarfile() is checked by TarInfo.frombuf() which raises either an EmptyHeaderError or TruncatedHeaderError respectively. ---------- assignee: -> lars.gustaebel resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 17:05:39 2014 From: report at bugs.python.org (Demian Brecht) Date: Fri, 18 Jul 2014 15:05:39 +0000 Subject: [issue8843] urllib2 Digest Authorization uri must match request URI In-Reply-To: <1275046398.81.0.158910525846.issue8843@psf.upfronthosting.co.za> Message-ID: <1405695939.86.0.87149182111.issue8843@psf.upfronthosting.co.za> Demian Brecht added the comment: FWIW, here's my take on this: RFC 2617 (3.2.2.5) states: This may be "*", an "absoluteURL" or an "abs_path" as specified in section 5.1.2 of [2], but it MUST agree with the Request-URI. Note: It must AGREE. RFC 3986 (6.2.3) states: In general, a URI that uses the generic syntax for authority with an empty path should be normalized to a path of "/". In my mind, this normalization should actually happen server-side, not client as the patch is suggesting. Additionally, should the logic in the supplied patch be applied, it would be inconsistent with any other than an empty path: http://example.com -> / http://example.com/foo -> /foo I would close this as won't fix. Side note: get_selector was deprecated in 3.3 and removed in 3.4 in favour of the Request.selector attribute. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 17:09:34 2014 From: report at bugs.python.org (Drekin) Date: Fri, 18 Jul 2014 15:09:34 +0000 Subject: [issue17620] Python interactive console doesn't use sys.stdin for input In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za> Message-ID: <1405696174.37.0.108075620562.issue17620@psf.upfronthosting.co.za> Drekin added the comment: There is still the serious inconsistency that the `sys.stdin` is not used for input by interactive loop but its encoding is. So if I replace `sys.stdin` with a custom object with its own `encoding` attribute, the standard interactive loop tries to use this encoding which may result in an exception on any input. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 17:18:15 2014 From: report at bugs.python.org (Demian Brecht) Date: Fri, 18 Jul 2014 15:18:15 +0000 Subject: [issue14414] xmlrpclib leaves connection in broken state if server returns error without content-length In-Reply-To: <1332778465.08.0.819519448389.issue14414@psf.upfronthosting.co.za> Message-ID: <1405696695.62.0.941691419669.issue14414@psf.upfronthosting.co.za> Changes by Demian Brecht : ---------- nosy: +dbrecht _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 17:44:09 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 18 Jul 2014 15:44:09 +0000 Subject: [issue21950] import sqlite3 not running after configure --prefix=/alt/path; make; make install In-Reply-To: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> Message-ID: <1405698249.02.0.5854030363.issue21950@psf.upfronthosting.co.za> R. David Murray added the comment: The install log shows the file being copied into place: copying build/lib.linux-x86_64-3.4/_sqlite3.cpython-34m.so -> /soft/pyt341/lib/python3.4/lib-dynload This does not line up with the fact that you said the file did not exist after the install. Something would have to be deleting the file after it got copied into place. After you run make install, is there anything at all in lib-dynload? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 17:47:44 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 18 Jul 2014 15:47:44 +0000 Subject: [issue21950] import sqlite3 not running after configure --prefix=/alt/path; make; make install In-Reply-To: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> Message-ID: <1405698464.67.0.739300618074.issue21950@psf.upfronthosting.co.za> R. David Murray added the comment: configure with a prefix followed by make/make install works fine for me, by the way (on a Gentoo system). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 17:52:59 2014 From: report at bugs.python.org (Roy Hyunjin Han) Date: Fri, 18 Jul 2014 15:52:59 +0000 Subject: [issue1598] unexpected response in imaplib In-Reply-To: <1197427257.83.0.419655228027.issue1598@psf.upfronthosting.co.za> Message-ID: <1405698779.02.0.897260753193.issue1598@psf.upfronthosting.co.za> Roy Hyunjin Han added the comment: Hi Lita, I no longer have access to a Domino server. I'm not sure whether there are enough users trying to access Domino with imaplib for this to warrant investigation. RHH ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 17:54:19 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Fri, 18 Jul 2014 15:54:19 +0000 Subject: [issue21935] Implement AUTH command in smtpd. In-Reply-To: <1404766823.82.0.391401675174.issue21935@psf.upfronthosting.co.za> Message-ID: <1405698859.51.0.2796584397.issue21935@psf.upfronthosting.co.za> Milan Oberkirch added the comment: After trying to implement SMTPS with asyncore and wrap_socket I agree with David that it is at least hard: somehow the handshake fails (ssl.SSLWantReadError) and I did not really figure out why. Looking at the debugging output of openssl indicates that the connection drops immediately after setting up the session on the client side. Anyway: I think we should apply a better version of my patch (will submit one soon) to be able to test smtplib (and also fix issue 8503). I'm going to make it clear that the AUTH functionality should only be used for testing or in combination with an encrypted tunnel. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 17:56:52 2014 From: report at bugs.python.org (Lita Cho) Date: Fri, 18 Jul 2014 15:56:52 +0000 Subject: [issue1598] unexpected response in imaplib In-Reply-To: <1405698779.02.0.897260753193.issue1598@psf.upfronthosting.co.za> Message-ID: Lita Cho added the comment: Hi Roy, Oh I see. Should we close this out as "Won't Fix" due to the fact that we aren't sure how many users are using this with Domino servers? Lita On Fri, Jul 18, 2014 at 8:52 AM, Roy Hyunjin Han wrote: > > Roy Hyunjin Han added the comment: > > Hi Lita, > > I no longer have access to a Domino server. > > I'm not sure whether there are enough users trying to access Domino with > imaplib for this to warrant investigation. > > RHH > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 17:59:08 2014 From: report at bugs.python.org (Joachim Bauch) Date: Fri, 18 Jul 2014 15:59:08 +0000 Subject: [issue14414] xmlrpclib leaves connection in broken state if server returns error without content-length In-Reply-To: <1332778465.08.0.819519448389.issue14414@psf.upfronthosting.co.za> Message-ID: <1405699148.27.0.522589610259.issue14414@psf.upfronthosting.co.za> Joachim Bauch added the comment: I could look into providing a patch if that helps... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 18:02:09 2014 From: report at bugs.python.org (Roy Hyunjin Han) Date: Fri, 18 Jul 2014 16:02:09 +0000 Subject: [issue1598] unexpected response in imaplib In-Reply-To: <1197427257.83.0.419655228027.issue1598@psf.upfronthosting.co.za> Message-ID: <1405699329.58.0.251025086362.issue1598@psf.upfronthosting.co.za> Roy Hyunjin Han added the comment: Yes, I think closing this issue is reasonable. If the error reappears, we can just reopen it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 18:14:49 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 18 Jul 2014 16:14:49 +0000 Subject: [issue21970] Broken code for handling file://host in urllib.request.FileHandler.file_open In-Reply-To: <1405216161.05.0.3363234179.issue21970@psf.upfronthosting.co.za> Message-ID: <1405700089.98.0.32910542162.issue21970@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 18:37:49 2014 From: report at bugs.python.org (Mikhail Korobov) Date: Fri, 18 Jul 2014 16:37:49 +0000 Subject: [issue22003] BytesIO copy-on-write In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za> Message-ID: <1405701469.89.0.52392931981.issue22003@psf.upfronthosting.co.za> Changes by Mikhail Korobov : ---------- nosy: +kmike _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 18:45:09 2014 From: report at bugs.python.org (Glenn Langford) Date: Fri, 18 Jul 2014 16:45:09 +0000 Subject: [issue13299] namedtuple row factory for sqlite3 In-Reply-To: <1320021145.59.0.53370875256.issue13299@psf.upfronthosting.co.za> Message-ID: <1405701909.38.0.79623988828.issue13299@psf.upfronthosting.co.za> Changes by Glenn Langford : ---------- nosy: -glangford _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 18:45:36 2014 From: report at bugs.python.org (Glenn Langford) Date: Fri, 18 Jul 2014 16:45:36 +0000 Subject: [issue20516] Concurrent.futures base concurrency improvement (with patch) In-Reply-To: <1391569015.82.0.789033083368.issue20516@psf.upfronthosting.co.za> Message-ID: <1405701936.08.0.966049002806.issue20516@psf.upfronthosting.co.za> Changes by Glenn Langford : ---------- nosy: -glangford _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 18:45:55 2014 From: report at bugs.python.org (Glenn Langford) Date: Fri, 18 Jul 2014 16:45:55 +0000 Subject: [issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures In-Reply-To: <1390491231.67.0.503348563079.issue20369@psf.upfronthosting.co.za> Message-ID: <1405701955.81.0.985368149777.issue20369@psf.upfronthosting.co.za> Changes by Glenn Langford : ---------- nosy: -glangford _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 18:46:17 2014 From: report at bugs.python.org (Glenn Langford) Date: Fri, 18 Jul 2014 16:46:17 +0000 Subject: [issue20297] concurrent.futures.as_completed() installs waiters for already completed Futures In-Reply-To: <1390079975.89.0.167689725202.issue20297@psf.upfronthosting.co.za> Message-ID: <1405701977.18.0.784166725461.issue20297@psf.upfronthosting.co.za> Changes by Glenn Langford : ---------- nosy: -glangford _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 19:01:14 2014 From: report at bugs.python.org (Demian Brecht) Date: Fri, 18 Jul 2014 17:01:14 +0000 Subject: [issue14414] xmlrpclib leaves connection in broken state if server returns error without content-length In-Reply-To: <1332778465.08.0.819519448389.issue14414@psf.upfronthosting.co.za> Message-ID: <1405702874.85.0.0148252342116.issue14414@psf.upfronthosting.co.za> Demian Brecht added the comment: Of /course/ a patch always helps :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 19:25:37 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Jul 2014 17:25:37 +0000 Subject: [issue21645] asyncio: Race condition in signal handling on FreeBSD In-Reply-To: <1401748554.93.0.147613682728.issue21645@psf.upfronthosting.co.za> Message-ID: <1405704337.34.0.0595037698561.issue21645@psf.upfronthosting.co.za> STINNER Victor added the comment: The test suite passed on FreeBSD 9 buildbot (3.4, 3.5 and my custom builds). I consider that the bug is now fixed. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 20:21:38 2014 From: report at bugs.python.org (Carol Willing) Date: Fri, 18 Jul 2014 18:21:38 +0000 Subject: [issue20064] PyObject_Malloc is not documented In-Reply-To: <1387913960.58.0.680621486861.issue20064@psf.upfronthosting.co.za> Message-ID: <1405707698.28.0.749258593338.issue20064@psf.upfronthosting.co.za> Carol Willing added the comment: I've reviewed this patch. It's my first patch review for this project so I'm not sure that I submitted the review correctly in Rietveld. ---------- nosy: +willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 20:24:08 2014 From: report at bugs.python.org (Zachary Ware) Date: Fri, 18 Jul 2014 18:24:08 +0000 Subject: [issue18392] Doc: PyObject_Malloc() is not documented In-Reply-To: <1373156816.39.0.0842066311974.issue18392@psf.upfronthosting.co.za> Message-ID: <1405707848.01.0.5414087586.issue18392@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> PyObject_Malloc is not documented _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 20:50:42 2014 From: report at bugs.python.org (Brett Cannon) Date: Fri, 18 Jul 2014 18:50:42 +0000 Subject: [issue16494] Add a method on importlib.SourceLoader for creating bytecode file format/container In-Reply-To: <1353168017.12.0.0693705888433.issue16494@psf.upfronthosting.co.za> Message-ID: <1405709442.36.0.661598527627.issue16494@psf.upfronthosting.co.za> Brett Cannon added the comment: I think I want to keep bytecode files as optimizations as much as possible, so exposing anything that explicitly writes them is just going to lead to headaches. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 20:53:01 2014 From: report at bugs.python.org (Tim Peters) Date: Fri, 18 Jul 2014 18:53:01 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1405709581.89.0.391162758655.issue22005@psf.upfronthosting.co.za> Tim Peters added the comment: I have no idea what was done to pickle for Python3, but this line works for me to unpickle a Python2 protocol 2 datetime pickle under Python3, where P2 is the Python2 pickle string: pickle.loads(bytes(P2, encoding='latin1'), encoding='bytes') For example, >>> P2 '\x80\x02cdatetime\ndatetime\nq\x00U\n\x07?\x07\x12\r%%\x06??q\x01\x85q\x02Rq\x03.' >>> pickle.loads(bytes(P2, encoding='latin1'), encoding='bytes') datetime.datetime(2014, 7, 18, 13, 37, 37, 451000) I don't understand the Python3 loads() docs with respect to the "encoding" and "errors" arguments, and can't guess whether this is the intended way. It seems at best highly obscure. But hard to argue with something that works ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 21:30:13 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 18 Jul 2014 19:30:13 +0000 Subject: [issue18993] There is an overshadowed and invalid test in testmock.py In-Reply-To: <1378796103.81.0.419617172609.issue18993@psf.upfronthosting.co.za> Message-ID: <1405711813.85.0.897163462468.issue18993@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we have a formal review on the latest patch please. ---------- nosy: +BreamoreBoy type: enhancement -> behavior versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 21:53:27 2014 From: report at bugs.python.org (Dan O'Reilly) Date: Fri, 18 Jul 2014 19:53:27 +0000 Subject: [issue22006] thread module documentation erroneously(?) states not all built-in functions release the GIL Message-ID: <1405713207.82.0.735431960595.issue22006@psf.upfronthosting.co.za> New submission from Dan O'Reilly: Currently, the caveats section of the thread/_thread module has this statement in it: "Not all built-in functions that may block waiting for I/O allow other threads to run. (The most popular ones (time.sleep(), file.read(), select.select()) work as expected.)" As far as I know, this isn't the case; all built-in functions that do blocking I/O release the GIL, and therefore do indeed allow other threads to run. I asked a question about this on stackoverflow recently (http://stackoverflow.com/q/24831458/2073595), and Mark Dickinson helpfully pointed out that this statement was added by Guido way back in 1994, which suggests it's probably just obsolete. If that's the case, the statement should be removed to avoid confusion. ---------- assignee: docs at python components: Documentation messages: 223428 nosy: dan.oreilly, docs at python priority: normal severity: normal status: open title: thread module documentation erroneously(?) states not all built-in functions release the GIL 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 Fri Jul 18 21:55:53 2014 From: report at bugs.python.org (Dan O'Reilly) Date: Fri, 18 Jul 2014 19:55:53 +0000 Subject: [issue22006] thread module documentation erroneously(?) states not all built-in functions that do blocking I/O release the GIL In-Reply-To: <1405713207.82.0.735431960595.issue22006@psf.upfronthosting.co.za> Message-ID: <1405713353.97.0.507989977561.issue22006@psf.upfronthosting.co.za> Changes by Dan O'Reilly : ---------- title: thread module documentation erroneously(?) states not all built-in functions release the GIL -> thread module documentation erroneously(?) states not all built-in functions that do blocking I/O release the GIL _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 22:00:49 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 18 Jul 2014 20:00:49 +0000 Subject: [issue17401] io.FileIO closefd parameter is not documented nor shown in repr In-Reply-To: <1363057927.36.0.00381165430664.issue17401@psf.upfronthosting.co.za> Message-ID: <1405713649.52.0.291679990085.issue17401@psf.upfronthosting.co.za> Mark Lawrence added the comment: >From the 3.5 docs. io.open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None) This is an alias for the builtin open() function. There is a description for closefd at the open() function link. So how about adding to the sentence above " where all the above parameters are described" ? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 22:35:52 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Jul 2014 20:35:52 +0000 Subject: [issue18395] Make _Py_char2wchar() and _Py_wchar2char() public In-Reply-To: <1373205636.55.0.562779126658.issue18395@psf.upfronthosting.co.za> Message-ID: <1405715752.44.0.23492644948.issue18395@psf.upfronthosting.co.za> STINNER Victor added the comment: > You seem to need wchar_t to call Py_Main and Py_SetProgramName. Yes, exactly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 22:37:46 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Jul 2014 20:37:46 +0000 Subject: [issue21998] asyncio: a new self-pipe should be created in the child process after fork In-Reply-To: <1405613445.85.0.0173565539891.issue21998@psf.upfronthosting.co.za> Message-ID: <1405715866.18.0.880347869019.issue21998@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I wanted to use the atfork module for that, but then I saw that it does not exist :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 22:50:56 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 18 Jul 2014 20:50:56 +0000 Subject: [issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars In-Reply-To: <1405482059.28.0.321220843423.issue21987@psf.upfronthosting.co.za> Message-ID: <1405716656.98.0.646171382876.issue21987@psf.upfronthosting.co.za> R. David Murray added the comment: There is indeed special logic that triggers if the name is longer than 100 characters. Presumably it has a bug. Marking this as easy since it shouldn't be too hard, given the failure example, to figure out what is wrong and fix it (and turn the example into a unit test). It doesn't look like the relevant code has changed in python3, so the bug probably exists there as well. ---------- keywords: +easy nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 22:57:19 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 18 Jul 2014 20:57:19 +0000 Subject: [issue21988] Decrease iterating overhead in timeit In-Reply-To: <1405501584.54.0.115556422233.issue21988@psf.upfronthosting.co.za> Message-ID: <1405717039.11.0.461181118081.issue21988@psf.upfronthosting.co.za> R. David Murray added the comment: Guido: I've added developer privs to your Guido.van.Rossum account. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 23:03:36 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 18 Jul 2014 21:03:36 +0000 Subject: [issue21989] Missing (optional) argument `start` and `end` in documentation for list.index In-Reply-To: <1405514419.16.0.727549411971.issue21989@psf.upfronthosting.co.za> Message-ID: <1405717416.9.0.338680927634.issue21989@psf.upfronthosting.co.za> R. David Murray added the comment: It's a tutorial, not API documentation. You will note that the 'key' and 'reverse' arguments to sort are not mentioned either. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 23:10:00 2014 From: report at bugs.python.org (Jonathan Stewmon) Date: Fri, 18 Jul 2014 21:10:00 +0000 Subject: [issue22007] sys.stdout.write on OS X is not EINTR safe Message-ID: <1405717800.93.0.311765291104.issue22007@psf.upfronthosting.co.za> New submission from Jonathan Stewmon: Writing to sys.stdout on OS X can fail with IOError: [Errno 4] Interrupted system call. I have observed this while trying to write to sys.stdout when SIGCHLD is received. The script below consistently reproduces the problem with python 2.7.2 on OS X 10.9.3. import sys import os import signal import subprocess import time children = {} def claim_child(): pid, status = os.wait() p = children.pop(pid) def trap(sig, frame): claim_child() signal.signal(signal.SIGCHLD, trap) running = 0 max_procs = 70 program = [sys.executable, '-c', 'import sys, time; print sys.version; time.sleep(3)'] f = sys.stdout # crashes with: IOError: [Errno 4] Interrupted system call # f = file('/tmp/eintr.log', 'w') # works just fine while True: while len(children) < max_procs: f.write('starting program: {}\n'.format(program)) p = subprocess.Popen(program) children[p.pid] = p time.sleep(0.05) ---------- components: IO messages: 223435 nosy: jstewmon priority: normal severity: normal status: open title: sys.stdout.write on OS X is not EINTR safe versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 23:28:38 2014 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 18 Jul 2014 21:28:38 +0000 Subject: [issue17131] subprocess.Popen.terminate can raise exception on Posix In-Reply-To: <1360058099.4.0.320628892834.issue17131@psf.upfronthosting.co.za> Message-ID: <1405718918.78.0.252519574946.issue17131@psf.upfronthosting.co.za> Gregory P. Smith added the comment: issue14252 appears to have been a fix for the windows side only. On Posix the best that could be done here is to catch OSError within Popen.terminate() and Popen.kill() and ignore the problem if there was an error. We do not have a way to know if the child process exists any longer or even to know if the process with the PID this call is sending the signal to is this Popen instances' child process or if the PID has already been recycled by the OS and used by another unfortunate process. the bigger question is... should we. this seems like an API change rather than a bugfix so I'm more inclined to do this in 2.5 only in case someone was relying on the exception to tell them that the process had already died. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 23:40:11 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 18 Jul 2014 21:40:11 +0000 Subject: [issue17528] Implement dumps/loads for lru_cache In-Reply-To: <1364036381.48.0.635559042513.issue17528@psf.upfronthosting.co.za> Message-ID: <1405719611.59.0.773269160288.issue17528@psf.upfronthosting.co.za> Mark Lawrence added the comment: https://pypi.python.org/pypi/fastcache/0.4.0 also seems relevant. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 23:42:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 18 Jul 2014 21:42:01 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1405719721.88.0.630557963488.issue14373@psf.upfronthosting.co.za> Mark Lawrence added the comment: https://pypi.python.org/pypi/fastcache/0.4.0 also seems relevant. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 23:50:17 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Jul 2014 21:50:17 +0000 Subject: [issue1049450] Solaris: EINTR exception in select/socket calls in telnetlib Message-ID: <1405720217.39.0.954316436256.issue1049450@psf.upfronthosting.co.za> STINNER Victor added the comment: The telnetlib now uses the new selectors introduced in Python 3.4: see the issue #19170. The selectors module handles InterruptedError (EINTR): it returns an empty list of events in this case. The changeset f713d9b6393c of the issue #19170 fixed this issue. Sorry for the delay, 10 years to fix this bug... It's probably because the telnetlib module is not widely used... ---------- nosy: +haypo, neologix resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 23:51:10 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 18 Jul 2014 21:51:10 +0000 Subject: [issue818201] distutils: clean does not use build_base option from build Message-ID: <1405720270.6.0.929850800078.issue818201@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- components: -Distutils2 nosy: +dstufft versions: +Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 18 23:52:35 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 18 Jul 2014 21:52:35 +0000 Subject: [issue644744] bdist_rpm fails when installing man pages Message-ID: <1405720355.76.0.137728758172.issue644744@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 00:00:00 2014 From: report at bugs.python.org (Ned Deily) Date: Fri, 18 Jul 2014 22:00:00 +0000 Subject: [issue22007] sys.stdout.write on OS X is not EINTR safe In-Reply-To: <1405717800.93.0.311765291104.issue22007@psf.upfronthosting.co.za> Message-ID: <1405720800.71.0.0894562115747.issue22007@psf.upfronthosting.co.za> Ned Deily added the comment: There have been a number of EINTR-releated issues reported in the past, some unique to BSD-based systems and/or OS X; see for example, Issue9867 and Issue12268. I don't know that any of them specifically addressed problems with writes to Python 2 file objects. FWIW, with your test case, I'm not able to reproduce a failure on 10.9.3 using python.org 2.7.8 or 2.7.3 or with the system 2.7.5. And, with a modified print(), I didn't see a failure with python.org 3.4.1, either. Can you say more about the origins of your Python 2.7.2? Have you tried with a current 2.7.8? How quickly does the test fail, e.g. after how many iterations? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 00:06:56 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Jul 2014 22:06:56 +0000 Subject: [issue22007] sys.stdout.write on OS X is not EINTR safe In-Reply-To: <1405717800.93.0.311765291104.issue22007@psf.upfronthosting.co.za> Message-ID: <1405721216.22.0.445257925054.issue22007@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is just an example of issue addressed by the issue #18885. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 00:09:28 2014 From: report at bugs.python.org (Milan Oberkirch) Date: Fri, 18 Jul 2014 22:09:28 +0000 Subject: [issue21935] Implement AUTH command in smtpd. In-Reply-To: <1404766823.82.0.391401675174.issue21935@psf.upfronthosting.co.za> Message-ID: <1405721368.29.0.782899346582.issue21935@psf.upfronthosting.co.za> Changes by Milan Oberkirch : Added file: http://bugs.python.org/file35991/smtpd_AUTH_full2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 00:09:57 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Jul 2014 22:09:57 +0000 Subject: [issue1049450] Solaris: EINTR exception in select/socket calls in telnetlib Message-ID: <1405721397.07.0.297325679118.issue1049450@psf.upfronthosting.co.za> STINNER Victor added the comment: By the way, the bug was only fixed in Python 3.4 and later. I'm not interested to fix it in older Python versions. ---------- versions: +Python 3.4, Python 3.5 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 00:14:01 2014 From: report at bugs.python.org (Ned Deily) Date: Fri, 18 Jul 2014 22:14:01 +0000 Subject: [issue22007] sys.stdout.write on OS X is not EINTR safe In-Reply-To: <1405717800.93.0.311765291104.issue22007@psf.upfronthosting.co.za> Message-ID: <1405721641.09.0.758327650549.issue22007@psf.upfronthosting.co.za> Ned Deily added the comment: Yes, an issue not likely to be addressed in Python 2.7. I'm still curious as to why I'm not able to reproduce the problem, though. I suppose it could just come down to differences in the system it is running on, like workload, amount of memory, and/or number of processors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 00:23:47 2014 From: report at bugs.python.org (Jonathan Stewmon) Date: Fri, 18 Jul 2014 22:23:47 +0000 Subject: [issue22007] sys.stdout.write on OS X is not EINTR safe In-Reply-To: <1405717800.93.0.311765291104.issue22007@psf.upfronthosting.co.za> Message-ID: <1405722227.07.0.573461652604.issue22007@psf.upfronthosting.co.za> Jonathan Stewmon added the comment: Sorry, I had a typo in the original report - I am actually using Python 2.7.7 installed with homebrew. The script crashes for me on the first iteration every time using iTerm as my terminal. I just tried it in Terminal, and it doesn't crash. Maybe it's actually an issue with iTerm? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 00:32:19 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Jul 2014 22:32:19 +0000 Subject: [issue22007] sys.stdout.write on OS X is not EINTR safe In-Reply-To: <1405717800.93.0.311765291104.issue22007@psf.upfronthosting.co.za> Message-ID: <1405722739.7.0.234810777494.issue22007@psf.upfronthosting.co.za> STINNER Victor added the comment: I can reproduce the issue on Linux: Traceback (most recent call last): File "x.py", line 26, in f.write('starting program: {}\n'.format(program)) IOError: [Errno 4] Interrupted system call ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 00:45:50 2014 From: report at bugs.python.org (A Kaptur) Date: Fri, 18 Jul 2014 22:45:50 +0000 Subject: [issue22008] Symtable's syntax warning should contain the word "because" Message-ID: <1405723549.99.0.479599106625.issue22008@psf.upfronthosting.co.za> New submission from A Kaptur: The symbol table's syntax error about unqualified exec is missing the word "because". >>> def foo(): ... exec "a = 1" ... def bar(): ... print a ... File "", line 2 SyntaxError: unqualified exec is not allowed in function 'foo' it contains a nested function with free variables ---------- assignee: docs at python components: Documentation files: issue.patch keywords: patch messages: 223447 nosy: akaptur, docs at python priority: normal severity: normal stage: needs patch status: open title: Symtable's syntax warning should contain the word "because" type: enhancement versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file35992/issue.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 00:51:17 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 18 Jul 2014 22:51:17 +0000 Subject: [issue1047397] cgitb failures Message-ID: <1405723877.77.0.486847328381.issue1047397@psf.upfronthosting.co.za> Mark Lawrence added the comment: The output now is c:\Users\Mark\PythonIssues>cgitbbug.py getattr1 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)] Traceback (most recent call last): File "C:\Users\Mark\PythonIssues\cgitbbug.py", line 34, in d.h('aaa') File "C:\Users\Mark\PythonIssues\cgitbbug.py", line 23, in _f raiseError() File "C:\Users\Mark\PythonIssues\cgitbbug.py", line 3, in raiseError raise ValueError('original error') ValueError: original error During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Mark\PythonIssues\cgitbbug.py", line 36, in print(cgitb.html(sys.exc_info(),context=3)) File "c:\python34\lib\cgitb.py", line 136, in html vars = scanvars(reader, frame, locals) File "c:\python34\lib\cgitb.py", line 88, in scanvars value = getattr(parent, token, __UNDEF__) File "C:\Users\Mark\PythonIssues\cgitbbug.py", line 16, in __getattr__ if self._mad=='getattr1': raise ValueError('getattr1 madness') ValueError: getattr1 madness Thus the madness has been fixed and this can be closed as "out of date". ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 00:57:17 2014 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 18 Jul 2014 22:57:17 +0000 Subject: [issue11001] Various obvious errors in cookies documentation In-Reply-To: <1295908065.55.0.221906287574.issue11001@psf.upfronthosting.co.za> Message-ID: <1405724237.22.0.893559631265.issue11001@psf.upfronthosting.co.za> Mark Lawrence added the comment: Given the comments in msg126979 do we formally review this, close as "won't fix" or what? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 01:00:06 2014 From: report at bugs.python.org (Orion Poplawski) Date: Fri, 18 Jul 2014 23:00:06 +0000 Subject: [issue21247] test_asyncio: test_subprocess_send_signal hangs on Fedora builders In-Reply-To: <1397597632.61.0.772376521638.issue21247@psf.upfronthosting.co.za> Message-ID: <1405724406.11.0.360758299581.issue21247@psf.upfronthosting.co.za> Orion Poplawski added the comment: I'm really sorry, I thought I had done the test build properly, but a second attempt has resulted in the same hang: http://koji.fedoraproject.org/koji/taskinfo?taskID=7165208 So I don't think it does the trick. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 01:02:40 2014 From: report at bugs.python.org (Berker Peksag) Date: Fri, 18 Jul 2014 23:02:40 +0000 Subject: [issue22008] Symtable's syntax warning should contain the word "because" In-Reply-To: <1405723549.99.0.479599106625.issue22008@psf.upfronthosting.co.za> Message-ID: <1405724560.13.0.763995917632.issue22008@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- assignee: docs at python -> components: +Library (Lib) -Documentation nosy: -docs at python stage: needs patch -> patch review type: enhancement -> behavior versions: -Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 01:26:07 2014 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 18 Jul 2014 23:26:07 +0000 Subject: [issue22008] Symtable's syntax warning should contain the word "because" In-Reply-To: <1405723549.99.0.479599106625.issue22008@psf.upfronthosting.co.za> Message-ID: <1405725967.26.0.996783234077.issue22008@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 01:26:21 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 Jul 2014 23:26:21 +0000 Subject: [issue22008] Symtable's syntax warning should contain the word "because" In-Reply-To: <1405723549.99.0.479599106625.issue22008@psf.upfronthosting.co.za> Message-ID: <3hFT3w2RSCz7Lkf@mail.python.org> Roundup Robot added the comment: New changeset ef009b76bca3 by Benjamin Peterson in branch '2.7': add missing 'because' (closes #22008) http://hg.python.org/cpython/rev/ef009b76bca3 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 02:24:49 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 Jul 2014 00:24:49 +0000 Subject: [issue7676] IDLE shell shouldn't use TABs In-Reply-To: <1263213381.47.0.181451927584.issue7676@psf.upfronthosting.co.za> Message-ID: <1405729489.28.0.364803166432.issue7676@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Raymond, I cannot program 'fix it'. I need an exact spec. I suspect that any change will upset someone. Which of the four alternative proposals would you consider to be an improvement? One of the problems is that what might look good on screen with colors, including shaded background, might not work as well when cut. We may have to try to separate the two. ---------- assignee: kbk -> terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 02:56:31 2014 From: report at bugs.python.org (Berker Peksag) Date: Sat, 19 Jul 2014 00:56:31 +0000 Subject: [issue5876] __repr__ returning unicode doesn't work when called implicitly In-Reply-To: <1241006313.4.0.792016858663.issue5876@psf.upfronthosting.co.za> Message-ID: <1405731391.38.0.210601623187.issue5876@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: fixed -> wont fix stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 03:01:50 2014 From: report at bugs.python.org (Silverback Networks) Date: Sat, 19 Jul 2014 01:01:50 +0000 Subject: [issue22009] pdb.set_trace() crashes when binary data is input via stdin Message-ID: <1405731710.65.0.406655018278.issue22009@psf.upfronthosting.co.za> New submission from Silverback Networks: sample.py: import sys, pdb infile = sys.stdin.buffer pdb.set_trace() command line: python -m pdb sample.py < binary.exe output: > c:\users\me\dropbox\sample.py(1)() -> import sys, pdb (Pdb) Traceback (most recent call last): File "C:\dev\Python\x86\lib\pdb.py", line 1661, in main pdb._runscript(mainpyfile) File "C:\dev\Python\x86\lib\pdb.py", line 1542, in _runscript self.run(statement) File "C:\dev\Python\x86\lib\bdb.py", line 431, in run exec(cmd, globals, locals) File "", line 1, in File "c:\users\me\dropbox\test.py", line 1, in import sys, pdb File "c:\users\me\dropbox\test.py", line 1, in import sys, pdb File "C:\dev\Python\x86\lib\bdb.py", line 48, in trace_dispatch return self.dispatch_line(frame) File "C:\dev\Python\x86\lib\bdb.py", line 66, in dispatch_line self.user_line(frame) File "C:\dev\Python\x86\lib\pdb.py", line 259, in user_line self.interaction(frame, None) File "C:\dev\Python\x86\lib\pdb.py", line 346, in interaction self._cmdloop() File "C:\dev\Python\x86\lib\pdb.py", line 319, in _cmdloop self.cmdloop() File "C:\dev\Python\x86\lib\cmd.py", line 126, in cmdloop line = input(self.prompt) File "C:\dev\Python\x86\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 72: character maps to Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program > c:\dev\python\x86\lib\encodings\cp1252.py(23)decode() -> return codecs.charmap_decode(input,self.errors,decoding_table)[0] (Pdb) Traceback (most recent call last): File "C:\dev\Python\x86\lib\pdb.py", line 1661, in main pdb._runscript(mainpyfile) File "C:\dev\Python\x86\lib\pdb.py", line 1542, in _runscript self.run(statement) File "C:\dev\Python\x86\lib\bdb.py", line 431, in run exec(cmd, globals, locals) File "", line 1, in File "c:\users\me\dropbox\test.py", line 1, in import sys, pdb File "c:\users\me\dropbox\test.py", line 1, in import sys, pdb File "C:\dev\Python\x86\lib\bdb.py", line 48, in trace_dispatch return self.dispatch_line(frame) File "C:\dev\Python\x86\lib\bdb.py", line 66, in dispatch_line self.user_line(frame) File "C:\dev\Python\x86\lib\pdb.py", line 259, in user_line self.interaction(frame, None) File "C:\dev\Python\x86\lib\pdb.py", line 346, in interaction self._cmdloop() File "C:\dev\Python\x86\lib\pdb.py", line 319, in _cmdloop self.cmdloop() File "C:\dev\Python\x86\lib\cmd.py", line 126, in cmdloop line = input(self.prompt) File "C:\dev\Python\x86\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 72: character maps to During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\dev\Python\x86\lib\runpy.py", line 171, in _run_module_as_main "__main__", mod_spec) File "C:\dev\Python\x86\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\dev\Python\x86\lib\pdb.py", line 1685, in pdb.main() File "C:\dev\Python\x86\lib\pdb.py", line 1677, in main pdb.interaction(None, t) File "C:\dev\Python\x86\lib\pdb.py", line 346, in interaction self._cmdloop() File "C:\dev\Python\x86\lib\pdb.py", line 319, in _cmdloop self.cmdloop() File "C:\dev\Python\x86\lib\cmd.py", line 126, in cmdloop line = input(self.prompt) File "C:\dev\Python\x86\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 57: character maps to python version: Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:24:06) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. ---------- components: Windows messages: 223453 nosy: silverbacknet priority: normal severity: normal status: open title: pdb.set_trace() crashes when binary data is input via stdin type: crash versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 03:16:49 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 Jul 2014 01:16:49 +0000 Subject: [issue22010] Idle: better management of Shell window output Message-ID: <1405732609.92.0.860307850836.issue22010@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Some of these ideas are in other issues, but possibly as side-thoughts. Any issues that directly address one of them can be added as dependency. The appropriate place for menu entries would be the Shell menu, which currently has only 2, 1 of which I have never used. I don't necessarily think everything needs a key shortcut. There are already too many for me to remember. 1. Clear/restart shell. The same as restart, but also clear after. If the shell is burdened with unwanted lines of text, let someone start over without quitting and restarting. 2. Move last output to output window. Long help output, as for classes, would be a prime example use. I am sure this idea has been mentioned, at least as a side note. 3. Delete last output. In the editor and while editing a statement, Undo undoes the effect of one or more of the last keypresses. I propose that in the shell, after submits a statement for processing, prints the output, and a new prompt, that Undo ^Z erase the new prompt, erase the output, and put the cursor at the end of the previously entered statement so it can be edited. (Idea prompted by Rick Johnson.) One use case for this is to correct syntax and logic errors, especially when one is using Idle to prepare examples to copy and paste elsewhere. I do this constantly and manually filtering out bad input and output is a major nuisance. Another use case to simply delete unwanted output, especially if long. In the latter case, one would not want the new prompt deleted, but ^Z can only act one way, and I don't think we need two new commands. 4. We need one or more custom cut methods, as proposed in #11838 "make interactive code savable as a runnable script". Such issues will depend on how we replace tabs in #7676. ---------- assignee: terry.reedy messages: 223454 nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: Idle: better management of Shell window output type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 03:18:17 2014 From: report at bugs.python.org (Silverback Networks) Date: Sat, 19 Jul 2014 01:18:17 +0000 Subject: [issue22009] pdb.set_trace() crashes with UnicodeDecodeError when binary data is input via stdin In-Reply-To: <1405731710.65.0.406655018278.issue22009@psf.upfronthosting.co.za> Message-ID: <1405732697.51.0.129610560693.issue22009@psf.upfronthosting.co.za> Silverback Networks added the comment: Just verified the problem on 3.4.1 as well. ---------- title: pdb.set_trace() crashes when binary data is input via stdin -> pdb.set_trace() crashes with UnicodeDecodeError when binary data is input via stdin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 03:23:30 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 19 Jul 2014 01:23:30 +0000 Subject: [issue17528] Implement dumps/loads for lru_cache In-Reply-To: <1364036381.48.0.635559042513.issue17528@psf.upfronthosting.co.za> Message-ID: <1405733010.37.0.0973179706337.issue17528@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Have you seen something like this done for other implementations of LRU caches? To me, the idea seems to be at odds with the idea of retaining only the last n calls in memory -- suggesting that a refreshing an outdated entry is cheaper than retiring it to disk and retrieving it later (as you might do with a shelf or database). ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 03:24:45 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 19 Jul 2014 01:24:45 +0000 Subject: [issue22001] containers "same" does not always mean "__eq__". In-Reply-To: <1405625961.78.0.30088981548.issue22001@psf.upfronthosting.co.za> Message-ID: <1405733085.11.0.826132900708.issue22001@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 03:51:12 2014 From: report at bugs.python.org (Bob Carroll) Date: Sat, 19 Jul 2014 01:51:12 +0000 Subject: [issue20585] urllib2 unrelease KQUEUE on Mac OSX 10.9+ In-Reply-To: <1392057963.63.0.832878598113.issue20585@psf.upfronthosting.co.za> Message-ID: <1405734672.68.0.168755632056.issue20585@psf.upfronthosting.co.za> Bob Carroll added the comment: I'm not forking, but this is possibly related my issue. I have a twisted application that periodically crashes when attempting to make an HTTP request. Based on the stack trace showing _scproxy, I tried the work around and it seems to have helped. The crash log is attached. ---------- nosy: +rcarz Added file: http://bugs.python.org/file35993/python_2014-07-18-171109.crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 04:32:35 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 19 Jul 2014 02:32:35 +0000 Subject: [issue11001] Various obvious errors in cookies documentation In-Reply-To: <1295908065.55.0.221906287574.issue11001@psf.upfronthosting.co.za> Message-ID: <1405737155.72.0.204623729531.issue11001@psf.upfronthosting.co.za> R. David Murray added the comment: My suggestion was that the help text from the doc strings be used to update the ReST documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 04:39:25 2014 From: report at bugs.python.org (Tim Peters) Date: Sat, 19 Jul 2014 02:39:25 +0000 Subject: [issue6931] dreadful performance in difflib: ndiff and HtmlDiff In-Reply-To: <1253199298.69.0.280559653373.issue6931@psf.upfronthosting.co.za> Message-ID: <1405737565.7.0.155883111013.issue6931@psf.upfronthosting.co.za> Tim Peters added the comment: I'm sympathetic, but I don't see a good solution here without using incompatible code. ndiff was built to generate "the highest quality diff possible", for text written and edited by humans, where "quality" is measured by human judgment (not an abstract mathematical measure). That was its goal, and I think it does well at that. It wasn't intended to unwind mechanical changes made to machine-generated gibberish (to human eyes) text. Not that such a thing has no value, but it was never ndiff's _intent_ to handle such stuff. So the best solution here would be to use a different differencing engine. As already noted, unified_diff skips any attempt to find "merely similar" lines, and that's the great source of expense here: ndiff takes time essentially cubic in the number of lines, given inputs with a great many similar (but no identical) lines. It was noted that kdiff3 does fine on these inputs very quickly, but, from the kdiff3 FAQ: "If similar lines appear next to each other, this actually is coincidence but this fortunately is often the case." It just so happens that in the inputs attached to this report, the first lines in each file pair are similar, and the second lines likewise, etc etc. This allows kdiff3 to do a wonderful job without any time at all spent _trying_ to find similar lines. But there's nothing coincidental here in what ndiff does: it finds "_the_ most similar pair", and that's a quadratic-time operation (which turns into cubic time when repeated over & over). I didn't write any of the HTML-generating functions, nor have I ever used them, so I'm not in a good position to judge what they "should do". If similar lines aren't interesting in this context, then switching to unified_diff would save gobs of time. If similar lines are interesting, then new code would be required to get at _some_ notion of that less expensively than ndiff does it (e.g., the similarity scores for all pairs could be computed once and saved away, reducing worst-case cubic time to worst-case quadratic time, but at the cost of needing additional memory quadratic in the number of lines). I'm -1 on 11740.patch: there is no reason, in general, to give up looking for the most similar pair - and give up on intraline differencing - simply because the total number of lines in the two blocks exceeds 99. It would reduce diff quality for all uses of the Differ class, not just for the specific uses of Differ made indirectly (via ndiff) by the make_table function - and it would be backward-incompatible anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 04:54:26 2014 From: report at bugs.python.org (Silverback Networks) Date: Sat, 19 Jul 2014 02:54:26 +0000 Subject: [issue22009] pdb.set_trace() crashes with UnicodeDecodeError when binary data is input via stdin In-Reply-To: <1405731710.65.0.406655018278.issue22009@psf.upfronthosting.co.za> Message-ID: <1405738466.21.0.808472114522.issue22009@psf.upfronthosting.co.za> Silverback Networks added the comment: OK, now that I've screwed my thinking cap back on, it's obvious that pdb in the example is pulling from stdin. However, that isn't be the case in my original problem, so modify the example to: sample.py: import sys, pdb infile = sys.stdin.buffer.read() pdb.set_trace() Same error despite nothing being left in stdin's buffer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 08:30:24 2014 From: report at bugs.python.org (Claudiu Popa) Date: Sat, 19 Jul 2014 06:30:24 +0000 Subject: [issue19776] Provide expanduser() on Path objects In-Reply-To: <1385409778.55.0.842571848249.issue19776@psf.upfronthosting.co.za> Message-ID: <1405751424.78.0.128269596828.issue19776@psf.upfronthosting.co.za> Claudiu Popa added the comment: No, my home directory is actually /root. The attached patch should be clearer now (I hope). Regarding your question, wouldn't checking for this duplicate what os.path.expanduser already does? (Unless checking for the exact same string before returning it.) ---------- Added file: http://bugs.python.org/file35994/issue19776_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 09:46:37 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 19 Jul 2014 07:46:37 +0000 Subject: [issue22006] thread module documentation erroneously(?) states not all built-in functions that do blocking I/O release the GIL In-Reply-To: <1405713207.82.0.735431960595.issue22006@psf.upfronthosting.co.za> Message-ID: <1405755997.84.0.148819988481.issue22006@psf.upfronthosting.co.za> Mark Dickinson added the comment: It seems likely that this information is just out of date. But even if there *are* still built-in functions lurking somewhere that don't release the GIL during I/O, the statement in the docs isn't really helpful in finding them. Either way, I'd recommend simply removing it. Adding Guido to the nosy in case he can provide a pre-Python 1.0 historical perspective. ---------- nosy: +gvanrossum, mark.dickinson versions: -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 09:47:26 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 19 Jul 2014 07:47:26 +0000 Subject: [issue22006] thread module documentation erroneously(?) states not all built-in functions that do blocking I/O release the GIL In-Reply-To: <1405713207.82.0.735431960595.issue22006@psf.upfronthosting.co.za> Message-ID: <1405756046.47.0.0360346266341.issue22006@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 11:07:37 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 Jul 2014 09:07:37 +0000 Subject: [issue21964] inconsistency in list-generator comprehension with yield(-from) In-Reply-To: <1405119987.38.0.925003339613.issue21964@psf.upfronthosting.co.za> Message-ID: <1405760857.99.0.354836894073.issue21964@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 11:07:47 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 Jul 2014 09:07:47 +0000 Subject: [issue21964] inconsistency in list-generator comprehension with yield(-from) In-Reply-To: <1405119987.38.0.925003339613.issue21964@psf.upfronthosting.co.za> Message-ID: <1405760867.01.0.293683952762.issue21964@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 12:37:00 2014 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 19 Jul 2014 10:37:00 +0000 Subject: [issue21997] Pdb.set_trace debugging does not end correctly in IDLE In-Reply-To: <1405612331.63.0.402043795388.issue21997@psf.upfronthosting.co.za> Message-ID: <1405766220.06.0.198292490781.issue21997@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Two issues here: a) in IDLE, on a 'return' debug event in the main module, the step command does not end the debugging session. b) in IDLE, BdbQuit is raised by the quit command when the debugger is started with pdb.set_trace(). I do not know IDLE, but a) seems closely related to issue 14743: "on terminating, Pdb debugs itself". As for b) BdbQuit is also raised outside of IDLE (see also issue 16446: "pdb raises BdbQuit on 'quit' when started with set_trace"): >>> def dodebug(): ... import pdb; pdb.set_trace() ... >>> dodebug() --Return-- > (2)dodebug()->None (Pdb) quit Traceback (most recent call last): File "", line 1, in File "", line 2, in dodebug File "/usr/local/lib/python3.5/bdb.py", line 52, in trace_dispatch return self.dispatch_return(frame, arg) File "/usr/local/lib/python3.5/bdb.py", line 96, in dispatch_return if self.quitting: raise BdbQuit bdb.BdbQuit ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 15:10:11 2014 From: report at bugs.python.org (Robin Becker) Date: Sat, 19 Jul 2014 13:10:11 +0000 Subject: [issue1047397] cgitb failures Message-ID: <1405775411.72.0.864492387147.issue1047397@psf.upfronthosting.co.za> Robin Becker added the comment: I'll repeat the post I made to BreamoreBoy regarding this bug: "re: http://bugs.python.org/issue1047397 this bug is now 10 years old. I'm not sure why it's to be considered closed because the original intent of the bug report was that the html output of the cgitb module could be confused and errors during evaluation could make the html output fail. So far as I can tell by modifying the original cgitbbug.py to run under python 3.4.1 it still fails to correctly produce html when a bug occurs in cgitb.html. Producing a more reasonable traceback is certainly a step forward, but I think that has been true since at least 3.1. The whole point of cgitb is to produce something reasonable for an html consumer." I have re-created the original 002 patch with mods for python 3.4.1. It's a bit of a shame that this wasn't fixed 10 years ago. Hopefully any style pedants will find this patch more acceptable. Personally I don't think style errors should prevent a working fix from being adopted. I would have just fixed the fix style and carped afterwards. ---------- Added file: http://bugs.python.org/file35995/bugfix003.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 16:46:40 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Jul 2014 14:46:40 +0000 Subject: [issue22006] thread module documentation erroneously(?) states not all built-in functions that do blocking I/O release the GIL In-Reply-To: <1405713207.82.0.735431960595.issue22006@psf.upfronthosting.co.za> Message-ID: <1405781200.02.0.284328485704.issue22006@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It all depends what you call "I/O". What is true is that not all functions doing system calls release the GIL, AFAIR. If you mean I/O as in actual disk or network I/O then yes, all such functions whould release the GIL. That said, I agree that the statement isn't very helpful. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 16:50:54 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Jul 2014 14:50:54 +0000 Subject: [issue17528] Implement dumps/loads for lru_cache In-Reply-To: <1364036381.48.0.635559042513.issue17528@psf.upfronthosting.co.za> Message-ID: <1405781454.41.0.396516835712.issue17528@psf.upfronthosting.co.za> Antoine Pitrou added the comment: That doesn't sound like a good idea. lru_cache is a decorator, that acts as transparently as possible (i.e. the decorated function has the same metadata and appearance as the original function). Therefore, the lru_cache'd function should also pickle as a regular function - which it currently does. Having a pickle carry all the cache overhead would actually be a regression - instead of a couple of bytes representing the function's global name, you could now get kilobytes (or more) of data representing the whole cache contents. (and, also, it would fail if the cache contains any non-picklable data) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 17:43:48 2014 From: report at bugs.python.org (Stephen Paul Chappell) Date: Sat, 19 Jul 2014 15:43:48 +0000 Subject: [issue7676] IDLE shell shouldn't use TABs In-Reply-To: <1263213381.47.0.181451927584.issue7676@psf.upfronthosting.co.za> Message-ID: <1405784628.68.0.972571438741.issue7676@psf.upfronthosting.co.za> Stephen Paul Chappell added the comment: If you want the IDLE shell to be as consistent as possible with the editor windows, changing the TAB binding to insert four spaces instead of a tab (alternative 2) would be helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 18:10:07 2014 From: report at bugs.python.org (=?utf-8?q?Yannick_Duch=C3=AAne?=) Date: Sat, 19 Jul 2014 16:10:07 +0000 Subject: =?utf-8?b?W2lzc3VlMjIwMTFdIOKAnG1ha2UgdGVzdOKAnSBmYWlscyB3aXRoIDMuNC4x?= =?utf-8?q?_on_Ubuntu_12=2E04?= Message-ID: <1405786207.71.0.923118203201.issue22011@psf.upfronthosting.co.za> New submission from Yannick Duch?ne: `make test` fails with Python 3.4.1 on Ubuntu 12.04 Intel 32 bits. The single `./configure` option used, was `--prefix=$HOME/.local`. As attached file, an archive containing both standard output and standard error outputs. Not some important error notifications appears only in standard output, not in standard error: ?OSError: [Errno 28] No space left on device?. The latter is surprising as there was 11GiB free space. ---------- components: Build files: test-logs.tar.gz messages: 223468 nosy: Hibou57 priority: normal severity: normal status: open title: ?make test? fails with 3.4.1 on Ubuntu 12.04 versions: Python 3.4 Added file: http://bugs.python.org/file35996/test-logs.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 18:47:15 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 Jul 2014 16:47:15 +0000 Subject: [issue22007] sys.stdout.write on OS X is not EINTR safe In-Reply-To: <1405717800.93.0.311765291104.issue22007@psf.upfronthosting.co.za> Message-ID: <1405788435.58.0.18810825541.issue22007@psf.upfronthosting.co.za> STINNER Victor added the comment: > I can reproduce the issue on Linux: Sorry, I forgot to mention that I reproduced the issue on Fedora 20 with Python 2.7. I cannot reproduce with Python 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 20:30:28 2014 From: report at bugs.python.org (Tyler Wade) Date: Sat, 19 Jul 2014 18:30:28 +0000 Subject: [issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX Message-ID: <1405794628.01.0.592426531891.issue22012@psf.upfronthosting.co.za> New submission from Tyler Wade: On Mac OSX, struct.unpack incorrectly handles bools. Python 3.4.1 (default, May 19 2014, 13:10:29) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import struct >>> struct.unpack('????', b'\x00\x01\x02\x03') (False, True, False, True) ---------- assignee: ronaldoussoren components: Macintosh messages: 223470 nosy: ronaldoussoren, wayedt priority: normal severity: normal status: open title: struct.unpack('?', '\x02') returns (False,) on Mac OSX type: behavior 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 Sat Jul 19 21:53:06 2014 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Jul 2014 19:53:06 +0000 Subject: [issue22006] thread module documentation erroneously(?) states not all built-in functions that do blocking I/O release the GIL In-Reply-To: <1405713207.82.0.735431960595.issue22006@psf.upfronthosting.co.za> Message-ID: <1405799586.37.0.833786730348.issue22006@psf.upfronthosting.co.za> Guido van Rossum added the comment: Not in my wildest dreams could I have expected that that claim would still be in the docs 20 years later. :-) Please get rid of it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 22:11:29 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 19 Jul 2014 20:11:29 +0000 Subject: [issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX In-Reply-To: <1405794628.01.0.592426531891.issue22012@psf.upfronthosting.co.za> Message-ID: <1405800689.68.0.0491604621102.issue22012@psf.upfronthosting.co.za> Ned Deily added the comment: Doing a quick look, the results vary. Using current python.org 2.7.8 and 3.4.1 installers, the results are correct. These interpreters are built with Apple gcc-4.2 (non-LLVM) from Xcode 3.2.6. Other 2.7 and 3.4.x builds I have available at the moment, including the Apple-supplied Python 2.7, were built with clang LLVM and they all give the incorrect result. $ /usr/bin/python2.7 -c "import sys,struct;print(struct.unpack('????', b'\x00\x01\x02\x03'), sys.version)" ((False, True, False, True), '2.7.5 (default, Mar 9 2014, 22:15:05) \n[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]') $ arch -i386 /usr/bin/python2.7 -c "import sys,struct;print(struct.unpack('????', b'\x00\x01\x02\x03'), sys.version)" ((False, True, False, True), '2.7.5 (default, Mar 9 2014, 22:15:05) \n[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]') $ /usr/local/bin/python2.7 -c "import sys,struct;print(struct.unpack('????', b'\x00\x01\x02\x03'), sys.version)" ((False, True, True, True), '2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35) \n[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]') $ /usr/local/bin/python2.7-32 -c "import sys,struct;print(struct.unpack('????', b'\x00\x01\x02\x03'), sys.version)" ((False, True, True, True), '2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35) \n[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]') $ /usr/local/bin/python3.4 -c "import sys,struct;print(struct.unpack('????', b'\x00\x01\x02\x03'), sys.version)" (False, True, True, True) 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 00:54:21) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] $ /usr/local/bin/python3.4-32 -c "import sys,struct;print(struct.unpack('????', b'\x00\x01\x02\x03'), sys.version)" (False, True, True, True) 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 00:54:21) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] $ ./bin/python3.4 -c "import sys,struct;print(struct.unpack('????', b'\x00\x01\x02\x03'), sys.version)" (False, True, False, True) 3.4.1+ (3.4:d6b71971b228, Jul 16 2014, 16:30:56) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] ---------- nosy: +ned.deily versions: -Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 22:24:40 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 19 Jul 2014 20:24:40 +0000 Subject: [issue21907] Update Windows build batch scripts In-Reply-To: <1404328602.32.0.540869349126.issue21907@psf.upfronthosting.co.za> Message-ID: <1405801480.97.0.840920057243.issue21907@psf.upfronthosting.co.za> Mark Lawrence added the comment: Does this render the patch against build_pgo.bat on #17667 obsolete? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 22:25:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 19 Jul 2014 20:25:01 +0000 Subject: [issue17667] Windows: build with "build_pgo.bat -2" fails to optimize python.dll In-Reply-To: <1365444634.63.0.621793850181.issue17667@psf.upfronthosting.co.za> Message-ID: <1405801501.46.0.467915057326.issue17667@psf.upfronthosting.co.za> Mark Lawrence added the comment: See also #21907. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 22:38:51 2014 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 19 Jul 2014 20:38:51 +0000 Subject: [issue17709] http://docs.python.org/2.7/objects.inv doesn't support :func:`repr` or :exc:`Exception` In-Reply-To: <1365837524.98.0.624427340429.issue17709@psf.upfronthosting.co.za> Message-ID: <1405802331.84.0.872433825573.issue17709@psf.upfronthosting.co.za> Mark Lawrence added the comment: I don't understand this at all, but if this is a Sphinx bug shouldn't it be reported on the appropriate bug tracker and not here? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 22:43:27 2014 From: report at bugs.python.org (Brian Curtin) Date: Sat, 19 Jul 2014 20:43:27 +0000 Subject: [issue17667] Windows: build with "build_pgo.bat -2" fails to optimize python.dll In-Reply-To: <1365444634.63.0.621793850181.issue17667@psf.upfronthosting.co.za> Message-ID: <1405802607.3.0.0563416228454.issue17667@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 22:46:09 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Jul 2014 20:46:09 +0000 Subject: [issue22006] thread module documentation erroneously(?) states not all built-in functions that do blocking I/O release the GIL In-Reply-To: <1405713207.82.0.735431960595.issue22006@psf.upfronthosting.co.za> Message-ID: <3hG1Sc63rQz7LrY@mail.python.org> Roundup Robot added the comment: New changeset 855ff9182a07 by Mark Dickinson in branch '3.4': Issue #22006: Remove outdated _thread caveat. Thanks Dan O'Reilly for the report. http://hg.python.org/cpython/rev/855ff9182a07 New changeset 3b6b905ae229 by Mark Dickinson in branch 'default': Issue #22006: Merge from 3.4. http://hg.python.org/cpython/rev/3b6b905ae229 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 22:47:35 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Jul 2014 20:47:35 +0000 Subject: [issue22006] thread module documentation erroneously(?) states not all built-in functions that do blocking I/O release the GIL In-Reply-To: <1405713207.82.0.735431960595.issue22006@psf.upfronthosting.co.za> Message-ID: <3hG1VG6Rs9z7LrV@mail.python.org> Roundup Robot added the comment: New changeset 4f359c631bb0 by Mark Dickinson in branch '2.7': Issue #22006: Remove outdated thread module caveat. Thanks Dan O'Reilly for the report. http://hg.python.org/cpython/rev/4f359c631bb0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 22:48:49 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 19 Jul 2014 20:48:49 +0000 Subject: [issue22006] thread module documentation erroneously(?) states not all built-in functions that do blocking I/O release the GIL In-Reply-To: <1405713207.82.0.735431960595.issue22006@psf.upfronthosting.co.za> Message-ID: <1405802929.16.0.878633179332.issue22006@psf.upfronthosting.co.za> Mark Dickinson added the comment: It's gone. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 23:06:45 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 19 Jul 2014 21:06:45 +0000 Subject: [issue21996] gettarinfo method does not handle files without text string names In-Reply-To: <1405583528.37.0.553699872308.issue21996@psf.upfronthosting.co.za> Message-ID: <1405804005.86.0.819525959087.issue21996@psf.upfronthosting.co.za> R. David Murray added the comment: Agreed, the documentation should be modified to say "(using os.fstat on its file descriptor, and its 'name' attribute if arcname is not specified"). ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, r.david.murray stage: -> needs patch versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 23:22:45 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 19 Jul 2014 21:22:45 +0000 Subject: [issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX In-Reply-To: <1405794628.01.0.592426531891.issue22012@psf.upfronthosting.co.za> Message-ID: <1405804965.98.0.492983260943.issue22012@psf.upfronthosting.co.za> Mark Dickinson added the comment: The relevant piece of code in the struct module looks like this: static PyObject * nu_bool(const char *p, const formatdef *f) { BOOL_TYPE x; memcpy((char *)&x, p, sizeof x); return PyBool_FromLong(x != 0); } Is it possible that BOOL_TYPE is a bitfield of length 1, and that clang is somehow making use of that fact? One thing I don't understand is that this shouldn't affect *standard* packing and unpacking (as opposed to native), but I still see the problem for a format of "????". Some debugging shows that we're calling 'nu_bool' even for " _______________________________________ From report at bugs.python.org Sat Jul 19 23:24:34 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 Jul 2014 21:24:34 +0000 Subject: [issue16446] pdb raises BdbQuit on 'quit' when started with set_trace In-Reply-To: <1352416193.43.0.475440625813.issue16446@psf.upfronthosting.co.za> Message-ID: <1405805074.43.0.456035641604.issue16446@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 19 23:31:03 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 19 Jul 2014 21:31:03 +0000 Subject: [issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX In-Reply-To: <1405794628.01.0.592426531891.issue22012@psf.upfronthosting.co.za> Message-ID: <1405805463.51.0.44755540076.issue22012@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Some debugging shows that we're calling 'nu_bool' even for " _______________________________________ From report at bugs.python.org Sun Jul 20 00:04:33 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 Jul 2014 22:04:33 +0000 Subject: [issue21997] Pdb.set_trace debugging does not end correctly In-Reply-To: <1405612331.63.0.402043795388.issue21997@psf.upfronthosting.co.za> Message-ID: <1405807473.93.0.704954731019.issue21997@psf.upfronthosting.co.za> Terry J. Reedy added the comment: With Python 3.4.1, Win 7, there is a detour stepping through displayhook before arriving at the same place with the same result upon quitting. If one does not quit, stepping ends at > c:\programs\python34\lib\threading.py(235)__enter__() -> return self._lock.__enter__() (Pdb) s --Return-- s --------------- With respect to b, the exception, this seems to be a duplicate, and I am inclined to close this issue as such. With respect to a, not stopping, this is not a bug, at least not one involving Idle. Idle executes code within an exec call within a call of the runcode method of the Executive class. In a similar circumstance, the console interpreter does not stop either. So I have removed Idle from the title and components. A direct exec is semi-problemmatical. >>> import pdb >>> def do(): pdb.set_trace() ... >>> exec('do()', locals()) --Return-- > (1)do()->None (Pdb) s --Return-- > (1)()->None (Pdb) s --Return-- > (1)()->None (Pdb) s # This returns to a '>>>' prompt, >>> def run(): exec('do()', locals()) # but hitting after this line returns us to the debugger. --Call-- > c:\programs\python34\lib\encodings\cp437.py(14)decode() -> def decode(self,input,errors='strict'): (Pdb) > c:\programs\python34\lib\encodings\cp437.py(15)decode() -> return codecs.charmap_decode(input,errors,decoding_table) (Pdb) q File "", line 0 ^ SyntaxError: decoding with 'cp437' codec failed (BdbQuit: ) # Now we are really out. >>> run() Traceback (most recent call last): File "", line 1, in NameError: name 'run' is not defined # the def statement did not execute >>> def run(): exec('do()', globals()) ... >>> run() # and now the behavior is as reported for Idle --Return-- > (1)do()->None s # about 20 steps later, still going. s > c:\programs\python34\lib\encodings\cp437.py(19)encode() -> return codecs.charmap_encode(input,self.errors,encoding_map)[0] --------------------------------------------- I know very little about the pdb spec and do not know whether the above is a(n unreported) python or pdb bug or not. If any of you think it is, say so. Otherwise this should be closed. ---------- components: -IDLE stage: -> resolved superseder: -> pdb raises BdbQuit on 'quit' when started with set_trace title: Pdb.set_trace debugging does not end correctly in IDLE -> Pdb.set_trace debugging does not end correctly versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 20 00:17:11 2014 From: report at bugs.python.org (paul j3) Date: Sat, 19 Jul 2014 22:17:11 +0000 Subject: [issue9399] Provide a 'print' action for argparse In-Reply-To: <1280329840.94.0.288179215378.issue9399@psf.upfronthosting.co.za> Message-ID: <1405808231.2.0.00448448903294.issue9399@psf.upfronthosting.co.za> paul j3 added the comment: As Steven notes, the patch lacks tests. It also lacks documentation. The 2 things that this class does different from 'version' are - write without passing the text through 'textwrap' - write to a user defined file There is a difference in opinion between ?ric and Steven as to whether the class should use write directly or use the HelpFormatter. I don't think it needs further action at this time. There doesn't seem to be a lot of interest in it. Also there are a number of ways of accomplishing the task without adding an Action class. - the class is a simple adaptation of the 'version' class - a user defined class works just as well - 'version' with Raw formatter, and shell redirection also works - it is also easy to write the text to a file after parse_args. I've attached a file that illustrates a number of these alternatives. It includes a 'callable' class. ----------------- The discussion got me thinking about a selective version of the RAW formatting, analogous to the HTML
 tag.  With this the user could mark a given text (description, epilog, help, version etc) as pre-formatted, without having to change the formatter_class.

    parser.add_argument('--license', action='version',
        version=Pre(formatted_text))

I probably should submit that in a new issue.

----------
Added file: http://bugs.python.org/file35997/try_write.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 00:33:19 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Sat, 19 Jul 2014 22:33:19 +0000
Subject: [issue17896] Move Windows external libs from \..\ to
 \externals
In-Reply-To: <1367601506.45.0.508953342953.issue17896@psf.upfronthosting.co.za>
Message-ID: <1405809199.44.0.196103169066.issue17896@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

I also find the location annoying and would be happy to see it moved.

Regarding the "extra long build time on the buildbots due to having to recompile Tcl/Tk and OpenSSL" is this a one off the first time you run after the commit, or does it always happen because the buildbots run some form of clean?  Sorry if this sounds like a daft question but I haven't the faintest idea how the various buildbots are configured.

----------
nosy: +BreamoreBoy, steve.dower, terry.reedy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 00:33:56 2014
From: report at bugs.python.org (Brian Curtin)
Date: Sat, 19 Jul 2014 22:33:56 +0000
Subject: [issue17896] Move Windows external libs from \..\ to
 \externals
In-Reply-To: <1367601506.45.0.508953342953.issue17896@psf.upfronthosting.co.za>
Message-ID: <1405809236.07.0.149108704189.issue17896@psf.upfronthosting.co.za>


Changes by Brian Curtin :


----------
nosy:  -brian.curtin

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 00:49:31 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 19 Jul 2014 22:49:31 +0000
Subject: [issue7676] IDLE shell shouldn't use TABs
In-Reply-To: <1263213381.47.0.181451927584.issue7676@psf.upfronthosting.co.za>
Message-ID: <1405810171.43.0.0881265218499.issue7676@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

The problem with just /\t/    / is the absence of a secondary prompt.

>>> def f():
    return 'not acceptible'

Hence the 8+4+4... proposal. With a proportional font, the return would start to the *left* of def. Adding '... ' works for fixed pitch fonts, but '...' is much narrower than '>>>' in a proportional font.

The problem with mandating 'fixed pitch' is that unicode fonts, such as Lucida Sans Unicode on Windows, are proportional.  With that font, spaces are very narrow: '8+4' would need to be 13 + 4 + 4 ... to look right, *on Idle*.  I feel that continuing to work with proportional fonts, for code not limited to ascii, is more important than this issue.

To look right regardless of font, code should start at the margin, with prompts in a separate narrow window. This means that output would not be dedented under input prompts.
---------------------------------------
 in> def f():
         print('code against margin')

out> code against margin
---------------------------------------
' in> ' and 'out> ' (or whatever input and output indicators were used) would be in a vertical strip (like line numbers) with, say, a light gray background (such as used here).  Normal output would be, say, the current blue on a very light blue background. Similarly for red stderr output. It takes very little tint to be distinct from a white background. I have set my custom configuration to try this out.

Cutting code is a different issue. As I said above, I think custom functions are needed. One could only cut code. Another could add '>>> ' and '... ' before input lines, for pasting into docstrings. Another could add '# ' before output lines, for pasting into messages in a form that readers could recut and paste into an editor.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 01:05:11 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Sat, 19 Jul 2014 23:05:11 +0000
Subject: [issue15106] Potential Bug in errors.c
In-Reply-To: <1340120572.84.0.94173614856.issue15106@psf.upfronthosting.co.za>
Message-ID: <1405811111.18.0.492144033345.issue15106@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

>From what I can see the code is completely the same in default but does this matter or not?  As a matter of interest is there an official policy regarding code clones, whether in C or pure Python?

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 01:25:06 2014
From: report at bugs.python.org (Ned Deily)
Date: Sat, 19 Jul 2014 23:25:06 +0000
Subject: [issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX
In-Reply-To: <1405794628.01.0.592426531891.issue22012@psf.upfronthosting.co.za>
Message-ID: <1405812306.55.0.250350340328.issue22012@psf.upfronthosting.co.za>


Ned Deily added the comment:

FTR, the problem also shows up with the current clang-3.4 (3.4.2) and clang3.5 (svn213451-1) packages in Debian testing (on i386), building --with-pydebug and without, so the issue is not confined to OS X.

----------
assignee: ronaldoussoren -> 

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 01:25:58 2014
From: report at bugs.python.org (Ned Deily)
Date: Sat, 19 Jul 2014 23:25:58 +0000
Subject: [issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX
In-Reply-To: <1405794628.01.0.592426531891.issue22012@psf.upfronthosting.co.za>
Message-ID: <1405812358.15.0.0944189293724.issue22012@psf.upfronthosting.co.za>


Changes by Ned Deily :


----------
components: +Build -Macintosh

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 01:26:57 2014
From: report at bugs.python.org (Ned Deily)
Date: Sat, 19 Jul 2014 23:26:57 +0000
Subject: [issue22012] struct.unpack('?', '\x02') returns (False,
 ) when Python is built with clang
In-Reply-To: <1405794628.01.0.592426531891.issue22012@psf.upfronthosting.co.za>
Message-ID: <1405812417.64.0.292214197017.issue22012@psf.upfronthosting.co.za>


Changes by Ned Deily :


----------
title: struct.unpack('?', '\x02') returns (False,) on Mac OSX -> struct.unpack('?', '\x02') returns (False,) when Python is built with clang

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 01:35:32 2014
From: report at bugs.python.org (Roundup Robot)
Date: Sat, 19 Jul 2014 23:35:32 +0000
Subject: [issue17210] documentation of PyUnicode_Format() states wrong
 argument type requirements
In-Reply-To: <1360934426.3.0.547345278452.issue17210@psf.upfronthosting.co.za>
Message-ID: <3hG5D32Dmqz7LkH@mail.python.org>


Roundup Robot added the comment:

New changeset 9cd3ab7c09d1 by Benjamin Peterson in branch '2.7':
args doesn't need to be a tuple (closes #17210)
http://hg.python.org/cpython/rev/9cd3ab7c09d1

New changeset ffbbd43d7342 by Benjamin Peterson in branch '3.4':
args doesn't need to be a tuple (closes #17210)
http://hg.python.org/cpython/rev/ffbbd43d7342

New changeset 2fc379ce5762 by Benjamin Peterson in branch 'default':
merge 3.4 (#17210)
http://hg.python.org/cpython/rev/2fc379ce5762

----------
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 01:57:52 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Sat, 19 Jul 2014 23:57:52 +0000
Subject: [issue15305] Test harness unnecessarily disambiguating twice
In-Reply-To: <1341834351.63.0.548541942582.issue15305@psf.upfronthosting.co.za>
Message-ID: <1405814272.61.0.258258281881.issue15305@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

The patch is very short so can we have a formal review please.

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 02:07:05 2014
From: report at bugs.python.org (Andrew Barnert)
Date: Sun, 20 Jul 2014 00:07:05 +0000
Subject: [issue1152248] Add support for reading records with arbitrary
 separators to the standard IO stack
Message-ID: <1405814825.52.0.151408170703.issue1152248@psf.upfronthosting.co.za>


Andrew Barnert added the comment:

http://thread.gmane.org/gmane.comp.python.ideas/28310 discusses the same idea.

Guido raised a serious problem with either adding an argument to readline and friends, or adding new methods readrecord and friends: It means the hundreds of existing file-like objects that exist today no longer meet the file API.

Putting the separator in the constructor call solves that problem. Construction is not part of the file API, and different file-like objects' constructors are already wildly different. It also seems to fit in better with what perl, awk, bash, etc. do (whether you either set something globally, or on the file, rather than on the line-reading mechanism). And it seems conceptually cleaner; a file shouldn't be changing line-endings in mid-stream?and if it does, that's similar to changing encodings.

Whether this should be done by reusing newline, or by adding another new parameter, I'm not sure. The biggest issue with reusing newline is that it has a meaning for write mode, not just for read mode (either terminal \n characters, or all \n characters, it's not entire clear which, are replaced with newline), and I'm not sure that's appropriate here. (Or, worse, maybe it's appropriate for text files but not binary files?)

R. David Murray's patch doesn't handle binary files, or _pyio, and IIRC from testing the same thing there was one more problem to fix for text files as well? but it's not hard to complete. If I have enough free time tomorrow, I'll clean up what I have and post it.

----------
nosy: +abarnert

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 02:41:35 2014
From: report at bugs.python.org (Andrew Barnert)
Date: Sun, 20 Jul 2014 00:41:35 +0000
Subject: [issue1152248] Add support for reading records with arbitrary
 separators to the standard IO stack
Message-ID: <1405816895.54.0.705421525632.issue1152248@psf.upfronthosting.co.za>


Andrew Barnert added the comment:

While we're at it, Douglas Alan's solution wouldn't be an ideal solution even if it were a builtin. A fileLineIter obviously doesn't support the stream API. It means you end up with two objects that share the same file, but have separate buffers and out-of-sync file pointers. And it's a lot slower.

That being said, I think it may be useful enough to put in the stdlib?even more so if you pull the resplit-an-iterator-of-strings code out:

def resplit(strings, separator):
    partialLine = None
    for s in strings:
        if partialLine:
            partialLine += s
        else:
            partialLine = s
        if not s:
            break
        lines = partialLine.split(separator)
        partialLine = lines.pop()
        yield from lines
    if partialLine:
        yield partialLine

Now, you can do this:

with open('rdm-example') as f:
    chunks = iter(partial(f.read, 8192), '')
    lines = resplit(chunks, '\0')
    lines = (line + '\n' for line in lines)

# Or, if you're just going to strip off the newlines anyway:
with open('file-0-example') as f:
    chunks = iter(partial(f.read, 8192), '')
    lines = resplit(chunks, '\0')

# Or, if you have a binary file:
with open('binary-example, 'rb') as f:
    chunks = iter(partial(f.read, 8192), b'')
    lines = resplit(chunks, b'\0')

# Or, if I understand ysj.ray's example:
with open('ysj.ray-example') as f:
    chunks = iter(partial(f.read, 8192), '')
    lines = resplit(chunks, '\r\n')
    records = resplit(lines, '\t')

# Or, if you have something that isn't a file at all:
lines = resplit((packet.body for packet in packets), '\n')

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 02:45:25 2014
From: report at bugs.python.org (Andrew Barnert)
Date: Sun, 20 Jul 2014 00:45:25 +0000
Subject: [issue1152248] Add support for reading records with arbitrary
 separators to the standard IO stack
Message-ID: <1405817125.01.0.559945778129.issue1152248@psf.upfronthosting.co.za>


Andrew Barnert added the comment:

One last thing, a quick & dirty solution that works today, if you don't mind accessing private internals of stdlib classes, and don't mind giving up the performance of _io for _pyio, and don't need a solution for binary files:

class MyTextIOWrapper(_pyio.TextIOWrapper):
    def readrecord(self, sep):
        readnl, self._readnl = self._readnl, sep
        try:
            return self.readline()
        finally:
            self._readnl = readnl

Or, if you prefer:

class MyTextIOWrapper(_pyio.TextIOWrapper):
    def __init__(self, *args, separator, **kwargs):
        super().__init__(*args, **kwargs)
        self._readnl = separator

For binary files, there's no solution quite as simple; you need to write your own readline method by copying and pasting the one from _pyio.RawIOBase, and the modifications to use an arbitrary separator aren't quite as trivial as they look at first (at least if you want multi-byte separators).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 03:35:18 2014
From: report at bugs.python.org (Martin Panter)
Date: Sun, 20 Jul 2014 01:35:18 +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: <1405820118.43.0.637937983439.issue1927@psf.upfronthosting.co.za>


Martin Panter added the comment:

I experimented with various redirections to /dev/null, files, and other terminal windows on Linux. Current behaviour I am seeing seems to be something like this:

* Prefers prompting to stderr if both stdout and stderr are terminals
* Prefers prompting to stdout if neither are terminals
* Prompts to the non-terminal if only one of stderr and stdout is a terminal. Surely this one should be the other way around if there is going to be a preference at all?

----------
nosy: +vadmium
versions: +Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 04:01:11 2014
From: report at bugs.python.org (Martin Panter)
Date: Sun, 20 Jul 2014 02:01:11 +0000
Subject: [issue1152248] Add support for reading records with arbitrary
 separators to the standard IO stack
Message-ID: <1405821671.34.0.538222667304.issue1152248@psf.upfronthosting.co.za>


Changes by Martin Panter :


----------
nosy: +vadmium

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 04:03:01 2014
From: report at bugs.python.org (Ned Deily)
Date: Sun, 20 Jul 2014 02:03:01 +0000
Subject: [issue22009] pdb.set_trace() crashes with UnicodeDecodeError when
 binary data is input via stdin
In-Reply-To: <1405731710.65.0.406655018278.issue22009@psf.upfronthosting.co.za>
Message-ID: <1405821781.06.0.380195343483.issue22009@psf.upfronthosting.co.za>


Ned Deily added the comment:

The problem here is that you are trying to use sys.stdin for two different purposes: 1. as a data input source for your program using stdin redirected to a disk file; and 2. for pdb's source of debugging commands, expected to be a terminal file.  By specifying "-m pdb", you are telling pdb to start an interactive debugging which it does, paused at the first statement in sample.py ("-> import sys, pdb").  It (actually the cmd standard library module which pdb uses) then tries to read stdin for command input but, because of the command line redirect (" < binary.exe"), reads the binary file instead.  Note this happens before sample.py has done anything.  If you just ran the command "python sample.py < binary.exe", then pdb would not be involved initially, the script would run, read the redirected file until EOF, and then invoke pdb via set_trace.  But, at that point, the redirected sys.stdin is at EOF so pdb immediately exits after trying to read a command.  The doc page for pdb does not specifically warn against redirecting stdin but it does document that the pdb.Pdb instance passes stdin arguments to a cmd.Cmd instance which defaults to using sys.stdin.  I think that's warning enough.

There is an open pdb feature request, Issue20061, to make it more convenient to use pdb with a separate terminal window.  That feature would also cover the rare use case here of having a redirected stdin with pdb.  Otherwise, you need to be careful how you use stdin while using pdb.

----------
components: +Library (Lib) -Windows
nosy: +ned.deily
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: crash -> 

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 04:42:50 2014
From: report at bugs.python.org (Martin Panter)
Date: Sun, 20 Jul 2014 02:42:50 +0000
Subject: [issue17131] subprocess.Popen.terminate can raise exception on Posix
In-Reply-To: <1360058099.4.0.320628892834.issue17131@psf.upfronthosting.co.za>
Message-ID: <1405824170.66.0.812332304595.issue17131@psf.upfronthosting.co.za>


Martin Panter added the comment:

For Posix (dunno about Windows), calling terminate or kill at the OS level after a poll or wait has already succeeded is a bad idea, because the PID may have been recycled. It is essentially operating on a released resource, similar to calling ?os.close? on a closed FD, or freeing unallocated memory.

There is a way to know if the PID is still valid though. Just make sure that successful poll and wait calls invalidate the PID. Then calling terminate or kill, or any other operation that requires the PID, would no longer be valid (or could do nothing if that is more appropriate). Similar to the behaviour of file objects after they are closed: subsequent close calls do nothing; other operations raise an exception.

----------
nosy: +vadmium

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 05:01:32 2014
From: report at bugs.python.org (Zachary Ware)
Date: Sun, 20 Jul 2014 03:01:32 +0000
Subject: [issue17896] Move Windows external libs from \..\ to
 \externals
In-Reply-To: <1367601506.45.0.508953342953.issue17896@psf.upfronthosting.co.za>
Message-ID: <1405825292.91.0.647734962383.issue17896@psf.upfronthosting.co.za>


Zachary Ware added the comment:

After the most recent changes to the buildbot scripts, it would be every time without a patch to the clean script, but at the time I only meant a single time (which really isn't a big deal).

The patch is well out of date, I can update it if we can come to a consensus that this kind of change is a good idea.

----------
stage:  -> patch review
versions: +Python 3.5 -Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 05:16:03 2014
From: report at bugs.python.org (Ned Deily)
Date: Sun, 20 Jul 2014 03:16:03 +0000
Subject: [issue22011] test_os extended attribute setxattr tests can fail with
 ENOSPC (Errno 28)
In-Reply-To: <1405786207.71.0.923118203201.issue22011@psf.upfronthosting.co.za>
Message-ID: <1405826163.69.0.0888799943522.issue22011@psf.upfronthosting.co.za>


Ned Deily added the comment:

(In the future, please just show the test failures and their tracebacks rather than uploading a tar file.) 

The logs show three test failures in test_os:
======================================================================
ERROR: test_fds (test.test_os.ExtendedAttributeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yannick/c/src/Python-3.4.1/Lib/test/test_os.py", line 2238, in test_fds
    self._check_xattrs(getxattr, setxattr, removexattr, listxattr)
  File "/home/yannick/c/src/Python-3.4.1/Lib/test/test_os.py", line 2213, in _check_xattrs
    self._check_xattrs_str(str, *args, **kwargs)
  File "/home/yannick/c/src/Python-3.4.1/Lib/test/test_os.py", line 2202, in _check_xattrs_str
    setxattr(fn, s("user.test"), b"a"*1024, **kwargs)
  File "/home/yannick/c/src/Python-3.4.1/Lib/test/test_os.py", line 2231, in setxattr
    os.setxattr(fp.fileno(), *args)
OSError: [Errno 28] No space left on device: 4

======================================================================
ERROR: test_lpath (test.test_os.ExtendedAttributeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yannick/c/src/Python-3.4.1/Lib/test/test_os.py", line 2223, in test_lpath
    os.listxattr, follow_symlinks=False)
  File "/home/yannick/c/src/Python-3.4.1/Lib/test/test_os.py", line 2213, in _check_xattrs
    self._check_xattrs_str(str, *args, **kwargs)
  File "/home/yannick/c/src/Python-3.4.1/Lib/test/test_os.py", line 2202, in _check_xattrs_str
    setxattr(fn, s("user.test"), b"a"*1024, **kwargs)
OSError: [Errno 28] No space left on device: '@test_16527_tmp'

======================================================================
ERROR: test_simple (test.test_os.ExtendedAttributeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yannick/c/src/Python-3.4.1/Lib/test/test_os.py", line 2219, in test_simple
    os.listxattr)
  File "/home/yannick/c/src/Python-3.4.1/Lib/test/test_os.py", line 2213, in _check_xattrs
    self._check_xattrs_str(str, *args, **kwargs)
  File "/home/yannick/c/src/Python-3.4.1/Lib/test/test_os.py", line 2202, in _check_xattrs_str
    setxattr(fn, s("user.test"), b"a"*1024, **kwargs)
OSError: [Errno 28] No space left on device: '@test_16527_tmp'

----------------------------------------------------------------------

Note that all three failures are on attempts to set a 1024-byte extended attributes on a /tmp file with os.setxattr(), a function which is just a wrapper around the Linux setxattr system call.  "man 2 setxattr" documents that the call can fail with ENOSPC (Errno 28) if "there is insufficient space remaining to store the extended attribute".  "man 5 attr", the overview of extended attribute support, notes that there are various kernel and file system specific limits on extended attributes, including length restrictions.  So presumably there may be legitimate reasons why these tests could get ENOSPC on particular system configurations.  It would be better if test_os anticipated such problems and passed those tests with a warning if ENOSPC is returned.

http://man7.org/linux/man-pages/man2/setxattr.2.html
http://man7.org/linux/man-pages/man5/attr.5.html

----------
components: +Tests -Build
keywords: +easy
nosy: +ned.deily
stage:  -> needs patch
title: ?make test? fails with 3.4.1 on Ubuntu 12.04 -> test_os extended attribute setxattr tests can fail with ENOSPC (Errno 28)
versions: +Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 08:39:30 2014
From: report at bugs.python.org (Berker Peksag)
Date: Sun, 20 Jul 2014 06:39:30 +0000
Subject: [issue1047397] cgitb failures
Message-ID: <1405838370.45.0.054070220714.issue1047397@psf.upfronthosting.co.za>


Changes by Berker Peksag :


----------
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 08:56:34 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 20 Jul 2014 06:56:34 +0000
Subject: [issue22013] Add at least minimal support for thread groups
Message-ID: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za>


New submission from Raymond Hettinger:

Currently, threading.Thread requires that group=None pending implementation of a ThreadGroup class such as that described in http://www.javaworld.com/article/2074481

This has been an open todo for very long time, possibly because it may be too big of a task to implement all the features including subgroups.

I think we can implement a small but useful set of features without too much difficultly:

path_explorers = threading.ThreadGroup('path_explorers')
for path in paths:
    threading.Thread(path_explorers, explore, (path,))
for thread in path_explorers: # enumerate unfinished explorers
    print(thread)
path_explorers.start()        # begin parallel search
path_explorers.join()         # wait for group to finish
print("Result:", best_path)

----------
components: Library (Lib)
messages: 223498
nosy: rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: Add at least minimal support for thread groups
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 09:00:24 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Sun, 20 Jul 2014 07:00:24 +0000
Subject: [issue22014] Add summary table for OS exception <-> errno mapping
Message-ID: <1405839624.34.0.825236607584.issue22014@psf.upfronthosting.co.za>


New submission from Nick Coghlan:

It would be handy if the main OS exception docs at https://docs.python.org/3/library/exceptions.html#os-exceptions included a summary table mapping between exception types and errno names, akin to the one in the original PEP (http://www.python.org/dev/peps/pep-3151/#new-exception-classes)

----------
assignee: docs at python
components: Documentation
keywords: easy
messages: 223499
nosy: docs at python, ncoghlan
priority: normal
severity: normal
status: open
title: Add summary table for OS exception <-> errno mapping
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 09:02:45 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Sun, 20 Jul 2014 07:02:45 +0000
Subject: [issue22014] Add summary table for OS exception <-> errno mapping
In-Reply-To: <1405839624.34.0.825236607584.issue22014@psf.upfronthosting.co.za>
Message-ID: <1405839765.61.0.960996785371.issue22014@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Another idea would be to include fragments of the ASCII art hierarchy throughout the doc, but that's trickier than it sounds, since we just use literalinclude to generate the current one.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 09:06:21 2014
From: report at bugs.python.org (Ronald Oussoren)
Date: Sun, 20 Jul 2014 07:06:21 +0000
Subject: [issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX
In-Reply-To: <1405804965.98.0.492983260943.issue22012@psf.upfronthosting.co.za>
Message-ID: <74677678-E10C-429C-A754-1C9E03E12AED@mac.com>


Ronald Oussoren added the comment:

> On 19 jul. 2014, at 23:22, Mark Dickinson  wrote:
> 
> 
> Mark Dickinson added the comment:
> 
> The relevant piece of code in the struct module looks like this:
> 
> static PyObject *
> nu_bool(const char *p, const formatdef *f)
> {
>    BOOL_TYPE x;
>    memcpy((char *)&x, p, sizeof x);
>    return PyBool_FromLong(x != 0);
> }
> 
> Is it possible that BOOL_TYPE is a bitfield of length 1, and that clang is somehow making use of that fact?

I haven't found a definitive source yet, but it seems that the only valid values for _Bool, which BOOL_TYPE expands to, are 0 and 1.  Clang might make use of that restriction. 

Ronald

----------
title: struct.unpack('?', '\x02') returns (False,) when Python is built with clang -> struct.unpack('?', '\x02') returns (False,) on Mac OSX

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 09:19:46 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 20 Jul 2014 07:19:46 +0000
Subject: [issue22013] Add at least minimal support for thread groups
In-Reply-To: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za>
Message-ID: <1405840786.31.0.984306371544.issue22013@psf.upfronthosting.co.za>


Changes by Raymond Hettinger :


Added file: http://bugs.python.org/file35998/parallel_download_application.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 09:20:27 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 20 Jul 2014 07:20:27 +0000
Subject: [issue22013] Add at least minimal support for thread groups
In-Reply-To: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za>
Message-ID: <1405840827.35.0.232640302717.issue22013@psf.upfronthosting.co.za>


Changes by Raymond Hettinger :


----------
keywords: +patch
Added file: http://bugs.python.org/file35999/threadgroup.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 10:25:18 2014
From: report at bugs.python.org (Mark Dickinson)
Date: Sun, 20 Jul 2014 08:25:18 +0000
Subject: [issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX
In-Reply-To: <1405794628.01.0.592426531891.issue22012@psf.upfronthosting.co.za>
Message-ID: <1405844718.59.0.799463159444.issue22012@psf.upfronthosting.co.za>


Mark Dickinson added the comment:

For native struct packing / unpacking, it's not even clear to me that this should be considered a bug (though for standard unpacking it definitely is):  the primary use-case for native unpacking is unpacking a collection of bytes that was written (from Python, or C, or ...) on the same machine, and in that case we're only going to be unpacking 0s and 1s.

FWIW, the docs say: "Either 0 or 1 in the native or standard bool representation will be packed, and any non-zero value will be True when unpacking.", so for native packing either the docs or the code need to be fixed.

The simplest solution would be to replace `nu_bool` with something identical to `bu_bool`.  In theory that would break on any platform where "sizeof(_Bool)" is greater than 1.  In practice, I doubt that Python's going to meet such platforms in a hurry.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 10:32:06 2014
From: report at bugs.python.org (Mark Dickinson)
Date: Sun, 20 Jul 2014 08:32:06 +0000
Subject: [issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX
In-Reply-To: <1405794628.01.0.592426531891.issue22012@psf.upfronthosting.co.za>
Message-ID: <1405845126.14.0.978001778007.issue22012@psf.upfronthosting.co.za>


Mark Dickinson added the comment:

> In practice, I doubt that Python's going to meet such platforms in a hurry.

Hrm; looks like that's not a particularly safe assumption, especially with older compilers that might do a "typedef int _Bool".

>From http://msdn.microsoft.com/en-us/library/tf4dy80a.aspx:

"That means that for Visual C++ 4.2, a call of sizeof(bool) yields 4, while in Visual C++ 5.0 and later, the same call yields 1."

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 10:57:06 2014
From: report at bugs.python.org (Ned Deily)
Date: Sun, 20 Jul 2014 08:57:06 +0000
Subject: [issue22012] struct.unpack('?', '\x02') returns (False,
 ) when Python is built with clang
In-Reply-To: <1405794628.01.0.592426531891.issue22012@psf.upfronthosting.co.za>
Message-ID: <1405846626.2.0.679755172333.issue22012@psf.upfronthosting.co.za>


Changes by Ned Deily :


----------
title: struct.unpack('?', '\x02') returns (False,) on Mac OSX -> struct.unpack('?', '\x02') returns (False,) when Python is built with clang

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 11:37:48 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sun, 20 Jul 2014 09:37:48 +0000
Subject: [issue22015] C signal handler doesn't save/restore errno
Message-ID: <1405849068.72.0.598999866788.issue22015@psf.upfronthosting.co.za>


New submission from STINNER Victor:

The signal module has a wakefd feature which calls write(fd) in a signal handler, but the signal handler replaces errno without saving/restoring it.

See "Practice 4" in this article:
http://www.ibm.com/developerworks/linux/library/l-reent/index.html

Attached patch fixes the issue for Python 3.5. The bug should be fixed in Python 2.7, 3.4 and 3.5.

----------
files: signal_errno.patch
keywords: patch
messages: 223504
nosy: haypo, neologix, pitrou
priority: normal
severity: normal
status: open
title: C signal handler doesn't save/restore errno
versions: Python 2.7, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36000/signal_errno.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 12:13:38 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sun, 20 Jul 2014 10:13:38 +0000
Subject: [issue22015] C signal handler doesn't save/restore errno
In-Reply-To: <1405849068.72.0.598999866788.issue22015@psf.upfronthosting.co.za>
Message-ID: <1405851218.2.0.885379494982.issue22015@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Ooops, I looked at the wrong function. signal_handler() saves/restores errno. trip_signal() is a function called by signal_handler(). The code is correct.

----------
resolution:  -> not a bug
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 12:33:50 2014
From: report at bugs.python.org (Drekin)
Date: Sun, 20 Jul 2014 10:33:50 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1405852430.01.0.695593192731.issue1602@psf.upfronthosting.co.za>


Changes by Drekin :


Removed file: http://bugs.python.org/file27245/win_unicode_console.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 12:38:12 2014
From: report at bugs.python.org (Xavier de Gaye)
Date: Sun, 20 Jul 2014 10:38:12 +0000
Subject: [issue21997] Pdb.set_trace debugging does not end correctly
In-Reply-To: <1405612331.63.0.402043795388.issue21997@psf.upfronthosting.co.za>
Message-ID: <1405852692.37.0.111544311508.issue21997@psf.upfronthosting.co.za>


Xavier de Gaye added the comment:

> # This returns to a '>>>' prompt,

At the above line in Terry test, the debugger is not terminated and on linux when I type  at this point I get:

>>>
--Call--
> /home/xavier/etc/.pystartup(21)save_history()
-> def save_history(historyPath=historyPath):
(Pdb)

So this seems to be demonstrating the same problem as a).

The NameError exception (name 'run' is not defined) is caused by the execution of its def statement having been interrupted by the debugger with BdbQuit.

This issue could be kept open so as to include the "exec('do()', locals())" with the test cases when fixing the problem of Pdb termination.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 12:48:20 2014
From: report at bugs.python.org (Drekin)
Date: Sun, 20 Jul 2014 10:48:20 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1405853300.19.0.424726922691.issue1602@psf.upfronthosting.co.za>


Drekin added the comment:

@Victor Stinner: You are right. So I did it. Here are the links to GitHub and PyPI: https://github.com/Drekin/win-unicode-console, https://pypi.python.org/pypi/win_unicode_console.

I also tried to delete the files, but it seems that it is only possible to unlink a file from the issue, but the file itself remains. Is it possible to manage the files?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 13:19:14 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Sun, 20 Jul 2014 11:19:14 +0000
Subject: [issue22016] Add a new 'surrogatereplace' output only error handler
Message-ID: <1405855154.64.0.953436457536.issue22016@psf.upfronthosting.co.za>


New submission from Nick Coghlan:

This would be along the same lines as xmlcharrefreplace and backslashreplace, but only affect surrogate escaped characters.

Unlike surrogate escape, which reproduces the escaped characters directly in the data stream, this would follow the 'replace' error handler and insert an appropriately encoded '?' character in the output stream.

The use case would be any context where losing the escaped characters is preferred to either potentially injecting arbitrary binary data into the output (surrogateescape), failing with an exception (strict), or any of the other existing codecs.

It would differ from 'replace' in that normal code points that can't be encoded at all would still trigger an error.

----------
components: Interpreter Core, Library (Lib)
messages: 223508
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Add a new 'surrogatereplace' output only error handler
versions: Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 13:56:54 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Sun, 20 Jul 2014 11:56:54 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1405857414.59.0.518184977539.issue1602@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Thanks Drekin - I'll point folks to your project as a good place to provide initial feedback, and if that seems promising we can look at potentially integrating the various fixes into Python 3.5

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 16:26:40 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Sun, 20 Jul 2014 14:26:40 +0000
Subject: [issue22013] Add at least minimal support for thread groups
In-Reply-To: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za>
Message-ID: <1405866400.44.0.394541875707.issue22013@psf.upfronthosting.co.za>


Changes by Antoine Pitrou :


----------
nosy: +tim.peters

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 16:29:56 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Sun, 20 Jul 2014 14:29:56 +0000
Subject: [issue22013] Add at least minimal support for thread groups
In-Reply-To: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za>
Message-ID: <1405866596.36.0.911757035974.issue22013@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

I have a hard time understanding what it would bring in Python's context. Even the Java API doesn't look very useful.

----------
nosy: +neologix, pitrou

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 16:46:01 2014
From: report at bugs.python.org (Ronald Oussoren)
Date: Sun, 20 Jul 2014 14:46:01 +0000
Subject: [issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX
In-Reply-To: <1405845126.14.0.978001778007.issue22012@psf.upfronthosting.co.za>
Message-ID: 


Ronald Oussoren added the comment:

> On 20 jul. 2014, at 10:32, Mark Dickinson  wrote:
> 
> 
> Mark Dickinson added the comment:
> 
>> In practice, I doubt that Python's going to meet such platforms in a hurry.
> 
> Hrm; looks like that's not a particularly safe assumption, especially with older compilers that might do a "typedef int _Bool"

I'm not sure about the actual definition, but at least for OSX on PPC sizeof(bool) is not 1. I ran into this with pyobjc when I tried to treat BOOL and bool the same.

All of this is with Objective-C, but the same should be true for plain C.

----------
title: struct.unpack('?', '\x02') returns (False,) when Python is built with clang -> struct.unpack('?', '\x02') returns (False,) on Mac OSX

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 17:00:21 2014
From: report at bugs.python.org (Jason R. Coombs)
Date: Sun, 20 Jul 2014 15:00:21 +0000
Subject: [issue13540] Document the Action API in argparse
In-Reply-To: <1323183395.55.0.489132691311.issue13540@psf.upfronthosting.co.za>
Message-ID: <1405868421.68.0.74470452621.issue13540@psf.upfronthosting.co.za>


Changes by Jason R. Coombs :


Added file: http://bugs.python.org/file36001/9ac347a7f375.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 17:22:27 2014
From: report at bugs.python.org (Jason R. Coombs)
Date: Sun, 20 Jul 2014 15:22:27 +0000
Subject: [issue13540] Document the Action API in argparse
In-Reply-To: <1323183395.55.0.489132691311.issue13540@psf.upfronthosting.co.za>
Message-ID: <1405869747.45.0.622392146332.issue13540@psf.upfronthosting.co.za>


Changes by Jason R. Coombs :


Added file: http://bugs.python.org/file36003/b8c09b766e20.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 17:23:59 2014
From: report at bugs.python.org (R. David Murray)
Date: Sun, 20 Jul 2014 15:23:59 +0000
Subject: [issue21999] shlex: bug in posix mode handling of empty strings
In-Reply-To: <1405615020.91.0.261812812224.issue21999@psf.upfronthosting.co.za>
Message-ID: <1405869839.23.0.890802124918.issue21999@psf.upfronthosting.co.za>


R. David Murray added the comment:

Vinay has a patch improving shlex parsing in issue 1521950, but it doesn't seem to address this case, so I'm adding him as nosy.

----------
nosy: +r.david.murray, vinay.sajip
stage:  -> needs patch
title: shlex: bug in posix more handling of empty strings -> shlex: bug in posix mode handling of empty strings
type:  -> behavior
versions:  -Python 3.1, Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 17:27:11 2014
From: report at bugs.python.org (R. David Murray)
Date: Sun, 20 Jul 2014 15:27:11 +0000
Subject: [issue22000] cross type comparisons clarification
In-Reply-To: <1405622312.02.0.49093151571.issue22000@psf.upfronthosting.co.za>
Message-ID: <1405870031.66.0.840559957923.issue22000@psf.upfronthosting.co.za>


R. David Murray added the comment:

'type' and 'class' are two different names for the same concept in python3, so this paragraph simply appears to be out of date and indeed in need of complete rewording.

----------
nosy: +r.david.murray

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 17:29:00 2014
From: report at bugs.python.org (Jason R. Coombs)
Date: Sun, 20 Jul 2014 15:29:00 +0000
Subject: [issue13540] Document the Action API in argparse
In-Reply-To: <1323183395.55.0.489132691311.issue13540@psf.upfronthosting.co.za>
Message-ID: <1405870140.36.0.28429619964.issue13540@psf.upfronthosting.co.za>


Jason R. Coombs added the comment:

I've made another commit to capture Steven's recommendations. I've also merged the work with the latest 2.7 tip, the result of which is the latest diff. I'll commit this in a week or two if there aren't any objections, though I would appreciate a review and especially any suggestions on how I might test the correctness of the syntax.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 17:33:41 2014
From: report at bugs.python.org (Jason R. Coombs)
Date: Sun, 20 Jul 2014 15:33:41 +0000
Subject: [issue13540] Document the Action API in argparse
In-Reply-To: <1323183395.55.0.489132691311.issue13540@psf.upfronthosting.co.za>
Message-ID: <1405870421.56.0.781577332553.issue13540@psf.upfronthosting.co.za>


Jason R. Coombs added the comment:

I've tried building the docs, but it appears to rely on a local build of Python as well as subversion, neither of which my system can do currently, so I'm hoping someone has a suitable environment to help test the building of the docs.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 17:34:07 2014
From: report at bugs.python.org (R. David Murray)
Date: Sun, 20 Jul 2014 15:34:07 +0000
Subject: [issue22001] containers "same" does not always mean "__eq__".
In-Reply-To: <1405625961.78.0.30088981548.issue22001@psf.upfronthosting.co.za>
Message-ID: <1405870447.13.0.975356540008.issue22001@psf.upfronthosting.co.za>


R. David Murray added the comment:

"must be identical" sounds like "identical twins".  I think what you mean is "must be references to the same object or to objects that compare equal".  If you don't want to get into the concept of 'references' here, I suppose it could read "must be the same object or objects that compare equal".  What I'm saying is that "same object" is stronger than "identical"..."identical" is much closer to "equal" in English.

----------
nosy: +r.david.murray

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 17:46:18 2014
From: report at bugs.python.org (R. David Murray)
Date: Sun, 20 Jul 2014 15:46:18 +0000
Subject: [issue22002] Make full use of test discovery in test subpackages
In-Reply-To: <1405627760.3.0.397447180395.issue22002@psf.upfronthosting.co.za>
Message-ID: <1405871178.27.0.738571901161.issue22002@psf.upfronthosting.co.za>


R. David Murray added the comment:

I have no problem with the change to test_email.  (I could have sworn I tried unittest.main() in __main__ when I set it up, but I must have screwed something up).

I didn't go over the patch line by line, but it looks good to me.

----------
nosy: +r.david.murray

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 18:16:43 2014
From: report at bugs.python.org (Geert Jansen)
Date: Sun, 20 Jul 2014 16:16:43 +0000
Subject: [issue21965] Add support for Memory BIO to _ssl
In-Reply-To: <1405156134.57.0.513965198344.issue21965@psf.upfronthosting.co.za>
Message-ID: <1405873003.42.0.69078439629.issue21965@psf.upfronthosting.co.za>


Geert Jansen added the comment:

Hi all (pitrou, haypo and all others) can I get some feedback on this patch?

Thanks!

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 18:24:34 2014
From: report at bugs.python.org (Xavier de Gaye)
Date: Sun, 20 Jul 2014 16:24:34 +0000
Subject: [issue22017] Bad reference counting in the _warnings module
Message-ID: <1405873474.62.0.40643670319.issue22017@psf.upfronthosting.co.za>


New submission from Xavier de Gaye:

$ ./python
Python 2.7.8+ (2.7:5563f895b215, Jul 20 2014, 18:10:28) 
[GCC 4.9.0 20140521 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import warnings
>>> warnings.defaultaction = 'default'
>>> warnings.warn('some warning')
__main__:1: UserWarning: some warning
>>> exit()
Fatal Python error: Objects/dictobject.c:519 object at 0x7fce2013e2e0 has negative ref count -2604246222170760230
Aborted (core dumped)

The following patch fixes this: the new string object is referenced both by the static variable '_default_action' and the module attribute 'default_action'.
Python 3.5 handles this correctly.
The same kind of fix should also be applied to '_once_registry' and '_filters'.

diff --git a/Python/_warnings.c b/Python/_warnings.c
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -903,6 +903,7 @@
         return;
 
     _default_action = PyString_FromString("default");
+    Py_INCREF(_default_action);
     if (_default_action == NULL)
         return;
     if (PyModule_AddObject(m, "default_action", _default_action) < 0)

----------
components: Interpreter Core
messages: 223519
nosy: xdegaye
priority: normal
severity: normal
status: open
title: Bad reference counting in the _warnings module
type: crash
versions: Python 2.7

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 18:28:46 2014
From: report at bugs.python.org (Xavier de Gaye)
Date: Sun, 20 Jul 2014 16:28:46 +0000
Subject: [issue22017] Bad reference counting in the _warnings module
In-Reply-To: <1405873474.62.0.40643670319.issue22017@psf.upfronthosting.co.za>
Message-ID: <1405873726.57.0.490092666461.issue22017@psf.upfronthosting.co.za>


Xavier de Gaye added the comment:

> The same kind of fix should also be applied to '_once_registry' and '_filters'.

Oops, no they are correctly refcounted.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 18:47:48 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Sun, 20 Jul 2014 16:47:48 +0000
Subject: [issue15376] Refactor the test_runpy walk_package support code into a
 common location
In-Reply-To: <1342509049.53.0.303616016829.issue15376@psf.upfronthosting.co.za>
Message-ID: <1405874868.86.0.970360028996.issue15376@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

The chain of dependencies goes from here to #15403, #18576 and back here.  How do we break this loop?

----------
nosy: +BreamoreBoy
type:  -> enhancement
versions: +Python 3.5 -Python 3.3, Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 18:50:34 2014
From: report at bugs.python.org (David Wilson)
Date: Sun, 20 Jul 2014 16:50:34 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1405875034.32.0.75145330564.issue22003@psf.upfronthosting.co.za>


David Wilson added the comment:

This version is tidied up enough that I think it could be reviewed.

Changes are:

 * Defer `buf' allocation until __init__, rather than __new__ as was previously done. Now upon completion, BytesIO.__new__ returns a valid, closed BytesIO, whereas previously a valid, empty, open BytesIO was returned. Is this interface change permissible?

 * Move __init__ guts into a "reinit()", for sharing with __setstate__, which also previously caused an unnecessary copy. Additionally gather up various methods for deallocating buffers into a single "reset()" function, called by reinit(), _dealloc(), and _close()

 * Per Stefan's suggested approach, reinit() now explicitly checks for a read-only buffer, falling back to silently performing a copy if the returned buffer is read-write. That seems vastly preferable to throwing an exception, which would probably be another interface change.

 * Call `unshare()` any place the buffer is about to be modified. If the buffer needs to be made private, it also accepts a size hint indicating how much less/more space the subsequent operation needs, to avoid a redundant reallocation after the unsharing.


Outstanding issues:

 * I don't understand why buf_size is a size_t, and I'm certain the casting in unshare() is incorrect somehow. Is it simply to avoid signed overflow?

----------
Added file: http://bugs.python.org/file36004/cow2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 18:56:59 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Sun, 20 Jul 2014 16:56:59 +0000
Subject: [issue22017] Bad reference counting in the _warnings module
In-Reply-To: <1405873474.62.0.40643670319.issue22017@psf.upfronthosting.co.za>
Message-ID: <1405875419.31.0.788229010168.issue22017@psf.upfronthosting.co.za>


Changes by Antoine Pitrou :


----------
nosy: +brett.cannon

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 18:57:58 2014
From: report at bugs.python.org (paul j3)
Date: Sun, 20 Jul 2014 16:57:58 +0000
Subject: [issue13540] Document the Action API in argparse
In-Reply-To: <1323183395.55.0.489132691311.issue13540@psf.upfronthosting.co.za>
Message-ID: <1405875478.66.0.288379245632.issue13540@psf.upfronthosting.co.za>


paul j3 added the comment:

I think you want to unlink 9ac347a7f375.diff 

It's from a different project

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 19:27:49 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Sun, 20 Jul 2014 17:27:49 +0000
Subject: [issue17665] convert test_wsgiref to idiomatic unittest code
In-Reply-To: <1365843351.69.0.98319893836.issue17665@psf.upfronthosting.co.za>
Message-ID: <1405877269.71.0.541721084355.issue17665@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Changes were made to this module on #20555.

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 19:28:09 2014
From: report at bugs.python.org (Gregory P. Smith)
Date: Sun, 20 Jul 2014 17:28:09 +0000
Subject: [issue17131] subprocess.Popen.terminate can raise exception on Posix
In-Reply-To: <1360058099.4.0.320628892834.issue17131@psf.upfronthosting.co.za>
Message-ID: <1405877289.87.0.00196110606367.issue17131@psf.upfronthosting.co.za>


Gregory P. Smith added the comment:

agreed, we could at least do that for the Popen methods.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 19:29:02 2014
From: report at bugs.python.org (Gregory P. Smith)
Date: Sun, 20 Jul 2014 17:29:02 +0000
Subject: [issue17131] subprocess.Popen.terminate can raise exception on Posix
In-Reply-To: <1360058099.4.0.320628892834.issue17131@psf.upfronthosting.co.za>
Message-ID: <1405877342.06.0.842155224148.issue17131@psf.upfronthosting.co.za>


Changes by Gregory P. Smith :


----------
assignee:  -> gregory.p.smith
stage:  -> needs patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 19:40:41 2014
From: report at bugs.python.org (Wolfgang Maier)
Date: Sun, 20 Jul 2014 17:40:41 +0000
Subject: [issue1152248] Add support for reading records with arbitrary
 separators to the standard IO stack
Message-ID: <1405878041.78.0.0989484198922.issue1152248@psf.upfronthosting.co.za>


Changes by Wolfgang Maier :


----------
nosy: +wolma

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 19:55:54 2014
From: report at bugs.python.org (David Wilson)
Date: Sun, 20 Jul 2014 17:55:54 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1405878953.99.0.951178845402.issue22003@psf.upfronthosting.co.za>


David Wilson added the comment:

New patch also calls unshare() during getbuffer()

----------
Added file: http://bugs.python.org/file36005/cow3.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 21:01:35 2014
From: report at bugs.python.org (Ned Deily)
Date: Sun, 20 Jul 2014 19:01:35 +0000
Subject: [issue22007] sys.stdout.write on Python 2.7 is not EINTR safe
In-Reply-To: <1405717800.93.0.311765291104.issue22007@psf.upfronthosting.co.za>
Message-ID: <1405882895.3.0.284030671475.issue22007@psf.upfronthosting.co.za>


Ned Deily added the comment:

I also can reproduce this on Linux with Python 2.7 but not with 3.4 which uses a different io system.  So the question is: is anyone interested in addressing this for Python 2 file objects?

----------
nosy: +gregory.p.smith
stage:  -> needs patch
title: sys.stdout.write on OS X is not EINTR safe -> sys.stdout.write on Python 2.7 is not EINTR safe

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 21:03:30 2014
From: report at bugs.python.org (R. David Murray)
Date: Sun, 20 Jul 2014 19:03:30 +0000
Subject: [issue22011] test_os extended attribute setxattr tests can fail with
 ENOSPC (Errno 28)
In-Reply-To: <1405786207.71.0.923118203201.issue22011@psf.upfronthosting.co.za>
Message-ID: <1405883010.59.0.523266434986.issue22011@psf.upfronthosting.co.za>


R. David Murray added the comment:

If "insuffcient space" is insufficient disk space (ie: /tmp is full), I don't see any reason the test should cater to that possibility.  None of our other tests do.  If it means something else, then nevermind.

----------
nosy: +r.david.murray

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 21:10:47 2014
From: report at bugs.python.org (Ned Deily)
Date: Sun, 20 Jul 2014 19:10:47 +0000
Subject: [issue22011] test_os extended attribute setxattr tests can fail with
 ENOSPC (Errno 28)
In-Reply-To: <1405786207.71.0.923118203201.issue22011@psf.upfronthosting.co.za>
Message-ID: <1405883447.84.0.534786116876.issue22011@psf.upfronthosting.co.za>


Ned Deily added the comment:

My reading of the man page is that in the xattr case it can refer to conditions other than just file system full, e.g. https://bugzilla.kernel.org/show_bug.cgi?id=12793.  Also, Yannick reported that the volume was apparently not full.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 21:11:11 2014
From: report at bugs.python.org (R. David Murray)
Date: Sun, 20 Jul 2014 19:11:11 +0000
Subject: [issue22013] Add at least minimal support for thread groups
In-Reply-To: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za>
Message-ID: <1405883471.26.0.693500600842.issue22013@psf.upfronthosting.co.za>


R. David Murray added the comment:

The example looks like something you could use concurrent.futures for and get more features besides?

----------
nosy: +r.david.murray

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 21:16:25 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sun, 20 Jul 2014 19:16:25 +0000
Subject: [issue22007] sys.stdout.write on Python 2.7 is not EINTR safe
In-Reply-To: <1405717800.93.0.311765291104.issue22007@psf.upfronthosting.co.za>
Message-ID: <1405883785.24.0.215986746813.issue22007@psf.upfronthosting.co.za>


STINNER Victor added the comment:

I'm interested to work on all EINTR issues, including Python 2.

I'm working on a new PEP with Charles-Fran?ois Natali to address *all* EINTR at once in Python 3.5. If the PEP is accepted, we may fix some EINTR issues on Python 2. Some changes change the behaviour and so cannot we done in Python 2. Well, the PEP is still a draft, we will see that later.

----------
nosy: +neologix

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 21:47:14 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sun, 20 Jul 2014 19:47:14 +0000
Subject: [issue22018] signal: accept socket for signal.set_wakeup_fd()
Message-ID: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>


New submission from STINNER Victor:

Hi,

I'm working on asyncio, someone asked why asyncio cannot be interrupted by CTRL+c (SIGINT):
https://code.google.com/p/tulip/issues/detail?id=191

On Windows, select.select() is not interrupted by CTRL+c. To get a reliable behaviour, interrupt select.select() on a signal, we can use signal.set_wakeup_fd(). New problem: on Windows, select.select() only supports sockets.

I propose to modify signal.set_wakeup_fd() to not only support files (use write), but also sockets (use send). Attached patch implements that.

This issue is part of a global PEP to modify how Python handles EINTR. I'm writing a PEP on that with Charles-Fran?ois Natali. The idea to retry on EINTR in some cases, like write(), so we need a way to wakeup the code on a signal, on all platforms.


Questions:

- I had to modify the pythoncore Visual Studio project to add a dependency to the WinSock library ("ws2_32.lib"). Is it a bad thing? We may split the _signal module into a new project, to only put the dependency there. What do you think? I'm not sure that it makes sense because the _signal module is always imported at Python startup, by initsigs() (search for the call to PyOS_InitInterrupts()).


- PySignal_SetWakeupFd() returns the old file descriptor, which is -1 by default. The API is not written to report errors. I chose to return -2 and clear the Python exception. Should we add a new function raising a Python exception on error? Ex: "int PySignal_SetWakeupFdWithError(int fd, int *old_fd)" returns 0 on success, -1 on error.


+        /* Import the _socket module to call WSAStartup() */
+        mod = PyImport_ImportModuleNoBlock("_socket");

I chose to import the _socket module because calling WSAStartup() requires also to call WSACleanup() at exit. I don't want to have two modules responsible for that.

I'm using "getsockopt(fd, SOL_SOCKET, SO_ERROR, ...)" to check if fd is a socket. Is there a better function to check if a file descriptor or handle is a socket?

According to the documentation, "GetFileType(handle) == FILE_TYPE_PIPE" is true for sockets, but also for (named and anonymous) pipes.

----------
components: Windows, asyncio
files: signal_socket.patch
keywords: patch
messages: 223532
nosy: gvanrossum, haypo, loewis, neologix, pitrou, yselivanov
priority: normal
severity: normal
status: open
title: signal: accept socket for signal.set_wakeup_fd()
versions: Python 3.5
Added file: http://bugs.python.org/file36006/signal_socket.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 21:49:34 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sun, 20 Jul 2014 19:49:34 +0000
Subject: [issue22018] signal: accept socket for signal.set_wakeup_fd()
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1405885774.84.0.944965146098.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

I tested manually test_signal.test_socket() on Windows 7: the test pass.

The test is currently skipped on Windows because the whole TestCase is skipped. Moreover, there is no socket.socketpair() function on Windows. For the manual test, I used asyncio.windows_utils.socketpair(). I prefer to not make test_signal depends on the asyncio module.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 22:00:28 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Sun, 20 Jul 2014 20:00:28 +0000
Subject: [issue22018] signal: accept socket for signal.set_wakeup_fd()
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1405886428.18.0.032811953762.issue22018@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

I don't know much about how sockets are implemented on Windows; is there a guarantee that the space of possible socket fds doesn't overlap the space of possible stream fds?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 22:04:49 2014
From: report at bugs.python.org (Roundup Robot)
Date: Sun, 20 Jul 2014 20:04:49 +0000
Subject: [issue22017] Bad reference counting in the _warnings module
In-Reply-To: <1405873474.62.0.40643670319.issue22017@psf.upfronthosting.co.za>
Message-ID: <3hGcVS1bM4z7LjY@mail.python.org>


Roundup Robot added the comment:

New changeset 8106f91fccd6 by Benjamin Peterson in branch '2.7':
correct ref counting of default_action (closes #22017)
http://hg.python.org/cpython/rev/8106f91fccd6

----------
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 22:41:18 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Sun, 20 Jul 2014 20:41:18 +0000
Subject: [issue22002] Make full use of test discovery in test subpackages
In-Reply-To: <1405627760.3.0.397447180395.issue22002@psf.upfronthosting.co.za>
Message-ID: <1405888878.39.0.10073485524.issue22002@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

I'm getting lost in all the enhancement requests for tests.  How does this relate to e.g. 16748 or 10572?

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 23:10:59 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sun, 20 Jul 2014 21:10:59 +0000
Subject: [issue22018] signal: accept socket for signal.set_wakeup_fd()
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1405890659.51.0.195121978058.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Guido wrote:
"I don't know much about how sockets are implemented on Windows; is there a guarantee that the space of possible socket fds doesn't overlap the space of possible stream fds?"

Python has a low-level _PyVerify_fd() which uses the __pioinfo private array. It looks socket "handles" (small integers betwen 256 and 1000 in my quick tests) and file descriptors overlap. Files get file descriptors between 0 and 2047.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 23:16:16 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 20 Jul 2014 21:16:16 +0000
Subject: [issue22013] Add at least minimal support for thread groups
In-Reply-To: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za>
Message-ID: <1405890976.31.0.449642624839.issue22013@psf.upfronthosting.co.za>


Changes by Raymond Hettinger :


Removed file: http://bugs.python.org/file35998/parallel_download_application.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 23:16:37 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 20 Jul 2014 21:16:37 +0000
Subject: [issue22013] Add at least minimal support for thread groups
In-Reply-To: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za>
Message-ID: <1405890997.8.0.213031105813.issue22013@psf.upfronthosting.co.za>


Changes by Raymond Hettinger :


Added file: http://bugs.python.org/file36007/parallel_download_application.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 23:20:52 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Sun, 20 Jul 2014 21:20:52 +0000
Subject: [issue22018] signal: accept socket for signal.set_wakeup_fd()
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1405891252.96.0.14451360234.issue22018@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

Perhaps the API should take a socket object on Windows to avoid any confusion?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 23:34:54 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sun, 20 Jul 2014 21:34:54 +0000
Subject: [issue22018] signal: accept socket for signal.set_wakeup_fd()
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1405892094.37.0.234698276277.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> Perhaps the API should take a socket object on Windows to avoid any confusion?

I don't know if the feature is useful, but signal.set_wakeup_fd() works on Windows since at least Python 2.7 and accepts files. Only supporting sockets would be a regression.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 23:45:40 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 20 Jul 2014 21:45:40 +0000
Subject: [issue22013] Add at least minimal support for thread groups
In-Reply-To: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za>
Message-ID: <1405892740.67.0.558117245477.issue22013@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

> The example looks like something you could use concurrent.futures for

The example was minimal to show how it works.  The concept of having groups of related threads is perfectly general.  It is a tool for organizing and reasoning about code more complex than this.  

The main virtue is in the aggregate join operation (wait for all workers doing a given kind of task to finish).  I believe this is reasonably common (I've seen aggregate joins at more than one client). 

The goal is to simplify common patterns of parallel work in phases (each phase must be complete before the next phase starts).

Old way:

    phase1_workers = []
    for data in pool:
        t = threading.Thread(target=phase1, args=(data,))
        t.start()
        phase1_workers.append(t)
    for t in phase1_workers:
        t.join()

    phase2_workers = []
    for data in phase1_pool:
        t = threading.Thread(target=phase2, args=(data,))
        t.start()
        phase2_workers.append(t)
    for t in phase2_workers:
        t.join()

    phase3_workers = []
    for data in phase2_pool:
        t = threading.Thread(target=phase3, args=(data,))
        t.start()
        phase3_workers.append(t)
    for t in phase3_workers:
        t.join()

    print('Done')

New way with cleaner code:

    phase1 = SimpleThreadGroup('phase1')
    phase2 = SimpleThreadGroup('phase2')
    phase3 = SimpleThreadGroup('phase3')

    for data in pool:
        t = threading.Thread(phase1, phase1_task, args=(data,)).start()
    phase1.join()

    for data in phase1_pool:
        t = threading.Thread(phase2, phase2_task, args=(data,)).start()
    phase2.join()

    for data in phase2_pool:
        t = threading.Thread(phase3, phase3_task, args=(data,)).start()
    phase3.join()

    print('Done')

The new code is easier to write, to reason about, and to maintain because the thread group takes care of building the aggregate collection and applying the aggregate join operation to make sure each phase is complete before going on to the next phase (i.e. all sprites moved, all user inputs processed, all monsters generated, all conflicts resolved, all points accumulated, all bonuses applied, ...)

As discussed in http://journals.ecs.soton.ac.uk/java/tutorial/java/threads/threadgroup.html , the feature would be more useful if we had the ability to suspend, resume, or stop collections of threads, but our threading have more limited controls (check name, get identifier, check whether the thread is alive, and most usefully wait for the thread with a join).

For people who write complex multi-threaded code (i.e. my clients), this would offer a nice simplification.  I don't see any reason to leave this feature left as a stub in perpetuity.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 23:51:20 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Sun, 20 Jul 2014 21:51:20 +0000
Subject: [issue7676] IDLE shell shouldn't use TABs
In-Reply-To: <1263213381.47.0.181451927584.issue7676@psf.upfronthosting.co.za>
Message-ID: <1405893080.02.0.439239196747.issue7676@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

To continue and expand some things I said in various messages above...

The reason Shell does not and indeed should not have a secondary line prompt is that in Shell, '>>> ' means 'Enter a statement:' rather than just a line. Being able to enter, edit, and recall complete statements rather than just lines is an important feature of Idle's Shell.

For proportional fonts, I suspect the tab stops are every 8 em quads. A em quad (named after M) is square, so it is as wide as the font is high.

In msg151418 I suggested that the solution is to not mix prompts with user input, as is done. I gave the narrow prompt window as fix 3. I suggested as fix 1 to put statement prompts and output indications on separate lines. Here is a mockup example.

>>>:
def f(x):
    if x:
        print('got it')
        return 'something'
>>>:
f(3)
---
got it
>>>:

(The 'blank line' signaling 'end of statement' is intentionally suppressed.) This should be easy to do and, to me, looks pretty decent. The hesitation I had before is the copy for paste problem, but if that is a custom function, it would not be hard to reformat. A minor problem is the output could include '>>>:\n' or '---\n', but today one can do

>>> print(">>> def fake():\n\treturn 'def'\n")
>>> def fake():
	return 'def'

>>>

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 20 23:52:21 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 20 Jul 2014 21:52:21 +0000
Subject: [issue22013] Add at least minimal support for thread groups
In-Reply-To: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za>
Message-ID: <1405893141.03.0.867369880817.issue22013@psf.upfronthosting.co.za>


Changes by Raymond Hettinger :


----------
nosy: +Christian.Tismer, aleax, kristjan.jonsson, lemburg

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 00:07:21 2014
From: report at bugs.python.org (David Wilson)
Date: Sun, 20 Jul 2014 22:07:21 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1405894041.07.0.141694171262.issue22003@psf.upfronthosting.co.za>


David Wilson added the comment:

I'm not sure the "read only buffer" test is strong enough: having a readonly view is not a guarantee that the data in the view cannot be changed through some other means, i.e. it is read-only, not immutable.

Pretty sure this approach is broken. What about the alternative approach of specializing for Bytes?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 00:20:18 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Sun, 20 Jul 2014 22:20:18 +0000
Subject: [issue22018] signal: accept socket for signal.set_wakeup_fd()
In-Reply-To: <1405892094.37.0.234698276277.issue22018@psf.upfronthosting.co.za>
Message-ID: 


Guido van Rossum added the comment:

So perhaps an int or a socket?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 00:22:37 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 20 Jul 2014 22:22:37 +0000
Subject: [issue22013] Add at least minimal support for thread groups
In-Reply-To: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za>
Message-ID: <1405894957.87.0.300312781318.issue22013@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

c++
"thread_group provides for a collection of threads that are related in some fashion."
http://www.boost.org/doc/libs/1_35_0/doc/html/thread/thread_management.html#thread.thread_management.threadgroup

perl
"Thread::Pool - group of threads for performing similar jobs"
http://search.cpan.org/dist/Thread-Pool/lib/Thread/Pool.pm

> Even the Java API doesn't look very useful.

This isn't a Java-only concept.  It is widely available.

haskell
"This module extends Control.Concurrent.Thread with the ability to wait for a group of threads to terminate."
http://hackage.haskell.org/package/threads-0.5.0.2/docs/Control-Concurrent-Thread-Group.html

ruby
"ThreadGroup provides a means of keeping track of a number of threads as a group."
http://www.ruby-doc.org/core-2.1.2/ThreadGroup.html

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 00:24:16 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 20 Jul 2014 22:24:16 +0000
Subject: [issue22013] Add at least minimal support for thread groups
In-Reply-To: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za>
Message-ID: <1405895056.88.0.438052196607.issue22013@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

> Even the Java API doesn't look very useful.

This isn't a Java-only concept.  It is widely available.  Here's a sample:

c++
"thread_group provides for a collection of threads that are related in some fashion."
http://www.boost.org/doc/libs/1_35_0/doc/html/thread/thread_management.html#thread.thread_management.threadgroup

perl
"Thread::Pool - group of threads for performing similar jobs"
http://search.cpan.org/dist/Thread-Pool/lib/Thread/Pool.pm

haskell
"This module extends Control.Concurrent.Thread with the ability to wait for a group of threads to terminate."
http://hackage.haskell.org/package/threads-0.5.0.2/docs/Control-Concurrent-Thread-Group.html

ruby
"ThreadGroup provides a means of keeping track of a number of threads as a group."
http://www.ruby-doc.org/core-2.1.2/ThreadGroup.html

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 00:24:27 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 20 Jul 2014 22:24:27 +0000
Subject: [issue22013] Add at least minimal support for thread groups
In-Reply-To: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za>
Message-ID: <1405895067.73.0.507665023104.issue22013@psf.upfronthosting.co.za>


Changes by Raymond Hettinger :


----------
Removed message: http://bugs.python.org/msg223544

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 00:48:29 2014
From: report at bugs.python.org (=?utf-8?q?Tin_Tvrtkovi=C4=87?=)
Date: Sun, 20 Jul 2014 22:48:29 +0000
Subject: [issue22013] Add at least minimal support for thread groups
In-Reply-To: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za>
Message-ID: <1405896509.62.0.303578140414.issue22013@psf.upfronthosting.co.za>


Tin Tvrtkovi? added the comment:

For your examples, my first instinct would be to use a thread pool executor. It's a nice high level API and can already do the aggregate join.

----------
nosy: +tinchester

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 00:54:28 2014
From: report at bugs.python.org (Claudiu Popa)
Date: Sun, 20 Jul 2014 22:54:28 +0000
Subject: [issue22013] Add at least minimal support for thread groups
In-Reply-To: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za>
Message-ID: <1405896868.21.0.73433074232.issue22013@psf.upfronthosting.co.za>


Claudiu Popa added the comment:

This seems indeed like a weaker version of ThreadPoolExecutor. Here's how your example looks with it, not very different and still easy to understand and grasp:


from concurrent.futures import ThreadPoolExecutor
from urllib.request import urlretrieve

with ThreadPoolExecutor(max_workers=3) as executor:
    url = 'http://www.{site}.org/'
    for site in ('perl', 'python', 'jython', 'pypy'):
        future = executor.submit(urlretrieve, url.format(site=site), site)



3 lines without imports and the initialisation of the pool.

----------
nosy: +Claudiu.Popa

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 00:56:48 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sun, 20 Jul 2014 22:56:48 +0000
Subject: [issue22018] signal: accept socket for signal.set_wakeup_fd()
In-Reply-To: 
Message-ID: 


STINNER Victor added the comment:

I don't understand. My patch works for files and sockets on all platforms.
What is the problem? You don't like the idea of checking the file type?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 01:30:53 2014
From: report at bugs.python.org (Jim Jewett)
Date: Sun, 20 Jul 2014 23:30:53 +0000
Subject: [issue22001] containers "same" does not always mean "__eq__".
In-Reply-To: <1405870447.13.0.975356540008.issue22001@psf.upfronthosting.co.za>
Message-ID: 


Jim Jewett added the comment:

Ah... "be the same object or compare equal" sounds much better.

I don't want "same" to sound like an informal  wording for equal,  because
getting rid of the confusion over NaN and similar objects is the whole
point of the revision.  On the other hand, I don't want the language spec
to imply that a more careful custom container is non-conforming.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 01:49:49 2014
From: report at bugs.python.org (Michael Rohan)
Date: Sun, 20 Jul 2014 23:49:49 +0000
Subject: [issue16778] Logger.findCaller needs to be smarter
In-Reply-To: <1356452428.01.0.563947098769.issue16778@psf.upfronthosting.co.za>
Message-ID: <1405900189.59.0.640728106376.issue16778@psf.upfronthosting.co.za>


Michael Rohan added the comment:

I recently implemented a custom logger derived from Logger and to get the
reporting of modules, etc, correct, I implemented the findCaller using
the same code as library code with the minor change of

if filename == _srcfile:

to

if filename in [logging._srcfile, _mysrcfile]:

with the local _mysrcfile being determined the same as in logging.

Maybe simply having a class list "srcfiles = [_srcfile]" and allowing
people who customize extend this would be the easiest way of handling
this: "Logger.srcfiles.append(_mysrcfile)"

----------
nosy: +mrohan

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 02:04:11 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Mon, 21 Jul 2014 00:04:11 +0000
Subject: [issue22018] signal: accept socket for signal.set_wakeup_fd()
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1405901051.3.0.451374499888.issue22018@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

My worry is that somehow a program has a fd that refers to both a file and a socket. But I agree that changing the API is not a great option either.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 02:32:51 2014
From: report at bugs.python.org (Andrew Barnert)
Date: Mon, 21 Jul 2014 00:32:51 +0000
Subject: [issue1152248] Add support for reading records with arbitrary
 separators to the standard IO stack
Message-ID: <1405902771.2.0.859036333558.issue1152248@psf.upfronthosting.co.za>


Changes by Andrew Barnert :


Added file: http://bugs.python.org/file36008/pep-newline.txt

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 02:33:29 2014
From: report at bugs.python.org (Andrew Barnert)
Date: Mon, 21 Jul 2014 00:33:29 +0000
Subject: [issue1152248] Add support for reading records with arbitrary
 separators to the standard IO stack
Message-ID: <1405902809.7.0.65818666351.issue1152248@psf.upfronthosting.co.za>


Changes by Andrew Barnert :


Added file: http://bugs.python.org/file36009/pep-peek.txt

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 02:49:15 2014
From: report at bugs.python.org (StupidHod)
Date: Mon, 21 Jul 2014 00:49:15 +0000
Subject: [issue22019] ntpath.join() error with Chinese character Path
Message-ID: <1405903755.61.0.322854383415.issue22019@psf.upfronthosting.co.za>


New submission from StupidHod:

When ntpath.join() works with a path that with Chinese character ,a unicode Decode error will happen.
detailes as:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb2 in position 0: ordinal not in range(128)

As the interparter said,it happened at
result_path = result_path + p_path line 84.

as I modif this expression with "result_path = str(result_path) + str(p_path)",it works well.

----------
components: Library (Lib)
messages: 223552
nosy: StupidHod
priority: normal
severity: normal
status: open
title: ntpath.join() error with Chinese character Path
type: behavior
versions: Python 2.7

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 03:55:18 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Mon, 21 Jul 2014 01:55:18 +0000
Subject: [issue22019] ntpath.join() error with Chinese character Path
In-Reply-To: <1405903755.61.0.322854383415.issue22019@psf.upfronthosting.co.za>
Message-ID: <1405907718.79.0.943747082441.issue22019@psf.upfronthosting.co.za>


Changes by Antoine Pitrou :


----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 04:08:19 2014
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 21 Jul 2014 02:08:19 +0000
Subject: [issue22019] ntpath.join() error with Chinese character Path
In-Reply-To: <1405903755.61.0.322854383415.issue22019@psf.upfronthosting.co.za>
Message-ID: <1405908499.19.0.369009361498.issue22019@psf.upfronthosting.co.za>


Zachary Ware added the comment:

What type are your arguments, str, unicode, or a mix?  I can reproduce your issue using a unicode and a str containing a non-ASCII character, while any other combination "works":

>>> import os
>>> os.path.join('test', 'test\x85')
'test\\test\x85'
>>> os.path.join('test', u'test\x85')
u'test\\test\x85'
>>> os.path.join(u'test', 'test\x85')
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Python27\lib\ntpath.py", line 84, in join
    result_path = result_path + p_path
UnicodeDecodeError: 'ascii' codec can't decode byte 0x85 in position 4: ordinal not in range(128)
>>> os.path.join(u'test', u'test\x85')
u'test\\test\x85'

The fact that any mixed-type combination works is sheer accident.  This is just a side effect of Python 2's 'bolted-on' approach to Unicode, and the fix is to upgrade to Python 3.  If you have to stay with Python 2, you can try to fix your code by making sure you decode all input to unicode as soon as you get it, and only encode to str when you have to (which is basically what you need to do in Python 3, but Python won't give you helpful exceptions at the source of the problem in 2.x).

I don't believe there's anything that should be changed in ntpath.join.

----------
nosy: +zach.ware

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 04:15:42 2014
From: report at bugs.python.org (Ezio Melotti)
Date: Mon, 21 Jul 2014 02:15:42 +0000
Subject: [issue22019] ntpath.join() error with Chinese character Path
In-Reply-To: <1405903755.61.0.322854383415.issue22019@psf.upfronthosting.co.za>
Message-ID: <1405908942.79.0.438940034528.issue22019@psf.upfronthosting.co.za>


Ezio Melotti added the comment:

Agreed.  Make sure that the arguments you are passing to ntpath.join() have the same type (i.e. either both unicode, or both string).

----------
nosy: +ezio.melotti
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 04:36:12 2014
From: report at bugs.python.org (StupidHod)
Date: Mon, 21 Jul 2014 02:36:12 +0000
Subject: [issue22019] ntpath.join() error with Chinese character Path
In-Reply-To: <1405908942.79.0.438940034528.issue22019@psf.upfronthosting.co.za>
Message-ID: 


StupidHod added the comment:

You are correct,the resultpath is unicode and path is str.Tks for your
comments.

2014-07-21 10:15 GMT+08:00 Ezio Melotti :

>
> Ezio Melotti added the comment:
>
> Agreed.  Make sure that the arguments you are passing to ntpath.join()
> have the same type (i.e. either both unicode, or both string).
>
> ----------
> nosy: +ezio.melotti
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> _______________________________________
> Python tracker 
> 
> _______________________________________
>

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 06:26:14 2014
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 21 Jul 2014 04:26:14 +0000
Subject: [issue21868] Tbuffer in turtle allows negative size
In-Reply-To: <1403680225.27.0.922926576552.issue21868@psf.upfronthosting.co.za>
Message-ID: <3hGqd12SVSz7LjP@mail.python.org>


Roundup Robot added the comment:

New changeset 847a0e74c4cc by Raymond Hettinger in branch '2.7':
Issue #21868: Prevent turtle crash due to invalid undo buffer size.
http://hg.python.org/cpython/rev/847a0e74c4cc

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 06:31:43 2014
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 21 Jul 2014 04:31:43 +0000
Subject: [issue21868] Tbuffer in turtle allows negative size
In-Reply-To: <1403680225.27.0.922926576552.issue21868@psf.upfronthosting.co.za>
Message-ID: <3hGqlM0fqQz7LjP@mail.python.org>


Roundup Robot added the comment:

New changeset 02b25ec13c94 by Raymond Hettinger in branch '3.4':
Issue #21868: Prevent turtle crash due to invalid undo buffer size.
http://hg.python.org/cpython/rev/02b25ec13c94

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 06:33:08 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Mon, 21 Jul 2014 04:33:08 +0000
Subject: [issue21868] Tbuffer in turtle allows negative size
In-Reply-To: <1403680225.27.0.922926576552.issue21868@psf.upfronthosting.co.za>
Message-ID: <1405917188.81.0.00224590356198.issue21868@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

Thanks for the patch Lita.  This was a nice fix.

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 06:38:01 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Mon, 21 Jul 2014 04:38:01 +0000
Subject: [issue11945] Adopt and document consistent semantics for handling NaN
 values in containers
In-Reply-To: <1303962145.0.0.00759154980454.issue11945@psf.upfronthosting.co.za>
Message-ID: <1405917481.77.0.310428821724.issue11945@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

Closing for the reasons listed and also because there is another pair of tracker items 22000 and 22001 pursuing related documentation updates.

----------
resolution:  -> not a bug
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 08:03:20 2014
From: report at bugs.python.org (Albert Ho)
Date: Mon, 21 Jul 2014 06:03:20 +0000
Subject: [issue22020] tutorial 9.10. Generators statement error
Message-ID: <1405922600.06.0.736556450587.issue22020@psf.upfronthosting.co.za>


New submission from Albert Ho:

https://docs.python.org/3/tutorial/classes.html
>>> for char in reverse('golf'):

I found that reverse didnt work
and i check the doc
https://docs.python.org/3.4/library/functions.html#reversed
>>> reversed(seq)?

I guess it just forget to change the statement

----------
messages: 223560
nosy: rt135792005
priority: normal
severity: normal
status: open
title: tutorial 9.10. Generators statement error
type: compile error
versions: Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 08:20:27 2014
From: report at bugs.python.org (Ezio Melotti)
Date: Mon, 21 Jul 2014 06:20:27 +0000
Subject: [issue22020] tutorial 9.10. Generators statement error
In-Reply-To: <1405922600.06.0.736556450587.issue22020@psf.upfronthosting.co.za>
Message-ID: <1405923627.29.0.826672186786.issue22020@psf.upfronthosting.co.za>


Ezio Melotti added the comment:

The "reverse" function is defined just above the example that uses it.

----------
assignee:  -> docs at python
components: +Documentation
nosy: +docs at python, ezio.melotti
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: compile error -> behavior

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 08:54:21 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Mon, 21 Jul 2014 06:54:21 +0000
Subject: [issue22013] Add at least minimal support for thread groups
In-Reply-To: <1405896509.62.0.303578140414.issue22013@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

> Tin Tvrtkovi? added the comment:
>
> For your examples, my first instinct would be to use a thread pool executor. It's a nice high level API and can already do the aggregate join.

Indeed, the examples posted don't make much sense: thread/process
pools are the way to go.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 09:08:37 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Mon, 21 Jul 2014 07:08:37 +0000
Subject: [issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize
 reported killed by shell
In-Reply-To: <1405498813.74.0.584718927576.issue21901@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

>> rdmurray at pydev:~/python/p34>python -c 'import resource; print(resource.getrlimit(resource.RLIMIT_NOFILE))'
>> (1024L, 1048576L)
>
> Oh, 1 million files is much bigger than 4 thousand files (4096).
>
> The test should only test FD_SETSIZE + 10 files, the problem is to get FD_SETSITE:

We could cap it to let's say 2**16, it's larger than any possible
FD_SETSIZE (which are usually low since fd_set are often allocated on
the stack and select() doesn't scale well behind that anyway).

But I don't see anything wrong with the test, it's really the buildbot
setting which is to blame: I expect other tests to fail with such a
low max virtual memory.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 09:56:35 2014
From: report at bugs.python.org (Vinay Sajip)
Date: Mon, 21 Jul 2014 07:56:35 +0000
Subject: [issue16778] Logger.findCaller needs to be smarter
In-Reply-To: <1356452428.01.0.563947098769.issue16778@psf.upfronthosting.co.za>
Message-ID: <1405929395.72.0.803707404075.issue16778@psf.upfronthosting.co.za>


Vinay Sajip added the comment:

> Maybe simply having a class list

Thanks, I'm aware of this approach and have considered it. The current patch's skipCallers API seems better than exposing an internal list, but I have held off implementing this in the hope that an approach based on frame annotations can be used.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 10:09:15 2014
From: report at bugs.python.org (Ronald Oussoren)
Date: Mon, 21 Jul 2014 08:09:15 +0000
Subject: [issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX
In-Reply-To: <1405794628.01.0.592426531891.issue22012@psf.upfronthosting.co.za>
Message-ID: <1405930155.42.0.724609420839.issue22012@psf.upfronthosting.co.za>


Ronald Oussoren added the comment:

I just confirmed that clang only uses the LSB for _Bool values by looking at the assembly generated for the following code:


#include 
#include 

int main(void)
{
	_Bool x;
	*(unsigned char*)&x = 42;
	printf("%d\n", (int)x);
	return 0;
}


The attached patch fixes the issue for me. The new testcase fails without the changes to _struct.c and passes with those changes.

----------
Added file: http://bugs.python.org/file36010/issue-22012.txt

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 11:13:17 2014
From: report at bugs.python.org (Ronald Oussoren)
Date: Mon, 21 Jul 2014 09:13:17 +0000
Subject: [issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX
In-Reply-To: <1405794628.01.0.592426531891.issue22012@psf.upfronthosting.co.za>
Message-ID: <1405933997.86.0.980351507648.issue22012@psf.upfronthosting.co.za>


Ronald Oussoren added the comment:

The last draf of ISO C '11: .

This says that _Bool is large enough to store 0 and 1, and that conversion of any integer data to _Bool results in 0 or 1.  If I interpret the document correctly there is no conforming way to create a value of _Bool that has a value other than 0 or 1, and that should mean clang's behavior is not a bug.

BTW. I haven't tested my patch on a PPC system yet (where sizeof(bool) != 1), and won't be able to do so until I'm back home (I'm currently at EuroPython)

----------
keywords: +needs review, patch
stage:  -> patch review

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 11:36:01 2014
From: report at bugs.python.org (Ronald Oussoren)
Date: Mon, 21 Jul 2014 09:36:01 +0000
Subject: [issue17695] _sysconfigdata broken with universal builds on OSX
In-Reply-To: <1365659948.17.0.458530957334.issue17695@psf.upfronthosting.co.za>
Message-ID: <1405935361.47.0.718731213116.issue17695@psf.upfronthosting.co.za>


Ronald Oussoren added the comment:

Sure... The issue is still present. To demonstrate the problem:

arch -i386 ./python.exe
Python 3.5.0a0 (default:9b450b19aa11+, Jul 21 2014, 10:03:38) 
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.maxsize
2147483647
>>> import sysconfig
>>> sysconfig.get_config_var('SIZEOF_LONG')
8
>>> 

This is on a machine that can run 64-bit code and uses a fat binary with i386 and x86_64 support. The script generating _sysconfigdata.py used the x86_64 code and hence created data that's only valid for the x86_64 binary.

It's easy enough to to create a patch that reproduces the preprocessor code in pymacconfig.h in sysconfig.py, but I'm not sure if that is the right fix in particular due to the vagueness of the sysconfig API.  

A short rant:

IMHO the current API of sysconfig is underspecified and tied way to much the arbitrary details of the CPython build system (not the actual function keys, but the set of information that can be retrieved). There is no documentation at all on which keys are present and what there meaning is. As an example, there have been a number of issues in the past where users tried to use the value for key that's only meant to be used at CPython build time and users complained that the value didn't work for them with an installed CPython.

----------
stage:  -> needs patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 11:50:13 2014
From: report at bugs.python.org (Weinan Li)
Date: Mon, 21 Jul 2014 09:50:13 +0000
Subject: [issue22021] shutil.make_archive()  root_dir do not work
Message-ID: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za>


New submission from Weinan Li:

set root_dir do not work

output:
=====================================================
Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import shutil
>>> shutil.make_archive("tmp.tar.gz", "gztar", "c:/xjtu", "c:/tmp")
'C:\\Python34\\tmp.tar.gz.tar.gz'
=====================================================

source code of make_archive()
=====================================================
756    save_cwd = os.getcwd()
757    if root_dir is not None:
758        if logger is not None:
759            logger.debug("changing into '%s'", root_dir)
760        base_name = os.path.abspath(base_name)
761        if not dry_run:
762            os.chdir(root_dir)
...
...
782    try:
783        filename = func(base_name, base_dir, **kwargs)
784    finally:
=====================================================

base_name is set before chdir, so the archive always be created in cwd, whether set root_dir or not.
so, line 760 should be move below line 762

----------
components: Library (Lib)
messages: 223568
nosy: DemoHT
priority: normal
severity: normal
status: open
title: shutil.make_archive()  root_dir do not work
type: behavior
versions: Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 11:58:44 2014
From: report at bugs.python.org (Ezio Melotti)
Date: Mon, 21 Jul 2014 09:58:44 +0000
Subject: [issue22021] shutil.make_archive()  root_dir do not work
In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za>
Message-ID: <1405936724.18.0.320644756426.issue22021@psf.upfronthosting.co.za>


Ezio Melotti added the comment:

Thanks for the report, do you want to provide a patch?
(You can check the devguide if you need more information.)

----------
keywords: +easy
nosy: +ezio.melotti, hynek, tarek
stage:  -> needs patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 12:13:54 2014
From: report at bugs.python.org (Julien Palard)
Date: Mon, 21 Jul 2014 10:13:54 +0000
Subject: [issue8706] accept keyword arguments on most base type methods and
 builtins
In-Reply-To: <1273777855.43.0.0259016277933.issue8706@psf.upfronthosting.co.za>
Message-ID: <1405937634.01.0.917053924496.issue8706@psf.upfronthosting.co.za>


Julien Palard added the comment:

I think for some builtins it may be usefull to have keyword arguments, in the case they take more than one parameter.

Typically, it's impossible to write:

    self.drop_elements(partial(isinstance, type(lxml.etree.Comment)))

Because isinstance take its argument in the "other" order, we may bypass this using keywords arguments:


    self.drop_elements(partial(isinstance, type=type(lxml.etree.Comment)))

But isinstance refuses keyword arguments, so there is no way to write this without a lambda:

    self.drop_elements(lambda x: isinstance(x,
                       type(lxml.etree.Comment)))

With is cool and work, I agree, it's just an example to explicitly show why keywords argument may be cool: functools.partial.

----------
nosy: +Julien.Palard

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 12:58:45 2014
From: report at bugs.python.org (R. David Murray)
Date: Mon, 21 Jul 2014 10:58:45 +0000
Subject: [issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize
 reported killed by shell
In-Reply-To: <1404254403.84.0.153705596072.issue21901@psf.upfronthosting.co.za>
Message-ID: <1405940325.37.0.236444590618.issue21901@psf.upfronthosting.co.za>


R. David Murray added the comment:

That is the only test that fails for lack of memory.  And it's not the buildbot, it's my development virtual machine.  Having the test suite be killed when I do a full test run is...rather annoying.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 13:04:26 2014
From: report at bugs.python.org (R. David Murray)
Date: Mon, 21 Jul 2014 11:04:26 +0000
Subject: [issue22021] shutil.make_archive()  root_dir do not work
In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za>
Message-ID: <1405940666.06.0.0133345896307.issue22021@psf.upfronthosting.co.za>


R. David Murray added the comment:

I believe this is working as designed, although the documentation does not make that clear.  root dir is the root directory of the *created archive*, it has nothing to do with where the archive file itself is placed.

----------
assignee:  -> docs at python
components: +Documentation
nosy: +docs at python, r.david.murray

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 13:17:39 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Mon, 21 Jul 2014 11:17:39 +0000
Subject: [issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize
 reported killed by shell
In-Reply-To: <1405940325.37.0.236444590618.issue21901@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

Alright, I'll cap the value then (no need to expose FD_SETSIZE).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 15:02:12 2014
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 21 Jul 2014 13:02:12 +0000
Subject: [issue22018] signal: accept socket for signal.set_wakeup_fd()
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <3hH34M2VVtz7Ljc@mail.python.org>


Roundup Robot added the comment:

New changeset 6b536f0516ea by Victor Stinner in branch 'default':
Issue #22018: Add _testcapi.raise_signal()
http://hg.python.org/cpython/rev/6b536f0516ea

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 15:26:30 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 21 Jul 2014 13:26:30 +0000
Subject: [issue22018] signal: accept socket for signal.set_wakeup_fd()
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1405949190.47.0.666270852596.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> My worry is that somehow a program has a fd that refers to both a file and a socket. But I agree that changing the API is not a great option either.

Well, when I read again my patch and played with it, I saw that it has different issues:

- a Windows socket handle is not an int, but a pointer: Python SOCKET_T type should be used instead

- when send() fails, we should reuse the code from socketmodule.c to raise an exception: we may need to check GetLastError() on Windows

I rewrote my patch to add a new function signal.set_wakeup_socket() instead of trying to guess if the file descriptor is a socket or a file. I adopted a similar approach in the PEP 446 with os.set_inheritable() and os.set_handle_inheritable() for the same reason: support sockets on Windows, socket.socket.set_inheritable() uses os.set_inheritable() on UNIX and os.set_handle_inheritable() on Windows.

signal.set_wakeup_socket() now takes a socket.socket object and returns the previous socket object (or None).

In the new patch, signal.set_wakeup_fd() and Py_SetWakeupFd() function are unchanged, which is more safer regarding to backward compatibility!

The first call to signal.set_wakeup_socket() imports the _socket module.

The Visual Studio still needs to be modified to add the dependency to the WinSock library ("ws2_32.lib"), just for the send() function.

----------
Added file: http://bugs.python.org/file36011/signal_socket-2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 16:26:35 2014
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 21 Jul 2014 14:26:35 +0000
Subject: [issue16748] Make CPython test package discoverable
In-Reply-To: <1356138147.12.0.530314626781.issue16748@psf.upfronthosting.co.za>
Message-ID: <1405952795.37.0.607117200928.issue16748@psf.upfronthosting.co.za>


Changes by Zachary Ware :


----------
dependencies: +Make full use of test discovery in test subpackages
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 16:27:16 2014
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 21 Jul 2014 14:27:16 +0000
Subject: [issue22002] Make full use of test discovery in test subpackages
In-Reply-To: <1405627760.3.0.397447180395.issue22002@psf.upfronthosting.co.za>
Message-ID: <1405952836.76.0.298705629912.issue22002@psf.upfronthosting.co.za>


Zachary Ware added the comment:

Thank you, Brett and David.

@Mark: This issue is a continuation of the #16748 effort (#16748 is a meta-issue for this kind of thing) and unrelated to #10572 (though this will add a feature to test.support that can be useful for the scattered test packages).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 16:27:59 2014
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 21 Jul 2014 14:27:59 +0000
Subject: [issue22002] Make full use of test discovery in test subpackages
In-Reply-To: <1405627760.3.0.397447180395.issue22002@psf.upfronthosting.co.za>
Message-ID: <1405952879.65.0.104598414128.issue22002@psf.upfronthosting.co.za>


Zachary Ware added the comment:

Victor, could you give me a yay or nay on the test_asyncio change?

----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 16:30:23 2014
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 21 Jul 2014 14:30:23 +0000
Subject: [issue22018] signal: accept socket for signal.set_wakeup_fd()
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <3hH5263pJSz7Lvp@mail.python.org>


Roundup Robot added the comment:

New changeset 42cf963e3ab1 by Victor Stinner in branch 'default':
Issue #22018: signal.set_wakeup_fd() now raises an OSError instead of a
http://hg.python.org/cpython/rev/42cf963e3ab1

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 17:07:33 2014
From: report at bugs.python.org (Edward O)
Date: Mon, 21 Jul 2014 15:07:33 +0000
Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle
In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za>
Message-ID: <1405955253.31.0.284789590336.issue22005@psf.upfronthosting.co.za>


Edward O added the comment:

The code works when using encoding='bytes'. Thanks Tim for the suggestion.

So this is not a bug, but is there any sense in having encoding='ASCII' by default in pickle ?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 17:08:47 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 21 Jul 2014 15:08:47 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1405955327.45.0.223468731085.issue22018@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
title: signal: accept socket for signal.set_wakeup_fd() -> Add a new signal.set_wakeup_socket() function

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 17:18:30 2014
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 21 Jul 2014 15:18:30 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <3hH65d70L2z7Ljl@mail.python.org>


Roundup Robot added the comment:

New changeset 7a1737033a23 by Victor Stinner in branch 'default':
Issue #22018: Hum, set_wakeup_fd() still raises ValueError on Windows
http://hg.python.org/cpython/rev/7a1737033a23

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 17:31:02 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Mon, 21 Jul 2014 15:31:02 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1405956662.32.0.783958171959.issue22003@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

> Pretty sure this approach is broken. What about the alternative approach of specializing for Bytes?

That would certainly sound good enough, to optimize the common case.

Also, it would be nice if you could add some tests to the patch (e.g. to stress the bytearray case). Thank you!

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 17:31:47 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Mon, 21 Jul 2014 15:31:47 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1405956707.48.0.345859980717.issue22003@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

As for whether the "checking for a readonly view" approach is broken, I don't know: that part of the buffer API is still mysterious to me. Stefan, would you have some insight?

----------
nosy: +skrah

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 17:46:42 2014
From: report at bugs.python.org (Tshepang Lekhonkhobe)
Date: Mon, 21 Jul 2014 15:46:42 +0000
Subject: [issue22013] Add at least minimal support for thread groups
In-Reply-To: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za>
Message-ID: <1405957602.31.0.571969033096.issue22013@psf.upfronthosting.co.za>


Changes by Tshepang Lekhonkhobe :


----------
nosy: +tshepang

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 18:04:47 2014
From: report at bugs.python.org (Stefan Krah)
Date: Mon, 21 Jul 2014 16:04:47 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405956707.48.0.345859980717.issue22003@psf.upfronthosting.co.za>
Message-ID: <20140721160446.GA27186@sleipnir.bytereef.org>


Stefan Krah added the comment:

I think checking for a readonly view is fine.  The protocol is this:

  1) Use the PyBUF_WRITABLE flag in the request. Then the provider must
     either have a writable buffer or else deny the request entirely.

  2) Omit the PyBUF_WRITABLE flag in the request.  Then the provider can
     return a writable or a readonly buffer, but must set the readonly flag
     correctly AND export the same type of buffer to ALL consumers.

It is not possible to ask for a readonly buffer explicitly, but the
readonly flag in the Py_Buffer struct should always be set correctly.

It is hard to guess the original intention of the PEP-3118 authors, but
in practice "readonly" means "immutable" here.  IMO a buffer provider would
be seriously broken if a readonly buffer is mutated in any way.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 18:05:04 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 21 Jul 2014 16:05:04 +0000
Subject: [issue22022] test_pathlib: shutil.rmtree() sporadic failures on
 Windows
Message-ID: <1405958704.27.0.741808263621.issue22022@psf.upfronthosting.co.za>


New submission from STINNER Victor:

Sometimes, test_pathlib fails because shutil.rmtree() cannot remove a test directory. Example:

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/4833/steps/test/logs/stdio

======================================================================
ERROR: test_touch_common (test.test_pathlib.WindowsPathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 477, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 367, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 376, in _rmtree_unsafe
    onerror(os.rmdir, path, sys.exc_info())
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 374, in _rmtree_unsafe
    os.rmdir(path)
OSError: [WinError 145] The directory is not empty: 'C:\\buildbot.python.org\\3.x.kloth-win64\\build\\build\\test_python_3444\\@test_3444_tmp\\dirB'

The error comes from this cleanup function:

        self.addCleanup(shutil.rmtree, BASE)

I don't understand how rmtree() can fail with "The directory is not empty".

Note: this buildbot runs 4 tests in parallel using the "-j4" command line option of regrtest.

----------
components: Tests, Windows
keywords: buildbot
messages: 223584
nosy: haypo
priority: normal
severity: normal
status: open
title: test_pathlib: shutil.rmtree() sporadic failures on Windows
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 18:15:23 2014
From: report at bugs.python.org (Ned Batchelder)
Date: Mon, 21 Jul 2014 16:15:23 +0000
Subject: [issue22022] test_pathlib: shutil.rmtree() sporadic failures on
 Windows
In-Reply-To: <1405958704.27.0.741808263621.issue22022@psf.upfronthosting.co.za>
Message-ID: <1405959323.3.0.971415104152.issue22022@psf.upfronthosting.co.za>


Ned Batchelder added the comment:

FWIW, every use of rmtree I have on Windows occasionally fails this way, parallelism seems not to be a factor.

----------
nosy: +nedbat

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 18:23:01 2014
From: report at bugs.python.org (Stefan Krah)
Date: Mon, 21 Jul 2014 16:23:01 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1405959781.5.0.807342255927.issue22003@psf.upfronthosting.co.za>


Stefan Krah added the comment:

The original wording in the PEP is this:

readonly
--------
    an integer variable to hold whether or not the memory is readonly. 1
    means the memory is readonly, zero means the memory is writable.


To me this means that a hypothetical compiler that could figure
out at compile time that the readonly flag is set would be allowed
to put the buffer contents into the read-only data section.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 18:28:13 2014
From: report at bugs.python.org (Tim Peters)
Date: Mon, 21 Jul 2014 16:28:13 +0000
Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle
In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za>
Message-ID: <1405960093.96.0.337366595321.issue22005@psf.upfronthosting.co.za>


Tim Peters added the comment:

@eddygeek, I'd still call something so unintuitive "a bug" - it's hard to believe this is the _intended_ way to get it to work.  So I'd keep this open until someone with better knowledge of intent chimes in.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 18:38:36 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 21 Jul 2014 16:38:36 +0000
Subject: [issue21822] KeyboardInterrupt during Thread.join hangs that Thread
In-Reply-To: <1403365475.16.0.757881205569.issue21822@psf.upfronthosting.co.za>
Message-ID: <1405960716.95.0.796924397442.issue21822@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 19:02:08 2014
From: report at bugs.python.org (David Wilson)
Date: Mon, 21 Jul 2014 17:02:08 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1405962128.89.0.42733226401.issue22003@psf.upfronthosting.co.za>


David Wilson added the comment:

Stefan,

Thanks for digging here. As much as I'd love to follow this interpretation, it simply doesn't match existing buffer implementations, including within the standard library.

For example, mmap.mmap(..., flags=mmap.MAP_SHARED, prot=mmap.PROT_READ) will produce a read-only buffer, yet mutability is entirely at the whim of the operating system. In this case, "immutability" may be apparent for years, until some machine has memory pressure, causing the shared mapping to be be flushed, and refreshed from (say, incoherent NFS storage) on next access.

I thought it would be worth auditing some of the most popular types of buffer just to check your interpretation, and this was the first, most obvious candidate.

Any thoughts? I'm leaning heavily toward the Bytes specialization approach

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 19:07:13 2014
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 21 Jul 2014 17:07:13 +0000
Subject: [issue22022] test_pathlib: shutil.rmtree() sporadic failures on
 Windows
In-Reply-To: <1405958704.27.0.741808263621.issue22022@psf.upfronthosting.co.za>
Message-ID: <1405962433.47.0.0455594172869.issue22022@psf.upfronthosting.co.za>


Zachary Ware added the comment:

This looks like a duplicate of #19811, which was closed as a duplicate of #19629.

----------
nosy: +zach.ware
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> support.rmtree fails on symlinks under Windows

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 19:20:28 2014
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 21 Jul 2014 17:20:28 +0000
Subject: [issue19629] support.rmtree fails on symlinks under Windows
In-Reply-To: <1384636992.45.0.350630415261.issue19629@psf.upfronthosting.co.za>
Message-ID: <3hH8pN2mGnz7LjM@mail.python.org>


Roundup Robot added the comment:

New changeset 28bb1aa9ca3d by Victor Stinner in branch '3.4':
Issue #19629: Fix support.rmtree(), use os.lstat() to check if the file is a
http://hg.python.org/cpython/rev/28bb1aa9ca3d

New changeset e405bcbf761c by Victor Stinner in branch 'default':
Merge Python 3.4
http://hg.python.org/cpython/rev/e405bcbf761c

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 19:20:29 2014
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 21 Jul 2014 17:20:29 +0000
Subject: [issue19811] test_pathlib: "The directory is not empty" error on
 os.rmdir()
In-Reply-To: <1385549108.25.0.37383053389.issue19811@psf.upfronthosting.co.za>
Message-ID: <3hH8pP15ndz7LjM@mail.python.org>


Roundup Robot added the comment:

New changeset 1db5cde4958f by Victor Stinner in branch '3.4':
Issue #19811, #22022: test_pathlib uses support.rmtree() instead of
http://hg.python.org/cpython/rev/1db5cde4958f

New changeset e405bcbf761c by Victor Stinner in branch 'default':
Merge Python 3.4
http://hg.python.org/cpython/rev/e405bcbf761c

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 19:20:30 2014
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 21 Jul 2014 17:20:30 +0000
Subject: [issue22022] test_pathlib: shutil.rmtree() sporadic failures on
 Windows
In-Reply-To: <1405958704.27.0.741808263621.issue22022@psf.upfronthosting.co.za>
Message-ID: <3hH8pP6XNcz7LjM@mail.python.org>


Roundup Robot added the comment:

New changeset 1db5cde4958f by Victor Stinner in branch '3.4':
Issue #19811, #22022: test_pathlib uses support.rmtree() instead of
http://hg.python.org/cpython/rev/1db5cde4958f

New changeset e405bcbf761c by Victor Stinner in branch 'default':
Merge Python 3.4
http://hg.python.org/cpython/rev/e405bcbf761c

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 19:27:14 2014
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 21 Jul 2014 17:27:14 +0000
Subject: [issue20064] PyObject_Malloc is not documented
In-Reply-To: <1387913960.58.0.680621486861.issue20064@psf.upfronthosting.co.za>
Message-ID: <1405963634.56.0.272164758447.issue20064@psf.upfronthosting.co.za>


Zachary Ware added the comment:

It appears that PyObject_Realloc and PyObject_Free are also not documented; they should be along with PyObject_Malloc.

I also left a couple of comments on Rietveld.

----------
nosy: +zach.ware
stage: needs patch -> patch review
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 19:38:29 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Mon, 21 Jul 2014 17:38:29 +0000
Subject: [issue22023] PyUnicode_FromFormat is broken on python 2
Message-ID: <1405964309.44.0.884917870385.issue22023@psf.upfronthosting.co.za>


New submission from Alex Gaynor:

http://hg.python.org/cpython/file/2.7/Objects/unicodeobject.c#l840

Specifically it calls "PyObject_Str", which will return a PyStringObject * (cast to a PyObject *), and then calls "PyUnicode_GET_SIZE", which is of course totally incorrect.

This code was originally back-ported from 3.0 -> 2.6, so I imagine no one caught the bug then.

----------
components: Interpreter Core, Unicode
messages: 223594
nosy: alex, ezio.melotti, haypo
priority: normal
severity: normal
status: open
title: PyUnicode_FromFormat is broken on python 2
versions: Python 2.7

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 19:56:13 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Mon, 21 Jul 2014 17:56:13 +0000
Subject: [issue1745108] 2.5.1 curses panel segfault in new_panel on aix 5.3
Message-ID: <1405965373.91.0.629113524322.issue1745108@psf.upfronthosting.co.za>


Changes by Mark Lawrence :


----------
nosy: +David.Edelsohn
type:  -> crash
versions: +Python 2.7, Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 19:58:04 2014
From: report at bugs.python.org (Lita Cho)
Date: Mon, 21 Jul 2014 17:58:04 +0000
Subject: [issue21597] Allow turtledemo code pane to get wider.
In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za>
Message-ID: <1405965484.44.0.00908416942445.issue21597@psf.upfronthosting.co.za>


Lita Cho added the comment:

Ping! Just wanted to see what the status was on getting this patch reviewed. I hope your eye is feeling better, Terry!

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 20:02:16 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Mon, 21 Jul 2014 18:02:16 +0000
Subject: [issue22023] PyUnicode_FromFormat is broken on python 2
In-Reply-To: <1405964309.44.0.884917870385.issue22023@psf.upfronthosting.co.za>
Message-ID: <1405965736.88.0.0319077085586.issue22023@psf.upfronthosting.co.za>


Alex Gaynor added the comment:

It's worth noting that this function is replete with incorrect assumptions about unicode vs. strings that came from the backport, the one I initially pointed out was merely the first.

The motivation for this issue is the SSL module backport (issue21308) for the record :-)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 20:14:32 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Mon, 21 Jul 2014 18:14:32 +0000
Subject: [issue21965] Add support for Memory BIO to _ssl
In-Reply-To: <1405156134.57.0.513965198344.issue21965@psf.upfronthosting.co.za>
Message-ID: <1405966472.77.0.691334625649.issue21965@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

The C part of the patch looks roughly ok to me (modulo a couple of comments). However, we must now find a way to expose this as a Python-level API.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 20:23:44 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Mon, 21 Jul 2014 18:23:44 +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: <1405967024.8.0.839523816499.issue6699@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

The latest patch reflects msg112886 and msg149117 so I believe it should be committed.

----------
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 20:24:41 2014
From: report at bugs.python.org (David Wilson)
Date: Mon, 21 Jul 2014 18:24:41 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1405967081.01.0.0915527478051.issue22003@psf.upfronthosting.co.za>


David Wilson added the comment:

I'm not sure how much work it would be, or even if it could be made sufficient to solve our problem, but what about extending the buffers interface to include a "int stable" flag, defaulting to 0?

It seems though, that it would just be making the already arcane buffers interface even more arcane simply for the benefit of our specific use case

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 21:09:33 2014
From: report at bugs.python.org (Stefan Krah)
Date: Mon, 21 Jul 2014 19:09:33 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405962128.89.0.42733226401.issue22003@psf.upfronthosting.co.za>
Message-ID: <20140721190932.GA28327@sleipnir.bytereef.org>


Stefan Krah added the comment:

I'm sure many exporters aren't setting the right flags; on the other hand
we already hash memoryviews based on readonly buffers, assuming they are
immutable.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 21:34:08 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 21 Jul 2014 19:34:08 +0000
Subject: [issue22023] PyUnicode_FromFormat is broken on python 2
In-Reply-To: <1405964309.44.0.884917870385.issue22023@psf.upfronthosting.co.za>
Message-ID: <1405971248.61.0.476488726076.issue22023@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Python 3 has many unit tests for PyUnicode_FromFormat(): see test_unicode.test_from_format().

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 21:41:08 2014
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 21 Jul 2014 19:41:08 +0000
Subject: [issue19629] support.rmtree fails on symlinks under Windows
In-Reply-To: <1384636992.45.0.350630415261.issue19629@psf.upfronthosting.co.za>
Message-ID: <3hHCwh0PGGz7LjR@mail.python.org>


Roundup Robot added the comment:

New changeset c026ed24a211 by Victor Stinner in branch '3.4':
Issue #19629: Add missing "import stat"
http://hg.python.org/cpython/rev/c026ed24a211

New changeset 168cd3d19fef by Victor Stinner in branch 'default':
(Merge 3.4) Issue #19629: Add missing "import stat"
http://hg.python.org/cpython/rev/168cd3d19fef

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 21:48:46 2014
From: report at bugs.python.org (Demian Brecht)
Date: Mon, 21 Jul 2014 19:48:46 +0000
Subject: [issue21793] httplib client/server status refactor
In-Reply-To: <1403031756.71.0.442697149496.issue21793@psf.upfronthosting.co.za>
Message-ID: <1405972126.61.0.120732961325.issue21793@psf.upfronthosting.co.za>


Demian Brecht added the comment:

Removed draft status code, removed S from VARIANTS_

----------
Added file: http://bugs.python.org/file36012/issue21793_2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 22:00:08 2014
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 21 Jul 2014 20:00:08 +0000
Subject: [issue22024] Add to shutil the ability to wait until files are
 definitely deleted
Message-ID: <1405972808.55.0.924744488039.issue22024@psf.upfronthosting.co.za>


New submission from Zachary Ware:

As suggested by Martin in msg170717, shutil should grow some way to block until a given file/directory is actually deleted, due to Windows' scheme of not actually deleting a file until all handles to it are closed.

This could take the form of a 'wait=False' parameter to rmtree that causes rmtree to block until the file/dir is gone (which could mean blocking indefinitely), or a new function "wait_until_deleted(name, timeout=None)".

Related issues: #15946, #7443, #19629

----------
components: Library (Lib)
keywords: easy
messages: 223604
nosy: zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Add to shutil the ability to wait until files are definitely deleted
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 22:11:38 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 21 Jul 2014 20:11:38 +0000
Subject: [issue21964] inconsistency in list-generator comprehension with
 yield(-from)
In-Reply-To: <1405119987.38.0.925003339613.issue21964@psf.upfronthosting.co.za>
Message-ID: <1405973498.9.0.860919943789.issue21964@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 22:12:38 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 21 Jul 2014 20:12:38 +0000
Subject: [issue21964] inconsistency in list-generator comprehension with
 yield(-from)
In-Reply-To: <1405119987.38.0.925003339613.issue21964@psf.upfronthosting.co.za>
Message-ID: <1405973558.25.0.562874003411.issue21964@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> For `g1`: it returns a generator because the listcomp contains a `yield from`.

IMO it's a bug: [... for ... in ...] must create a list.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 22:12:55 2014
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 21 Jul 2014 20:12:55 +0000
Subject: [issue12855] linebreak sequences should be better documented
In-Reply-To: <1314654150.68.0.797504547224.issue12855@psf.upfronthosting.co.za>
Message-ID: <1405973575.56.0.422041946212.issue12855@psf.upfronthosting.co.za>


Changes by Zachary Ware :


----------
stage:  -> patch review
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 22:16:02 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Mon, 21 Jul 2014 20:16:02 +0000
Subject: [issue22025] webbrowser.get(command_line) does not support
 Windows-style path separators
Message-ID: <1405973762.56.0.905297116521.issue22025@psf.upfronthosting.co.za>


New submission from Dan O'Reilly:

Currently, when webbrowser.get() is passed a "using" argument that consists of a command line string like "C:\Users\dan\AppData\Local\Google\Chrome\Application\chrome.exe %s", it will use shlex.split(command_line) to tokenize the string. However, when given Windows-style path separators (as is likely to be the case on Windows), shlex.split returns the path with all the separators removed:

>>> cmd = "C:\\Users\\oreild1\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe %s"
>>> shlex.split(cmd)
['C:Usersoreild1AppDataLocalGoogleChromeApplicationchrome.exe', '%s']

Of course, this means the browser object returned is useless. I'm not sure what the preferred way to fix this is: either document that POSIX-style path separators are required (even on Windows), or pass posix=False to shlex.split if we're running Windows.

----------
components: Library (Lib)
messages: 223606
nosy: dan.oreilly
priority: normal
severity: normal
status: open
title: webbrowser.get(command_line) does not support Windows-style path separators
type: behavior
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  Mon Jul 21 22:17:37 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Mon, 21 Jul 2014 20:17:37 +0000
Subject: [issue21822] KeyboardInterrupt during Thread.join hangs that Thread
In-Reply-To: <1403365475.16.0.757881205569.issue21822@psf.upfronthosting.co.za>
Message-ID: <1405973857.77.0.479210054301.issue21822@psf.upfronthosting.co.za>


Changes by Antoine Pitrou :


----------
nosy: +neologix, pitrou, tim.peters
type:  -> behavior
versions: +Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 22:22:04 2014
From: report at bugs.python.org (Les Bothwell)
Date: Mon, 21 Jul 2014 20:22:04 +0000
Subject: [issue22026] 2.7.8 ttk Button text display problem
Message-ID: <1405974124.93.0.889625077741.issue22026@psf.upfronthosting.co.za>


New submission from Les Bothwell:

My system: Windows 7 64 bit.  Python 2.7.8 (32 bit)
There's a problem with ttk button label text truncation when using large fonts on 2.7.8.  2.7.6 works Ok.  With 2.7.6, increasing the font size in a ttk style makes the button large enough to display the text properly.  With 2.7.8 the button seems to be large enough but the text is truncated on the right.  See attached file for pics.
Since issue 21665 is not closed yet, is this a side effect of ttk build problems?

This displays the problem..
from Tkinter import *
import ttk

from oxogame import *

class MainWindow(Frame):
    def __init__(self, master=None):
        " Initialise main window with controls "
        Frame.__init__(self, master)
        master.title('Font problem')
        ttk.Style().configure('Square.TButton', font='Arial 24 bold', width=1, height=1, padding=(6,0))

        ttk.Button(self, state=NORMAL, text='X', style='Square.TButton').pack(side=LEFT)
        ttk.Button(self, state=NORMAL, text='O', style='Square.TButton').pack(side=LEFT)
        self.pack(side=LEFT, fill=None, expand=0)

if __name__ == "__main__":
    root = Tk()
    root.resizable(0, 0)
    root.attributes("-toolwindow", 1)
    MainWindow(root).mainloop()

----------
components: Tkinter
files: ttk_font.pdf
messages: 223607
nosy: les.bothwell
priority: normal
severity: normal
status: open
title: 2.7.8 ttk Button text display problem
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file36013/ttk_font.pdf

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 22:22:56 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Mon, 21 Jul 2014 20:22:56 +0000
Subject: [issue21822] KeyboardInterrupt during Thread.join hangs that Thread
In-Reply-To: <1403365475.16.0.757881205569.issue21822@psf.upfronthosting.co.za>
Message-ID: <1405974176.91.0.498436972783.issue21822@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

This works for me under Linux.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 22:28:17 2014
From: report at bugs.python.org (Jeremy Kloth)
Date: Mon, 21 Jul 2014 20:28:17 +0000
Subject: [issue22024] Add to shutil the ability to wait until files are
 definitely deleted
In-Reply-To: <1405972808.55.0.924744488039.issue22024@psf.upfronthosting.co.za>
Message-ID: <1405974497.93.0.811858815263.issue22024@psf.upfronthosting.co.za>


Changes by Jeremy Kloth :


----------
nosy: +jkloth

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 22:28:18 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Mon, 21 Jul 2014 20:28:18 +0000
Subject: [issue22025] webbrowser.get(command_line) does not support
 Windows-style path separators
In-Reply-To: <1405973762.56.0.905297116521.issue22025@psf.upfronthosting.co.za>
Message-ID: <1405974498.41.0.107754377811.issue22025@psf.upfronthosting.co.za>


Dan O'Reilly added the comment:

Attached is a patch for the latter approach.

----------
keywords: +patch
Added file: http://bugs.python.org/file36014/web.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 22:37:24 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Mon, 21 Jul 2014 20:37:24 +0000
Subject: [issue1702036] Make Turtle thread-safe so it does not crash
Message-ID: <1405975044.34.0.653502070915.issue1702036@psf.upfronthosting.co.za>


Changes by Mark Lawrence :


----------
nosy: +Lita.Cho

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 21 23:29:00 2014
From: report at bugs.python.org (Milan Oberkirch)
Date: Mon, 21 Jul 2014 21:29:00 +0000
Subject: [issue22027] RFC 6531 (SMTPUTF8) support in smtplib
Message-ID: <1405978140.81.0.388141454985.issue22027@psf.upfronthosting.co.za>


New submission from Milan Oberkirch:

This patch is related to and depends on issue 21725. I put it here for review, it can be applied (maybe with small changes) as soon as issue 21725 is fixed.

----------
components: email
files: smtplib_smtputf8_issue21725-dependent.patch
keywords: patch
messages: 223610
nosy: barry, jesstess, pitrou, r.david.murray, zvyn
priority: normal
severity: normal
status: open
title: RFC 6531 (SMTPUTF8) support in smtplib
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file36015/smtplib_smtputf8_issue21725-dependent.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 00:03:25 2014
From: report at bugs.python.org (David Wilson)
Date: Mon, 21 Jul 2014 22:03:25 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1405980205.22.0.727196794194.issue22003@psf.upfronthosting.co.za>


David Wilson added the comment:

Hi Stefan,

How does this approach in reinit() look? We first ask for a writable buffer, and if the object obliges, immediately copy it. Otherwise if it refused, ask for a read-only buffer, and this time expect that it will never change.

This still does not catch the case of mmap.mmap. I am not sure how do deal with mmap.mmap. There is no way for it to export PROT_READ as a read-only buffer without permitted mutation, so the only options seem to either be a) remove buffer support from mmap, or b) blacklist it in bytesio(!).


Antoine, I have padded out the unit tests a little. test_memoryio.py seems the best place for them. Also modified test_sizeof(), although to the way this test is designed seems inherently brittle to begin with. Now it is also sensitive to changes in Py_buffer struct.


Various other changes:

* __new__ once again returns a valid, open, empty BytesIO, since the alternative breaks pickling.

* reinit() preserves existing BytesIO state until it knows it can succeed, which fixes another of the pickle tests.

* setstate() had CHECK_CLOSED() re-added, again for the pickle tests.


Probably the patch guts could be rearranged again, since the definition of the functions is no longer as clear as it was in cow3.patch.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 00:03:44 2014
From: report at bugs.python.org (David Wilson)
Date: Mon, 21 Jul 2014 22:03:44 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1405980224.67.0.887927906803.issue22003@psf.upfronthosting.co.za>


Changes by David Wilson :


Added file: http://bugs.python.org/file36016/cow4.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 00:18:19 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 21 Jul 2014 22:18:19 +0000
Subject: [issue22023] PyUnicode_FromFormat is broken on python 2
In-Reply-To: <1405964309.44.0.884917870385.issue22023@psf.upfronthosting.co.za>
Message-ID: <1405981099.45.0.306924309036.issue22023@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Here is a patch fixing %S and %R formats and supporting %li and %zi. It fixes also %S, %R and %V for non-ASCII characters.

PyUnicode_FromFormat() of Python 2 doesn't support width, precision and padding. For example, "%100i" does crash. For %S, %R and %V, the function decodes byte strings from ISO-8859-1 in Python 2, whereas it decodes from UTF-8 in Python 3.

----------
keywords: +patch
Added file: http://bugs.python.org/file36017/unicode_fromformat.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 00:22:38 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Mon, 21 Jul 2014 22:22:38 +0000
Subject: [issue22023] PyUnicode_FromFormat is broken on python 2
In-Reply-To: <1405964309.44.0.884917870385.issue22023@psf.upfronthosting.co.za>
Message-ID: <1405981358.38.0.395797758988.issue22023@psf.upfronthosting.co.za>


Alex Gaynor added the comment:

Hi Victor, thanks for working on this. I don't know the Unicode codebase that well, but this looks like an obvious improvement to me (much less broken :-)).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 00:37:49 2014
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 21 Jul 2014 22:37:49 +0000
Subject: [issue21976] Fix test_ssl.py to handle LibreSSL versioning
 appropriately
In-Reply-To: <1405318558.48.0.274142597942.issue21976@psf.upfronthosting.co.za>
Message-ID: <3hHHrX3ksKz7LjP@mail.python.org>


Roundup Robot added the comment:

New changeset 4dac45f88d45 by Antoine Pitrou in branch '3.4':
Issue #21976: Fix test_ssl to accept LibreSSL version strings.
http://hg.python.org/cpython/rev/4dac45f88d45

New changeset 98aec1d9e2a0 by Antoine Pitrou in branch 'default':
Issue #21976: Fix test_ssl to accept LibreSSL version strings.
http://hg.python.org/cpython/rev/98aec1d9e2a0

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 00:40:32 2014
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 21 Jul 2014 22:40:32 +0000
Subject: [issue21976] Fix test_ssl.py to handle LibreSSL versioning
 appropriately
In-Reply-To: <1405318558.48.0.274142597942.issue21976@psf.upfronthosting.co.za>
Message-ID: <3hHHvg4Cspz7Lmr@mail.python.org>


Roundup Robot added the comment:

New changeset 33fc081285b2 by Antoine Pitrou in branch '2.7':
Issue #21976: Fix test_ssl to accept LibreSSL version strings.
http://hg.python.org/cpython/rev/33fc081285b2

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 00:41:03 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Mon, 21 Jul 2014 22:41:03 +0000
Subject: [issue21976] Fix test_ssl.py to handle LibreSSL versioning
 appropriately
In-Reply-To: <1405318558.48.0.274142597942.issue21976@psf.upfronthosting.co.za>
Message-ID: <1405982463.91.0.0370223653639.issue21976@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

This should be fixed now. Thank you very much!

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 01:03:40 2014
From: report at bugs.python.org (Demian Brecht)
Date: Mon, 21 Jul 2014 23:03:40 +0000
Subject: [issue20898] Missing 507 response description
In-Reply-To: <1394637244.26.0.361164120424.issue20898@psf.upfronthosting.co.za>
Message-ID: <1405983820.04.0.785408822981.issue20898@psf.upfronthosting.co.za>


Demian Brecht added the comment:

Being this is tagged for 3.5, I've refactored status codes as part of #21793. Should that be accepted and merged, that will also clear up this issue.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 01:34:02 2014
From: report at bugs.python.org (Demian Brecht)
Date: Mon, 21 Jul 2014 23:34:02 +0000
Subject: [issue13128] httplib debuglevel on CONNECT doesn't print response
 headers
In-Reply-To: <1318050704.97.0.551622649018.issue13128@psf.upfronthosting.co.za>
Message-ID: <1405985642.85.0.206128048513.issue13128@psf.upfronthosting.co.za>


Demian Brecht added the comment:

Attached a simple fix to the problem as written, matching logging method of HTTPResponse.begin().

----------
nosy: +demian.brecht
Added file: http://bugs.python.org/file36018/issue13128.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 02:03:43 2014
From: report at bugs.python.org (Demian Brecht)
Date: Tue, 22 Jul 2014 00:03:43 +0000
Subject: [issue14301] xmlrpc client transport and threading problem
In-Reply-To: <1331735658.17.0.761953257498.issue14301@psf.upfronthosting.co.za>
Message-ID: <1405987423.21.0.281616530471.issue14301@psf.upfronthosting.co.za>


Changes by Demian Brecht :


----------
nosy: +demian.brecht

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 02:45:30 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Tue, 22 Jul 2014 00:45:30 +0000
Subject: [issue21536] extension built with a shared python cannot be loaded
 with a static python
In-Reply-To: <1400525402.57.0.75792320709.issue21536@psf.upfronthosting.co.za>
Message-ID: <1405989930.94.0.496122753913.issue21536@psf.upfronthosting.co.za>


Changes by Antoine Pitrou :


----------
nosy: +barry

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 03:01:03 2014
From: report at bugs.python.org (Lita Cho)
Date: Tue, 22 Jul 2014 01:01:03 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1405990863.13.0.0244106212354.issue21933@psf.upfronthosting.co.za>


Lita Cho added the comment:

I have  a version of this working with Ctrl-plus and Ctrl-minus. However, there is a bug with Tk 8.5.9 where binding to MouseWheel  crashes Tkinter for Macs (issue10731), which I am running into. I need to update Tkinter to see if this works.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 03:54:17 2014
From: report at bugs.python.org (Lita Cho)
Date: Tue, 22 Jul 2014 01:54:17 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1405994057.37.0.852183994717.issue21933@psf.upfronthosting.co.za>


Lita Cho added the comment:

Here is a patch for changing the font size using the scroll wheel. I also added the shortcuts "Ctrl-plus" to increase the font size and "Ctrl-minus" to decrease the font size.

However, since the MouseWheel is now bound to changing the font
size, the canvas won't scroll. I can try to fix this so that the mousewheel only changes the font size if the text pane is highlighted. But that might not be intuitive. Thoughts?

Note, this patch also includes the window sash (issue21597). They are sort of dependent since I am also redefining the onResize method, so I clumped all the bindings to one method. But if you want that to be separate, I can try to make it into two separate patches.

----------
keywords: +patch
Added file: http://bugs.python.org/file36019/window_pane_font_size.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 03:55:33 2014
From: report at bugs.python.org (Lita Cho)
Date: Tue, 22 Jul 2014 01:55:33 +0000
Subject: [issue1702036] Make Turtle thread-safe so it does not crash
Message-ID: <1405994133.0.0.0480574451809.issue1702036@psf.upfronthosting.co.za>


Changes by Lita Cho :


----------
nosy: +jesstess

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 04:04:26 2014
From: report at bugs.python.org (Jim Conyngham)
Date: Tue, 22 Jul 2014 02:04:26 +0000
Subject: [issue22028] Python 3.4.1 Installer ended prematurely (Windows msi)
Message-ID: <1405994666.12.0.143457311308.issue22028@psf.upfronthosting.co.za>


New submission from Jim Conyngham:

Python will not install on my Windows 7 (64-bit) OS.

I have repeatedly tried the install with variations (specifying an install directly vs. taking the default; running as admininstrator vs. not; with and without logging) and with multiple downloads python-3.4.1.msi, python-3.4.1.amd64.msi, and python-3.4.0.amd64.msi.  No matter what, it always fails with the same symptoms.

msiexec log file is attached.  There are a number of errors indicated on the log, but the one that's fatal seems to be this one:

MSI (s) (24:8C) [14:46:34:848]: Executing op: CustomActionSchedule(Action=UpdatePip,ActionType=3090,Source=F:\Shared.W7\Python34\python.exe,Target=-m ensurepip -U --default-pip,)
CustomAction UpdatePip returned actual error code 3 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (24:8C) [14:46:34:957]: Note: 1: 1722 2: UpdatePip 3: F:\Shared.W7\Python34\python.exe 4: -m ensurepip -U --default-pip 
MSI (s) (24:8C) [14:46:34:957]: Note: 1: 2262 2: Error 3: -2147287038 
Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.  Action UpdatePip, location: F:\Shared.W7\Python34\python.exe, command: -m ensurepip -U --default-pip 
MSI (s) (24:8C) [14:46:41:292]: Note: 1: 2262 2: Error 3: -2147287038 
MSI (s) (24:8C) [14:46:41:292]: Product: Python 3.4.1 -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.  Action UpdatePip, location: F:\Shared.W7\Python34\python.exe, command: -m ensurepip -U --default-pip 

Action ended 14:46:41: InstallFinalize. Return value 3.

The same text, "There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor." appears in a message box at the point of failure.

----------
components: Installation
files: python.log
messages: 223621
nosy: DieInSente
priority: normal
severity: normal
status: open
title: Python 3.4.1 Installer ended prematurely (Windows msi)
type: crash
versions: Python 3.4
Added file: http://bugs.python.org/file36020/python.log

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 04:06:16 2014
From: report at bugs.python.org (Weinan Li)
Date: Tue, 22 Jul 2014 02:06:16 +0000
Subject: [issue22021] shutil.make_archive()  root_dir do not work
In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za>
Message-ID: <1405994776.49.0.170134505156.issue22021@psf.upfronthosting.co.za>


Weinan Li added the comment:

I don't think so.

In source code, it just change work dir to root_dir, do nothing, and then the change word dir back.

If it works as design, the "root_dir" will be meaningless. should be remove.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 04:34:35 2014
From: report at bugs.python.org (Zach Byrne)
Date: Tue, 22 Jul 2014 02:34:35 +0000
Subject: [issue21955] ceval.c: implement fast path for integers with a single
 digit
In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za>
Message-ID: <1405996475.84.0.21592398199.issue21955@psf.upfronthosting.co.za>


Zach Byrne added the comment:

I did something similar to BINARY_SUBSCR after looking at the 2.7 source as Raymond suggested. Hopefully I got my binaries straight this time :) The new patch includes Victor's inlining and my new subscript changes.

Platform of campaign orig:
Python version: 3.5.0a0 (default:c8ce5bca0fcd+, Jul 15 2014, 18:11:28) [GCC 4.6.3]
Timer precision: 6 ns
Date: 2014-07-21 20:28:30

Platform of campaign patch:
Python version: 3.5.0a0 (default:c8ce5bca0fcd+, Jul 21 2014, 20:21:20) [GCC 4.6.3]
Timer precision: 20 ns
Date: 2014-07-21 20:28:39

---------------------+-------------+---------------
Tests??????????????? | ???????orig | ?????????patch
---------------------+-------------+---------------
1+2????????????????? | ?118 ns (*) | ?103 ns (-13%)
"1+2" ran 100 times? | 7.28 us (*) | 5.93 us (-19%)
x[1]???????????????? | ?120 ns (*) | ??98 ns (-19%)
"x[1]" ran 100 times | 7.35 us (*) | 5.31 us (-28%)
---------------------+-------------+---------------
Total??????????????? | 14.9 us (*) | 11.4 us (-23%)
---------------------+-------------+---------------

----------
Added file: http://bugs.python.org/file36021/21955_2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 05:05:16 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Tue, 22 Jul 2014 03:05:16 +0000
Subject: [issue1702036] Make Turtle thread-safe so it does not crash
Message-ID: <1405998316.61.0.700668314634.issue1702036@psf.upfronthosting.co.za>


Changes by Raymond Hettinger :


----------
priority: normal -> low
versions: +Python 3.5 -Python 3.2

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 05:06:37 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Tue, 22 Jul 2014 03:06:37 +0000
Subject: [issue21793] httplib client/server status refactor
In-Reply-To: <1403031756.71.0.442697149496.issue21793@psf.upfronthosting.co.za>
Message-ID: <1405998397.73.0.210559739535.issue21793@psf.upfronthosting.co.za>


Changes by Raymond Hettinger :


----------
assignee:  -> rhettinger
nosy: +rhettinger

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 05:14:20 2014
From: report at bugs.python.org (Weinan Li)
Date: Tue, 22 Jul 2014 03:14:20 +0000
Subject: [issue22021] shutil.make_archive()  root_dir do not work
In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za>
Message-ID: <1405998860.08.0.211855538666.issue22021@psf.upfronthosting.co.za>


Weinan Li added the comment:

Here's the path

----------
keywords: +patch
Added file: http://bugs.python.org/file36022/Issue22021.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 05:57:00 2014
From: report at bugs.python.org (Berker Peksag)
Date: Tue, 22 Jul 2014 03:57:00 +0000
Subject: [issue19629] support.rmtree fails on symlinks under Windows
In-Reply-To: <1384636992.45.0.350630415261.issue19629@psf.upfronthosting.co.za>
Message-ID: <1406001420.14.0.375673702099.issue19629@psf.upfronthosting.co.za>


Changes by Berker Peksag :


----------
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 06:27:15 2014
From: report at bugs.python.org (Martin Panter)
Date: Tue, 22 Jul 2014 04:27:15 +0000
Subject: [issue22021] shutil.make_archive()  root_dir do not work
In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za>
Message-ID: <1406003235.13.0.258919526434.issue22021@psf.upfronthosting.co.za>


Changes by Martin Panter :


----------
nosy: +vadmium

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 06:46:53 2014
From: report at bugs.python.org (paul j3)
Date: Tue, 22 Jul 2014 04:46:53 +0000
Subject: [issue22029] argparse - CSS white-space: like control for individual
 text blocks
Message-ID: <1406004413.12.0.04362068929.issue22029@psf.upfronthosting.co.za>


New submission from paul j3:

A number of the issues seek to customize the wrapping behavior in HelpFormatter - beyond what the current Formatter subclasses offer.

http://bugs.python.org/issue13923 and http://bugs.python.org/issue12806 - want a wrapping method that preserves existing \n, while still wrapping long lines.

http://bugs.python.org/issue12806#msg144353 - suggests that this formatter is similar to CSS property white-space: pre-wrap.

http://bugs.python.org/issue9399 - wants to write a pre-formatted 'license' text using a 'version'-like Action.
 -
http://bugs.python.org/issue13023  - wants to use 2 HelpFormatter subclasses at the same time (Raw and Defaults).

http://bugs.python.org/issue13023#msg144475: "Yeah, adding a formatter instance seems overkill for the usual case of wanting to preserve formatting of the epilog."

http://bugs.python.org/issue12284 - wants to put formatted examples in the epilog.

It might be easier to handle these issues if the user could designate how an individual text block (description, epilog, help) is to be formatted.  

HTML has a '
' tag, CSS has 'white-space:' attribute (with 5 styles of wrapping and white-space handling).

The usage example might be something like:

    parser = ArgumentParser(prog='PROG',
        description = NoWrap('This is a description...'),
        epilog = PreWrap('Multipoint epilog with examples...'),
        )
    parser.add_argument('-f', help='help with normal wrapping')

----------
components: Library (Lib)
messages: 223625
nosy: BreamoreBoy, GraylinKim, bethard, denilsonsa, eric.araujo, jonash, paul.j3
priority: normal
severity: normal
status: open
title: argparse - CSS white-space: like control for individual text blocks
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 07:41:35 2014
From: report at bugs.python.org (paul j3)
Date: Tue, 22 Jul 2014 05:41:35 +0000
Subject: [issue22029] argparse - CSS white-space: like control for individual
 text blocks
In-Reply-To: <1406004413.12.0.04362068929.issue22029@psf.upfronthosting.co.za>
Message-ID: <1406007695.24.0.49230491871.issue22029@psf.upfronthosting.co.za>


paul j3 added the comment:

One way of marking a string for special wrap handing is to make it an instance of a subclass of 'str'.

This patch adds class _WhitespaceStyle(str), and 5 subclasses corresponding to the possible values of the CSS whitespace:.

     Normal
     Pre
     NoWrap
     PreLine
     PreWrap 

Together they define methods:

    _str_format() - apply % style formatting
    format() - apply the py3 {} style formatting
    _split_lines() - style specific split_lines (may or may not pass through text_wrap)
    _fill_text() - style specific fill_text (again without without test_wrap)

All return a text object of the same class (as self).  This make it possible to apply the % formatting to a string, and then apply the wrapping, without loosing class information:

    Pre('sample text %(default)s')._str_format(dict(default='Boo'))._fill_text(30, '   ')

This subclass information is lost when the string pass through other 'str' operations, for example '\n'.join().  I needed to add _str_format because % formatting is applied to them before text_wrap.

The HelpFormatter has:

    _str_format() - all the previous % formatting instances
    _split_lines()
    _fill_text()

These delegate the action to the respective white_space classes, or use the (default) Normal subclass if the text is a plain 'str'.

test_argparse.py has 2 test cases that use the 'Pre' class to replicate the behaviour of the Raw...HelpFormatter class tests.  Undoubtedly it needs further tests to handle all of these new classes.

I haven't made any doc changes yet.

I wrote these classes based on the descriptions of what the CSS options do, but I have not tried to compare the handling of sample text.  I can also imagine users wanting to refine the wrap handling further (e.g. http://bugs.python.org/issue12806).

I intend to write test files to show how these new classes could be used in the various issues that I listed in the previous post.

------------

Since I had to collect the % formatting cases into one _str_format() method (to preserve class information), I am also exploring the use of Py3 {} formatting.  

Py3FormatHelpFormatter - a new Formatter class that redefines _str_format() to handle {} style formatting (if present).  I put this in a separate class because there is a slight possibility that existing code has text that might be confused for Py3 style formatting, e.g.

    help='help text {default: %(default)s}'  

I think the issue of using Py3 formatting was raised and rejected.  So I'm not committed to including this feature.

----------
keywords: +patch
Added file: http://bugs.python.org/file36023/issue22029_1.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 08:07:13 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Tue, 22 Jul 2014 06:07:13 +0000
Subject: [issue21597] Allow turtledemo code pane to get wider.
In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za>
Message-ID: <1406009232.99.0.84493214165.issue21597@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

For me, FLAT is about as mushy as the default, while SOLID actually looks like a divider. I find the sash easier to 'grab' and move. I plan to go with that. If it looks substantially worse on some other system, we could make the argument conditional on sys.platform or whatever.

I plan to do a 'final' review in the next day and either commit or post a revision for testing on non-Windows systems.

----------
stage: patch review -> commit review

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 08:10:41 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Tue, 22 Jul 2014 06:10:41 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1406009441.2.0.502288542694.issue21933@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

I plan to commit the sash patch before reviewing this. I would wait until then to do a separate patch.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 08:35:23 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Tue, 22 Jul 2014 06:35:23 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1406010923.36.0.516557130467.issue21933@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

MOUSEWHEEL should continue to scroll.
CONTROL+MOUSEWHEEL should change font size, as you said at the beginning.
At least on Windows, this seems pretty standard: Internet Explorer, Firefox, Notepad++, LibreOffice (and, I imagin, OpenOffice, and Word), Thunderbird.  The only exception I can find that has a font size setting but ignores ^wheel is Command Prompt, which breaks multiple UI rules.  Notepad does not allow font resizing.

Get ^wheel to work right and I would like to add it to Idle, where ^wheel scrolls along with wheel.

^+ and ^- are pretty standard also, though LibreOffice does not recognize them. Perhaps this is because it is explicit cross platform.

We can conditionally not bind wheel events on Mac setups where it fails. Does #10731 have enough info to do that? In not... I have not yet looked into generating key/mouse events from code, but perhaps it would be possible to generate a wheel event inside try: except and unbind if there is an exception.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 08:46:36 2014
From: report at bugs.python.org (Lita Cho)
Date: Tue, 22 Jul 2014 06:46:36 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1406010923.36.0.516557130467.issue21933@psf.upfronthosting.co.za>
Message-ID: 


Lita Cho added the comment:

Sounds good. I can wait till the sash code gets incorporated in order to
add in the font code.

I would have to generate a MOUSEWHEEL event and see if it fails. I have
generated mouse clicks before. I'll try to see if I can generate a
MOUSEWHEEL event and if it errors, not bind to it. Although it might be
hard for me to test, as I just updated my tcl/tk.

I will also try to figure out how to bind to Ctrl+MOUSEWHEEL and not just
MOUSEWHEEL.

Lita

On Mon, Jul 21, 2014 at 11:35 PM, Terry J. Reedy 
wrote:

>
> Terry J. Reedy added the comment:
>
> MOUSEWHEEL should continue to scroll.
> CONTROL+MOUSEWHEEL should change font size, as you said at the beginning.
> At least on Windows, this seems pretty standard: Internet Explorer,
> Firefox, Notepad++, LibreOffice (and, I imagin, OpenOffice, and Word),
> Thunderbird.  The only exception I can find that has a font size setting
> but ignores ^wheel is Command Prompt, which breaks multiple UI rules.
>  Notepad does not allow font resizing.
>
> Get ^wheel to work right and I would like to add it to Idle, where ^wheel
> scrolls along with wheel.
>
> ^+ and ^- are pretty standard also, though LibreOffice does not recognize
> them. Perhaps this is because it is explicit cross platform.
>
> We can conditionally not bind wheel events on Mac setups where it fails.
> Does #10731 have enough info to do that? In not... I have not yet looked
> into generating key/mouse events from code, but perhaps it would be
> possible to generate a wheel event inside try: except and unbind if there
> is an exception.
>
> ----------
>
> _______________________________________
> Python tracker 
> 
> _______________________________________
>

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 08:52:12 2014
From: report at bugs.python.org (Ned Deily)
Date: Tue, 22 Jul 2014 06:52:12 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1406011932.11.0.90674421321.issue21933@psf.upfronthosting.co.za>


Ned Deily added the comment:

Lita, I tried the patch.  From the perspective of an OS X user, while I might expect that using the zoom gesture on a mousepad or using a mousewheel (the equivalent) to increase or decrease the font size, I would even more expect scrolling to work especially if scrollbars are present.  Clearly, scrolling is more important so, if it is not possible to bind Tk mousewheel events without affecting scrolling, I would abandon the mousewheel.  On OS X, the standard way to provide size adjustment (of fonts or images) is to provide "Bigger" or "Smaller" menu items with the standard keyboard shortcuts of Command-Shift-Equal (and Command-Equal) which is displayed as "Command +" (so the user on a US keyboard just presses the Command key and the =/+ key) and Command-Hyphen ("Command -").  The Apple OS X Human Interface Guidelines go into more detail and you can see these shortcuts in action in many standard OS X applications (TextEdit, Mail, Safari, etc).  As it stands today, turtledemo does not use the standard OS X menu bar where these commands would normally be placed.  And that's a bit of a separate problem because since turtledemo doesn't change the root menu it defaults to a Tk-provided one which includes things "Run Widget Demo" under the file menu.  To be a proper OS X app, turtledemo should customize the menu, at least removing the widget demo item and then it could add the Bigger and Smaller menu items to a Format menu.  Actually, the turtledemo Examples and Help pulldown options would ideally also be available in the standard menu hierarchy.  I'm not suggesting that is a requirement but that's what I think an OS X user would expect and what the Apple HIG would require.

https://developer.apple.com/library/mac/documentation/userexperience/conceptual/applehiguidelines/KeyboardShortcuts/KeyboardShortcuts.html
https://developer.apple.com/library/mac/documentation/userexperience/conceptual/applehiguidelines/Menus/Menus.html

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 09:06:47 2014
From: report at bugs.python.org (Lita Cho)
Date: Tue, 22 Jul 2014 07:06:47 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1406011932.11.0.90674421321.issue21933@psf.upfronthosting.co.za>
Message-ID: 


Lita Cho added the comment:

I completely agree about the mousewheel. However, would it make sense for
OS X to combine command with mousewheel? I have never seen that before. I
am not sure if I can bind the zoom gesture with tkinter, but I can find
out.

I also think the shortcuts are not intuitive as an OS X user, as command
should be used instead of Ctrl.

What I can do check the operating system and define the font shortcuts
accordingly. I am not sure about redefining the Menu shortcuts as that
seems like a separate issue.

On Mon, Jul 21, 2014 at 11:52 PM, Ned Deily  wrote:

>
> Ned Deily added the comment:
>
> Lita, I tried the patch.  From the perspective of an OS X user, while I
> might expect that using the zoom gesture on a mousepad or using a
> mousewheel (the equivalent) to increase or decrease the font size, I would
> even more expect scrolling to work especially if scrollbars are present.
>  Clearly, scrolling is more important so, if it is not possible to bind Tk
> mousewheel events without affecting scrolling, I would abandon the
> mousewheel.  On OS X, the standard way to provide size adjustment (of fonts
> or images) is to provide "Bigger" or "Smaller" menu items with the standard
> keyboard shortcuts of Command-Shift-Equal (and Command-Equal) which is
> displayed as "Command +" (so the user on a US keyboard just presses the
> Command key and the =/+ key) and Command-Hyphen ("Command -").  The Apple
> OS X Human Interface Guidelines go into more detail and you can see these
> shortcuts in action in many standard OS X applications (TextEdit, Mail,
> Safari, etc).  As it stands today, turtledemo does not use the standard OS
> X menu bar where these commands would normally be placed.  And that's a bit
> of a separate problem because since turtledemo doesn't change the root menu
> it defaults to a Tk-provided one which includes things "Run Widget Demo"
> under the file menu.  To be a proper OS X app, turtledemo should customize
> the menu, at least removing the widget demo item and then it could add the
> Bigger and Smaller menu items to a Format menu.  Actually, the turtledemo
> Examples and Help pulldown options would ideally also be available in the
> standard menu hierarchy.  I'm not suggesting that is a requirement but
> that's what I think an OS X user would expect and what the Apple HIG would
> require.
>
>
> https://developer.apple.com/library/mac/documentation/userexperience/conceptual/applehiguidelines/KeyboardShortcuts/KeyboardShortcuts.html
>
> https://developer.apple.com/library/mac/documentation/userexperience/conceptual/applehiguidelines/Menus/Menus.html
>
> ----------
>
> _______________________________________
> Python tracker 
> 
> _______________________________________
>

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 09:09:38 2014
From: report at bugs.python.org (Ned Deily)
Date: Tue, 22 Jul 2014 07:09:38 +0000
Subject: [issue22028] Python 3.4.1 Installer ended prematurely (Windows msi)
In-Reply-To: <1405994666.12.0.143457311308.issue22028@psf.upfronthosting.co.za>
Message-ID: <1406012978.4.0.877470537191.issue22028@psf.upfronthosting.co.za>


Changes by Ned Deily :


----------
nosy: +steve.dower, zach.ware

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 09:15:42 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 07:15:42 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1406013342.6.0.918458265054.issue22003@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

See also issue15381.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 09:16:28 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 22 Jul 2014 07:16:28 +0000
Subject: [issue21970] Broken code for handling file://host in
 urllib.request.FileHandler.file_open
In-Reply-To: <1405216161.05.0.3363234179.issue21970@psf.upfronthosting.co.za>
Message-ID: <3hHWLz4gc0z7Ll6@mail.python.org>


Roundup Robot added the comment:

New changeset 4b98961748f1 by Senthil Kumaran in branch '3.4':
Fix localhost checking in FileHandler. Raised in #21970.
http://hg.python.org/cpython/rev/4b98961748f1

New changeset 2c660948bb41 by Senthil Kumaran in branch 'default':
Merge 3.4
http://hg.python.org/cpython/rev/2c660948bb41

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 09:18:09 2014
From: report at bugs.python.org (Ned Deily)
Date: Tue, 22 Jul 2014 07:18:09 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1406013489.28.0.389406101588.issue21933@psf.upfronthosting.co.za>


Ned Deily added the comment:

On OS X, the actions associated with trackpad gestures are controlled by the Trackpad panel of System Preferences.  The default settings map the "pinch with two fingers" gesture to "Zoom in or out" which Tk apps see as Mousewheel events: no programming needed!

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 09:19:37 2014
From: report at bugs.python.org (Senthil Kumaran)
Date: Tue, 22 Jul 2014 07:19:37 +0000
Subject: [issue21970] Broken code for handling file://host in
 urllib.request.FileHandler.file_open
In-Reply-To: <1405216161.05.0.3363234179.issue21970@psf.upfronthosting.co.za>
Message-ID: <1406013577.41.0.436621357933.issue21970@psf.upfronthosting.co.za>


Senthil Kumaran added the comment:

I have addressed the mistake where req.host is self.get_names() was done instead of req.host in self.get_names() in the first commit as it was an obvious problem.

I will come up with patch/solution addressing the other behavior mentioned in this report.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 09:22:04 2014
From: report at bugs.python.org (Lita Cho)
Date: Tue, 22 Jul 2014 07:22:04 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1406013489.28.0.389406101588.issue21933@psf.upfronthosting.co.za>
Message-ID: 


Lita Cho added the comment:

What really? That is so awesome! I will check that out!

However, I figure I still need to create separate bindings for Linux,
Windows and Mac, right? Or does Tkinter unify all the mousewheel events?

Lita

On Tue, Jul 22, 2014 at 12:18 AM, Ned Deily  wrote:

>
> Ned Deily added the comment:
>
> On OS X, the actions associated with trackpad gestures are controlled by
> the Trackpad panel of System Preferences.  The default settings map the
> "pinch with two fingers" gesture to "Zoom in or out" which Tk apps see as
> Mousewheel events: no programming needed!
>
> ----------
>
> _______________________________________
> Python tracker 
> 
> _______________________________________
>

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 09:32:08 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Tue, 22 Jul 2014 07:32:08 +0000
Subject: [issue22030] Use calloc in set resizing
Message-ID: <1406014328.9.0.576652284701.issue22030@psf.upfronthosting.co.za>


New submission from Raymond Hettinger:

Victor, how does this look?

----------
assignee: haypo
files: set_calloc.diff
keywords: patch
messages: 223638
nosy: haypo, rhettinger
priority: normal
severity: normal
stage: patch review
status: open
title: Use calloc in set resizing
type: performance
versions: Python 3.5
Added file: http://bugs.python.org/file36024/set_calloc.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 09:35:00 2014
From: report at bugs.python.org (Ned Deily)
Date: Tue, 22 Jul 2014 07:35:00 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1406014500.4.0.584464259233.issue21933@psf.upfronthosting.co.za>


Ned Deily added the comment:

"However, I figure I still need to create separate bindings for Linux,
"Windows and Mac, right? Or does Tkinter unify all the mousewheel events?

I'm not sure I understand: I think that Tk only provides one MouseWheel event binding.  Keyboard or menu items might differ, yes, e.g. Cmd-+ vs Ctrl-+.

http://www.tcl.tk/man/tcl8.5/TkCmd/bind.htm#M9

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 09:42:58 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 22 Jul 2014 07:42:58 +0000
Subject: [issue22030] Use calloc in set resizing
In-Reply-To: <1406014328.9.0.576652284701.issue22030@psf.upfronthosting.co.za>
Message-ID: 


STINNER Victor added the comment:

Be careful. In my tests, calloc() was slower than malloc() + memset() for
memory blocks smaller than 1 MB. Calloc() can be interesting if only a few
pages (4096 bytes) are modified.

You must provide benchmarks.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 09:49:11 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 22 Jul 2014 07:49:11 +0000
Subject: [issue22030] Use calloc in set resizing
In-Reply-To: <1406014328.9.0.576652284701.issue22030@psf.upfronthosting.co.za>
Message-ID: <1406015351.6.0.768083958437.issue22030@psf.upfronthosting.co.za>


STINNER Victor added the comment:

See also issue #21644 (bytearray).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 09:49:22 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 22 Jul 2014 07:49:22 +0000
Subject: [issue21644] Optimize bytearray(int) constructor to use calloc()
In-Reply-To: <1401740758.16.0.943124117891.issue21644@psf.upfronthosting.co.za>
Message-ID: <1406015362.96.0.175136984559.issue21644@psf.upfronthosting.co.za>


STINNER Victor added the comment:

See also issue #22030 (set).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 10:05:54 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 22 Jul 2014 08:05:54 +0000
Subject: [issue21044] tarfile does not handle file .name being an int
In-Reply-To: <1395624777.51.0.277506799413.issue21044@psf.upfronthosting.co.za>
Message-ID: <3hHXS14Rfyz7LjP@mail.python.org>


Roundup Robot added the comment:

New changeset 51699f5f5430 by Serhiy Storchaka in branch '2.7':
Backout 308f3c1e36d3.  This change (issue21044) does not need to be merged on
http://hg.python.org/cpython/rev/51699f5f5430

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 10:05:55 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 22 Jul 2014 08:05:55 +0000
Subject: [issue15759] "make suspicious" doesn't display instructions in case
 of failure
In-Reply-To: <1345613663.78.0.519613331574.issue15759@psf.upfronthosting.co.za>
Message-ID: <3hHXS22cCXz7LjP@mail.python.org>


Roundup Robot added the comment:

New changeset 10b83036c723 by Serhiy Storchaka in branch '3.4':
Issue #15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/
http://hg.python.org/cpython/rev/10b83036c723

New changeset c755a3b58fa6 by Serhiy Storchaka in branch 'default':
Issue #15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/
http://hg.python.org/cpython/rev/c755a3b58fa6

New changeset a61c3d17fe4f by Serhiy Storchaka in branch '2.7':
Issue #15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/
http://hg.python.org/cpython/rev/a61c3d17fe4f

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 10:06:02 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Tue, 22 Jul 2014 08:06:02 +0000
Subject: [issue22030] Use calloc in set resizing
In-Reply-To: <1406014328.9.0.576652284701.issue22030@psf.upfronthosting.co.za>
Message-ID: <1406016362.22.0.407067756887.issue22030@psf.upfronthosting.co.za>


Changes by Raymond Hettinger :


----------
resolution:  -> rejected
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 10:33:12 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 08:33:12 +0000
Subject: [issue21044] tarfile does not handle file .name being an int
In-Reply-To: <1395624777.51.0.277506799413.issue21044@psf.upfronthosting.co.za>
Message-ID: <1406017992.42.0.194752306481.issue21044@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Thanks Zachary for pointing to buildbot failure.

> Also, Serhiy, I think you may have got me mixed up with someone else.

Indeed, I either missed you with Antoine Pietri or missed this issue with issue19524. In any case thanks you for your activity on the tracker. And thanks Antoine Pietri for his contribution on this issue.

> Still, it would be interesting to investigate why this breaks 2.7 though.

Left open until will investigated this. Will open a new issue if there is a bug here.

----------
resolution:  -> remind

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 10:36:28 2014
From: report at bugs.python.org (Lita Cho)
Date: Tue, 22 Jul 2014 08:36:28 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1406014500.4.0.584464259233.issue21933@psf.upfronthosting.co.za>
Message-ID: 


Lita Cho added the comment:

Oh I see. And then pinch on the trackpad just generates a overall MouseWheel event, not a specific zoom-in event. For some reason, I thought there was a different event depending on operating systems. Before, Linux would trigger  and  events and not MouseWheel.

On Jul 22, 2014, at 12:35 AM, Ned Deily  wrote:

> 
> Ned Deily added the comment:
> 
> "However, I figure I still need to create separate bindings for Linux,
> "Windows and Mac, right? Or does Tkinter unify all the mousewheel events?
> 
> I'm not sure I understand: I think that Tk only provides one MouseWheel event binding.  Keyboard or menu items might differ, yes, e.g. Cmd-+ vs Ctrl-+.
> 
> http://www.tcl.tk/man/tcl8.5/TkCmd/bind.htm#M9
> 
> ----------
> 
> _______________________________________
> Python tracker 
> 
> _______________________________________

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 10:36:49 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 08:36:49 +0000
Subject: [issue15759] "make suspicious" doesn't display instructions in case
 of failure
In-Reply-To: <1345613663.78.0.519613331574.issue15759@psf.upfronthosting.co.za>
Message-ID: <1406018209.08.0.723187359097.issue15759@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
assignee: docs at python -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 10:50:42 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 08:50:42 +0000
Subject: [issue22031] Hexadecimal id in reprs
Message-ID: <1406019042.04.0.51382116159.issue22031@psf.upfronthosting.co.za>


New submission from Serhiy Storchaka:

Default repr of an instance looks as:

>>> object()


Many specialized reprs follow a pattern <... at {hexadecimal id}...>. But there are few deviations:

1. Reprs of WeakValueDictionary and WeakKeyDictionary in the weakref module output decimal id.

2. reprlib and reprs of CDLL in the ctypes module and DateTime and MultiCall in the xmlrpc.client module output hexadecimal id but without the "0x" prefix.

Proposed patch makes these cases to conform with other reprs.

----------
components: Library (Lib)
files: repr_hex_id.diff
keywords: patch
messages: 223647
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Hexadecimal id in reprs
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file36025/repr_hex_id.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 10:53:05 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 22 Jul 2014 08:53:05 +0000
Subject: [issue22031] Hexadecimal id in reprs
In-Reply-To: <1406019042.04.0.51382116159.issue22031@psf.upfronthosting.co.za>
Message-ID: <1406019185.45.0.149442433157.issue22031@psf.upfronthosting.co.za>


STINNER Victor added the comment:

The patch looks good to me.

----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 11:02:36 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 09:02:36 +0000
Subject: [issue22032] Use __qualname__ together with __module__
Message-ID: <1406019756.34.0.140996851672.issue22032@psf.upfronthosting.co.za>


New submission from Serhiy Storchaka:

Often when class name is reported in stdlib (e.g. in reprs), it used together with module name: '%s.%s' % (self.__class__.__module__, self.__class__.__name__). But this code is wrong when a class is nested. The __qualname__ attribute should be used instead of just __name__ (and it is already used in multiple places).

Proposed patch replaces __name__ to __qualname__ when it used together with module name to format full class name.

----------
components: Library (Lib)
files: repr_qualname.diff
keywords: patch
messages: 223649
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Use __qualname__ together with __module__
type: behavior
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36026/repr_qualname.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 11:08:05 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 09:08:05 +0000
Subject: [issue22033] Subclass friendly reprs
Message-ID: <1406020084.96.0.790015152809.issue22033@psf.upfronthosting.co.za>


New submission from Serhiy Storchaka:

Some reprs in stdlib are subclass friendly. They contains class name or even fully qualified class name and substitute appropriate subclass name in subclasses. But some reprs contains hardcoded either class name, or module name, or fully qualified class name. Proposed patch makes multiple reprs in stdlib more subclass friendly.

See also issue22032.

----------
components: Library (Lib)
files: repr_subclass_friendly.diff
keywords: patch
messages: 223650
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Subclass friendly reprs
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file36027/repr_subclass_friendly.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 11:14:40 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 22 Jul 2014 09:14:40 +0000
Subject: [issue22032] Use __qualname__ together with __module__
In-Reply-To: <1406019756.34.0.140996851672.issue22032@psf.upfronthosting.co.za>
Message-ID: <1406020480.01.0.0320873002503.issue22032@psf.upfronthosting.co.za>


STINNER Victor added the comment:

The patch looks good to me.

For Python 3.4, may it break the backward compatibility? For example, breaking doctests relying on the exact representation? If there is a risk, it's maybe safer to only modify Python 3.5.

----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 11:14:57 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 22 Jul 2014 09:14:57 +0000
Subject: [issue22031] Hexadecimal id in reprs
In-Reply-To: <1406019042.04.0.51382116159.issue22031@psf.upfronthosting.co.za>
Message-ID: <3hHYzh6dTNz7Ljs@mail.python.org>


Roundup Robot added the comment:

New changeset 4cef7b0ec659 by Serhiy Storchaka in branch 'default':
Issue #22031: Reprs now always use hexadecimal format with the "0x" prefix
http://hg.python.org/cpython/rev/4cef7b0ec659

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 11:17:52 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 09:17:52 +0000
Subject: [issue22031] Hexadecimal id in reprs
In-Reply-To: <1406019042.04.0.51382116159.issue22031@psf.upfronthosting.co.za>
Message-ID: <1406020672.36.0.622809055818.issue22031@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Thanks Victor. Applied only in default because this issue is too minor.

----------
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 11:33:29 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 09:33:29 +0000
Subject: [issue22034] posixpath.join() and bytearray
Message-ID: <1406021609.78.0.443791365349.issue22034@psf.upfronthosting.co.za>


New submission from Serhiy Storchaka:

posixpath.join() raises misleading exception in case when all arguments are bytearrays:

>>> import posixpath
>>> posixpath.join(bytearray(b'foo'), bytearray(b'bar'))
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython/Lib/posixpath.py", line 91, in join
    "components.") from None
TypeError: Can't mix strings and bytes in path components.

This bug was introduced in issue15377 and misleading test which provoked it was added in issue15180.

I proposed two patches. Patch for 3.4 only eliminates wrong specialcasing of bytearray (none of os.path methods work with bytearray). Patch for 3.5 also adds better error messages for wrong argument types of posixpath.join (of course we can apply it to 3.4 too).

----------
components: Library (Lib)
files: posixpath_join_bytearray-3.4.diff
keywords: patch
messages: 223654
nosy: hynek, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: posixpath.join() and bytearray
type: behavior
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36028/posixpath_join_bytearray-3.4.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 11:33:58 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 09:33:58 +0000
Subject: [issue22034] posixpath.join() and bytearray
In-Reply-To: <1406021609.78.0.443791365349.issue22034@psf.upfronthosting.co.za>
Message-ID: <1406021638.45.0.48998496895.issue22034@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file36029/posixpath_join_bytearray-3.5.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 12:00:23 2014
From: report at bugs.python.org (Les Bothwell)
Date: Tue, 22 Jul 2014 10:00:23 +0000
Subject: [issue22026] 2.7.8 ttk Button text display problem
In-Reply-To: <1405974124.93.0.889625077741.issue22026@psf.upfronthosting.co.za>
Message-ID: <1406023223.66.0.0202599376926.issue22026@psf.upfronthosting.co.za>


Les Bothwell added the comment:

In my example, the import statement can be removed (dammit)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 12:09:20 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 10:09:20 +0000
Subject: [issue15275] isinstance is called a more times that needed in ntpath
In-Reply-To: <1341668298.8.0.671820953585.issue15275@psf.upfronthosting.co.za>
Message-ID: <1406023760.18.0.260279544533.issue15275@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Here is alternative patch. I believe it makes a code simpler.

Microbenchmarks:

$ ./python -m timeit -n 100000 -s "from ntpath import splitdrive"  "splitdrive('c:foo')"

Before: 100000 loops, best of 3: 20 usec per loop
After: 100000 loops, best of 3: 11.5 usec per loop

$ ./python -m timeit -n 100000 -s "from ntpath import splitext"  "splitext('python.exe')"

Before: 100000 loops, best of 3: 23.6 usec per loop
After: 100000 loops, best of 3: 18 usec per loop

$ ./python -m timeit -s "from ntpath import join"  "join('foo', 'bar')"

Before: 10000 loops, best of 3: 50.9 usec per loop
After: 10000 loops, best of 3: 32.3 usec per loop

$ ./python -m timeit -s "from ntpath import normpath"  "normpath('/foo/bar/baz')"

Before: 10000 loops, best of 3: 67.5 usec per loop
After: 10000 loops, best of 3: 40.3 usec per loop

$ ./python -m timeit -s "from ntpath import relpath"  "relpath('foo', 'bar')"

Before: 1000 loops, best of 3: 695 usec per loop
After: 1000 loops, best of 3: 456 usec per loop

----------
nosy: +serhiy.storchaka
versions: +Python 3.5 -Python 3.4
Added file: http://bugs.python.org/file36030/ntpath_cleanup.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 12:12:08 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 22 Jul 2014 10:12:08 +0000
Subject: [issue15275] isinstance is called a more times that needed in ntpath
In-Reply-To: <1341668298.8.0.671820953585.issue15275@psf.upfronthosting.co.za>
Message-ID: <1406023928.05.0.0944433353847.issue15275@psf.upfronthosting.co.za>


STINNER Victor added the comment:

I like ntpath_cleanup.diff, I don't think that it makes the code worse.

FYI os.fsencode() accepts str too, you can simplify:

     if isinstance(path, bytes):
-        userhome = userhome.encode(sys.getfilesystemencoding())
+        userhome = os.fsencode(userhome)

to


+    userhome = os.fsencode(userhome)

----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 12:20:40 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 10:20:40 +0000
Subject: [issue22035] Fatal error in dbm.gdbm
Message-ID: <1406024440.03.0.44171364302.issue22035@psf.upfronthosting.co.za>


New submission from Serhiy Storchaka:

It is possible to crash Python by breaking opened gdbm database.

>>> import _gdbm as dbm
>>> db = dbm.open('x.db', 'n')
>>> open('x.db', 'wb').close()
>>> db[b'a'] = b'b'
gdbm fatal: read error

Proposed patch tries to convert fatal gdbm into regular exception or in Python fatal error (which at least produces traceback).

>>> import _gdbm as dbm
>>> db = dbm.open('x.db', 'n')
>>> open('x.db', 'wb').close()
>>> db[b'a'] = b'b'
Traceback (most recent call last):
  File "", line 1, in 
_gdbm.error: gdbm fatal: read error

----------
components: Extension Modules
files: dbm_gdbm_fatal_error.patch
keywords: patch
messages: 223658
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Fatal error in dbm.gdbm
type: crash
versions: Python 2.7, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36031/dbm_gdbm_fatal_error.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 13:21:52 2014
From: report at bugs.python.org (Berker Peksag)
Date: Tue, 22 Jul 2014 11:21:52 +0000
Subject: [issue17665] convert test_wsgiref to idiomatic unittest code
In-Reply-To: <1365843351.69.0.98319893836.issue17665@psf.upfronthosting.co.za>
Message-ID: <1406028112.25.0.486253815229.issue17665@psf.upfronthosting.co.za>


Changes by Berker Peksag :


----------
nosy: +berker.peksag
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 13:30:54 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 11:30:54 +0000
Subject: [issue21859] Add Python implementation of FileIO
In-Reply-To: <1403608013.94.0.257739188668.issue21859@psf.upfronthosting.co.za>
Message-ID: <1406028654.59.0.95903924957.issue21859@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Next iteration of the patch addressed Victor's comments.

----------
Added file: http://bugs.python.org/file36032/pyio_fileio_4.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 13:48:07 2014
From: report at bugs.python.org (Steven D'Aprano)
Date: Tue, 22 Jul 2014 11:48:07 +0000
Subject: [issue22031] Hexadecimal id in reprs
In-Reply-To: <1406019042.04.0.51382116159.issue22031@psf.upfronthosting.co.za>
Message-ID: <20140722114800.GP9112@ando>


Steven D'Aprano added the comment:

> Many specialized reprs follow a pattern <... at {hexadecimal id}...>. 
> But there are few deviations:
[...]
> Proposed patch makes these cases to conform with other reprs.

I oppose making this change. The exact format of this generic repr of 
instances is not a part of Python's API, and we should not encourage 
people to think that it must always follow the same pattern or rely on 
that pattern.

Changing the repr risks breaking doctests. That *might* be acceptable if 
there was some obvious benefit to the change, e.g. changing from some 
generic  to a nicer, more useful display. But to 
risk breaking doctests just for consistency with other generic displays 
when that consistency has never been promised is not worth it.

----------
nosy: +steven.daprano

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 13:52:07 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 11:52:07 +0000
Subject: [issue22032] Use __qualname__ together with __module__
In-Reply-To: <1406019756.34.0.140996851672.issue22032@psf.upfronthosting.co.za>
Message-ID: <1406029927.16.0.366245007488.issue22032@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

It broke Python tests (test_traceback and test_unittest), and the patch contains fixes for this. Yes, it can break user test if they test nested subclasses of classes touched by this patch. This is not very likely, but on other hand I don't see what can happen wrong when we will not fix it in 3.4.

----------
versions:  -Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 13:52:11 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 22 Jul 2014 11:52:11 +0000
Subject: [issue22031] Hexadecimal id in reprs
In-Reply-To: <1406019042.04.0.51382116159.issue22031@psf.upfronthosting.co.za>
Message-ID: <1406029931.43.0.136285570287.issue22031@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> Changing the repr risks breaking doctests.

That's why the change was only done in Python 3.5. To port your application to Python 3.5, you can modify you doctests to use "..." (ellipsis option of doctests).

> That *might* be acceptable if there was some obvious benefit
> to the change,

It's better to have consistent representation of objects. Low-level debuggers like gdb uses hexadecimal, not decimal. I'm regulary using gdb, and having the memory address in hexadecimal helps.

By the way, you should never rely on the (exact) representation in your unit tests :-)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 13:54:22 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 22 Jul 2014 11:54:22 +0000
Subject: [issue22032] Use __qualname__ together with __module__
In-Reply-To: <1406019756.34.0.140996851672.issue22032@psf.upfronthosting.co.za>
Message-ID: <1406030062.3.0.369765393578.issue22032@psf.upfronthosting.co.za>


STINNER Victor added the comment:

If an application relies on the exact representation in an unit test, it would be annoying to check the minor Python version to support the old and the new format.

Using the qualified name is better, but it can wait Python 3.5 IMO. They are enough complains that Python breaks backward compatibility, which is true or not :-)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 14:00:35 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 22 Jul 2014 12:00:35 +0000
Subject: [issue22032] Use __qualname__ together with __module__
In-Reply-To: <1406019756.34.0.140996851672.issue22032@psf.upfronthosting.co.za>
Message-ID: <3hHdfp3X9Tz7LjP@mail.python.org>


Roundup Robot added the comment:

New changeset fe3c98313855 by Serhiy Storchaka in branch 'default':
Issue #22032: __qualname__ instead of __name__ is now always used to format
http://hg.python.org/cpython/rev/fe3c98313855

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 14:05:15 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 12:05:15 +0000
Subject: [issue22032] Use __qualname__ together with __module__
In-Reply-To: <1406019756.34.0.140996851672.issue22032@psf.upfronthosting.co.za>
Message-ID: <1406030715.15.0.308278133963.issue22032@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

I agree with you. Thank for your review Victor.

All these issues are precursors to issue22033.

----------
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 14:10:22 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 12:10:22 +0000
Subject: [issue21988] Decrease iterating overhead in timeit
In-Reply-To: <1405501584.54.0.115556422233.issue21988@psf.upfronthosting.co.za>
Message-ID: <1406031022.23.0.199298800128.issue21988@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

OK. In any case I don't like this patch, it breaks simplicity and elegance of current code.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 14:10:30 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 22 Jul 2014 12:10:30 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406031030.79.0.827403755968.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

New patch to rebase the code and document the new function. It fixed also the docstring.

----------
Added file: http://bugs.python.org/file36033/signal_socket-3.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 14:11:03 2014
From: report at bugs.python.org (R. David Murray)
Date: Tue, 22 Jul 2014 12:11:03 +0000
Subject: [issue22021] shutil.make_archive()  root_dir do not work
In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za>
Message-ID: <1406031063.59.0.208497881677.issue22021@psf.upfronthosting.co.za>


R. David Murray added the comment:

The point *should* be that if you have something like:

   /home/me/some/directory/my/stuff/a
   /home/me/some/directory/my/stuff/b
   /home/me/some/other/directory

and you set rootdir to '/home/me/some' and base_dir='/home/me/some/directory/my' then the file paths in the archive will be:

    directory/my/stuff/a
    directory/my/stuff/b

At least, that's how I read the docs, though as I said they are *not* clear.  (I can't otherwise imagine any reason to have the root_dir parameter, with that name.)

Is this not what happens?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 14:32:32 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 22 Jul 2014 12:32:32 +0000
Subject: [issue22033] Subclass friendly reprs
In-Reply-To: <1406020084.96.0.790015152809.issue22033@psf.upfronthosting.co.za>
Message-ID: <1406032352.0.0.726233738377.issue22033@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 14:42:26 2014
From: report at bugs.python.org (Donald Stufft)
Date: Tue, 22 Jul 2014 12:42:26 +0000
Subject: [issue22028] Python 3.4.1 Installer ended prematurely (Windows msi)
In-Reply-To: <1405994666.12.0.143457311308.issue22028@psf.upfronthosting.co.za>
Message-ID: <1406032946.74.0.711719913889.issue22028@psf.upfronthosting.co.za>


Changes by Donald Stufft :


----------
nosy: +dstufft

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 17:20:42 2014
From: report at bugs.python.org (Martin Matusiak)
Date: Tue, 22 Jul 2014 15:20:42 +0000
Subject: [issue22036] Obsolete reference to stringobject in comment
Message-ID: <1406042442.28.0.89298124162.issue22036@psf.upfronthosting.co.za>


New submission from Martin Matusiak:

bits shared by the stringobject and unicodeobject implementations (and
possibly other modules, in a not too distant future).

"stringobject" should be "bytesobject"

----------
components: Interpreter Core
files: fix_typo_stringlib.diff
keywords: patch
messages: 223669
nosy: numerodix
priority: normal
severity: normal
status: open
title: Obsolete reference to stringobject in comment
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file36034/fix_typo_stringlib.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 17:54:57 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Tue, 22 Jul 2014 15:54:57 +0000
Subject: [issue22023] PyUnicode_FromFormat is broken on python 2
In-Reply-To: <1405964309.44.0.884917870385.issue22023@psf.upfronthosting.co.za>
Message-ID: <1406044497.34.0.638569560309.issue22023@psf.upfronthosting.co.za>


Alex Gaynor added the comment:

Reviewed more closely today, I think the docs probably need updating, but otherwise this LGTM, massive improvement! Thanks!

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 18:16:30 2014
From: report at bugs.python.org (Steve Dower)
Date: Tue, 22 Jul 2014 16:16:30 +0000
Subject: [issue22028] Python 3.4.1 Installer ended prematurely (Windows msi)
In-Reply-To: <1405994666.12.0.143457311308.issue22028@psf.upfronthosting.co.za>
Message-ID: <1406045790.18.0.548826879192.issue22028@psf.upfronthosting.co.za>


Steve Dower added the comment:

You can always deselect pip from the installation. Running it separately after installation will no doubt show what the actual problem is.

----------
nosy: +loewis

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 18:36:49 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 16:36:49 +0000
Subject: [issue15275] isinstance is called a more times that needed in ntpath
In-Reply-To: <1341668298.8.0.671820953585.issue15275@psf.upfronthosting.co.za>
Message-ID: <1406047009.81.0.458772676822.issue15275@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

No, if *path* is not bytes, *userhome* shouldn't be converted to bytes.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 18:51:51 2014
From: report at bugs.python.org (Aaron Hill)
Date: Tue, 22 Jul 2014 16:51:51 +0000
Subject: [issue22037] Poor grammar in asyncio TCP echo client example
Message-ID: <1406047911.63.0.907095249067.issue22037@psf.upfronthosting.co.za>


New submission from Aaron Hill:

The last sentence in the explanation of the TCP echo client currently reads: 

"At run_until_complete() exit, the loop is no more running, so there is no need to stop the loop in case of an error".

The grammar should be improved to something like "...the loop is no longer running", or "...the loop has stopped running"

The current documentation can be found here: https://docs.python.org/3/library/asyncio-protocol.html#echo-client

----------
assignee: docs at python
components: Documentation
messages: 223673
nosy: Aaron1011, docs at python
priority: normal
severity: normal
status: open
title: Poor grammar in asyncio TCP echo client example

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 18:54:28 2014
From: report at bugs.python.org (Zachary Ware)
Date: Tue, 22 Jul 2014 16:54:28 +0000
Subject: [issue22025] webbrowser.get(command_line) does not support
 Windows-style path separators
In-Reply-To: <1405973762.56.0.905297116521.issue22025@psf.upfronthosting.co.za>
Message-ID: <1406048068.37.0.891411950944.issue22025@psf.upfronthosting.co.za>


Changes by Zachary Ware :


----------
nosy: +georg.brandl
stage:  -> patch review
versions:  -Python 3.1, Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 19:08:19 2014
From: report at bugs.python.org (Zachary Ware)
Date: Tue, 22 Jul 2014 17:08:19 +0000
Subject: [issue22026] 2.7.8 ttk Button text display problem
In-Reply-To: <1405974124.93.0.889625077741.issue22026@psf.upfronthosting.co.za>
Message-ID: <1406048899.94.0.398622369312.issue22026@psf.upfronthosting.co.za>


Zachary Ware added the comment:

I believe this is a change in Tk itself, I can get your 2.7.6 result with Python 2.7.8+ compiled against Tcl/Tk 8.5.2, and your 2.7.8 result with Python 2.7.6 compiled against Tcl/Tk 8.5.15.  I would guess that Tk is trying to avoid getting glyph in your padding and that you may need to work with centering somehow, but that's just wild speculation.

Serhiy, do you have any further insight?

----------
nosy: +serhiy.storchaka, zach.ware
resolution:  -> third party
status: open -> pending

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 19:17:43 2014
From: report at bugs.python.org (Zachary Ware)
Date: Tue, 22 Jul 2014 17:17:43 +0000
Subject: [issue21665] 2.7.7 ttk widgets not themed
In-Reply-To: <1401923912.15.0.591794107997.issue21665@psf.upfronthosting.co.za>
Message-ID: <1406049463.97.0.96924320877.issue21665@psf.upfronthosting.co.za>


Zachary Ware added the comment:

2.7.8 seems fine and there haven't been any reports about Tkinter not working on Win2k yet, so I'll go ahead and change the 2.7 buildbot scripts and close the issue.

----------
assignee:  -> zach.ware

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 19:24:12 2014
From: report at bugs.python.org (Vitor de Lima)
Date: Tue, 22 Jul 2014 17:24:12 +0000
Subject: [issue22038] Implement atomic operations on non-x86 platforms
Message-ID: <1406049852.33.0.466915172772.issue22038@psf.upfronthosting.co.za>


New submission from Vitor de Lima:

The atomic operations listed in the pyatomic.h header file were implemented only for the x86 architecture, this patch uses the atomic bultins available in GCC >= 4.7 to implement such operations, allowing it to work properly in other platforms.

----------
components: Interpreter Core
files: atomic.patch
keywords: patch
messages: 223676
nosy: Vitor.de.Lima
priority: normal
severity: normal
status: open
title: Implement atomic operations on non-x86 platforms
type: enhancement
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36035/atomic.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 19:28:28 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 22 Jul 2014 17:28:28 +0000
Subject: [issue21665] 2.7.7 ttk widgets not themed
In-Reply-To: <1401923912.15.0.591794107997.issue21665@psf.upfronthosting.co.za>
Message-ID: <3hHmx72JW3z7LjQ@mail.python.org>


Roundup Robot added the comment:

New changeset 73fcf00b9e0c by Zachary Ware in branch '2.7':
Closes #21665: Don't use OPTS=noxp or -DWINVER=0x0500 when compiling Tcl/Tk
http://hg.python.org/cpython/rev/73fcf00b9e0c

----------
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 19:32:38 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Tue, 22 Jul 2014 17:32:38 +0000
Subject: [issue22038] Implement atomic operations on non-x86 platforms
In-Reply-To: <1406049852.33.0.466915172772.issue22038@psf.upfronthosting.co.za>
Message-ID: <1406050358.31.0.0198635892668.issue22038@psf.upfronthosting.co.za>


Changes by Antoine Pitrou :


----------
nosy: +jyasskin, neologix

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 19:56:30 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Tue, 22 Jul 2014 17:56:30 +0000
Subject: [issue22039] PyObject_SetAttr doesn't mention value = NULL
Message-ID: <1406051790.64.0.0676928180206.issue22039@psf.upfronthosting.co.za>


New submission from Antoine Pitrou:

PyObject_SetAttr, when called with value == NULL, actually deletes the attribute, but the documentation doesn't say it. It mentions PyObject_DelAttr, but it is only a macro and can therefore not be looked up using e.g. ctypes.

----------
assignee: docs at python
components: Documentation
messages: 223678
nosy: docs at python, pitrou
priority: normal
severity: normal
status: open
title: PyObject_SetAttr doesn't mention value = NULL
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 20:28:29 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Tue, 22 Jul 2014 18:28:29 +0000
Subject: [issue22023] PyUnicode_FromFormat is broken on python 2
In-Reply-To: <1405964309.44.0.884917870385.issue22023@psf.upfronthosting.co.za>
Message-ID: <1406053709.82.0.469697721336.issue22023@psf.upfronthosting.co.za>


Alex Gaynor added the comment:

I've tested in my local dev with my SSL patches applied, and I've confirmed that it fixes the segfaults.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 20:30:09 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Tue, 22 Jul 2014 18:30:09 +0000
Subject: [issue21591] "exec(a, b, c)" not the same as "exec a in b,
 c" in nested functions
In-Reply-To: <1401266879.61.0.867969486588.issue21591@psf.upfronthosting.co.za>
Message-ID: <1406053809.77.0.956160401429.issue21591@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

This does appear to be a bug. Please research the C code that originates the error message -- there's probably a simple logic mistake.

----------
nosy: +gvanrossum

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 20:50:01 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Tue, 22 Jul 2014 18:50:01 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1406055001.58.0.80490630817.issue22003@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

There's also the following code in numpy's getbuffer method:

    /*
     * If a read-only buffer is requested on a read-write array, we return a
     * read-write buffer, which is dubious behavior. But that's why this call
     * is guarded by PyArray_ISWRITEABLE rather than (flags &
     * PyBUF_WRITEABLE).
     */
    if (PyArray_ISWRITEABLE(self)) {
        if (array_might_be_written(self) < 0) {
            goto fail;
        }
    }

... which seems to imply that mmap is not the only one with "dubious behaviour" (?).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 21:12:25 2014
From: report at bugs.python.org (Stefan Krah)
Date: Tue, 22 Jul 2014 19:12:25 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1406056345.51.0.763225261303.issue22003@psf.upfronthosting.co.za>


Stefan Krah added the comment:

Actually we have an extra safety net in memory_hash() apart from
the readonly check:  We also check if the underlying object is
hashable.

This might be applicable here, too. Unfortunately mmap objects
*are* hashable, leading to some funny results:


>>> import mmap
>>> with open("hello.txt", "wb") as f:
...     f.write(b"xxxxx\n")
...
6
>>> f = open("hello.txt", "r+b")
>>> mm = mmap.mmap(f.fileno(), 0, prot=mmap.PROT_READ)
>>> x = memoryview(mm)
>>> hash(mm)
-9223363309538046107
>>> hash(x)
-3925142568057840789
>>> x.tolist()
[120, 120, 120, 120, 120, 10]
>>>
>>> with open("hello.txt", "wb") as g:
...     g.write(b"yyy\n")
...
4
>>> hash(mm)
-9223363309538046107
>>> hash(x)
-3925142568057840789
>>> x.tolist()
[121, 121, 121, 10, 0, 0]


memoryview (rightfully) assumes that hashable objects are immutable
and caches the first hash.

I'm not sure why mmap objects are hashable, it looks like a bug
to me.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 21:37:26 2014
From: report at bugs.python.org (Stefan Krah)
Date: Tue, 22 Jul 2014 19:37:26 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1406057846.36.0.0550327415808.issue22003@psf.upfronthosting.co.za>


Stefan Krah added the comment:

I think the mmap behavior is probably worse than the NumPy example.

I assume that in the example the exporter sets view.readonly=0.
mmap objects set view.readonly=1 and can still be mutated.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 21:50:32 2014
From: report at bugs.python.org (Zachary Ware)
Date: Tue, 22 Jul 2014 19:50:32 +0000
Subject: [issue14484] missing return in win32_kill?
In-Reply-To: <1333462226.23.0.725280599354.issue14484@psf.upfronthosting.co.za>
Message-ID: <1406058632.47.0.667470635056.issue14484@psf.upfronthosting.co.za>


Zachary Ware added the comment:

It looks like we have a bit of a mess here.  2.7 has a return there (and thus doesn't fall back to TerminateProcess if GenerateConsoleCtrlEvent fails), added 40 commits after the initial implementation in b1c00c7d3c85, but 3.x was never changed so 2.7 and 3.x have behaved differently from the the time it was implemented.  Which version is right, or is it too late to change either one and 3.x should just remove the unused error setting?  An interesting possibility might be to convert the signal.CTRL_* values to an enum, and use that as a way to distinguish between ``0`` and ``signal.CTRL_C_EVENT``.  I suspect that might become rather hairy, though.

Either way, I don't think os.kill can promise much more than "try to make the specified process die" on Windows; signals are just so crippled on Windows that that's about all you can do with them anyway.  It might not hurt for the docs to try to make that clearer.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 21:54:30 2014
From: report at bugs.python.org (Paul Moore)
Date: Tue, 22 Jul 2014 19:54:30 +0000
Subject: [issue22040] Add a "force" parameter to shutil.rmtree
Message-ID: <1406058870.67.0.270826115135.issue22040@psf.upfronthosting.co.za>


New submission from Paul Moore:

It would be useful for shutil.rmtree to have a "force" argument that overrode read-only permission issues, essentially replicating the behaviour of the -f flag in rm -rf (Unix) and the -force parameter of del (Windows Powershell).

It's possible to use the onerror callback to implement this, but it's tricky to get right in a cross-platform manner. See http://stackoverflow.com/questions/2656322, which recommends

def onerror(func, path, exc_info):
    if not os.access(path, os.W_OK):
        os.chmod(path, stat.S_IWUSR)
        func(path)
    else:
        raise

and http://stackoverflow.com/questions/1889597 which recommends

def remove_readonly(func, path, excinfo):
    os.chmod(path, stat.S_IWRITE)
    func(path)

It's not clear whether either of these is portable, though (the former looks to me like it's Unix-specific and the latter like it's for Windows, but I'm not sure).

Having the functionality available in the standard library function directly avoids having people write tricky and potentially buggy code for what is a pretty common situation. (In particular, this comes up a lot in code that deletes git checkouts on Windows, where git makes parts of the .git directory readonly).

----------
components: Library (Lib)
messages: 223685
nosy: pmoore
priority: normal
severity: normal
status: open
title: Add a "force" parameter to shutil.rmtree
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 22:02:33 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Tue, 22 Jul 2014 20:02:33 +0000
Subject: [issue22040] Add a "force" parameter to shutil.rmtree
In-Reply-To: <1406058870.67.0.270826115135.issue22040@psf.upfronthosting.co.za>
Message-ID: <1406059353.93.0.750810397601.issue22040@psf.upfronthosting.co.za>


Charles-Fran?ois Natali added the comment:

On Unix at least, this doesn't apply: rm -f doesn't mean "ignore permissions", but but rather don't ask confirmation which the rm commands asks in some cases (empty file, directory, etc).
Ans the code posted wouldn't work, since the permission to remove a file applies to to the file, but to the parent directory (must have write permission). And we certainly don't want to change the directory permission anyway.

Not sure about Windows, though.

----------
nosy: +neologix

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 22:12:24 2014
From: report at bugs.python.org (R. David Murray)
Date: Tue, 22 Jul 2014 20:12:24 +0000
Subject: [issue22040] Add a "force" parameter to shutil.rmtree
In-Reply-To: <1406058870.67.0.270826115135.issue22040@psf.upfronthosting.co.za>
Message-ID: <1406059944.54.0.745049329906.issue22040@psf.upfronthosting.co.za>


R. David Murray added the comment:

Actually it does apply on unix:

rdmurray at session:~/tmp>ls -ld foo
drwxr-x--- 2 rdmurray rdmurray 4096 Jul 22 16:09 foo
rdmurray at session:~/tmp>ls -l foo
total 0
-r--r----- 1 rdmurray rdmurray 0 Jul 22 16:09 bar
rdmurray at session:~/tmp>rm -r foo
rm: remove write-protected regular empty file ?foo/bar?? 

If I say yes it will remove it, since I have write perms on the directory.  rm -rf will not prompt and will delete it.

I believe the situation is analogous on Windows, but I"m not sure.

----------
nosy: +r.david.murray, zach.ware

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 22:16:05 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Tue, 22 Jul 2014 20:16:05 +0000
Subject: [issue22007] sys.stdout.write on Python 2.7 is not EINTR safe
In-Reply-To: <1405717800.93.0.311765291104.issue22007@psf.upfronthosting.co.za>
Message-ID: <1406060165.53.0.742779174421.issue22007@psf.upfronthosting.co.za>


Changes by Charles-Fran?ois Natali :


----------
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> handle EINTR in the stdlib

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 22:16:28 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Tue, 22 Jul 2014 20:16:28 +0000
Subject: [issue21772] platform.uname() not EINTR safe
In-Reply-To: <1402853550.81.0.562777788511.issue21772@psf.upfronthosting.co.za>
Message-ID: <1406060188.07.0.729825885244.issue21772@psf.upfronthosting.co.za>


Changes by Charles-Fran?ois Natali :


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> handle EINTR in the stdlib

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 22:19:20 2014
From: report at bugs.python.org (Alejandro MJ)
Date: Tue, 22 Jul 2014 20:19:20 +0000
Subject: [issue22041] http POST request with python 3.3 through web proxy
Message-ID: <1406060360.4.0.822886887897.issue22041@psf.upfronthosting.co.za>


New submission from Alejandro MJ:

I'm trying this specific method with python, in order to use a different ip source, to do a POST request: 

import http.client, urllib.parse
data = urllib.parse.urlencode({'QLastname': 'DIAZ HERNANDEZ', 'QFirstname': 'JAIME'})
headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"}
conn = http.client.HTTPConnection("www.infobel.com",80, source_address=("16.19.109.51", 0))
conn.request("POST", "/es/spain/people.aspx", data, headers)
response = conn.getresponse()
print(response.status, response.reason)
data = response.read()
conn.close()

It works perfectly when I test it without a proxy, but when I try with proxy connection, I receive this error:

>>> conn.request("POST", "/es/spain/people.aspx", data, headers)
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Python34\lib\http\client.py", line 1090, in request
    self._send_request(method, url, body, headers)
  File "C:\Python34\lib\http\client.py", line 1128, in _send_request
    self.endheaders(body)
  File "C:\Python34\lib\http\client.py", line 1086, in endheaders
    self._send_output(message_body)
  File "C:\Python34\lib\http\client.py", line 924, in _send_output
    self.send(msg)
  File "C:\Python34\lib\http\client.py", line 859, in send
    self.connect()
  File "C:\Python34\lib\http\client.py", line 836, in connect
    self.timeout, self.source_address)
  File "C:\Python34\lib\socket.py", line 509, in create_connection
    raise err
  File "C:\Python34\lib\socket.py", line 500, in create_connection
    sock.connect(sa)

TimeoutError: [WinError 10060] Se produjo un error durante el intento...

How could I follow proxy configuration in this script? 

This is the code I made to test with proxy (following the documentation of Python):

import http.client, urllib.parse
data = urllib.parse.urlencode({'QLastname': 'DIAZ HERNANDEZ', 'QFirstname': 'JAIME'})
headers={"Content-Type":"application/x-www-form-urlencoded","Accept":"text/plain"}
conn = http.client.HTTPConnection(proxy_url,8080, source_address=(ipAddress, 0))
conn.set_tunnel("www.infobel.com")
conn.request("POST", "/es/spain/people.aspx", data, headers)
response = conn.getresponse()
print(response.status, response.reason)
data = response.read()
conn.close()

I could't make it work in this SO:
SUSE Linux Enterprise Server 11 (x86_64) VERSION = 11 PATCHLEVEL = 2 

The message that proxy give us is this:

2014-07-22 08:31:49 87 16.19.109.51 23.2.2.22 - - - PROXIED "none" -  200 TCP_ACCELERATED CONNECT - tcp www.infobel.com 80 / - - - 23.2.2.22 39 39 - 
2014-07-22 08:31:49 1  16.19.109.51 23.2.2.22 - - dns_unresolved_hostname PROXIED "none" -  404 TCP_ERR_MISS POST - http cachebdvg1.igrupobbva 8080 /es/spain/people.aspx - aspx - 23.2.2.22 815 230 - 

So I tried to prove it in other SO, such as Windows, in a different computer. A curious thing... I've tried this with Python3.4.1 in Windows, and it didn't work. But when I proved with Python3.3.5 it works!! 

Thanks for help.

----------
components: Windows
messages: 223688
nosy: AlexMJ
priority: normal
severity: normal
status: open
title: http POST request with python 3.3 through web proxy
type: behavior
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 22:20:18 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Tue, 22 Jul 2014 20:20:18 +0000
Subject: [issue22040] Add a "force" parameter to shutil.rmtree
In-Reply-To: <1406059944.54.0.745049329906.issue22040@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

> Actually it does apply on unix:

No, it does not apply: here's what I've written:
"""
 rm -f doesn't mean "ignore permissions", but but rather don't ask
confirmation which the rm commands asks in some cases (empty file,
directory, etc).
"""

Having a file non-writable fits in those "some cases" where rm is
extra careful and asks confirmation.: calling shutil.rmtree() on your
example will succeed, so it does not apply on Unix.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 22:23:16 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 20:23:16 +0000
Subject: [issue22002] Make full use of test discovery in test subpackages
In-Reply-To: <1405627760.3.0.397447180395.issue22002@psf.upfronthosting.co.za>
Message-ID: <1406060596.16.0.0282523310046.issue22002@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Nice. Could you please comment multiple dirname()-s in load_package_tests() as it done for basename in Lib/test/test_tools/__init__.py?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 22:30:30 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 22 Jul 2014 20:30:30 +0000
Subject: [issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize
 reported killed by shell
In-Reply-To: <1404254403.84.0.153705596072.issue21901@psf.upfronthosting.co.za>
Message-ID: <3hHrzB1x3Kz7LjM@mail.python.org>


Roundup Robot added the comment:

New changeset 7238c6a05ca6 by Charles-Fran?ois Natali in branch '3.4':
Issue #21901: Cap the maximum number of file descriptors to use for the test.
http://hg.python.org/cpython/rev/7238c6a05ca6

New changeset 89665cc05592 by Charles-Fran?ois Natali in branch 'default':
Issue #21901: Cap the maximum number of file descriptors to use for the test.
http://hg.python.org/cpython/rev/89665cc05592

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 22:31:39 2014
From: report at bugs.python.org (David Wilson)
Date: Tue, 22 Jul 2014 20:31:39 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1406061099.44.0.951082069508.issue22003@psf.upfronthosting.co.za>


David Wilson added the comment:

Stefan, I like your new idea. If there isn't some backwards compatibility argument about mmap.mmap being hashable, then it could be considered a bug, and fixed in the same hypothetical future release that includes this BytesIO change. The only cost now is that to test for hashability, we must hash the object, which causes every byte in it to be touched (aka. almost 50% the cost of a copy)

If however we can't fix mmap.mmap due to the interface change (I think that's a silly idea -- Python has never been about letting the user shoot themselves in the foot), then the specialized-for-Bytes approach is almost as good (and perhaps even better, since the resulting concept and structure layout is more aligned with Serhiy's patch in issue15381).

tl;dr: 

a) mmap.mmap can be fixed - use hashability as strong test for immutability (instead of ugly heuristic involving buffer blags)
   - undecided: is calling hash(obj) to check for immutability too costly?

b) mmap.mmap can't be fixed - use the Bytes specialization approach.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 22:35:05 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Tue, 22 Jul 2014 20:35:05 +0000
Subject: [issue17293] uuid.getnode() MAC address on AIX
In-Reply-To: <1361777348.15.0.791534887595.issue17293@psf.upfronthosting.co.za>
Message-ID: <1406061305.79.0.0458247465785.issue17293@psf.upfronthosting.co.za>


Charles-Fran?ois Natali added the comment:

Thanks for the patch, but I'm not even sure AIX is an officially supported platform, so I'm not sure what to do with this patch.

----------
nosy: +neologix

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 22:36:43 2014
From: report at bugs.python.org (R. David Murray)
Date: Tue, 22 Jul 2014 20:36:43 +0000
Subject: [issue22040] Add a "force" parameter to shutil.rmtree
In-Reply-To: <1406058870.67.0.270826115135.issue22040@psf.upfronthosting.co.za>
Message-ID: <1406061403.95.0.561760625013.issue22040@psf.upfronthosting.co.za>


R. David Murray added the comment:

In other words, on unix shutil.rmtree is *already* 'rm -rf'.  This then argues that it *not* deleting read only files on Windows is a bug, albeit one we may not be able to fix for backward compatibility reasons.

Ah, and now my memory is jogged.  This is a duplicate of issue 19643, and that was more or less the conclusion.

----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> shutil rmtree fails on readonly files in Windows

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 22:51:22 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Tue, 22 Jul 2014 20:51:22 +0000
Subject: [issue17391] _cursesmodule Fails to Build on GCC 2.95 (static)
In-Reply-To: <1362925103.81.0.892590106021.issue17391@psf.upfronthosting.co.za>
Message-ID: <1406062282.0.0.462716462835.issue17391@psf.upfronthosting.co.za>


Charles-Fran?ois Natali added the comment:

Jerrfey, thanks for your patch, but apparently in the - long - meantime, the declaration has already been moved up.

----------
nosy: +neologix
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 22:52:32 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 20:52:32 +0000
Subject: [issue21860] Correct FileIO docstrings
In-Reply-To: <1403610592.56.0.388497950887.issue21860@psf.upfronthosting.co.za>
Message-ID: <1406062352.89.0.940279604885.issue21860@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 22:52:49 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Tue, 22 Jul 2014 20:52:49 +0000
Subject: [issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize
 reported killed by shell
In-Reply-To: <1404254403.84.0.153705596072.issue21901@psf.upfronthosting.co.za>
Message-ID: <1406062369.91.0.973089346647.issue21901@psf.upfronthosting.co.za>


Charles-Fran?ois Natali added the comment:

Sorry for the delay, should be fixed now.

----------
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 22:59:17 2014
From: report at bugs.python.org (Jeffrey Armstrong)
Date: Tue, 22 Jul 2014 20:59:17 +0000
Subject: [issue17391] _cursesmodule Fails to Build on GCC 2.95 (static)
In-Reply-To: <1362925103.81.0.892590106021.issue17391@psf.upfronthosting.co.za>
Message-ID: <1406062757.5.0.642913520699.issue17391@psf.upfronthosting.co.za>


Jeffrey Armstrong added the comment:

Next time I see a bug I'll be sure to wait rather than actually submit a patch...

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 23:15:58 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 22 Jul 2014 21:15:58 +0000
Subject: [issue15275] isinstance is called a more times that needed in ntpath
In-Reply-To: <1406047009.81.0.458772676822.issue15275@psf.upfronthosting.co.za>
Message-ID: 


STINNER Victor added the comment:

Oh you're right sorry.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 23:16:39 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Tue, 22 Jul 2014 21:16:39 +0000
Subject: [issue17391] _cursesmodule Fails to Build on GCC 2.95 (static)
In-Reply-To: <1406062757.5.0.642913520699.issue17391@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

> Jeffrey Armstrong added the comment:
>
> Next time I see a bug I'll be sure to wait rather than actually submit a patch...

I understand your frustration, but please don't do that: you have to
understand that we don't have any automatic reminder of issues, so it
can happen that some go unnoticed, especially if no core developer is
assigned.
Is this happens in the future, simply send an email on the python-dev
mailing list saying that you've got a patch waiting for review, this
shoud do the trick.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 23:17:43 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 22 Jul 2014 21:17:43 +0000
Subject: [issue22026] 2.7.8 ttk Button text display problem
In-Reply-To: <1405974124.93.0.889625077741.issue22026@psf.upfronthosting.co.za>
Message-ID: <1406063863.77.0.937408883345.issue22026@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Indeed. I got different results with different versions of Tk. Here is Tcl script which demonstrates this.

----------
status: pending -> closed
Added file: http://bugs.python.org/file36036/issue22026.tcl

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 23:25:41 2014
From: report at bugs.python.org (Neil Muller)
Date: Tue, 22 Jul 2014 21:25:41 +0000
Subject: [issue21591] "exec(a, b, c)" not the same as "exec a in b,
 c" in nested functions
In-Reply-To: <1401266879.61.0.867969486588.issue21591@psf.upfronthosting.co.za>
Message-ID: <1406064341.33.0.473926509787.issue21591@psf.upfronthosting.co.za>


Neil Muller added the comment:

Poking at the source of the error suggests the problem is in symtable.c:

The offending logic looks to be (around line 1124 in python 2.7 at revision 91767:4cef7b0ec659):

if (s->v.Exec.globals) {
   ...
}
else
{
   st->st_cur->ste_unoptimized |= OPT_BARE_EXEC;
}

since OPT_BARE_EXEC is the flag that triggers the exception.

As far as I can see, this makes no provision for the exec() case, and only avoids setting OPT_BARE_EXEC if globals is specified using the old syntax.

----------
nosy: +Neil Muller

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 23:29:55 2014
From: report at bugs.python.org (Zachary Ware)
Date: Tue, 22 Jul 2014 21:29:55 +0000
Subject: [issue22026] 2.7.8 ttk Button text display problem
In-Reply-To: <1405974124.93.0.889625077741.issue22026@psf.upfronthosting.co.za>
Message-ID: <1406064595.27.0.861310698292.issue22026@psf.upfronthosting.co.za>


Changes by Zachary Ware :


----------
stage:  -> resolved

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 23:42:32 2014
From: report at bugs.python.org (Paul Moore)
Date: Tue, 22 Jul 2014 21:42:32 +0000
Subject: [issue22040] Add a "force" parameter to shutil.rmtree
In-Reply-To: <1406058870.67.0.270826115135.issue22040@psf.upfronthosting.co.za>
Message-ID: <1406065352.19.0.473777403189.issue22040@psf.upfronthosting.co.za>


Paul Moore added the comment:

Doh. And I was even involved in the previous issue. Sorry for the noise.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 22 23:49:54 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Tue, 22 Jul 2014 21:49:54 +0000
Subject: [issue22040] Add a "force" parameter to shutil.rmtree
In-Reply-To: <1406061403.95.0.561760625013.issue22040@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

> In other words, on unix shutil.rmtree is *already* 'rm -rf'.

Exactly :-)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 00:11:39 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Tue, 22 Jul 2014 22:11:39 +0000
Subject: [issue13299] namedtuple row factory for sqlite3
In-Reply-To: <1320021145.59.0.53370875256.issue13299@psf.upfronthosting.co.za>
Message-ID: <1406067099.37.0.574133879114.issue13299@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

I'd like to see this in 3.5 as I often use sqlite so what needs doing here?

----------
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 00:26:37 2014
From: report at bugs.python.org (David Edelsohn)
Date: Tue, 22 Jul 2014 22:26:37 +0000
Subject: [issue17293] uuid.getnode() MAC address on AIX
In-Reply-To: <1361777348.15.0.791534887595.issue17293@psf.upfronthosting.co.za>
Message-ID: <1406067997.58.0.981306990823.issue17293@psf.upfronthosting.co.za>


David Edelsohn added the comment:

Huh?  What does officially supported platform mean? CPython builds and runs on AIX.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 01:14:34 2014
From: report at bugs.python.org (Milan Oberkirch)
Date: Tue, 22 Jul 2014 23:14:34 +0000
Subject: [issue12378] smtplib.SMTP_SSL leaks socket connections on SSL error
In-Reply-To: <1308599064.12.0.317669798103.issue12378@psf.upfronthosting.co.za>
Message-ID: <1406070874.83.0.562009990929.issue12378@psf.upfronthosting.co.za>


Milan Oberkirch added the comment:

I agree that there is not much we can do on the server side (see issue 19806) and with the fix for issue 19662 the server won't recognize this error at all (patiently waiting for b'\r\n\' which is unlikely to appear in the first handshake-message from the client).

Attached is a smtplib patch for 3.x.

----------
nosy: +jesstess, zvyn
Added file: http://bugs.python.org/file36037/issue12378_py35.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 01:19:56 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Tue, 22 Jul 2014 23:19:56 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1406071196.32.0.624279275014.issue22003@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

I don't like the idea of trying to hash the object. It may be a time-consuming operation, while the result will be thrown away.

I think restricting the optimization to bytes objects is fine. We can whitelist other types, such as memoryview.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 01:43:27 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 22 Jul 2014 23:43:27 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406072607.24.0.679789058549.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

I talked with Charles-Fran?ois. He doesn't like the idea of a new function because it would be harder to write portable code: which function should be used? signal.set_wakeup_fd() already works with sockets on UNIX.

Here is a new patch version 4 which tries to combine previous patchs:

- don't touch anything to existing code on UNIX. Keep the sig_atomic_t type for wakeup_fd and continue to use write() on sockets.

- on Windows, use a new "wakeup" structure to store the file descriptor or socket handle (use the  SOCKET_T type) and the last send() errors (errno and GetLastError())

- on Windows, use getsockopt(fd, SOL_SOCKET, SO_ERROR, ...) to check if fd is a socket: the function fails with WSAENOTSOCK if fd is not a socket.

- on Windows, PySignal_SetWakeupFd() only supports file descriptors. The function returns -1 if signal.set_wakeup_fd() was called with a socket handler, because the return type (int) is too small to store a socket handle (need type SOCKET_T) and we cannot change the prototype of this public API.

Reminder: the purpose of the whole patch is to be able to wakeup an event loop based on select.select() on Windows. select() only supports sockets on Windows.

Notes:

- we still need to add a dependency to the WinSock library

- the test are still skipped on Windows, I will work on a new patch to make the file descriptor or socket non-blocking and to run more wakeup fd tests on Windows

- if send() fails twice, the error is only reported once until report_wakeup_send_error() is called to consume the error. Anything, if send() failed, it will probably fail again quickly, there is no need to flood the terminal with these errors.

----------
Added file: http://bugs.python.org/file36038/signal_socket-4.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 02:30:43 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 00:30:43 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406075443.13.0.704741239781.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

I tried to modify signal.set_wakeup_socket() to automatically make the file descriptor non-blocking. Problem: fcntl() function and O_NONBLOCK flag don't exist on Windows. Non-blocking operations are only supported for sockets...

Calling a blocking function (write()) in a signal handler will probably block the application. So I don't think that it makes sense to support files in signal.set_wakeup_fd() on Windows. I guess that nobody used this function on Windows in fact.

I can probably simplify my patch to only support sockets on Windows.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 02:49:31 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 00:49:31 +0000
Subject: [issue22042] signal.set_wakeup_fd(fd): set the fd to non-blocking mode
Message-ID: <1406076570.98.0.190305939229.issue22042@psf.upfronthosting.co.za>


New submission from STINNER Victor:

I think that signal.set_wakeup_fd(fd) must set the file descriptor to the non-blocking mode, instead of requiring the file descriptor mode to be non-blocking.

Atttached patch implements this idea.

See also the issue #22018 which proposes to support sockets in signal.set_wakeup_fd(fd) on Windows.

We have to decide if signal.set_wakeup_fd() is supposed to support files or not on Windows. Non-blocking mode does not exist for files on Windows, only for sockets.

I didn't test my patch on Windows yet.

Note: the new _Py_set_blocking() function tries to use ioctl() instead of fnctl() when available to only use one syscall instead of two. I used the same optimization in _Py_set_inheritable().

----------
files: signal_nonblock.patch
keywords: patch
messages: 223710
nosy: haypo
priority: normal
severity: normal
status: open
title: signal.set_wakeup_fd(fd): set the fd to non-blocking mode
versions: Python 3.5
Added file: http://bugs.python.org/file36039/signal_nonblock.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 02:49:38 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 00:49:38 +0000
Subject: [issue22042] signal.set_wakeup_fd(fd): set the fd to non-blocking mode
In-Reply-To: <1406076570.98.0.190305939229.issue22042@psf.upfronthosting.co.za>
Message-ID: <1406076578.01.0.580698542784.issue22042@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
nosy: +neologix

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 03:20:41 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 23 Jul 2014 01:20:41 +0000
Subject: [issue21955] ceval.c: implement fast path for integers with a single
 digit
In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za>
Message-ID: <1406078441.55.0.123379067108.issue21955@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

Please run the actual benchmark suite to get interesting numbers: http://hg.python.org/benchmarks

----------
nosy: +pitrou

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 03:25:22 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 23 Jul 2014 01:25:22 +0000
Subject: [issue22042] signal.set_wakeup_fd(fd): set the fd to non-blocking mode
In-Reply-To: <1406076570.98.0.190305939229.issue22042@psf.upfronthosting.co.za>
Message-ID: <1406078722.31.0.674505924333.issue22042@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

I think it would be much better to expose a generic function to make a fd non-blocking, rather than bake it inside signal.set_wakeup_fd().

Also, given set_wakeup_fd() is rather specialized and uncommon, I don't see much point in making it more convenient.

----------
nosy: +pitrou

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 03:35:05 2014
From: report at bugs.python.org (Lita Cho)
Date: Wed, 23 Jul 2014 01:35:05 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1406079305.82.0.663628288123.issue21933@psf.upfronthosting.co.za>


Lita Cho added the comment:

I've added it so that if the OS is Mac, it will use Command-minus and Command-=. If it is on Windows, it uses Ctrl-minus and Ctrl-= (I wasn't sure if Windows uses shift sa well, but I don't think it does.)

When I tried the "pinch" movement in Mac, the MouseWheel event didn't trigger at all. It is only when I did the scroll (for me two fingers moving downward or upward) movement is when that event triggered. 

I currently have it so that when Control+MouseWheel makes the font size move. Let me know what you think.

I can also try adding a widget so that the user can change the font through the GUI.

----------
Added file: http://bugs.python.org/file36040/window_pane_font_size_v2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 03:39:33 2014
From: report at bugs.python.org (Lita Cho)
Date: Wed, 23 Jul 2014 01:39:33 +0000
Subject: [issue21867] Turtle returns TypeError when undobuffer is set to 0
 (aka no undo is allowed)
In-Reply-To: <1403679717.28.0.526098112146.issue21867@psf.upfronthosting.co.za>
Message-ID: <1406079573.85.0.438951009131.issue21867@psf.upfronthosting.co.za>


Lita Cho added the comment:

This is now fixed due to a patch in issue21868.

----------
resolution:  -> fixed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 04:10:03 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 02:10:03 +0000
Subject: [issue22043] Use a monotonic clock to compute timeouts
Message-ID: <1406081401.66.0.461602325424.issue22043@psf.upfronthosting.co.za>


New submission from STINNER Victor:

Currently, socket methods (ex: accept, recv, recvfrom, recvmsg, send, sendto, sendmsg), threading.Lock.acquire() and threading.RLock.acquire() use the system clock to compute their timeout. It's fine for the first call. But if the call is interrupted and the timeout need to be recomputed, it can wait too short or too long. Timeouts must use a monotonic clock, not the system clock. See the PEP 418 for more information.

Python modules were already patched to use the time.monotonic() function implemented in Python 3.3.

Attached patch fixes also functions which still use the system clock to compute timeouts.

A major change of the patch is that a monotonic clock is now require to use Python 3.5. Last time I checked, there was only one OS without monotonic clock: GNU Hurd. Hurd maintainers can patch Python 3.5 to fallback on the system clock until Hurd provides a monotonic clock.

Another important change is that Python now depends on the librt on Solaris and on Linux with glibc older than 2.17 (clock_gettime is now available directly in the libc since glibc 2.17).

----------
files: pymonotonic.patch
keywords: patch
messages: 223715
nosy: haypo
priority: normal
severity: normal
status: open
title: Use a monotonic clock to compute timeouts
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file36041/pymonotonic.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 04:11:24 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 02:11:24 +0000
Subject: [issue22043] Use a monotonic clock to compute timeouts
In-Reply-To: <1406081401.66.0.461602325424.issue22043@psf.upfronthosting.co.za>
Message-ID: <1406081484.47.0.309922044535.issue22043@psf.upfronthosting.co.za>


STINNER Victor added the comment:

On FreeBSD and OpenBSD, clock_gettime() is directly available in the libc.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 04:15:19 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 02:15:19 +0000
Subject: [issue22042] signal.set_wakeup_fd(fd): set the fd to non-blocking mode
In-Reply-To: <1406076570.98.0.190305939229.issue22042@psf.upfronthosting.co.za>
Message-ID: <1406081719.81.0.333799437527.issue22042@psf.upfronthosting.co.za>


STINNER Victor added the comment:

"Also, given set_wakeup_fd() is rather specialized and uncommon, I don't see much point in making it more convenient."

The problem is that passing a blocking file descriptor can block the whole Python process. The hang does not occur immediatly, but only when the pipe is full for example, which may only occur in some corner cases (ex: heavy system load, slow network, etc.).

The minimum would be to raise an error if the file descriptor is in blocking mode.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 05:20:22 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 23 Jul 2014 03:20:22 +0000
Subject: [issue21597] Allow turtledemo code pane to get wider.
In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za>
Message-ID: <1406085622.76.0.453752854992.issue21597@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

I reviewed code and made the following changes in uploaded file:
Move some code and blank lines around.
Since you left packing within mBar frame, removed
       self.mBar.grid_columnconfigure(0, weight=1)
Since the only thing packed in the left frame was the text frame, renamed makeLeftFrame to makeTextFrame, removed the left frame and returned the text frame to be gridded directly.  Works fine.
Remove left_frame, graph_frame temporaries.

The questions that stopped me from pushing this are about the following lines in makeGraphicFrame.

        self._canvas = turtle.ScrolledCanvas(root,
                                             800, 600,
                                             self.canvwidth, self.canvheight)
        turtle._Screen._canvas = self._canvas #*
        turtle._Screen._canvas.adjustScrolls()
        turtle._Screen._canvas._rootwindow.bind('', self.onResize)
        turtle._Screen._canvas._canvas['borderwidth'] = 0
        turtle._Screen._canvas.grid(row=0, column=0, sticky='news') ##
        ...
        return  turtle._Screen._canvas

It seems that in all lines except #*, 'turtle._Screen._canvas' could be replaced by 'self._canvas' or even a 'canvas' temporary. The ## line seems wrong, as the parent is root and 0,0 is not where the canvas shoud be gridded and indeed not where it is gridded after being returned.  The demo seems fine after commenting out the line. So it seems that the following should work.

        self._Screen._canvas = self._canvas = canvas = (
                turtle.ScrolledCanvas(
                root, 800, 600, self.canvwidth, self.canvheight))
        canvas.adjustScrolls()
        canvas._rootwindow.bind('', self.onResize)
        canvas._canvas['borderwidth'] = 0
        ...
        return  canvas

Am I missing something?  Just curious, what is the  event? Or rather, what generates it?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 06:08:56 2014
From: report at bugs.python.org (Lita Cho)
Date: Wed, 23 Jul 2014 04:08:56 +0000
Subject: [issue21597] Allow turtledemo code pane to get wider.
In-Reply-To: <1406085622.76.0.453752854992.issue21597@psf.upfronthosting.co.za>
Message-ID: 


Lita Cho added the comment:

On Tue, Jul 22, 2014 at 8:20 PM, Terry J. Reedy 
wrote:

>
> Terry J. Reedy added the comment:
>
> I reviewed code and made the following changes in uploaded file:
> Move some code and blank lines around.
> Since you left packing within mBar frame, removed
>        self.mBar.grid_columnconfigure(0, weight=1)
> Since the only thing packed in the left frame was the text frame, renamed
> makeLeftFrame to makeTextFrame, removed the left frame and returned the
> text frame to be gridded directly.  Works fine.
> Remove left_frame, graph_frame temporaries.
>
> The questions that stopped me from pushing this are about the following
> lines in makeGraphicFrame.
>
>         self._canvas = turtle.ScrolledCanvas(root,
>                                              800, 600,
>                                              self.canvwidth,
> self.canvheight)
>         turtle._Screen._canvas = self._canvas #*
>         turtle._Screen._canvas.adjustScrolls()
>         turtle._Screen._canvas._rootwindow.bind('',
> self.onResize)
>         turtle._Screen._canvas._canvas['borderwidth'] = 0
>         turtle._Screen._canvas.grid(row=0, column=0, sticky='news') ##
>         ...
>         return  turtle._Screen._canvas
>
It seems that in all lines except #*, 'turtle._Screen._canvas' could be
> replaced by 'self._canvas' or even a 'canvas' temporary. The ## line seems
> wrong, as the parent is root and 0,0 is not where the canvas shoud be
> gridded and indeed not where it is gridded after being returned.  The demo
> seems fine after commenting out the line. So it seems that the following
> should work.
>
>         self._Screen._canvas = self._canvas = canvas = (
>                 turtle.ScrolledCanvas(
>                 root, 800, 600, self.canvwidth, self.canvheight))
>         canvas.adjustScrolls()
>         canvas._rootwindow.bind('', self.onResize)
>         canvas._canvas['borderwidth'] = 0
>         ...
>         return  canvas
>

Yes! I like this a lot better. turtle._Screen._canvas was how the canvas
was being manipulated before. I was trying to follow the original
programmer's convention, but that works perfectly!

>
> Am I missing something?  Just curious, what is the  event? Or
> rather, what generates it?
>
>
The Configure event is triggered when the widget changes size. It is super
confusing. Look for '' in the documentation here:

http://effbot.org/tkinterbook/tkinter-events-and-bindings.htm

I had to override Turtle's onResize metbod because the canvas wasn't
centering properly when the sash was being moved.

> ----------
>
> _______________________________________
> Python tracker 
> 
> _______________________________________
>

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 06:33:03 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 23 Jul 2014 04:33:03 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1406089983.21.0.982789911086.issue21933@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

On windows, new patch gives this:
Traceback (most recent call last):
  File "F:\Python\dev\4\py34\Lib\turtledemo\__main__.py", line 295, in 
    demo = DemoWindow()
  File "F:\Python\dev\4\py34\Lib\turtledemo\__main__.py", line 73, in __init__
    graph_frame = self.makeGraphFrame(pane)
  File "F:\Python\dev\4\py34\Lib\turtledemo\__main__.py", line 115, in makeGraphFrame
    self._makeBindings(turtle._Screen._canvas._rootwindow)
  File "F:\Python\dev\4\py34\Lib\turtledemo\__main__.py", line 130, in _makeBindings
    root_window.bind_all('<%s-minus>' % shortcut, self._decreaseFont)
  File "F:\Python\dev\4\py34\lib\tkinter\__init__.py", line 1049, in bind_all
    return self._bind(('bind', 'all'), sequence, func, add, 0)
  File "F:\Python\dev\4\py34\lib\tkinter\__init__.py", line 992, in _bind
    self.tk.call(what + (sequence, cmd))
_tkinter.TclError: bad event type or keysym "Ctrl"

/Ctrl/Control in "shortcut = 'Control" and demo runs.

        root_window.bind_all('<%s-minus>' % shortcut, self._decreaseFont)
        root_window.bind_all('<%s-=>' % shortcut, self._increaseFont)

^- shrinks on -_ key and num keypad.
&+ enlarges on =+ key but not num keypad.  Fix by adding
        root_window.bind_all('<%s-plus>' % shortcut, self._increaseFont)

^wheel either way maked giant type -- evt.delta on my machine is +-120!
        self.txtfont['size'] += evt.delta // 120
works like expected. And please spell out 'event'. 

Out general policy is one patch per issue. The one for #21587 already fixes two issues. After we finish that (see questions), produce a small patch for this.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 06:38:30 2014
From: report at bugs.python.org (Lita Cho)
Date: Wed, 23 Jul 2014 04:38:30 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1406089983.21.0.982789911086.issue21933@psf.upfronthosting.co.za>
Message-ID: 


Lita Cho added the comment:

Sounds good. I will wait till #21587 and create a small patch afterwards.
Thanks!

On Tue, Jul 22, 2014 at 9:33 PM, Terry J. Reedy 
wrote:

>
> Terry J. Reedy added the comment:
>
> On windows, new patch gives this:
> Traceback (most recent call last):
>   File "F:\Python\dev\4\py34\Lib\turtledemo\__main__.py", line 295, in
> 
>     demo = DemoWindow()
>   File "F:\Python\dev\4\py34\Lib\turtledemo\__main__.py", line 73, in
> __init__
>     graph_frame = self.makeGraphFrame(pane)
>   File "F:\Python\dev\4\py34\Lib\turtledemo\__main__.py", line 115, in
> makeGraphFrame
>     self._makeBindings(turtle._Screen._canvas._rootwindow)
>   File "F:\Python\dev\4\py34\Lib\turtledemo\__main__.py", line 130, in
> _makeBindings
>     root_window.bind_all('<%s-minus>' % shortcut, self._decreaseFont)
>   File "F:\Python\dev\4\py34\lib\tkinter\__init__.py", line 1049, in
> bind_all
>     return self._bind(('bind', 'all'), sequence, func, add, 0)
>   File "F:\Python\dev\4\py34\lib\tkinter\__init__.py", line 992, in _bind
>     self.tk.call(what + (sequence, cmd))
> _tkinter.TclError: bad event type or keysym "Ctrl"
>
> /Ctrl/Control in "shortcut = 'Control" and demo runs.
>
>         root_window.bind_all('<%s-minus>' % shortcut, self._decreaseFont)
>         root_window.bind_all('<%s-=>' % shortcut, self._increaseFont)
>
> ^- shrinks on -_ key and num keypad.
> &+ enlarges on =+ key but not num keypad.  Fix by adding
>         root_window.bind_all('<%s-plus>' % shortcut, self._increaseFont)
>
> ^wheel either way maked giant type -- evt.delta on my machine is +-120!
>         self.txtfont['size'] += evt.delta // 120
> works like expected. And please spell out 'event'.
>
> Out general policy is one patch per issue. The one for #21587 already
> fixes two issues. After we finish that (see questions), produce a small
> patch for this.
>
> ----------
>
> _______________________________________
> Python tracker 
> 
> _______________________________________
>

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 06:53:02 2014
From: report at bugs.python.org (Tom Flanagan)
Date: Wed, 23 Jul 2014 04:53:02 +0000
Subject: [issue22044] Premature Py_DECREF while generating a TypeError in
 call_tzinfo_method
Message-ID: <1406091182.12.0.549229771581.issue22044@psf.upfronthosting.co.za>


New submission from Tom Flanagan:

call_tzinfo_method in Modules/_datetimemodule.c:900 calls Py_DECREF(offset)
before trying to use offset to generate a TypeError message.

This causes a crash if that was the last reference to offset and Py_DECREF clears it.

----------
components: Library (Lib)
files: python_bug.diff
keywords: patch
messages: 223722
nosy: Knio, belopolsky
priority: normal
severity: normal
status: open
title: Premature Py_DECREF while generating a TypeError in call_tzinfo_method
type: crash
versions: Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36042/python_bug.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 06:56:18 2014
From: report at bugs.python.org (Tom Flanagan)
Date: Wed, 23 Jul 2014 04:56:18 +0000
Subject: [issue22044] Premature Py_DECREF while generating a TypeError in
 call_tzinfo_method
In-Reply-To: <1406091182.12.0.549229771581.issue22044@psf.upfronthosting.co.za>
Message-ID: <1406091378.54.0.573472203621.issue22044@psf.upfronthosting.co.za>


Tom Flanagan added the comment:

Included python test case which causes a segmentation fault on

Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 bit (AMD64)] on win32

Python 3.4.0 (default, Apr 11 2014, 13:05:11) [GCC 4.8.2] on linux

Python 3.5.0a0 (default:89665cc05592+, Jul 22 2014, 21:35:55) [GCC 4.8.2] on linux

----------
Added file: http://bugs.python.org/file36043/python_crash.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 07:37:53 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Wed, 23 Jul 2014 05:37:53 +0000
Subject: [issue17293] uuid.getnode() MAC address on AIX
In-Reply-To: <1406067997.58.0.981306990823.issue17293@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

> Huh?  What does officially supported platform mean? CPython builds and runs on AIX.

It means a platform for which we have regular contributors committed
to support the port, and ideallly with a stable buildbot.

We apparently have an unstable buildbot with mainy tests failing (and
last time I checked it didn't even build IIRC))
http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/

So it would be nice to have the full regtest pass (with skips if applicable).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 07:51:21 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 23 Jul 2014 05:51:21 +0000
Subject: [issue13299] namedtuple row factory for sqlite3
In-Reply-To: <1320021145.59.0.53370875256.issue13299@psf.upfronthosting.co.za>
Message-ID: <1406094681.75.0.179157839515.issue13299@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

There is significant overhead. Microbenchmark results:

$ ./python -m timeit -s "import sqlite3; con = sqlite3.connect(':memory:')"  "con.execute('select 1 as a, 2 as b').fetchall()"
10000 loops, best of 3: 35.8 usec per loop

$ ./python -m timeit -s "import sqlite3; con = sqlite3.connect(':memory:'); con.row_factory = sqlite3.Row"  "con.execute('select 1 as a, 2 as b').fetchall()"
10000 loops, best of 3: 37.3 usec per loop

$ ./python -m timeit -s "import sqlite3; con = sqlite3.connect(':memory:'); con.row_factory = sqlite3.NamedTupleRow"  "con.execute('select 1 as a, 2 as b').fetchall()"
10000 loops, best of 3: 92.1 usec per loop

It would be easier to add __getattr__ to sqlite3.Row.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 08:00:19 2014
From: report at bugs.python.org (Zach Byrne)
Date: Wed, 23 Jul 2014 06:00:19 +0000
Subject: [issue21955] ceval.c: implement fast path for integers with a single
 digit
In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za>
Message-ID: <1406095219.02.0.1569049413.issue21955@psf.upfronthosting.co.za>


Zach Byrne added the comment:

I ran the whole benchmark suite. There are a few that are slower: call_method_slots, float, pickle_dict, and unpack_sequence.

Report on Linux zach-vbox 3.2.0-24-generic-pae #39-Ubuntu SMP Mon May 21 18:54:21 UTC 2012 i686 i686
Total CPU cores: 1

### 2to3 ###
24.789549 -> 24.809551: 1.00x slower

### call_method_slots ###
Min: 1.743554 -> 1.780807: 1.02x slower
Avg: 1.751735 -> 1.792814: 1.02x slower
Significant (t=-26.32)
Stddev: 0.00576 -> 0.01823: 3.1660x larger

### call_method_unknown ###
Min: 1.828094 -> 1.739625: 1.05x faster
Avg: 1.852225 -> 1.806721: 1.03x faster
Significant (t=2.28)
Stddev: 0.01874 -> 0.24320: 12.9783x larger

### call_simple ###
Min: 1.353581 -> 1.263386: 1.07x faster
Avg: 1.397946 -> 1.302046: 1.07x faster
Significant (t=24.28)
Stddev: 0.03667 -> 0.03154: 1.1629x smaller

### chaos ###
Min: 1.199377 -> 1.115550: 1.08x faster
Avg: 1.230859 -> 1.146573: 1.07x faster
Significant (t=16.24)
Stddev: 0.02663 -> 0.02525: 1.0544x smaller

### django_v2 ###
Min: 2.682884 -> 2.633110: 1.02x faster
Avg: 2.747521 -> 2.690486: 1.02x faster
Significant (t=9.90)
Stddev: 0.02744 -> 0.03010: 1.0970x larger

### fastpickle ###
Min: 1.751475 -> 1.597340: 1.10x faster
Avg: 1.771805 -> 1.613533: 1.10x faster
Significant (t=64.81)
Stddev: 0.01177 -> 0.01263: 1.0727x larger

### float ###
Min: 1.254858 -> 1.293067: 1.03x slower
Avg: 1.336045 -> 1.365787: 1.02x slower
Significant (t=-3.30)
Stddev: 0.04851 -> 0.04135: 1.1730x smaller

### json_dump_v2 ###
Min: 17.871819 -> 16.968647: 1.05x faster
Avg: 18.428747 -> 17.483397: 1.05x faster
Significant (t=4.10)
Stddev: 1.60617 -> 0.27655: 5.8078x smaller

### mako ###
Min: 0.241614 -> 0.231678: 1.04x faster
Avg: 0.253730 -> 0.240585: 1.05x faster
Significant (t=8.93)
Stddev: 0.01912 -> 0.01327: 1.4417x smaller

### mako_v2 ###
Min: 0.225664 -> 0.213179: 1.06x faster
Avg: 0.234850 -> 0.225984: 1.04x faster
Significant (t=10.12)
Stddev: 0.01379 -> 0.01391: 1.0090x larger

### meteor_contest ###
Min: 0.777612 -> 0.758924: 1.02x faster
Avg: 0.799580 -> 0.780897: 1.02x faster
Significant (t=3.97)
Stddev: 0.02482 -> 0.02212: 1.1221x smaller

### nbody ###
Min: 0.969724 -> 0.883935: 1.10x faster
Avg: 0.996416 -> 0.918375: 1.08x faster
Significant (t=12.65)
Stddev: 0.02426 -> 0.03627: 1.4951x larger

### nqueens ###
Min: 1.142745 -> 1.128195: 1.01x faster
Avg: 1.296659 -> 1.162443: 1.12x faster
Significant (t=2.75)
Stddev: 0.34462 -> 0.02680: 12.8578x smaller

### pickle_dict ###
Min: 1.433264 -> 1.467394: 1.02x slower
Avg: 1.468122 -> 1.506908: 1.03x slower
Significant (t=-7.20)
Stddev: 0.02695 -> 0.02691: 1.0013x smaller

### raytrace ###
Min: 5.454853 -> 5.538799: 1.02x slower
Avg: 5.530943 -> 5.676983: 1.03x slower
Significant (t=-8.64)
Stddev: 0.05152 -> 0.10791: 2.0947x larger

### regex_effbot ###
Min: 0.205875 -> 0.194776: 1.06x faster
Avg: 0.211118 -> 0.198759: 1.06x faster
Significant (t=5.10)
Stddev: 0.01305 -> 0.01112: 1.1736x smaller

### regex_v8 ###
Min: 0.141628 -> 0.133819: 1.06x faster
Avg: 0.147024 -> 0.140053: 1.05x faster
Significant (t=2.72)
Stddev: 0.01163 -> 0.01388: 1.1933x larger

### richards ###
Min: 0.734472 -> 0.727501: 1.01x faster
Avg: 0.760795 -> 0.743484: 1.02x faster
Significant (t=3.50)
Stddev: 0.02778 -> 0.02127: 1.3061x smaller

### silent_logging ###
Min: 0.344678 -> 0.336087: 1.03x faster
Avg: 0.357982 -> 0.347361: 1.03x faster
Significant (t=2.76)
Stddev: 0.01992 -> 0.01852: 1.0755x smaller

### simple_logging ###
Min: 1.104831 -> 1.072921: 1.03x faster
Avg: 1.146844 -> 1.117068: 1.03x faster
Significant (t=4.02)
Stddev: 0.03552 -> 0.03848: 1.0833x larger

### spectral_norm ###
Min: 1.710336 -> 1.688910: 1.01x faster
Avg: 1.872578 -> 1.738698: 1.08x faster
Significant (t=2.35)
Stddev: 0.40095 -> 0.03331: 12.0356x smaller

### tornado_http ###
Min: 0.849374 -> 0.852209: 1.00x slower
Avg: 0.955472 -> 0.916075: 1.04x faster
Significant (t=4.82)
Stddev: 0.07059 -> 0.04119: 1.7139x smaller

### unpack_sequence ###
Min: 0.000030 -> 0.000020: 1.52x faster
Avg: 0.000164 -> 0.000174: 1.06x slower
Significant (t=-13.11)
Stddev: 0.00011 -> 0.00013: 1.2256x larger

### unpickle_list ###
Min: 1.333952 -> 1.212805: 1.10x faster
Avg: 1.373228 -> 1.266677: 1.08x faster
Significant (t=16.32)
Stddev: 0.02894 -> 0.03597: 1.2428x larger

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 08:00:47 2014
From: report at bugs.python.org (Martin Matusiak)
Date: Wed, 23 Jul 2014 06:00:47 +0000
Subject: [issue22036] Obsolete reference to stringobject in comment
In-Reply-To: <1406042442.28.0.89298124162.issue22036@psf.upfronthosting.co.za>
Message-ID: <1406095247.12.0.00263604378116.issue22036@psf.upfronthosting.co.za>


Changes by Martin Matusiak :


----------
nosy: +benjamin.peterson

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 08:58:44 2014
From: report at bugs.python.org (Ronald Oussoren)
Date: Wed, 23 Jul 2014 06:58:44 +0000
Subject: [issue20468] resource module documentation is incorrect
In-Reply-To: <1391208641.83.0.141932054107.issue20468@psf.upfronthosting.co.za>
Message-ID: <1406098724.24.0.94888745328.issue20468@psf.upfronthosting.co.za>


Ronald Oussoren added the comment:

The attached patch (for the default branch) adds information about the unit of maxrss to the documentation, and removes the sentences about calculating the total memory size from the getpagesize documentation.

----------
assignee: ronaldoussoren -> 
components: +Documentation -Macintosh
keywords: +needs review, patch
stage:  -> patch review
Added file: http://bugs.python.org/file36044/issue-20468.txt

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 10:29:25 2014
From: report at bugs.python.org (Andrew Svetlov)
Date: Wed, 23 Jul 2014 08:29:25 +0000
Subject: [issue22037] Poor grammar in asyncio TCP echo client example
In-Reply-To: <1406047911.63.0.907095249067.issue22037@psf.upfronthosting.co.za>
Message-ID: <1406104165.53.0.121559648784.issue22037@psf.upfronthosting.co.za>


Andrew Svetlov added the comment:

Fixed in d19c58e13ac9
Thanks

----------
nosy: +asvetlov
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 10:41:47 2014
From: report at bugs.python.org (Chris Rebert)
Date: Wed, 23 Jul 2014 08:41:47 +0000
Subject: [issue18355] Merge super() guide into documentation
In-Reply-To: <1372901200.41.0.725969821731.issue18355@psf.upfronthosting.co.za>
Message-ID: <1406104907.28.0.238584797059.issue18355@psf.upfronthosting.co.za>


Changes by Chris Rebert :


----------
nosy: +cvrebert

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 10:50:26 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 08:50:26 +0000
Subject: [issue22037] Poor grammar in asyncio TCP echo client example
In-Reply-To: <1406047911.63.0.907095249067.issue22037@psf.upfronthosting.co.za>
Message-ID: <1406105426.76.0.86754800324.issue22037@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Thanks for the patch Aaron. I wrote the documentation and I'm not a native english speaker. Please don't hesitate to report other grammar issues like that. You may group all of them in a single issue.

----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 11:25:04 2014
From: report at bugs.python.org (Lita Cho)
Date: Wed, 23 Jul 2014 09:25:04 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1406107504.67.0.409134897305.issue21933@psf.upfronthosting.co.za>


Lita Cho added the comment:

Oops! I was suppose to add 'Control' not 'Ctrl'. I can fix that quickly but I will wait till the other patch goes through.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 11:27:48 2014
From: report at bugs.python.org (Lita Cho)
Date: Wed, 23 Jul 2014 09:27:48 +0000
Subject: [issue21597] Allow turtledemo code pane to get wider.
In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za>
Message-ID: <1406107668.88.0.67751558679.issue21597@psf.upfronthosting.co.za>


Lita Cho added the comment:

Just to clarify, should I submit a new patch with outlined style changes?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 11:57:06 2014
From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=)
Date: Wed, 23 Jul 2014 09:57:06 +0000
Subject: [issue21987] TarFile.getmember on directory requires trailing slash
 iff over 100 chars
In-Reply-To: <1405482059.28.0.321220843423.issue21987@psf.upfronthosting.co.za>
Message-ID: <1406109426.24.0.468587295717.issue21987@psf.upfronthosting.co.za>


Lars Gust?bel added the comment:

Apparently, the problem is located in TarInfo._proc_gnulong(). I attached a patch.

When tarfile reads an archive, it strips trailing slashes from all filenames, except GNUTYPE_LONGNAME headers, which is a bug. tarfile creates GNU_FORMAT tar files by default, hence it uses an additional GNUTYPE_LONGNAME header for filenames >100 chars. That's why tarfile_issue.py fails if used with PAX_FORMAT, because PAX_FORMAT doesn't have this bug.

----------
keywords: +patch
Added file: http://bugs.python.org/file36045/issue21987.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 12:11:30 2014
From: report at bugs.python.org (Andrew Svetlov)
Date: Wed, 23 Jul 2014 10:11:30 +0000
Subject: [issue17709] http://docs.python.org/2.7/objects.inv doesn't support
 :func:`repr` or :exc:`Exception`
In-Reply-To: <1365837524.98.0.624427340429.issue17709@psf.upfronthosting.co.za>
Message-ID: <1406110290.61.0.854150025397.issue17709@psf.upfronthosting.co.za>


Andrew Svetlov added the comment:

Cannot reproduce.

----------
nosy: +asvetlov
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 14:11:07 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Wed, 23 Jul 2014 12:11:07 +0000
Subject: [issue21777] Separate out documentation of binary sequence methods
In-Reply-To: <1402918605.38.0.604956966245.issue21777@psf.upfronthosting.co.za>
Message-ID: <1406117467.19.0.339332544627.issue21777@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

3rd in progress draft - converted most of the "inherently assumes ASCII" docs now. I think this set of changes really makes it clear how non-trivial it actually is to infer the binary domain behaviour from the str docs, which have all sorts of Unicode complications. You can't easily infer the behaviour from the Python 2 docs either, since these operations were locale dependent for Python 2 str objects.

----------
Added file: http://bugs.python.org/file36046/separate_binary_sequence_docs_v3.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 14:12:20 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Wed, 23 Jul 2014 12:12:20 +0000
Subject: [issue21777] Separate out documentation of binary sequence methods
In-Reply-To: <1402918605.38.0.604956966245.issue21777@psf.upfronthosting.co.za>
Message-ID: <1406117540.94.0.822438663207.issue21777@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Note I haven't added back the immutability guarantees yet - I'll do that before declaring this ready for final review.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 14:14:51 2014
From: report at bugs.python.org (Ezio Melotti)
Date: Wed, 23 Jul 2014 12:14:51 +0000
Subject: [issue21777] Separate out documentation of binary sequence methods
In-Reply-To: <1402918605.38.0.604956966245.issue21777@psf.upfronthosting.co.za>
Message-ID: <1406117691.84.0.242602383372.issue21777@psf.upfronthosting.co.za>


Changes by Ezio Melotti :


----------
nosy: +chris.jerdonek, ezio.melotti, zach.ware
stage:  -> patch review

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 14:17:42 2014
From: report at bugs.python.org (Shannon Kerr)
Date: Wed, 23 Jul 2014 12:17:42 +0000
Subject: [issue22045] Python make issue
Message-ID: <1406117862.23.0.135696000898.issue22045@psf.upfronthosting.co.za>


New submission from Shannon Kerr:

If you execute the following commands on a system that doesn?t already have Python 2.7.X installed on it, it will result in bloated libs that statically link libpythyon2.7.a instead of the locally built libpython2.7.so:

./configure
make
sudo make install
./configure ?enable-shared
make
sudo make install


Due to the library search path order in the Python build tools being:
-L /usr/local/lib -L .
the first lib found is in /usr/local/lib and it is the static library, so this is used to link.  This results in, for example, cPickle.so being 4.9M instead of 188K.

Shouldn't the just-built local library be used before anything on the system?

----------
components: Build
messages: 223736
nosy: skerr
priority: normal
severity: normal
status: open
title: Python make issue
versions: Python 2.7

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 14:19:27 2014
From: report at bugs.python.org (Shannon Kerr)
Date: Wed, 23 Jul 2014 12:19:27 +0000
Subject: [issue22045] Python make issue
In-Reply-To: <1406117862.23.0.135696000898.issue22045@psf.upfronthosting.co.za>
Message-ID: <1406117967.89.0.0341637332622.issue22045@psf.upfronthosting.co.za>


Changes by Shannon Kerr :


----------
type:  -> compile error

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 14:19:42 2014
From: report at bugs.python.org (Shannon Kerr)
Date: Wed, 23 Jul 2014 12:19:42 +0000
Subject: [issue22045] Python make issue
In-Reply-To: <1406117862.23.0.135696000898.issue22045@psf.upfronthosting.co.za>
Message-ID: <1406117982.06.0.747475143116.issue22045@psf.upfronthosting.co.za>


Changes by Shannon Kerr :


----------
type: compile error -> behavior

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 14:20:23 2014
From: report at bugs.python.org (Jason Heeris)
Date: Wed, 23 Jul 2014 12:20:23 +0000
Subject: [issue22046] ZipFile.read() should mention that it might throw
 NotImplementedError
Message-ID: <1406118023.79.0.0716895014277.issue22046@psf.upfronthosting.co.za>


New submission from Jason Heeris:

As per issue 5701, the zipfile.ZipFile.read() method will throw a NotImplementedError if the compression scheme is not supported. However, there is no mention of this possibility in the documentation for the read() method. I would suggest, say, "Calling read() on a ZipFile that uses an unsupported compression scheme (eg. implode) will raise a NotImplementedError."

It looks like you can use the testzip() method to check that this won't happen (ie. after you open the file but before you extract an entry). If that is really the expected way to check for this kind of condition, it would be nice to mention that too (under either method).

----------
assignee: docs at python
components: Documentation
messages: 223737
nosy: detly, docs at python
priority: normal
severity: normal
status: open
title: ZipFile.read() should mention that it might throw NotImplementedError
type: enhancement
versions: Python 2.7, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 14:23:17 2014
From: report at bugs.python.org (Alejandro Mj)
Date: Wed, 23 Jul 2014 12:23:17 +0000
Subject: [issue22041] http POST request with python 3.3 through web proxy
In-Reply-To: <1406060360.4.0.822886887897.issue22041@psf.upfronthosting.co.za>
Message-ID: <1406118196.99.0.857991066346.issue22041@psf.upfronthosting.co.za>


Changes by Alejandro Mj :


----------
nosy:  -AlexMJ

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 15:15:53 2014
From: report at bugs.python.org (Dirkjan Ochtman)
Date: Wed, 23 Jul 2014 13:15:53 +0000
Subject: [issue21591] "exec(a, b, c)" not the same as "exec a in b,
 c" in nested functions
In-Reply-To: <1401266879.61.0.867969486588.issue21591@psf.upfronthosting.co.za>
Message-ID: <1406121353.86.0.783270082689.issue21591@psf.upfronthosting.co.za>


Changes by Dirkjan Ochtman :


----------
nosy: +djc

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 15:43:51 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 23 Jul 2014 13:43:51 +0000
Subject: [issue17293] uuid.getnode() MAC address on AIX
In-Reply-To: <1361777348.15.0.791534887595.issue17293@psf.upfronthosting.co.za>
Message-ID: <1406123031.32.0.290880223713.issue17293@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

David is listed against AIX on the experts list https://docs.python.org/devguide/experts.html.  That alone suggests to me that AIX is an officially supported platform.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 15:45:30 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 13:45:30 +0000
Subject: [issue14484] missing return in win32_kill?
In-Reply-To: <1333462226.23.0.725280599354.issue14484@psf.upfronthosting.co.za>
Message-ID: <1406123130.01.0.0284576532858.issue14484@psf.upfronthosting.co.za>


STINNER Victor added the comment:

I understand that os.kill(pid, sig) should call TerminateProcess() or GenerateConsoleCtrlEvent() depending on the value of sig.

The problem is that these two functions are very different. A process can set a control handler for CTRL_C_EVENT and CTRL_BREAK_EVENT, so can decide how to handle GenerateConsoleCtrlEvent() event.

TerminateProcess() kills the process with the specified exit code.

To me it looks wrong to call TerminateProcess() with a signal number or event for the exit code!? We need to expose TerminateProcess() as a new Python function, os.TerminateProcess(pid, exitcode) for example.

os.kill(pid, sig) should raise a ValueError if sig is not CTRL_C_EVENT nor CTRL_BREAK_EVENT.

----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 15:52:01 2014
From: report at bugs.python.org (Demian Brecht)
Date: Wed, 23 Jul 2014 13:52:01 +0000
Subject: [issue22041] http POST request with python 3.3 through web proxy
In-Reply-To: <1406060360.4.0.822886887897.issue22041@psf.upfronthosting.co.za>
Message-ID: <1406123521.34.0.765664827595.issue22041@psf.upfronthosting.co.za>


Changes by Demian Brecht :


----------
nosy: +demian.brecht

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 15:56:07 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 13:56:07 +0000
Subject: [issue22038] Implement atomic operations on non-x86 platforms
In-Reply-To: <1406049852.33.0.466915172772.issue22038@psf.upfronthosting.co.za>
Message-ID: <1406123767.5.0.189609122726.issue22038@psf.upfronthosting.co.za>


STINNER Victor added the comment:

+ #define __ATOMIC_RELAXED 0

You should use the "_Py_" prefix for these constants, to avoid conflicts in applications.

(You may also replace tabs with spaces, the PEP 7 says "Use 4-space indents and no tabs at all." but I also prefer to avoid tabs in other places.)

I tested your patch on Fedora 20 (Linux kernel 3.14.8, GCC 4.8.2, glibc 2.18) on x86_64 ("Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz") and the whole Python test suite pass.

GCC 4.9 (released a few month ago) provides the  header:
https://gcc.gnu.org/gcc-4.9/changes.html

pyatomic.h contains this comment:

/* XXX: When compilers start offering a stdatomic.h with lock-free
   atomic_int and atomic_address types, include that here and rewrite
   the atomic operations in terms of it. */

But using  header can be done in a separated issue.

----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 17:23:09 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 23 Jul 2014 15:23:09 +0000
Subject: [issue21580] PhotoImage(data=...) apparently has to be UTF-8 or
 Base-64 encoded
In-Reply-To: <1401083544.46.0.470654104454.issue21580@psf.upfronthosting.co.za>
Message-ID: <1406128989.56.0.173550460521.issue21580@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
nosy: +terry.reedy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 17:30:22 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 23 Jul 2014 15:30:22 +0000
Subject: [issue21888] plistlib.FMT_BINARY behavior doesn't send required dict
 parameter
In-Reply-To: <1404148099.9.0.0254576282966.issue21888@psf.upfronthosting.co.za>
Message-ID: <1406129422.44.0.865235584556.issue21888@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
assignee:  -> serhiy.storchaka

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 17:35:01 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Wed, 23 Jul 2014 15:35:01 +0000
Subject: [issue21423] concurrent.futures.ThreadPoolExecutor should accept an
 initializer argument
In-Reply-To: <1399160288.58.0.274862722075.issue21423@psf.upfronthosting.co.za>
Message-ID: <1406129701.34.0.475790870647.issue21423@psf.upfronthosting.co.za>


Dan O'Reilly added the comment:

It seems like everyone agrees that this functionality is useful, so I'm reviving this in hopes of getting a patch pushed through. I've updated Andreas' patch so that it applies cleanly against the latest tree, and tweaked the handling of exceptions in initializer. Now, ProcessPoolExecutor will raise a BrokenPoolException should an initializer method fail, and ThreadPoolExecutor will raise a RunTimeError stating that the pool can't be used because an initializer failed.

I was hoping to use multiprocessing.Pool's handling of initializer exceptions as a guide for the right behavior here, but it actually does terrible job: an exception raised in the initializer is completely unhandled, and results in an endless loop of new processes being started up and immediately failing. But that's a separate bug report. :)

For now there are still unit tests for testing exceptions being raised in the initializer, but they're noisy; the traceback for each initializer exception gets printed to stdout. I'm not sure if that's undesirable behavior or not.

If the new behavior looks ok, the docs will need an update to.

----------
nosy: +dan.oreilly
Added file: http://bugs.python.org/file36047/pool_init.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 17:42:11 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 23 Jul 2014 15:42:11 +0000
Subject: [issue21044] tarfile does not handle file .name being an int
In-Reply-To: <1395624777.51.0.277506799413.issue21044@psf.upfronthosting.co.za>
Message-ID: <3hJLX228hlz7LjR@mail.python.org>


Roundup Robot added the comment:

New changeset 825137d0d4ca by Serhiy Storchaka in branch '3.4':
Correct issue #21044 patch author.
http://hg.python.org/cpython/rev/825137d0d4ca

New changeset 4fe27263f9d4 by Serhiy Storchaka in branch 'default':
Correct issue #21044 patch author.
http://hg.python.org/cpython/rev/4fe27263f9d4

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 17:50:30 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 23 Jul 2014 15:50:30 +0000
Subject: [issue21888] plistlib.FMT_BINARY behavior doesn't send required dict
 parameter
In-Reply-To: <1404148099.9.0.0254576282966.issue21888@psf.upfronthosting.co.za>
Message-ID: <3hJLjd5sQbz7Mqg@mail.python.org>


Roundup Robot added the comment:

New changeset 09746dc1a3b4 by Serhiy Storchaka in branch '3.4':
Issue #21888: plistlib's load() and loads() now work if the fmt parameter is
http://hg.python.org/cpython/rev/09746dc1a3b4

New changeset 275d02865d11 by Serhiy Storchaka in branch 'default':
Issue #21888: plistlib's load() and loads() now work if the fmt parameter is
http://hg.python.org/cpython/rev/275d02865d11

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 18:03:44 2014
From: report at bugs.python.org (Sam Kerr)
Date: Wed, 23 Jul 2014 16:03:44 +0000
Subject: [issue22047] argparse improperly prints mutually exclusive options
 when they are in a group
Message-ID: <1406131424.14.0.0235697032218.issue22047@psf.upfronthosting.co.za>


New submission from Sam Kerr:

The following code:

   import argparse
   parser = argparse.ArgumentParser()
   group1 = parser.add_mutually_exclusive_group()
   group2 = group1.add_mutually_exclusive_group()
   group2.add_argument('-hello',action='store_true', help="A flag")
   args = parser.parse_args()

produces this output:

   skerr at gravel:~$ python bug.py -h
   usage: bug.py [-h] [[-hello]

   optional arguments:
        -h, --help  show this help message and exit
        -hello      A flag
   skerr at gravel:~$ 

Note the double [[ around hello, but there is no double ]] to close it. This is the error.

----------
components: Library (Lib)
messages: 223744
nosy: Sam.Kerr
priority: normal
severity: normal
status: open
title: argparse improperly prints mutually exclusive options when they are in a group
type: behavior
versions: Python 2.7

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 18:04:38 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 23 Jul 2014 16:04:38 +0000
Subject: [issue21888] plistlib.FMT_BINARY behavior doesn't send required dict
 parameter
In-Reply-To: <1404148099.9.0.0254576282966.issue21888@psf.upfronthosting.co.za>
Message-ID: <1406131478.55.0.0673073166334.issue21888@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 18:07:37 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 23 Jul 2014 16:07:37 +0000
Subject: [issue18168] plistlib output self-sorted dictionary
In-Reply-To: <1370663536.42.0.663795573436.issue18168@psf.upfronthosting.co.za>
Message-ID: <1406131657.79.0.21915466641.issue18168@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 18:12:16 2014
From: report at bugs.python.org (Lita Cho)
Date: Wed, 23 Jul 2014 16:12:16 +0000
Subject: [issue1598] unexpected response in imaplib
In-Reply-To: <1197427257.83.0.419655228027.issue1598@psf.upfronthosting.co.za>
Message-ID: <1406131936.55.0.894496744478.issue1598@psf.upfronthosting.co.za>


Changes by Lita Cho :


----------
nosy:  -Lita.Cho

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 19:07:11 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 23 Jul 2014 17:07:11 +0000
Subject: [issue22002] Make full use of test discovery in test subpackages
In-Reply-To: <1405627760.3.0.397447180395.issue22002@psf.upfronthosting.co.za>
Message-ID: <3hJNQ700GTz7LjW@mail.python.org>


Roundup Robot added the comment:

New changeset 4f9f7e0fe1fd by Zachary Ware in branch '3.4':
Issue #22002: Make full use of test discovery in test sub-packages.
http://hg.python.org/cpython/rev/4f9f7e0fe1fd

New changeset 6298895a52de by Zachary Ware in branch 'default':
Closes #22002: Merge with 3.4
http://hg.python.org/cpython/rev/6298895a52de

----------
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 19:08:19 2014
From: report at bugs.python.org (Dmitry Korchemny)
Date: Wed, 23 Jul 2014 17:08:19 +0000
Subject: [issue22048] Add weighted random choice to random package
Message-ID: <1406135299.72.0.385494554352.issue22048@psf.upfronthosting.co.za>


New submission from Dmitry Korchemny:

Need to have a function for weighted randomization:

given a dictionary: key -> weight (= non-negative number), return a key of the dictionary with the probability proportional to its weight. This capability is basic and is badly missing.

----------
components: Library (Lib)
messages: 223746
nosy: dkorchem
priority: normal
severity: normal
status: open
title: Add weighted random choice to random package
versions: Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 19:11:04 2014
From: report at bugs.python.org (Zachary Ware)
Date: Wed, 23 Jul 2014 17:11:04 +0000
Subject: [issue22002] Make full use of test discovery in test subpackages
In-Reply-To: <1405627760.3.0.397447180395.issue22002@psf.upfronthosting.co.za>
Message-ID: <1406135464.17.0.219378032241.issue22002@psf.upfronthosting.co.za>


Zachary Ware added the comment:

Committed with a couple of changes from the posted patch: commented on the multiple dirname() calls as Serhiy suggested, removed the 'with DirsOnSysPath():' line since it turns out to be unnecessary when supplying top_level_dir to loader.discover(), and added some documentation for the new function to Doc/library/test.rst.

Victor, I went ahead and did the change to test_asyncio since it looks like the tulip project test package doesn't actually have __init__.py or __main__.py, and thus should be no conflict.  Please correct me if I'm wrong on that.

Thanks for the reviews!

----------
assignee:  -> zach.ware

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 19:16:22 2014
From: report at bugs.python.org (Chris Bruner)
Date: Wed, 23 Jul 2014 17:16:22 +0000
Subject: [issue22049] argparse: type= doesn't honor nargs > 1
Message-ID: <1406135782.37.0.476079892774.issue22049@psf.upfronthosting.co.za>


New submission from Chris Bruner:

>From the documentation, I think that argparse should pass the entire nargs-long string to the "type=" callable. Instead, it only passes the first argument (of nargs), making it impossible within argparse's framework to check for a tuple of mixed types, e.g., 2 ints and a float (my case), or a string and three numbers, etc.

See attached reproducer.

----------
files: argparse_typedef_bug.py
messages: 223748
nosy: Chris.Bruner
priority: normal
severity: normal
status: open
title: argparse: type= doesn't honor nargs > 1
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file36048/argparse_typedef_bug.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 19:20:44 2014
From: report at bugs.python.org (Mark Dickinson)
Date: Wed, 23 Jul 2014 17:20:44 +0000
Subject: [issue22048] Add weighted random choice to random package
In-Reply-To: <1406135299.72.0.385494554352.issue22048@psf.upfronthosting.co.za>
Message-ID: <1406136044.93.0.514634553707.issue22048@psf.upfronthosting.co.za>


Mark Dickinson added the comment:

Duplicate of #18844.

----------
nosy: +mark.dickinson
resolution:  -> duplicate
status: open -> closed
superseder:  -> allow weights in random.choice

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 19:21:10 2014
From: report at bugs.python.org (Mark Dickinson)
Date: Wed, 23 Jul 2014 17:21:10 +0000
Subject: [issue18844] allow weights in random.choice
In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za>
Message-ID: <1406136070.82.0.749783531638.issue18844@psf.upfronthosting.co.za>


Mark Dickinson added the comment:

Closed issue 22048 as a duplicate of this one.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 19:22:32 2014
From: report at bugs.python.org (Mark Dickinson)
Date: Wed, 23 Jul 2014 17:22:32 +0000
Subject: [issue18844] allow weights in random.choice
In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za>
Message-ID: <1406136152.21.0.662701908537.issue18844@psf.upfronthosting.co.za>


Changes by Mark Dickinson :


----------
nosy: +dkorchem

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 19:26:18 2014
From: report at bugs.python.org (Zachary Ware)
Date: Wed, 23 Jul 2014 17:26:18 +0000
Subject: [issue21500] Make use of the "load_tests" protocol in test_importlib
 packages
In-Reply-To: <1400007358.12.0.940641548905.issue21500@psf.upfronthosting.co.za>
Message-ID: <1406136378.41.0.598824581392.issue21500@psf.upfronthosting.co.za>


Zachary Ware added the comment:

This has been covered by #22002.

----------
nosy: +zach.ware
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Make full use of test discovery in test subpackages

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 19:43:24 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 23 Jul 2014 17:43:24 +0000
Subject: [issue15275] isinstance is called a more times that needed in ntpath
In-Reply-To: <1341668298.8.0.671820953585.issue15275@psf.upfronthosting.co.za>
Message-ID: <3hJPCv65xCzPYS@mail.python.org>


Roundup Robot added the comment:

New changeset b22aaa59d24f by Serhiy Storchaka in branch 'default':
Issue #15275: Clean up and speed up the ntpath module.
http://hg.python.org/cpython/rev/b22aaa59d24f

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 19:46:54 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 23 Jul 2014 17:46:54 +0000
Subject: [issue15275] isinstance is called a more times that needed in ntpath
In-Reply-To: <1341668298.8.0.671820953585.issue15275@psf.upfronthosting.co.za>
Message-ID: <1406137614.27.0.233608532691.issue15275@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 19:59:39 2014
From: report at bugs.python.org (Chris Bruner)
Date: Wed, 23 Jul 2014 17:59:39 +0000
Subject: [issue22050] argparse: read nargs > 1 options from file doesn't work
Message-ID: <1406138379.67.0.283419872247.issue22050@psf.upfronthosting.co.za>


New submission from Chris Bruner:

When reading options from a file, argparse should read all  values from each line. Instead, it complains of there not being enough options.

python file:
#!/usr/bin/env python
import argparse

p = argparse.ArgumentParser(description='Reproduce argparse nargs file bug',
    fromfile_prefix_chars='@')
p.add_argument('-t', '--triple', metavar='N', nargs=3)

args = p.parse_args(['@input.opts'])
print args

input.opts:
--triple 1 2 3
-t 2 2 32


Output:
bernoulli:myclu cwbrune$ argparse_nargs_file_bug.py 
usage: argparse_nargs_file_bug.py [-h] [-t N N N]
argparse_nargs_file_bug.py: error: argument -t/--triple: expected 3 argument(s)

----------
files: argparse_nargs_file_bug.py
messages: 223753
nosy: Chris.Bruner
priority: normal
severity: normal
status: open
title: argparse: read nargs > 1 options from file doesn't work
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file36049/argparse_nargs_file_bug.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 20:03:48 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 23 Jul 2014 18:03:48 +0000
Subject: [issue5718] Problem compiling ffi part of build on AIX 5.3.
In-Reply-To: <1239117342.9.0.186105014374.issue5718@psf.upfronthosting.co.za>
Message-ID: <1406138628.82.0.471272014271.issue5718@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

@David what is your opinion on this issue?

----------
nosy: +David.Edelsohn

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 20:11:09 2014
From: report at bugs.python.org (R. David Murray)
Date: Wed, 23 Jul 2014 18:11:09 +0000
Subject: [issue22050] argparse: read nargs > 1 options from file doesn't work
In-Reply-To: <1406138379.67.0.283419872247.issue22050@psf.upfronthosting.co.za>
Message-ID: <1406139069.92.0.523635444405.issue22050@psf.upfronthosting.co.za>


R. David Murray added the comment:

Your input.opts file is in the wrong format.  it should read

--triple
1
2
3
-t
2
3
32

----------
nosy: +r.david.murray
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 20:11:35 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 23 Jul 2014 18:11:35 +0000
Subject: [issue11077] Tkinter is not thread safe
In-Reply-To: <1296488432.58.0.0945320697853.issue11077@psf.upfronthosting.co.za>
Message-ID: <1406139095.01.0.169614860283.issue11077@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
resolution:  -> works for me
status: open -> pending

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 20:20:10 2014
From: report at bugs.python.org (R. David Murray)
Date: Wed, 23 Jul 2014 18:20:10 +0000
Subject: [issue22049] argparse: type= doesn't honor nargs > 1
In-Reply-To: <1406135782.37.0.476079892774.issue22049@psf.upfronthosting.co.za>
Message-ID: <1406139610.06.0.792865478723.issue22049@psf.upfronthosting.co.za>


R. David Murray added the comment:

Nope.  The documentation says:

    N (an integer). N arguments from the command line will be gathered together into a list

The type function is applied to each argument independently.  It would be easy enough to make this explicit in one of the nargs multi-argument examples by using type as well.

----------
assignee:  -> docs at python
components: +Documentation
nosy: +docs at python, r.david.murray
stage:  -> needs patch
versions: +Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 20:28:59 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 23 Jul 2014 18:28:59 +0000
Subject: [issue21566] make use of the new default socket.listen() backlog
 argument
In-Reply-To: <1400880411.34.0.235990435925.issue21566@psf.upfronthosting.co.za>
Message-ID: <3hJQDV2FkQz7LjS@mail.python.org>


Roundup Robot added the comment:

New changeset f7643c893587 by Charles-Fran?ois Natali in branch 'default':
Issue #21566: Make use of socket.listen() default backlog.
http://hg.python.org/cpython/rev/f7643c893587

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 20:47:18 2014
From: report at bugs.python.org (Chris Bruner)
Date: Wed, 23 Jul 2014 18:47:18 +0000
Subject: [issue22050] argparse: read nargs > 1 options from file doesn't work
In-Reply-To: <1406138379.67.0.283419872247.issue22050@psf.upfronthosting.co.za>
Message-ID: <1406141238.0.0.790401238433.issue22050@psf.upfronthosting.co.za>


Chris Bruner added the comment:

Tried the format you gave. Still doesn't work. Same error message:

bernoulli:myclu cwbrune$ argparse_nargs_file_bug.py 
usage: argparse_nargs_file_bug.py [-h] [-t N N N]
argparse_nargs_file_bug.py: error: argument -t/--triple: expected 3 argument(s)
bernoulli:myclu cwbrune$ cat argparse_nargs_file_bug.py 
#!/usr/bin/env python
import argparse

p = argparse.ArgumentParser(description='Reproduce argparse nargs file bug',
    fromfile_prefix_chars='@')
p.add_argument('-t', '--triple', metavar='N', nargs=3)

args = p.parse_args(['@input.opts'])
print args
bernoulli:myclu cwbrune$ cat input.opts 
--triple 
1 
2 
3
-t 
2 
2 
32
bernoulli:myclu cwbrune$

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 20:49:31 2014
From: report at bugs.python.org (Chris Bruner)
Date: Wed, 23 Jul 2014 18:49:31 +0000
Subject: [issue22050] argparse: read nargs > 1 options from file doesn't work
In-Reply-To: <1406138379.67.0.283419872247.issue22050@psf.upfronthosting.co.za>
Message-ID: <1406141371.87.0.129504860136.issue22050@psf.upfronthosting.co.za>


Chris Bruner added the comment:

Oops, my mistake: had multiple '-t' in file, but not an "action=append". Your version works just fine.

Sorry for the confusion, and thank you for the correction!

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 21:01:54 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 23 Jul 2014 19:01:54 +0000
Subject: [issue21597] Allow turtledemo code pane to get wider.
In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za>
Message-ID: <3hJQyV0bKyz7LjM@mail.python.org>


Roundup Robot added the comment:

New changeset 60301b9982b2 by Terry Jan Reedy in branch '2.7':
Issue #21597: Turtledemo text pane can now be widened to view or copy complete
http://hg.python.org/cpython/rev/60301b9982b2

New changeset 0fb515063324 by Terry Jan Reedy in branch '3.4':
Issue #21597: Turtledemo text pane can now be widened to view or copy complete
http://hg.python.org/cpython/rev/0fb515063324

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 21:01:55 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 23 Jul 2014 19:01:55 +0000
Subject: [issue19132] Add compact mode to pprint
In-Reply-To: <1380485149.97.0.648520685176.issue19132@psf.upfronthosting.co.za>
Message-ID: <3hJQyV62RNz7LjM@mail.python.org>


Roundup Robot added the comment:

New changeset 60301b9982b2 by Terry Jan Reedy in branch '2.7':
Issue #21597: Turtledemo text pane can now be widened to view or copy complete
http://hg.python.org/cpython/rev/60301b9982b2

New changeset 0fb515063324 by Terry Jan Reedy in branch '3.4':
Issue #21597: Turtledemo text pane can now be widened to view or copy complete
http://hg.python.org/cpython/rev/0fb515063324

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 21:04:42 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 23 Jul 2014 19:04:42 +0000
Subject: [issue18132] buttons in turtledemo disappear on small screens
In-Reply-To: <1370353605.18.0.929519765734.issue18132@psf.upfronthosting.co.za>
Message-ID: <1406142282.67.0.605523458392.issue18132@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

Fixed by
New changeset 60301b9982b2 by Terry Jan Reedy in branch '2.7':
Issue #21597: Turtledemo text pane can now be widened to view or copy complete
http://hg.python.org/cpython/rev/60301b9982b2

New changeset 0fb515063324 by Terry Jan Reedy in branch '3.4':
Issue #21597: Turtledemo text pane can now be widened to view or copy complete
http://hg.python.org/cpython/rev/0fb515063324

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 21:07:27 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 23 Jul 2014 19:07:27 +0000
Subject: [issue21597] Allow turtledemo code pane to get wider.
In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za>
Message-ID: <1406142447.17.0.746583175452.issue21597@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

No, I believe this is done ;-). Onward to font sizing.
Thank you for the hard work on this. It is a great improvement.

----------
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 21:07:56 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Wed, 23 Jul 2014 19:07:56 +0000
Subject: [issue21566] make use of the new default socket.listen() backlog
 argument
In-Reply-To: <1400880411.34.0.235990435925.issue21566@psf.upfronthosting.co.za>
Message-ID: <1406142476.62.0.654128474569.issue21566@psf.upfronthosting.co.za>


Charles-Fran?ois Natali added the comment:

Committed, thanks for the reviews (I only updated one call to socket.listen(), inside multiprocessing, the rest is in the test suite).

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 21:18:02 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 23 Jul 2014 19:18:02 +0000
Subject: [issue21573] Clean up turtle.py code formatting
In-Reply-To: <1400982505.0.0.749326101789.issue21573@psf.upfronthosting.co.za>
Message-ID: <1406143082.83.0.59205520067.issue21573@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

In private email, Gregor indicated that he would like to be involved in turtle maintenance, and will be available about Aug. 1.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 21:18:25 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 23 Jul 2014 19:18:25 +0000
Subject: [issue6167] Tkinter.Scrollbar: the activate method needs to return a
 value, and set should take only two args
In-Reply-To: <1243887092.8.0.492821608561.issue6167@psf.upfronthosting.co.za>
Message-ID: <3hJRKX6XWgz7LjW@mail.python.org>


Roundup Robot added the comment:

New changeset 6ae34a948cb4 by Serhiy Storchaka in branch 'default':
Issue #6167: Scrollbar.activate() now returns the name of active element if
http://hg.python.org/cpython/rev/6ae34a948cb4

New changeset f5df571bfe1d by Serhiy Storchaka in branch '2.7':
Issue #6167: Backported tests for Scrollbar.activate() and Scrollbar.set()
http://hg.python.org/cpython/rev/f5df571bfe1d

New changeset 2cac1e3f825a by Serhiy Storchaka in branch '3.4':
Issue #6167: Backported tests for Scrollbar.activate() and Scrollbar.set()
http://hg.python.org/cpython/rev/2cac1e3f825a

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 21:23:52 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 23 Jul 2014 19:23:52 +0000
Subject: [issue6167] Tkinter.Scrollbar: the activate method needs to return a
 value, and set should take only two args
In-Reply-To: <1243887092.8.0.492821608561.issue6167@psf.upfronthosting.co.za>
Message-ID: <1406143432.52.0.153313576723.issue6167@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Committed without change activate() parameter name. I still think this parameter name is wrong.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 21:33:45 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 23 Jul 2014 19:33:45 +0000
Subject: [issue4350] Remove dead code from Tkinter.py
In-Reply-To: <1227053659.32.0.711141995765.issue4350@psf.upfronthosting.co.za>
Message-ID: <3hJRgD5DjLz7LjS@mail.python.org>


Roundup Robot added the comment:

New changeset 549a7615abe3 by Serhiy Storchaka in branch 'default':
Issue #4350: Removed a number of out-of-dated and non-working for a long time
http://hg.python.org/cpython/rev/549a7615abe3

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 21:35:13 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 23 Jul 2014 19:35:13 +0000
Subject: [issue4350] Remove dead code from Tkinter.py
In-Reply-To: <1227053659.32.0.711141995765.issue4350@psf.upfronthosting.co.za>
Message-ID: <1406144113.83.0.0873736100535.issue4350@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 21:40:59 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 23 Jul 2014 19:40:59 +0000
Subject: [issue19493] Report skipped ctypes tests as skipped
In-Reply-To: <1383569878.45.0.454771857446.issue19493@psf.upfronthosting.co.za>
Message-ID: <3hJRqZ617Hz7LjW@mail.python.org>


Roundup Robot added the comment:

New changeset 49a2bed5185a by Zachary Ware in branch '2.7':
Issue #19493: Fix two uses of ctypes.test.requires (it's not a decorator)
http://hg.python.org/cpython/rev/49a2bed5185a

New changeset 374a9a259c09 by Zachary Ware in branch '3.4':
Issue #19493: Fix two uses of ctypes.test.requires (it's not a decorator)
http://hg.python.org/cpython/rev/374a9a259c09

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 21:44:20 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Wed, 23 Jul 2014 19:44:20 +0000
Subject: [issue19776] Provide expanduser() on Path objects
In-Reply-To: <1385409778.55.0.842571848249.issue19776@psf.upfronthosting.co.za>
Message-ID: <1406144660.04.0.277855484448.issue19776@psf.upfronthosting.co.za>


Charles-Fran?ois Natali added the comment:

> There is a question. What should pathlib's expanduser() do in case
> when user directory can't be determined (or user does not exist)?
> Perhaps unlike to os.path.expanduser() it should raise an exception
> (as in many other pathlib's methods).

Let's see what POSIX says:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_01

"""
If the system does not recognize the login name, the results are undefined.
"""

Helpful, isn't it ;-)

Behaving like os.path.expanduser() would have the advantage of consistency (which is in turn consistent with Unix shells), OTOH, it seems wrong to just return the unexpanded form: for example, if someone calls expanduser('~apache') and there's apache user, returning '~apache' could be dangerous if there was an '~apache' folder in the CWD.

So I think it would be better to raise an exception.

----------
nosy: +neologix

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 21:57:47 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 23 Jul 2014 19:57:47 +0000
Subject: [issue22051] Turtledemo: stop reloading demos
Message-ID: <1406145466.97.0.661318262793.issue22051@psf.upfronthosting.co.za>


New submission from Terry J. Reedy:

I propose to remove the following two lines with 'reload' from turtledemo.__main__.py.

from importlib import reload
...
... def loadfile(self, filename):
...
        reload(self.module)

Reloading modules each time a demo is run allows and even encourages module level code that initializes variables (other than classes) and has system side-effects. In particular, some such calls created the test problems reported in #21882. Code that needs to be run each time the required main() is called should be inside main.  Indeed, reforming the two_canvases demo (see patch for #21882) made two_canvases work properly within the demo driver.

With the demos patched, I tried them all twice after commenting out the reload. I did not notice any difference, except possibly faster response.

I already edited the help text to tell users to initialize in main().

----------
assignee: terry.reedy
keywords: patch
messages: 223771
nosy: gregorlingl, terry.reedy
priority: normal
severity: normal
stage: patch review
status: open
title: Turtledemo: stop reloading demos
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 22:00:27 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 23 Jul 2014 20:00:27 +0000
Subject: [issue21882] turtledemo modules imported by test___all__ cause side
 effects or failures
In-Reply-To: <1404086161.6.0.896977354321.issue21882@psf.upfronthosting.co.za>
Message-ID: <1406145627.67.0.800407299149.issue21882@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

I opened #22051 about removing reload to force better code. Since the tests are passing and I think the demo modules should be minimally tested by importing, and no one has said otherwise since the fix, I am closing this.

----------
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 22:03:33 2014
From: report at bugs.python.org (Lita Cho)
Date: Wed, 23 Jul 2014 20:03:33 +0000
Subject: [issue21597] Allow turtledemo code pane to get wider.
In-Reply-To: <1406142447.17.0.746583175452.issue21597@psf.upfronthosting.co.za>
Message-ID: 


Lita Cho added the comment:

Sweet! Thank you so much, Terry!

On Wednesday, July 23, 2014, Terry J. Reedy  wrote:

>
> Terry J. Reedy added the comment:
>
> No, I believe this is done ;-). Onward to font sizing.
> Thank you for the hard work on this. It is a great improvement.
>
> ----------
> resolution:  -> fixed
> stage: commit review -> resolved
> status: open -> closed
>
> _______________________________________
> Python tracker >
> 
> _______________________________________
>

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 22:06:37 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 23 Jul 2014 20:06:37 +0000
Subject: [issue16547] IDLE raises an exception in tkinter after fresh file's
 text has been rendered
In-Reply-To: <1353785000.68.0.88975991365.issue16547@psf.upfronthosting.co.za>
Message-ID: <1406145997.41.0.160864093898.issue16547@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> IDLE - quickly closing a large file triggers a traceback

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 22:11:55 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 23 Jul 2014 20:11:55 +0000
Subject: [issue14117] Turtledemo: exception and minor glitches.
In-Reply-To: <1330120365.77.0.428280648922.issue14117@psf.upfronthosting.co.za>
Message-ID: <1406146315.8.0.800731236173.issue14117@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

Added #21933, change text font size, as dependency.
Added new #22051 remove reload, as dependency.
#18132: stop demo buttons from disappearing, was fixed by #21507 patch.

----------
dependencies: +Allow the user to change font sizes with the text pane of turtledemo, Turtledemo: stop reloading demos

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 22:14:51 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Wed, 23 Jul 2014 20:14:51 +0000
Subject: [issue18643] add a fallback socketpair() implementation in
 test.support
In-Reply-To: <1375531895.31.0.501848123953.issue18643@psf.upfronthosting.co.za>
Message-ID: <1406146491.17.0.789308088031.issue18643@psf.upfronthosting.co.za>


Charles-Fran?ois Natali added the comment:

Barring any objection, I'll commit the patch attached within a couple days.

----------
title: implement socketpair() on Windows -> add a fallback socketpair() implementation in test.support
Added file: http://bugs.python.org/file36050/socketpair-3.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 22:41:50 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 20:41:50 +0000
Subject: [issue18643] add a fallback socketpair() implementation in
 test.support
In-Reply-To: <1375531895.31.0.501848123953.issue18643@psf.upfronthosting.co.za>
Message-ID: <1406148110.47.0.74760666115.issue18643@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> Barring any objection, I'll commit the patch attached within a couple days.

I have objections!

You should copy the code from asyncio.windows_utils.socketpair(). It checks also type and proto parameter: raise a ValueError for unsupported values (only SOCK_STREAM and proto=0 are supported). It also supports IPv6. It handles BlockingIOError and InterruptedError on connect (I never understood why these exceptions are simply ignored).

You patch checks the address received by accept() and retry. It's a little bit surprising. If you get an unexpected connection, maybe an exception should be raised, instead of just ignoring it. Maybe we should modify the code in asyncio to check also the address?

Finally, please add socketpair() directly to the socket module. It is useful for applications, not only for tests.

A socket.socketpair() function available on Windows would help me to write tests for the issue #22018!

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 23:00:07 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 23 Jul 2014 21:00:07 +0000
Subject: [issue22042] signal.set_wakeup_fd(fd): set the fd to non-blocking mode
In-Reply-To: <1406076570.98.0.190305939229.issue22042@psf.upfronthosting.co.za>
Message-ID: <3hJTZt3rJXz7LjW@mail.python.org>


Roundup Robot added the comment:

New changeset 9dc66b3a1d0d by Victor Stinner in branch 'default':
Issue #22042: Avoid dangerous C cast in socket.setblocking()
http://hg.python.org/cpython/rev/9dc66b3a1d0d

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 23:03:30 2014
From: report at bugs.python.org (Mark Dickinson)
Date: Wed, 23 Jul 2014 21:03:30 +0000
Subject: [issue22052] Comparison operators called in reverse order for
 subclasses with no override.
Message-ID: <1406149410.09.0.756154064568.issue22052@psf.upfronthosting.co.za>


New submission from Mark Dickinson:

As reported in a StackOverflow question [1]: the order in which the special comparison methods are called seems to be contradictory to the docs [2].  In the following snippet, __eq__ is called with reversed operands first:

>>> class A:
...     def __eq__(self, other):
...         print(type(self), type(other))
...         return True
... 
>>> class B(A):
...     pass
... 
>>> A() == B()
 
True

However, the docs note that:

"""If the right operand?s type is a subclass of the left operand?s type and that subclass provides the reflected method for the operation, this method will be called before the left operand?s non-reflected method. This behavior allows subclasses to override their ancestors? operations."""

... which suggests that this reversal should only happen when the subclass B *overrides* A's definition of __eq__ (and indeed that's the usual behaviour for arithmetic operations like __add__).

Looking more closely, that statement in the docs is in the 'numeric-types' section, so it's not clear that its rules should apply to the comparison operators.  But either way, some doc clarification could be useful.


[1] http://stackoverflow.com/q/24919375/270986
[2] https://docs.python.org/3.5/reference/datamodel.html#emulating-numeric-types

----------
assignee: docs at python
components: Documentation
messages: 223778
nosy: docs at python, mark.dickinson
priority: normal
severity: normal
status: open
title: Comparison operators called in reverse order for subclasses with no override.
versions: Python 2.7, Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 23:15:21 2014
From: report at bugs.python.org (Eric V. Smith)
Date: Wed, 23 Jul 2014 21:15:21 +0000
Subject: [issue21990] saxutils defines an inner class where a normal one would
 do
In-Reply-To: <1405520928.93.0.195566496029.issue21990@psf.upfronthosting.co.za>
Message-ID: <1406150121.85.0.498191655052.issue21990@psf.upfronthosting.co.za>


Eric V. Smith added the comment:

Looks fine to me. Normally I'd define the class being returned before the function returning it, but it doesn't really make a difference.

----------
nosy: +eric.smith

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 23:24:33 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 23 Jul 2014 21:24:33 +0000
Subject: [issue22053] turtledemo: clean up start and stop, fix warning
Message-ID: <1406150673.05.0.480577347652.issue22053@psf.upfronthosting.co.za>


New submission from Terry J. Reedy:

The patch adds a main function with the minimum needed to start the mainloop. It omits the 'while RUN' loop and development code for catching exceptions while running. They should never happen, and silently suppressing tracebacks is a bad idea.

The patch also deletes the unneeded sys.exit() call from _destroy. In 3.x debug builds, this call results in the following clipped warning being printed in the startup console.

    while executing
"46111032_destroy"
    (command for "WM_DELETE_WINDOW" window manager protocol) 

These no longer occur when sys.exit() is removed.

Turtledemo works fine with these changes.

----------
assignee: terry.reedy
files: turdemo_start_stop.diff
keywords: patch
messages: 223780
nosy: terry.reedy
priority: normal
severity: normal
stage: commit review
status: open
title: turtledemo: clean up start and stop, fix warning
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36051/turdemo_start_stop.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 23:28:39 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 23 Jul 2014 21:28:39 +0000
Subject: [issue22053] turtledemo: clean up start and stop, fix warning
In-Reply-To: <1406150673.05.0.480577347652.issue22053@psf.upfronthosting.co.za>
Message-ID: <3hJVCp6WbSz7LjV@mail.python.org>


Roundup Robot added the comment:

New changeset 823f5507bd86 by Terry Jan Reedy in branch '2.7':
Issue #22053: Cleanup turtledemo start and stop and fix debug shutdown warning.
http://hg.python.org/cpython/rev/823f5507bd86

New changeset 57531d65cdd4 by Terry Jan Reedy in branch '3.4':
Issue #22053: Cleanup turtledemo start and stop and fix debug shutdown warning.
http://hg.python.org/cpython/rev/57531d65cdd4

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 23:29:21 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 23 Jul 2014 21:29:21 +0000
Subject: [issue22053] turtledemo: clean up start and stop, fix warning
In-Reply-To: <1406150673.05.0.480577347652.issue22053@psf.upfronthosting.co.za>
Message-ID: <1406150961.51.0.191580731606.issue22053@psf.upfronthosting.co.za>


Changes by Terry J. Reedy :


----------
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 23:30:14 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 21:30:14 +0000
Subject: [issue22054] Add os.get_blocking() and os.set_blocking() functions
Message-ID: <1406151014.25.0.918263340821.issue22054@psf.upfronthosting.co.za>


New submission from STINNER Victor:

Antoine suggested me to add these functions in the issue #22042.

Here is a patch to implement these functions and use them in various places.

----------
files: os_blocking.patch
keywords: patch
messages: 223782
nosy: haypo, neologix, pitrou
priority: normal
severity: normal
status: open
title: Add os.get_blocking() and os.set_blocking() functions
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file36052/os_blocking.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 23:34:53 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 21:34:53 +0000
Subject: [issue18643] add a fallback socketpair() implementation in
 test.support
In-Reply-To: <1375531895.31.0.501848123953.issue18643@psf.upfronthosting.co.za>
Message-ID: <1406151293.22.0.641905550117.issue18643@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
versions: +Python 3.5 -Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 23:36:47 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 23 Jul 2014 21:36:47 +0000
Subject: [issue14117] Turtledemo: exception and minor glitches.
In-Reply-To: <1330120365.77.0.428280648922.issue14117@psf.upfronthosting.co.za>
Message-ID: <1406151407.06.0.419480568689.issue14117@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

#22053 added main(), eliminated 'while RUN', and fixed this a 3.x debug shutdown message.

The main remaining problem I am aware of now is that some demos 'print' messages to the console (or shell), which would be a problem if there were not one (as with pythonw).  Except for one demo, the messages would fit on the demo window message button. A possible fix would be to call demo.main with the button, so mainloop demos could write back to it.
(Normal demo returns are put there now.)

----------
versions: +Python 2.7

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 23:39:07 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 21:39:07 +0000
Subject: [issue22054] Add os.get_blocking() and os.set_blocking() functions
In-Reply-To: <1406151014.25.0.918263340821.issue22054@psf.upfronthosting.co.za>
Message-ID: <1406151547.95.0.852876159681.issue22054@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Oops, test_asyncio was failing. Fixed patched.

----------
Added file: http://bugs.python.org/file36053/os_blocking-2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 23:41:24 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 21:41:24 +0000
Subject: [issue22042] signal.set_wakeup_fd(fd): set the fd to non-blocking mode
In-Reply-To: <1406076570.98.0.190305939229.issue22042@psf.upfronthosting.co.za>
Message-ID: <1406151684.92.0.0899286953393.issue22042@psf.upfronthosting.co.za>


STINNER Victor added the comment:

As suggested by Antoine, I created the issue #22054 to add os.get_blocking() and os.set_blocking() functions.

Here is the simplified patch for signal.set_wakeup_fd(fd). It now depends on the patch of the issue #22054.

----------
Added file: http://bugs.python.org/file36054/os_blocking-2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 23 23:45:24 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 23 Jul 2014 21:45:24 +0000
Subject: [issue21597] Allow turtledemo code pane to get wider.
In-Reply-To: <1401306787.8.0.543638067901.issue21597@psf.upfronthosting.co.za>
Message-ID: <1406151924.14.0.333991204697.issue21597@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

Lita, when replying by email, please, please delete the message you are replying to (except possibly for a directly quoted line or two).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 00:06:48 2014
From: report at bugs.python.org (Lita Cho)
Date: Wed, 23 Jul 2014 22:06:48 +0000
Subject: [issue21597] Allow turtledemo code pane to get wider.
In-Reply-To: <1406151924.14.0.333991204697.issue21597@psf.upfronthosting.co.za>
Message-ID: 


Lita Cho added the comment:

Sorry about that!! Thanks for letting me know.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 00:21:34 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Wed, 23 Jul 2014 22:21:34 +0000
Subject: [issue18643] add a fallback socketpair() implementation in
 test.support
In-Reply-To: <1406148110.47.0.74760666115.issue18643@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

> You should copy the code from asyncio.windows_utils.socketpair(). It checks also type and proto parameter: raise a ValueError for unsupported values (only SOCK_STREAM and proto=0 are supported). It also supports IPv6. It handles BlockingIOError and InterruptedError on connect (I never understood why these exceptions are simply ignored).

I could use it then, although all those checks are unnecessary since
the underlying socket() call will check it for us.

> You patch checks the address received by accept() and retry. It's a little bit surprising. If you get an unexpected connection, maybe an exception should be raised, instead of just ignoring it. Maybe we should modify the code in asyncio to check also the address?

Why?
If you have an unexpected connection, it should be dropped, and we
should wait until the client we're expecting connects, there's no
reason to raise an error.
But I'll just reuse asyncio's version.

> Finally, please add socketpair() directly to the socket module. It is useful for applications, not only for tests.

Well, that's what I suggested initially, but never got any reply, so I
went for the least intrusive. I personally think too it should belong
to socket module.

So here it is.

----------
Added file: http://bugs.python.org/file36055/socketpair-4.diff

_______________________________________
Python tracker 

_______________________________________
-------------- next part --------------
diff -r f7643c893587 Doc/library/socket.rst
--- a/Doc/library/socket.rst	Wed Jul 23 19:28:13 2014 +0100
+++ b/Doc/library/socket.rst	Wed Jul 23 23:20:09 2014 +0100
@@ -350,7 +350,6 @@
    type, and protocol number.  Address family, socket type, and protocol number are
    as for the :func:`.socket` function above. The default family is :const:`AF_UNIX`
    if defined on the platform; otherwise, the default is :const:`AF_INET`.
-   Availability: Unix.
 
    The newly created sockets are :ref:`non-inheritable `.
 
@@ -361,6 +360,9 @@
    .. versionchanged:: 3.4
       The returned sockets are now non-inheritable.
 
+   .. versionchanged:: 3.5
+      Windows support added
+
 
 .. function:: create_connection(address[, timeout[, source_address]])
 
diff -r f7643c893587 Lib/socket.py
--- a/Lib/socket.py	Wed Jul 23 19:28:13 2014 +0100
+++ b/Lib/socket.py	Wed Jul 23 23:20:09 2014 +0100
@@ -76,6 +76,11 @@
                       if name.isupper() and name.startswith('SOCK_')})
 globals().update(SocketType.__members__)
 
+
+_LOCALHOST    = '127.0.0.1'
+_LOCALHOST_V6 = '::1'
+
+
 def _intenum_converter(value, enum_klass):
     """Convert a numeric family value to an IntEnum member.
 
@@ -468,6 +473,52 @@
         b = socket(family, type, proto, b.detach())
         return a, b
 
+else:
+
+    # Origin: https://gist.github.com/4325783, by Geert Jansen.  Public domain.
+    def socketpair(family=AF_INET, type=SOCK_STREAM, proto=0):
+        if family == AF_INET:
+            host = _LOCALHOST
+        elif family == AF_INET6:
+            host = _LOCALHOST_V6
+        else:
+            raise ValueError("Ony AF_INET and AF_INET6 socket address families "
+                             "are supported")
+        if type != SOCK_STREAM:
+            raise ValueError("Only SOCK_STREAM socket type is supported")
+        if proto != 0:
+            raise ValueError("Only protocol zero is supported")
+
+        # We create a connected TCP socket. Note the trick with
+        # setblocking(False) that prevents us from having to create a thread.
+        lsock = socket(family, type, proto)
+        try:
+            lsock.bind((host, 0))
+            lsock.listen()
+            # On IPv6, ignore flow_info and scope_id
+            addr, port = lsock.getsockname()[:2]
+            csock = socket(family, type, proto)
+            try:
+                csock.setblocking(False)
+                try:
+                    csock.connect((addr, port))
+                except (BlockingIOError, InterruptedError):
+                    pass
+                ssock, _ = lsock.accept()
+                csock.setblocking(True)
+            except:
+                csock.close()
+                raise
+        finally:
+            lsock.close()
+        return (ssock, csock)
+
+socketpair.__doc__ = """socketpair([family[, type[, proto]]]) -> (socket object, socket object)
+Create a pair of socket objects from the sockets returned by the platform
+socketpair() function.
+The arguments are the same as for socket() except the default family is AF_UNIX
+if defined on the platform; otherwise, the default is AF_INET.
+"""
 
 _blocking_errnos = { EAGAIN, EWOULDBLOCK }
 
diff -r f7643c893587 Lib/test/test_socket.py
--- a/Lib/test/test_socket.py	Wed Jul 23 19:28:13 2014 +0100
+++ b/Lib/test/test_socket.py	Wed Jul 23 23:20:09 2014 +0100
@@ -3702,8 +3702,6 @@
         self.cli.connect((HOST, self.port))
         time.sleep(1.0)
 
- at unittest.skipUnless(hasattr(socket, 'socketpair'),
-                     'test needs socket.socketpair()')
 @unittest.skipUnless(thread, 'Threading required for this test.')
 class BasicSocketPairTest(SocketPairTest):
 

From report at bugs.python.org  Thu Jul 24 00:22:08 2014
From: report at bugs.python.org (R. David Murray)
Date: Wed, 23 Jul 2014 22:22:08 +0000
Subject: [issue22052] Comparison operators called in reverse order for
 subclasses with no override.
In-Reply-To: <1406149410.09.0.756154064568.issue22052@psf.upfronthosting.co.za>
Message-ID: <1406154128.99.0.306387445256.issue22052@psf.upfronthosting.co.za>


R. David Murray added the comment:

"the subclass provides" doesn't actually imply anything about overriding, I think.  For __eq__, though, that means that *every* class "provides" it.  Indeed, I've always thought of the rule as "the subclass goes first" with no qualification, but that's only true for __eq__.

It looks like the "subclass goes first" note is missing from the __eq__ section.

But see issue 21408.  I find it hard to reason about this algorithm, so I could be completely wrong :)

----------
nosy: +r.david.murray

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 00:29:58 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 23 Jul 2014 22:29:58 +0000
Subject: [issue18174] Make regrtest with --huntrleaks check for fd leaks
In-Reply-To: <1370807273.91.0.83033499223.issue18174@psf.upfronthosting.co.za>
Message-ID: <1406154598.08.0.686626551844.issue18174@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Just flagging this up as testing is rather important.

----------
components: +Tests
nosy: +BreamoreBoy
versions: +Python 2.7, Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 00:42:51 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 23 Jul 2014 22:42:51 +0000
Subject: [issue2091] file accepts 'rU+' as a mode
In-Reply-To: <1202856909.89.0.801927341292.issue2091@psf.upfronthosting.co.za>
Message-ID: <1406155371.87.0.835452393868.issue2091@psf.upfronthosting.co.za>


Changes by Mark Lawrence :


----------
versions: +Python 3.5 -Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 01:18:14 2014
From: report at bugs.python.org (Demian Brecht)
Date: Wed, 23 Jul 2014 23:18:14 +0000
Subject: [issue21850] Fix httplib and SimpleHTTPServer in unicodeless build
In-Reply-To: <1403595340.98.0.841039748191.issue21850@psf.upfronthosting.co.za>
Message-ID: <1406157494.91.0.902695119395.issue21850@psf.upfronthosting.co.za>


Demian Brecht added the comment:

Left a couple comments on Rietveld

----------
nosy: +demian.brecht

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 01:18:19 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 23:18:19 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406157499.09.0.354893354739.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Windows only supports non-blocking mode for sockets. IMO we should only support sockets on Windows. I opened the issue #22042 which proposes to change signal.set_wakeup_fd(fd) to automatically make the file descriptor non-blocking. I cannot implement it on Windows because files cannot be configured to non-blocking mode.


I have an API design issue. Choices:

(A) On UNIX, signal.set_wakeup_fd(fd) is unchanged: accept any file descriptors (int). On Windows, signal.set_wakeup_fd(fd) only accepts socket objects (socket.socket).

(B) On UNIX, signal.set_wakeup_fd(fd) is unchanged: accept any file descriptors (int). On Windows, signal.set_wakeup_fd(fd) only accepts socket handles (int).

(C) signal.set_wakeup_fd(fd) is unchanged but it is no more available on Windows (signal.set_wakeup_fd does not exist anymore, same change for PySignal_SetWakeupFd). Add a new signal.set_wakeup_socket(socket) function which only accepts socket objects (socket.socket), available on all platforms.


The issue #22042 (make the file descriptor or socket automatically non-blocking) can be implemented with any of these options.

The option (A) is really ugly: only accepting int on UNIX and only socket.socket on Windows doesn't look like a portable API.

I don't like the option (B). Sockets are usually stored as objects (socket.socket) because of Windows, not as socket handle (int)

So my favorite option is (C).


On Windows, socket.fileno() returns a socket handle. Even if socket handles and file descriptors look the same (small integers), their namespace are completly separated. Operations on socket handles don't accept file descriptor. Operations on file descriptors don't accept socket handles.

Socket objects are preferred for portability. For example, socket.send() works on all platforms.


The option (C) also avoids the need of guessing the file type. On Windows, there is no function to check if a number is a file descriptor or a socket handle. _PyVerify_fd() tells you if a number if a file descriptor or not. But there is no public Windows function to check if a number is a socket handle.

The option (C) also makes the implemantion simpler: the signal module can:
- call socket.setblocking(False) to make the socket non-blocking,
- get directly the socket handle/file descriptor from the socket object (using the private C structure),
- call the socket error handler instead of copying the code.


I'm not sure that getsockopt(sock_fd, SOL_SOCKET, SO_ERROR, ...) is reliable. I had bad experiences why I designed os.get_inheritable(fd) vs os.get_handle_inheritable(handle): calling os.get_inheritable() with a handle created file descriptors, which is something really strange. I'm no more sure about that, but I remember a very strange behaviour.

Python now has os.get_inheritable(fd) for file descriptors and os.get_handle_inheritable(handle) for handles (it is only used for socket handles in factor) to not guess.

----------
Added file: http://bugs.python.org/file36056/wakeup_socket-6.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 01:18:28 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 23:18:28 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406157508.24.0.570258568611.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Windows only supports non-blocking mode for sockets. IMO we should only support sockets on Windows. I opened the issue #22042 which proposes to change signal.set_wakeup_fd(fd) to automatically make the file descriptor non-blocking. I cannot implement it on Windows because files cannot be configured to non-blocking mode.


I have an API design issue. Choices:

(A) On UNIX, signal.set_wakeup_fd(fd) is unchanged: accept any file descriptors (int). On Windows, signal.set_wakeup_fd(fd) only accepts socket objects (socket.socket).

(B) On UNIX, signal.set_wakeup_fd(fd) is unchanged: accept any file descriptors (int). On Windows, signal.set_wakeup_fd(fd) only accepts socket handles (int).

(C) signal.set_wakeup_fd(fd) is unchanged but it is no more available on Windows (signal.set_wakeup_fd does not exist anymore, same change for PySignal_SetWakeupFd). Add a new signal.set_wakeup_socket(socket) function which only accepts socket objects (socket.socket), available on all platforms.


The issue #22042 (make the file descriptor or socket automatically non-blocking) can be implemented with any of these options.

The option (A) is really ugly: only accepting int on UNIX and only socket.socket on Windows doesn't look like a portable API.

I don't like the option (B). Sockets are usually stored as objects (socket.socket) because of Windows, not as socket handle (int)

So my favorite option is (C).


On Windows, socket.fileno() returns a socket handle. Even if socket handles and file descriptors look the same (small integers), their namespace are completly separated. Operations on socket handles don't accept file descriptor. Operations on file descriptors don't accept socket handles.

Socket objects are preferred for portability. For example, socket.send() works on all platforms.


The option (C) also avoids the need of guessing the file type. On Windows, there is no function to check if a number is a file descriptor or a socket handle. _PyVerify_fd() tells you if a number if a file descriptor or not. But there is no public Windows function to check if a number is a socket handle.

The option (C) also makes the implemantion simpler: the signal module can:
- call socket.setblocking(False) to make the socket non-blocking,
- get directly the socket handle/file descriptor from the socket object (using the private C structure),
- call the socket error handler instead of copying the code.


I'm not sure that getsockopt(sock_fd, SOL_SOCKET, SO_ERROR, ...) is reliable. I had bad experiences why I designed os.get_inheritable(fd) vs os.get_handle_inheritable(handle): calling os.get_inheritable() with a handle created file descriptors, which is something really strange. I'm no more sure about that, but I remember a very strange behaviour.

Python now has os.get_inheritable(fd) for file descriptors and os.get_handle_inheritable(handle) for handles (it is only used for socket handles in factor) to not guess.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 01:22:31 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 23 Jul 2014 23:22:31 +0000
Subject: [issue17548] unittest.mock: test_create_autospec_unbound_methods is
 skipped
In-Reply-To: <1364255908.36.0.236092443385.issue17548@psf.upfronthosting.co.za>
Message-ID: <1406157751.19.0.890960023836.issue17548@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Both of these tests are still commented out in the default branch.

----------
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 01:31:21 2014
From: report at bugs.python.org (Milan Oberkirch)
Date: Wed, 23 Jul 2014 23:31:21 +0000
Subject: [issue16005] smtplib.SMTP().sendmail() and rset()
In-Reply-To: <1348402885.58.0.691449233826.issue16005@psf.upfronthosting.co.za>
Message-ID: <1406158281.37.0.679013613635.issue16005@psf.upfronthosting.co.za>


Milan Oberkirch added the comment:

This bug is fixed (at least in 3.5) so you might want to close it.
(See the _rset function in smtplib.py:482 and how its used in sendmail.)

----------
nosy: +jesstess, zvyn

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 01:32:53 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 23 Jul 2014 23:32:53 +0000
Subject: [issue18605] 2.7: test_threading hangs on Solaris 9
In-Reply-To: <1375254182.2.0.923446047018.issue18605@psf.upfronthosting.co.za>
Message-ID: <1406158373.81.0.453937679007.issue18605@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Is Solaris 9 supported as I can't find any buildbots for it?

----------
nosy: +BreamoreBoy, jcea
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 01:34:34 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 23:34:34 +0000
Subject: [issue18643] add a fallback socketpair() implementation in
 test.support
In-Reply-To: 
Message-ID: 


STINNER Victor added the comment:

2014-07-24 0:21 GMT+02:00 Charles-Fran?ois Natali :
>> You should copy the code from asyncio.windows_utils.socketpair(). It checks also type and proto parameter: raise a ValueError for unsupported values (only SOCK_STREAM and proto=0 are supported). It also supports IPv6. It handles BlockingIOError and InterruptedError on connect (I never understood why these exceptions are simply ignored).
>
> I could use it then, although all those checks are unnecessary since
> the underlying socket() call will check it for us.

socket.socket() supports SOCK_DGRAM on Windows, but asyncio
socketpair() function does not. The check on the socket family is just
to raise a better error message than an error on connect() or
something else.

I don't remember why I added a specific check on the proto parameter.

We might support more protocols in the future, but I'm not sure that
it's interesting to support them (right now). I  guess that most
people will call socketpair() without any parameter.

>> You patch checks the address received by accept() and retry. It's a little bit surprising. If you get an unexpected connection, maybe an exception should be raised, instead of just ignoring it. Maybe we should modify the code in asyncio to check also the address?
>
> Why?
> If you have an unexpected connection, it should be dropped, and we
> should wait until the client we're expecting connects, there's no
> reason to raise an error.
> But I'll just reuse asyncio's version.

Your version is safer. You should reuse your while dropping unknown connections.

By the way, we should reuse socket.socketpair() in
asyncio.windows_utils. The Tulip is written for Python 3.3 and shares
exactly the same code base, so you should write

Something like:

if hasattr(socket, 'socketpair'):
    socketpair = socket.socketpair
else:
  def socketpair(...): ...

Please also fix socketpair() in asyncio to add the while/drop unknown
connection (well, the function in socket.py and windows_utils.py must
be the same).

> Well, that's what I suggested initially, but never got any reply, so I
> went for the least intrusive. I personally think too it should belong
> to socket module.

On Windows, asyncio uses a socket pair in its default event loop
(SelectorEventLoop) for its "self pipe", because select.select() only
supports sockets. The Windows ProactorEventLoop also uses a socket
pair for its "self pipe".

Oh, and you forgot to modify the documentation to update
"Availability". Please add a ".. versionchanged:: 3.5" mentionning
that the function is now also available on Windows.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 01:35:05 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 23:35:05 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406158505.84.0.452808919964.issue22018@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
Removed message: http://bugs.python.org/msg223793

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 01:38:43 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 23 Jul 2014 23:38:43 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406158723.07.0.391891262659.issue22018@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

> I don't like the option (B). Sockets are usually stored as objects (socket.socket) because of Windows, not as socket handle (int)

I don't understand this. If you're ok with calling fileno() under Linux, why not under Windows?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 01:50:48 2014
From: report at bugs.python.org (Demian Brecht)
Date: Wed, 23 Jul 2014 23:50:48 +0000
Subject: [issue15267] tempfile.TemporaryFile and httplib incompatibility
In-Reply-To: <1341620675.47.0.0551988049302.issue15267@psf.upfronthosting.co.za>
Message-ID: <1406159448.91.0.859552317704.issue15267@psf.upfronthosting.co.za>


Changes by Demian Brecht :


----------
nosy: +demian.brecht

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 01:51:33 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 23 Jul 2014 23:51:33 +0000
Subject: [issue1191964] add non-blocking read and write methods to
 subprocess.Popen
Message-ID: <1406159493.72.0.265844627577.issue1191964@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> I have implemented and would continue to lean towards continuing to hide BrokenPipeError on the additional API endpoints.

FYI asyncio.Process.communicate() ignores BrokenPipeError and ConnectionResetError, whereas asyncio.Process.stdin.drain() (coroutine to wait until all bytes are written) raises a BrokenPipeError or ConnectionResetError if the child process exited. I think subprocess has the same design.

(I modified recently asyncio to ignore BrokenPipeError in communicate(), it was a bug.)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 01:52:55 2014
From: report at bugs.python.org (Milan Oberkirch)
Date: Wed, 23 Jul 2014 23:52:55 +0000
Subject: [issue1481032] patch smtplib:when SMTPDataError,
 rset crashes with sslerror
Message-ID: <1406159575.59.0.300857968552.issue1481032@psf.upfronthosting.co.za>


Milan Oberkirch added the comment:

This bug was resolved for SMTPServerDisconnected exceptions but not for SSLError. Is it still reproducible? If so, the attached patch should fix it for 3.x (couldn't test if it does because I don't know how to reproduce the error).

----------
nosy: +jesstess, zvyn
Added file: http://bugs.python.org/file36057/issue1481032.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 02:20:22 2014
From: report at bugs.python.org (Demian Brecht)
Date: Thu, 24 Jul 2014 00:20:22 +0000
Subject: [issue3566] httplib persistent connections violate MUST in RFC2616
 sec 8.1.4.
In-Reply-To: <1218901279.9.0.954545383172.issue3566@psf.upfronthosting.co.za>
Message-ID: <1406161222.97.0.248912335256.issue3566@psf.upfronthosting.co.za>


Changes by Demian Brecht :


----------
nosy: +demian.brecht

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 02:32:11 2014
From: report at bugs.python.org (Demian Brecht)
Date: Thu, 24 Jul 2014 00:32:11 +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: <1406161931.13.0.809517420104.issue14044@psf.upfronthosting.co.za>


Changes by Demian Brecht :


----------
nosy: +demian.brecht

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 03:55:36 2014
From: report at bugs.python.org (Atsuo Ishimoto)
Date: Thu, 24 Jul 2014 01:55:36 +0000
Subject: [issue9949] os.path.realpath on Windows does not follow symbolic links
In-Reply-To: <1285426994.28.0.192028764756.issue9949@psf.upfronthosting.co.za>
Message-ID: <1406166936.67.0.283172521328.issue9949@psf.upfronthosting.co.za>


Changes by Atsuo Ishimoto :


Removed file: http://bugs.python.org/file26487/issue9949.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 03:57:33 2014
From: report at bugs.python.org (Atsuo Ishimoto)
Date: Thu, 24 Jul 2014 01:57:33 +0000
Subject: [issue9949] os.path.realpath on Windows does not follow symbolic links
In-Reply-To: <1285426994.28.0.192028764756.issue9949@psf.upfronthosting.co.za>
Message-ID: <1406167053.77.0.601056832876.issue9949@psf.upfronthosting.co.za>


Atsuo Ishimoto added the comment:

I have unlinked my patch since it doesn't looks correct now. Sorry for disturbing.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 03:59:07 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Thu, 24 Jul 2014 01:59:07 +0000
Subject: [issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't
 batch function arguments by chunks
In-Reply-To: <1298300689.71.0.822605356721.issue11271@psf.upfronthosting.co.za>
Message-ID: <1406167147.73.0.0574943039345.issue11271@psf.upfronthosting.co.za>


Dan O'Reilly added the comment:

I'm seeing an even larger difference between multiprocessing.Pool and ProcessPoolExecutor on my machine, with Python 3.4:

Starting multiproc...done in 2.160644769668579 s.
Starting futures...done in 67.953957319259644 s.
Starting futures "fixed"...done in 2.134932041168213 s.

I've updated the initial patch to address the comments Antoine made; the chunksize now defaults to 1, and itertools is used to chunk the input iterables, rather than building a list. Attached is an updated benchmark script:

Starting multiproc...done in 2.2295100688934326 s.
Starting futures...done in 68.5991039276123 s.
Starting futures "fixed" (no chunking)...done in 69.18992304801941 s.
Starting futures "fixed" (with chunking)...done in 2.352942705154419 s.

The new implementation of map has essentially identical performance to the original with chunksize=1, but it performs much better with a larger chunksize provided.

----------
nosy: +dan.oreilly
Added file: http://bugs.python.org/file36058/test_mult.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 04:01:00 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Thu, 24 Jul 2014 02:01:00 +0000
Subject: [issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't
 batch function arguments by chunks
In-Reply-To: <1298300689.71.0.822605356721.issue11271@psf.upfronthosting.co.za>
Message-ID: <1406167260.03.0.745308541455.issue11271@psf.upfronthosting.co.za>


Dan O'Reilly added the comment:

Here's a patch that adds the new map implementation from the benchmark script to concurrent.futures.process.

----------
keywords: +patch
Added file: http://bugs.python.org/file36059/map_chunksize.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 04:59:21 2014
From: report at bugs.python.org (Demian Brecht)
Date: Thu, 24 Jul 2014 02:59:21 +0000
Subject: [issue22041] http POST request with python 3.3 through web proxy
In-Reply-To: <1406060360.4.0.822886887897.issue22041@psf.upfronthosting.co.za>
Message-ID: <1406170761.65.0.913343010063.issue22041@psf.upfronthosting.co.za>


Demian Brecht added the comment:

Hi Alejandro,

I've spent a little time looking into this. I haven't been able to reproduce what you're seeing on Windows exactly, but I've encountered other issues along the same path using a local squid instance (localhost:4242):


from http.client import OK, HTTPConnection
import unittest

class TestProxy(unittest.TestCase):
    def test_proxy_tunnel_success(self):
        con = HTTPConnection('localhost', 4242)
        con.set_tunnel('www.example.com')
        con.request('GET', 'http://www.example.com')
        resp = con.getresponse()
        self.assertEqual(resp.code, 200)
        data = resp.read()
        con.close()

    def test_proxy_tunnel_failure(self):
        con = HTTPConnection('localhost', 4242)
        con.set_tunnel('www.example.com')
        con.request('GET', '/')
        resp = con.getresponse()
        self.assertEqual(resp.code, 200) # FAILS
        con.close()

if __name__ == '__main__':
    unittest.main()


As you can see with the test above, if I use the full URI, the request succeeds, but the relative path (as in your example) fails. My assumption is that these issues may be related to proxy server implementations, but I'd have to some further investigation before being able to go on more than a hunch (and I don't have time to do that tonight).

As a first step, could you please try using a full URI in your request and see if that produces the desired result?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 05:07:59 2014
From: report at bugs.python.org (Weinan Li)
Date: Thu, 24 Jul 2014 03:07:59 +0000
Subject: [issue22021] shutil.make_archive()  root_dir do not work
In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za>
Message-ID: <1406171279.49.0.295613394763.issue22021@psf.upfronthosting.co.za>


Weinan Li added the comment:

that sounds reasonable

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 06:40:07 2014
From: report at bugs.python.org (Roundup Robot)
Date: Thu, 24 Jul 2014 04:40:07 +0000
Subject: [issue22036] Obsolete reference to stringobject in comment
In-Reply-To: <1406042442.28.0.89298124162.issue22036@psf.upfronthosting.co.za>
Message-ID: <3hJgnf2VWhz7LjZ@mail.python.org>


Roundup Robot added the comment:

New changeset a5a80f79699e by Benjamin Peterson in branch '3.4':
s/stringobject/bytesobject/ (closes #22036)
http://hg.python.org/cpython/rev/a5a80f79699e

New changeset 6be54158e935 by Benjamin Peterson in branch 'default':
merge 3.4 (#22036)
http://hg.python.org/cpython/rev/6be54158e935

----------
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 07:00:31 2014
From: report at bugs.python.org (Demian Brecht)
Date: Thu, 24 Jul 2014 05:00:31 +0000
Subject: [issue22041] http POST request with python 3.3 through web proxy
In-Reply-To: <1406060360.4.0.822886887897.issue22041@psf.upfronthosting.co.za>
Message-ID: <1406178031.69.0.415900851433.issue22041@psf.upfronthosting.co.za>


Demian Brecht added the comment:

Ignore my previous note. Digging into this a little more, I think I've possibly found the underlying issue:

If the port is not specified in set_tunnel (as in your example), the buffer sent over the wire looks like

"send: b'POST [PATH] HTTP/1.1\r\nHost: [HOST]:None\r\nAccept-Encoding: identity\r\nContent-Length: 41\r\nAccept: text/plain\r\nContent-type: application/x-www-form-urlencoded\r\n\r\n[FORM_DATA]'"

Note the "None" as the port. However, if the port is explicitly set, then the resulting buffer looks like:

"send: b'POST [PATH] HTTP/1.1\r\nHost: [HOST]:[PORT]\r\nAccept-Encoding: identity\r\nContent-Length: 41\r\nAccept: text/plain\r\nContent-type: application/x-www-form-urlencoded\r\n\r\n[FORM_DATA]'"


Can you retry your example, but specify the port and let me know if that fixes your problem? Either way, this is a bug that I'll submit a patch (and test) for, but I'd like to know that it solves the issue as written.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 07:17:25 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 24 Jul 2014 05:17:25 +0000
Subject: [issue21990] saxutils defines an inner class where a normal one would
 do
In-Reply-To: <1405520928.93.0.195566496029.issue21990@psf.upfronthosting.co.za>
Message-ID: <1406179045.76.0.384315328693.issue21990@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

LGTM. But it would be better to add underscore prefix to class name.

----------
nosy: +serhiy.storchaka
stage:  -> commit review

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 07:24:13 2014
From: report at bugs.python.org (paul j3)
Date: Thu, 24 Jul 2014 05:24:13 +0000
Subject: [issue13041] argparse: terminal width is not detected properly
In-Reply-To: <1316902039.33.0.744560309521.issue13041@psf.upfronthosting.co.za>
Message-ID: <1406179453.26.0.440923397103.issue13041@psf.upfronthosting.co.za>


paul j3 added the comment:

For now the user could add this to his module:

    import os, shutil
    os.environ['COLUMNS'] = str(shutil.get_terminal_size().columns)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 07:26:59 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 24 Jul 2014 05:26:59 +0000
Subject: [issue2091] file accepts 'rU+' as a mode
In-Reply-To: <1202856909.89.0.801927341292.issue2091@psf.upfronthosting.co.za>
Message-ID: <1406179619.66.0.650131255519.issue2091@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

In Python 3.4+ 'U' already emits deprecation warning.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 08:29:17 2014
From: report at bugs.python.org (Saimadhav Heblikar)
Date: Thu, 24 Jul 2014 06:29:17 +0000
Subject: [issue22055] Incomplete sentence in asyncio BaseEventLoop doc
Message-ID: <1406183357.8.0.942140002589.issue22055@psf.upfronthosting.co.za>


Changes by Saimadhav Heblikar :


----------
assignee: docs at python
components: Documentation, asyncio
files: asyncio-eventloop-doc-incomplete-sent.diff
keywords: patch
nosy: docs at python, gvanrossum, haypo, sahutd, yselivanov
priority: normal
severity: normal
status: open
title: Incomplete sentence in asyncio BaseEventLoop doc
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36060/asyncio-eventloop-doc-incomplete-sent.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 09:04:37 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 24 Jul 2014 07:04:37 +0000
Subject: [issue21580] PhotoImage(data=...) apparently has to be UTF-8 or
 Base-64 encoded
In-Reply-To: <1401083544.46.0.470654104454.issue21580@psf.upfronthosting.co.za>
Message-ID: <1406185477.19.0.181152718123.issue21580@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

I will try test the problem and fix on Windows within a day.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 09:19:35 2014
From: report at bugs.python.org (Mark Dickinson)
Date: Thu, 24 Jul 2014 07:19:35 +0000
Subject: [issue22052] Comparison operators called in reverse order for
 subclasses with no override.
In-Reply-To: <1406149410.09.0.756154064568.issue22052@psf.upfronthosting.co.za>
Message-ID: <1406186375.86.0.694825382533.issue22052@psf.upfronthosting.co.za>


Mark Dickinson added the comment:

> "the subclass provides" doesn't actually imply anything about overriding, I think.

Yes, that was the thrust of one of the SO answers.  Unfortunately, that explanation doesn't work for arithmetic operators, though: there an explicit override is necessary.  Here's another example, partly to get away from the extra complication of __eq__ being its own inverse.  After:

    class A(object):
        def __lt__(self, other): return True
        def __gt__(self, other): return False
        def __add__(self, other): return 1729
        def __radd__(self, other): return 42

    class B(A): pass

we get:

    >>> A() + B()
    1729
    >>> A() < B()
    False

So the addition is calling the usual __add__ method first (the special exception in the docs doesn't apply: while B *is* a subclass of A, it doesn't *override* A's __radd__ method).  But the comparison is (surprisingly) calling the __gt__ method first.

So we've got two different rules being followed: one for arithmetic operators, and a different one for comparisons.

This isn't a big deal behaviour-wise: I'm certainly not advocating a behaviour change here.  But it would be nice to document it.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 09:30:12 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Thu, 24 Jul 2014 07:30:12 +0000
Subject: [issue16733] Solaris ctypes_test failures
In-Reply-To: <1355959487.2.0.457059136813.issue16733@psf.upfronthosting.co.za>
Message-ID: <1406187012.22.0.541017791797.issue16733@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Only one Solaris box was online when I looked and that had passed ctypes tests, but surely this will have been sorted out by now?

----------
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 10:01:38 2014
From: report at bugs.python.org (Dirkjan Ochtman)
Date: Thu, 24 Jul 2014 08:01:38 +0000
Subject: [issue21591] "exec(a, b, c)" not the same as "exec a in b,
 c" in nested functions
In-Reply-To: <1401266879.61.0.867969486588.issue21591@psf.upfronthosting.co.za>
Message-ID: <1406188898.02.0.838265143529.issue21591@psf.upfronthosting.co.za>


Dirkjan Ochtman added the comment:

I came up with a patch that shifts the compatibility hack we have for the tuple form of exec from run-time (in exec_statement()) to the CST-to-AST transformation (in ast_for_exec_stmt()). It seems to pass the tests (including the ones Robert pasted in here). Please review.

----------
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file36061/bug21591.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 10:01:44 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 08:01:44 +0000
Subject: [issue18643] add a fallback socketpair() implementation in
 test.support
In-Reply-To: <1375531895.31.0.501848123953.issue18643@psf.upfronthosting.co.za>
Message-ID: <1406188904.63.0.145192666807.issue18643@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> I don't remember why I added a specific check on the proto parameter.

I tested on Windows: socket.socket(proto=1) raises an OSError(WSAEPROTONOSUPPORT):

"""
WSAEPROTONOSUPPORT 10043: Protocol not supported.

The requested protocol has not been configured into the system, or no implementation for it exists. For example, a socket call requests a SOCK_DGRAM socket, but specifies a stream protocol.
"""

Since the error comes directly at socket.socket(), we drop drop the explicit test in socketpair().

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 10:02:48 2014
From: report at bugs.python.org (Dirkjan Ochtman)
Date: Thu, 24 Jul 2014 08:02:48 +0000
Subject: [issue21591] "exec(a, b, c)" not the same as "exec a in b,
 c" in nested functions
In-Reply-To: <1401266879.61.0.867969486588.issue21591@psf.upfronthosting.co.za>
Message-ID: <1406188968.28.0.473827894738.issue21591@psf.upfronthosting.co.za>


Dirkjan Ochtman added the comment:

Oh, one specific question: I'm not sure if I should free the "old" expr1 (the top-level exec value) before overwriting it with the new one.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 10:11:52 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Thu, 24 Jul 2014 08:11:52 +0000
Subject: [issue18643] add a fallback socketpair() implementation in
 test.support
In-Reply-To: 
Message-ID: 


Charles-Fran?ois Natali added the comment:

> By the way, we should reuse socket.socketpair() in
> asyncio.windows_utils. The Tulip is written for Python 3.3 and shares
> exactly the same code base, so you should write
>
> Something like:
>
> if hasattr(socket, 'socketpair'):
>     socketpair = socket.socketpair
> else:
>   def socketpair(...): ...
>
> Please also fix socketpair() in asyncio to add the while/drop unknown
> connection (well, the function in socket.py and windows_utils.py must
> be the same).

That's a separate issue.

> Oh, and you forgot to modify the documentation to update
> "Availability". Please add a ".. versionchanged:: 3.5" mentionning
> that the function is now also available on Windows.

Did you look at the patch?

363 .. versionchanged:: 3.5
364 Windows support added

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 10:28:48 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Thu, 24 Jul 2014 08:28:48 +0000
Subject: [issue19875] test_getsockaddrarg occasional failure
In-Reply-To: <1386065859.81.0.4295023541.issue19875@psf.upfronthosting.co.za>
Message-ID: <1406190528.38.0.256466240181.issue19875@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Clearly the long term solution is to fix the problems in the cpython code referenced in msg205227, but in the short term is it worth attempting a work around as suggested in msg205131 ?

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 10:38:04 2014
From: report at bugs.python.org (Andrew Svetlov)
Date: Thu, 24 Jul 2014 08:38:04 +0000
Subject: [issue22055] Incomplete sentence in asyncio BaseEventLoop doc
Message-ID: <1406191084.4.0.954616040636.issue22055@psf.upfronthosting.co.za>


New submission from Andrew Svetlov:

Fixed in f578e1d717b7 and f578e1d717b7.
Thanks.

----------
nosy: +asvetlov
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 10:49:10 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 08:49:10 +0000
Subject: [issue18643] add a fallback socketpair() implementation in
 test.support
In-Reply-To: 
Message-ID: 


STINNER Victor added the comment:

2014-07-24 10:11 GMT+02:00 Charles-Fran?ois Natali :
>> Please also fix socketpair() in asyncio to add the while/drop unknown
>> connection (well, the function in socket.py and windows_utils.py must
>> be the same).
>
> That's a separate issue.

Ok.

>> Oh, and you forgot to modify the documentation to update
>> "Availability". Please add a ".. versionchanged:: 3.5" mentionning
>> that the function is now also available on Windows.
>
> Did you look at the patch?
>
> 363 .. versionchanged:: 3.5
> 364 Windows support added

Ok, I missed this part.

In this case, socketpair-4.diff looks good to me. You can commit your
patch in Python 3.5.

I will open another issue to synchronize asyncio, maybe fix accept()
to check the address and drop the "if proto != 0:" test.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 11:34:38 2014
From: report at bugs.python.org (Roundup Robot)
Date: Thu, 24 Jul 2014 09:34:38 +0000
Subject: [issue20055] On Windows NT 6 with administrator account,
 there are two failing tests on test_shutil.py
In-Reply-To: <1387810124.3.0.485695266122.issue20055@psf.upfronthosting.co.za>
Message-ID: <3hJpKT2JWGz7LjQ@mail.python.org>


Roundup Robot added the comment:

New changeset 84f26a437893 by Victor Stinner in branch '3.4':
Issue #20055: Fix BaseEventLoop.stop() docstring, incomplete sentence.
http://hg.python.org/cpython/rev/84f26a437893

New changeset f657b64c67ab by Victor Stinner in branch 'default':
(Merge 3.4) Issue #20055: Fix BaseEventLoop.stop() docstring, incomplete
http://hg.python.org/cpython/rev/f657b64c67ab

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 12:00:16 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 10:00:16 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406196016.97.0.719987691976.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> I don't understand this. If you're ok with calling fileno() under Linux, why not under Windows?

I propose to add set_wakeup_socket() for all platforms. This function doesn't really call the fileno() method, it gets the socket file descriptor/socket handle from the C structure.

I explained why I prefer to use an object rather than a number for set_wakeup_socket(). For example, it makes a clear separation between set_wakeup_fd(int) and set_wakeup_socket(socket).

Would you prefer to use the file descriptor/socket handler for set_wakeup_socket()?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 12:25:02 2014
From: report at bugs.python.org (Roundup Robot)
Date: Thu, 24 Jul 2014 10:25:02 +0000
Subject: [issue19884] Importing readline produces erroneous output
In-Reply-To: <1386158776.45.0.265770743985.issue19884@psf.upfronthosting.co.za>
Message-ID: <3hJqRf16nVz7Ljd@mail.python.org>


Roundup Robot added the comment:

New changeset 0177d8a4e82a by Victor Stinner in branch '2.7':
Issue #19884: readline: Disable the meta modifier key if stdout is not a
http://hg.python.org/cpython/rev/0177d8a4e82a

New changeset 6303266beb80 by Victor Stinner in branch '3.4':
Issue #19884: readline: Disable the meta modifier key if stdout is not a
http://hg.python.org/cpython/rev/6303266beb80

New changeset f85a968f9e01 by Victor Stinner in branch 'default':
(Merge 3.4) Issue #19884: readline: Disable the meta modifier key if stdout is
http://hg.python.org/cpython/rev/f85a968f9e01

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 12:25:35 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 10:25:35 +0000
Subject: [issue19884] Importing readline produces erroneous output
In-Reply-To: <1386158776.45.0.265770743985.issue19884@psf.upfronthosting.co.za>
Message-ID: <1406197535.71.0.391955557142.issue19884@psf.upfronthosting.co.za>


STINNER Victor added the comment:

I commited my patch.

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 12:44:38 2014
From: report at bugs.python.org (Roundup Robot)
Date: Thu, 24 Jul 2014 10:44:38 +0000
Subject: [issue21813] Enhance doc of os.stat_result
In-Reply-To: <1403255902.92.0.811638089523.issue21813@psf.upfronthosting.co.za>
Message-ID: <3hJqtF6C4Jz7Ljd@mail.python.org>


Roundup Robot added the comment:

New changeset 833325d45113 by Victor Stinner in branch '3.4':
Issue #21813: Enhance documentation of the os.stat_result class.
http://hg.python.org/cpython/rev/833325d45113

New changeset 5d70ac83d104 by Victor Stinner in branch 'default':
Issue #21813: Enhance documentation of the os.stat_result class.
http://hg.python.org/cpython/rev/5d70ac83d104

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 12:45:33 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 10:45:33 +0000
Subject: [issue21813] Enhance doc of os.stat_result
In-Reply-To: <1403255902.92.0.811638089523.issue21813@psf.upfronthosting.co.za>
Message-ID: <1406198733.0.0.134838553707.issue21813@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Thanks Zachary Ware for your review. I'm not sure that I addressed all your comments, but I'm not interested to spend too much time on the documentation. Please open an issue if your saw other things that can be improved.

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 13:28:33 2014
From: report at bugs.python.org (akira)
Date: Thu, 24 Jul 2014 11:28:33 +0000
Subject: [issue1191964] add non-blocking read and write methods to
 subprocess.Popen
In-Reply-To: <1406159493.72.0.265844627577.issue1191964@psf.upfronthosting.co.za>
 (STINNER Victor's message of "Wed, 23 Jul 2014 23:51:34 +0000")
Message-ID: <877g33m1wi.fsf@gmail.com>


akira added the comment:

STINNER Victor  writes:
>
>> I have implemented and would continue to lean towards continuing to
> hide BrokenPipeError on the additional API endpoints.
>
> FYI asyncio.Process.communicate() ignores BrokenPipeError and
> ConnectionResetError, whereas asyncio.Process.stdin.drain() (coroutine
> to wait until all bytes are written) raises a BrokenPipeError or
> ConnectionResetError if the child process exited. I think subprocess
> has the same design.

Do Popen.write_nonblocking() and Popen.read_nonblocking() methods
belong to the second category? Should they raise BrokenPipeError?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 13:45:05 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 11:45:05 +0000
Subject: [issue1191964] add non-blocking read and write methods to
 subprocess.Popen
In-Reply-To: <877g33m1wi.fsf@gmail.com>
Message-ID: 


STINNER Victor added the comment:

> Do Popen.write_nonblocking() and Popen.read_nonblocking() methods
> belong to the second category? Should they raise BrokenPipeError?

IMO when you write directly to stdin and read from stdout/stderr of a
child process, your code should be written to handle BrokenPipeError.
You must decide how to handle them. Otherwise, you have to poll
manually the child process using proc.poll() which is less efficient.

If you forget to poll the process, your program may enter an unlimited
loop which only occur in some cases (bug in the child process which
exits before reading the whole stdin input).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 13:45:35 2014
From: report at bugs.python.org (Yukihiro Nakadaira)
Date: Thu, 24 Jul 2014 11:45:35 +0000
Subject: [issue13533] Would like Py_Initialize to play friendly with host app
In-Reply-To: <1323099394.97.0.36914155274.issue13533@psf.upfronthosting.co.za>
Message-ID: <1406202335.41.0.158180741937.issue13533@psf.upfronthosting.co.za>


Yukihiro Nakadaira added the comment:

This problem easily happen when there is no python installation and there is standalone python application compiled with py2exe or cx_Freeze (e.g. Mercurial).  Such application have pythonXX.dll in its directory.  But its python library can not be loaded normally.  So an application, which loads pythonXX.dll to check if python is available and uses it if possible, is terminated when loading python.

Vim uses python as embedding scripting language.  Vim loads pythonXX.dll when :python command is used.  And this problem is reported occasionally.

----------
nosy: +ynkdir

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 15:00:29 2014
From: report at bugs.python.org (David Edelsohn)
Date: Thu, 24 Jul 2014 13:00:29 +0000
Subject: [issue5718] Problem compiling ffi part of build on AIX 5.3.
In-Reply-To: <1239117342.9.0.186105014374.issue5718@psf.upfronthosting.co.za>
Message-ID: <1406206829.46.0.244353826797.issue5718@psf.upfronthosting.co.za>


David Edelsohn added the comment:

ffi_closure_helper_DARWIN should have been declared "extern" in the assembly file. This has been fixed in more recent versions of libffi and imported into more recent versions of CPython, including 2.7.

.extern .ffi_closure_helper_DARWIN

Is it worth updating libffi.diff to insert the appropriate fix in 2.6 or not?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 15:06:09 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Thu, 24 Jul 2014 13:06:09 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1406196016.97.0.719987691976.issue22018@psf.upfronthosting.co.za>
Message-ID: <53D104BE.3030706@free.fr>


Antoine Pitrou added the comment:

Le 24/07/2014 06:00, STINNER Victor a ?crit :
>
> STINNER Victor added the comment:
>
>> I don't understand this. If you're ok with calling fileno() under Linux, why not under Windows?
>
> I propose to add set_wakeup_socket() for all platforms.

That's not what I'm answering to, though. See option B above.

Again, what's wrong with passing the socket as a fileno?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 15:06:47 2014
From: report at bugs.python.org (Stefan Krah)
Date: Thu, 24 Jul 2014 13:06:47 +0000
Subject: [issue5718] Problem compiling ffi part of build on AIX 5.3.
In-Reply-To: <1239117342.9.0.186105014374.issue5718@psf.upfronthosting.co.za>
Message-ID: <1406207207.37.0.523921656024.issue5718@psf.upfronthosting.co.za>


Stefan Krah added the comment:

Thanks, David. If this is fixed in 2.7 we can close the issue.

----------
nosy: +skrah
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 15:20:09 2014
From: report at bugs.python.org (akira)
Date: Thu, 24 Jul 2014 13:20:09 +0000
Subject: [issue9770] curses.ascii.isblank() function is broken. It confuses
 backspace (BS 0x08) with tab (0x09)
In-Reply-To: <1283558509.74.0.494754089018.issue9770@psf.upfronthosting.co.za>
Message-ID: <1406208009.15.0.497289744727.issue9770@psf.upfronthosting.co.za>


akira added the comment:

I've made the title more explicit: "curses.isblank function doesn't match
ctype.h" -> "curses.ascii.isblank() function is broken. It confuses
backspace (BS 0x08) with tab (0x09)"

If a core developer could review the open questions from the 
previous message msg221008 then I could prepare a proper patch for the 
issue.

----------
title: curses.isblank function doesn't match ctype.h -> curses.ascii.isblank() function is broken. It confuses backspace (BS 0x08) with tab (0x09)

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 15:46:46 2014
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 24 Jul 2014 13:46:46 +0000
Subject: [issue21813] Enhance doc of os.stat_result
In-Reply-To: <1403255902.92.0.811638089523.issue21813@psf.upfronthosting.co.za>
Message-ID: <1406209606.2.0.651887007948.issue21813@psf.upfronthosting.co.za>


Zachary Ware added the comment:

The only comments you didn't address you were right not to (sorry for the noise about path_fd, I completely missed that it was just a link reference); what you committed looks fine to me.

Thanks for your work on this, it looks like a big improvement to me!

----------
versions: +Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 15:53:15 2014
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 24 Jul 2014 13:53:15 +0000
Subject: [issue20055] On Windows NT 6 with administrator account,
 there are two failing tests on test_shutil.py
In-Reply-To: <1387810124.3.0.485695266122.issue20055@psf.upfronthosting.co.za>
Message-ID: <1406209995.98.0.575117882883.issue20055@psf.upfronthosting.co.za>


Changes by Zachary Ware :


----------
Removed message: http://bugs.python.org/msg223821

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 15:53:37 2014
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 24 Jul 2014 13:53:37 +0000
Subject: [issue22055] Incomplete sentence in asyncio BaseEventLoop doc
In-Reply-To: <1406191084.4.0.954616040636.issue22055@psf.upfronthosting.co.za>
Message-ID: <1406210017.58.0.871585162528.issue22055@psf.upfronthosting.co.za>


Zachary Ware added the comment:

Misposted to #20055:

New changeset 84f26a437893 by Victor Stinner in branch '3.4':
Issue #20055: Fix BaseEventLoop.stop() docstring, incomplete sentence.
http://hg.python.org/cpython/rev/84f26a437893

New changeset f657b64c67ab by Victor Stinner in branch 'default':
(Merge 3.4) Issue #20055: Fix BaseEventLoop.stop() docstring, incomplete
http://hg.python.org/cpython/rev/f657b64c67ab

----------
nosy: +zach.ware

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 15:59:49 2014
From: report at bugs.python.org (Alon Mishne)
Date: Thu, 24 Jul 2014 13:59:49 +0000
Subject: [issue22057] The doc say all globals are copied on eval(),
 but only __builtins__ is copied
Message-ID: <1406210389.95.0.0796853252426.issue22057@psf.upfronthosting.co.za>


New submission from Alon Mishne:

According to the documentation of eval():

> If the globals dictionary is present and lacks '__builtins__', the current globals are copied into globals before expression is parsed.

However in practice only the __builtins__ items are copied, see:

http://hg.python.org/cpython/file/2.7/Python/bltinmodule.c#l655

See http://stackoverflow.com/q/24934908/242762

----------
assignee: docs at python
components: Documentation
messages: 223837
nosy: amishne, docs at python
priority: normal
severity: normal
status: open
title: The doc say all globals are copied on eval(), but only __builtins__ is copied
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  Thu Jul 24 16:08:43 2014
From: report at bugs.python.org (R. David Murray)
Date: Thu, 24 Jul 2014 14:08:43 +0000
Subject: [issue22052] Comparison operators called in reverse order for
 subclasses with no override.
In-Reply-To: <1406149410.09.0.756154064568.issue22052@psf.upfronthosting.co.za>
Message-ID: <1406210923.66.0.959969059458.issue22052@psf.upfronthosting.co.za>


R. David Murray added the comment:

Ah yes.  I remember there being a discussion somewhere about the differences between comparison operator inverses and the arithmetic 'r' methods, but I can't find it at the moment.  I *thought* there was a full discussion of the logic involved in these cases, but I can't find that either.  We need one somewhere that we can crosslink to if it doesn't already exist.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 16:20:02 2014
From: report at bugs.python.org (Wolfgang Maier)
Date: Thu, 24 Jul 2014 14:20:02 +0000
Subject: [issue9882] abspath from directory
In-Reply-To: <1284682917.39.0.650396347526.issue9882@psf.upfronthosting.co.za>
Message-ID: <1406211602.89.0.610128922118.issue9882@psf.upfronthosting.co.za>


Changes by Wolfgang Maier :


----------
nosy: +wolma

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 16:41:24 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 24 Jul 2014 14:41:24 +0000
Subject: [issue1730136] tkFont.__eq__ gives type error
Message-ID: <1406212884.6.0.5500908379.issue1730136@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

The patch was not committed to 2.7 and now this bug causes an error on buildbot.

http://buildbot.python.org/all/builders/AMD64%20Debian%20root%202.7/builds/303/steps/test/logs/stdio

======================================================================
ERROR: test_finalizer (test.test_gc.GCTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/buildarea/2.7.angelico-debian-amd64/build/Lib/test/test_gc.py", line 149, in test_finalizer
    gc.garbage.remove(obj)
  File "/root/buildarea/2.7.angelico-debian-amd64/build/Lib/lib-tk/tkFont.py", line 100, in __eq__
    return self.name == other.name and isinstance(other, Font)
AttributeError: A instance has no attribute 'name'

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 16:41:32 2014
From: report at bugs.python.org (Facundo Batista)
Date: Thu, 24 Jul 2014 14:41:32 +0000
Subject: [issue22058] datetime.datetime() should accept a datetime.date as
 constructor
Message-ID: <1406212892.92.0.452471397422.issue22058@psf.upfronthosting.co.za>


New submission from Facundo Batista:

Currently (tested on py3.4):

>>> from datetime import datetime, date
>>> d = datetime.now()
>>> date(d)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: an integer is required (got type datetime.datetime)

IMO, it's like doing int(float), a truncation of some info. For example, this is what I want to happen:

>>> d
datetime.datetime(2014, 7, 24, 11, 38, 44, 966613)
>>> date(d)
datetime.date(2014, 7, 24)

----------
messages: 223840
nosy: facundobatista
priority: normal
severity: normal
status: open
title: datetime.datetime() should accept a datetime.date as constructor
versions: Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 16:42:06 2014
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 24 Jul 2014 14:42:06 +0000
Subject: [issue14534] Add method to mark unittest.TestCases as "do not run".
In-Reply-To: <1333977053.0.0.776415854805.issue14534@psf.upfronthosting.co.za>
Message-ID: <1406212926.3.0.332964234298.issue14534@psf.upfronthosting.co.za>


Zachary Ware added the comment:

Victor: Sorry for the delay in getting back to this.  I'm attaching your full patch again; the diff you posted is a diff against your first patch, while what we need to be able to review it properly is a diff against the tip of the 'default' branch.  You may be able to make such a diff by pulling from http://hg.python.org/cpython and then doing "hg diff -r default Lib/unittest", but that may still not come up with the right changes.  I would suggest stripping your repository of any changesets on default branch that are not present on http://hg.python.org/cpython#default, and recommitting your changes on your own 'issue14534' branch, then you can make a proper patch just by doing "hg diff -r default" (assuming your branch is up to date with default).

----------
Added file: http://bugs.python.org/file36062/issue14534.v2.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 16:46:50 2014
From: report at bugs.python.org (Hoxily)
Date: Thu, 24 Jul 2014 14:46:50 +0000
Subject: [issue22059] incorrect type conversion from str to bytes in asynchat
 module in asynchat.py
Message-ID: <1406213210.3.0.145864066025.issue22059@psf.upfronthosting.co.za>


New submission from Hoxily:

refer to  http://hg.python.org/cpython/file/5d70ac83d104/Lib/asynchat.py#l123

----------
components: Library (Lib)
hgrepos: 265
messages: 223842
nosy: brett.cannon, hoxily, tim.peters
priority: normal
severity: normal
status: open
title: incorrect type conversion from str to bytes in asynchat module in asynchat.py
type: behavior
versions: Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 16:47:04 2014
From: report at bugs.python.org (wjssz)
Date: Thu, 24 Jul 2014 14:47:04 +0000
Subject: [issue21084] IDLE can't deal with characters above the range
 (U+0000-U+FFFF)
In-Reply-To: <1396008065.84.0.00802001667749.issue21084@psf.upfronthosting.co.za>
Message-ID: <1406213224.04.0.0245353886801.issue21084@psf.upfronthosting.co.za>


wjssz added the comment:

I wrote this code, but I don't know how to make a patch.

Insert these codes in C:\Python34\Lib\idlelib\IOBinding.py
Around line 234, before this line:
self.text.delete("1.0", "end")


        # check non-bmp characters
        line_count = 1
        position_count = 1
        for char in chars:
            if char == '\n':
                line_count += 1
                position_count = 1
            if ord(char) > 0xFFFF:
                nonbmp_msg = ("IDLE can't display non-BMP characters "
                              "(codepoint above 0xFFFF).\n"
                              "A non-BMP character found at line %d, "
                              "position %d of file %s, codepoint 0x%X.\n"
                              "Please open this file with another editor.")
                tkMessageBox.showerror("non-BMP character",
                                        nonbmp_msg %
                                       (line_count, position_count,
                                        filename, ord(char)),
                                       parent=self.text)
                return False
            position_count += 1

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 16:48:33 2014
From: report at bugs.python.org (Roundup Robot)
Date: Thu, 24 Jul 2014 14:48:33 +0000
Subject: [issue1730136] tkFont.__eq__ gives type error
Message-ID: <3hJxHh2r9jz7LjV@mail.python.org>


Roundup Robot added the comment:

New changeset 841cdb6145e9 by Serhiy Storchaka in branch '2.7':
Issue #1730136: Fix comparison between a tk Font object and an object of a
http://hg.python.org/cpython/rev/841cdb6145e9

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 16:52:11 2014
From: report at bugs.python.org (Hoxily)
Date: Thu, 24 Jul 2014 14:52:11 +0000
Subject: [issue22059] incorrect type conversion from str to bytes in asynchat
 module in asynchat.py
In-Reply-To: <1406213210.3.0.145864066025.issue22059@psf.upfronthosting.co.za>
Message-ID: <1406213531.51.0.403368899385.issue22059@psf.upfronthosting.co.za>


Changes by Hoxily :


----------
hgrepos:  -265

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 16:56:33 2014
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 24 Jul 2014 14:56:33 +0000
Subject: [issue21623] build ssl failed use vs2010 express
In-Reply-To: <1401595425.37.0.323501689421.issue21623@psf.upfronthosting.co.za>
Message-ID: <1406213793.96.0.631349399671.issue21623@psf.upfronthosting.co.za>


Zachary Ware added the comment:

Mo Jia: are you still having issues with this?

----------
resolution:  -> works for me
status: open -> pending

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 16:56:43 2014
From: report at bugs.python.org (wjssz)
Date: Thu, 24 Jul 2014 14:56:43 +0000
Subject: [issue21084] IDLE can't deal with characters above the range
 (U+0000-U+FFFF)
In-Reply-To: <1396008065.84.0.00802001667749.issue21084@psf.upfronthosting.co.za>
Message-ID: <1406213803.55.0.464186375488.issue21084@psf.upfronthosting.co.za>


wjssz added the comment:

Changing the second "if" to "elif" is better.

I'm sorry, I have never submitted patch.
If somebody gives a hand, feel free to modify those codes.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 17:02:51 2014
From: report at bugs.python.org (Facundo Batista)
Date: Thu, 24 Jul 2014 15:02:51 +0000
Subject: [issue22058] datetime.datetime() should accept a datetime.date as
 init parameter
In-Reply-To: <1406212892.92.0.452471397422.issue22058@psf.upfronthosting.co.za>
Message-ID: <1406214171.28.0.355187134604.issue22058@psf.upfronthosting.co.za>


Changes by Facundo Batista :


----------
title: datetime.datetime() should accept a datetime.date as constructor -> datetime.datetime() should accept a datetime.date as init parameter

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 17:11:48 2014
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 24 Jul 2014 15:11:48 +0000
Subject: [issue19980] Improve help('non-topic') response
In-Reply-To: <1386984892.27.0.919528696836.issue19980@psf.upfronthosting.co.za>
Message-ID: <1406214708.23.0.816696943222.issue19980@psf.upfronthosting.co.za>


Zachary Ware added the comment:

Mark, would you like to update your patch to address my review comments?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 17:20:48 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 24 Jul 2014 15:20:48 +0000
Subject: [issue9882] abspath from directory
In-Reply-To: <1284682917.39.0.650396347526.issue9882@psf.upfronthosting.co.za>
Message-ID: <1406215248.51.0.816410875739.issue9882@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
status: open -> pending

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 17:26:46 2014
From: report at bugs.python.org (Ezio Melotti)
Date: Thu, 24 Jul 2014 15:26:46 +0000
Subject: [issue21084] IDLE can't deal with characters above the range
 (U+0000-U+FFFF)
In-Reply-To: <1396008065.84.0.00802001667749.issue21084@psf.upfronthosting.co.za>
Message-ID: <1406215606.14.0.835049770637.issue21084@psf.upfronthosting.co.za>


Ezio Melotti added the comment:

See https://docs.python.org/devguide/patch.html

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 17:33:15 2014
From: report at bugs.python.org (R. David Murray)
Date: Thu, 24 Jul 2014 15:33:15 +0000
Subject: [issue22058] datetime.datetime() should accept a datetime.date as
 init parameter
In-Reply-To: <1406212892.92.0.452471397422.issue22058@psf.upfronthosting.co.za>
Message-ID: <1406215995.71.0.318040011294.issue22058@psf.upfronthosting.co.za>


R. David Murray added the comment:

There is already a spelling for that operation, and it is d.date().  I'm not sure that there is a strong enough argument for adding a second way to spell it, but I won't close this yet to see what other people think.  

Personally I don't think it has ever occurred to me to do date(datetime) (although I have wanted to pass a string to the constructor), and I've wanted the operation and found the 'date()' method more than once.

----------
nosy: +belopolsky, r.david.murray

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 17:35:40 2014
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 24 Jul 2014 15:35:40 +0000
Subject: [issue8110] subprocess.py doesn't correctly detect Windows machines
In-Reply-To: <1268236633.45.0.419738445411.issue8110@psf.upfronthosting.co.za>
Message-ID: <1406216140.23.0.549354651195.issue8110@psf.upfronthosting.co.za>


Zachary Ware added the comment:

How about this?  Should apply equally to 3.4 and default, 2.7 is different but can use the same concept (with s/_winapi/_subprocess/ among other changes).

----------
nosy: +zach.ware
stage: test needed -> patch review
versions: +Python 3.4, Python 3.5 -Python 2.6, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file36063/issue8110.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 17:39:20 2014
From: report at bugs.python.org (R. David Murray)
Date: Thu, 24 Jul 2014 15:39:20 +0000
Subject: [issue22059] incorrect type conversion from str to bytes in asynchat
 module in asynchat.py
In-Reply-To: <1406213210.3.0.145864066025.issue22059@psf.upfronthosting.co.za>
Message-ID: <1406216360.75.0.59561188315.issue22059@psf.upfronthosting.co.za>


R. David Murray added the comment:

So you are saying that that if will never trigger and can be deleted?

----------
nosy: +r.david.murray

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 17:51:26 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 15:51:26 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406217086.61.0.209948286054.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> That's not what I'm answering to, though. See option B above.
> Again, what's wrong with passing the socket as a fileno?

There is nothing "wrong", it's just that I prefer option (C) over the option (B).

Quick poll in the Python stdlib for functions accepting sockets on Windows.

Expect a socket object:

- asyncore.dispatcher.set_socket()
- ssl.wrap_socket(), ssl.SSLSocket()

Expect a (socket) handle:

- os.set_handle_inheritable(), function accepting any kind of handle, not only socket handles

Accept a file descriptor or an object with a fileno() method:

- select.select(), select.poll()

Hum, I'm not convinced by the poll :-/ There are too few functions to use it to take a decision.


On UNIX, sockets are just file descriptors, like any other file descriptor. So all functions accepting file descriptors accept sockets.

--

Note: select.select() uses "int PyObject_AsFileDescriptor(PyObject *o)" to get the socket handle of a socket, I would expect the SOCKET_T type here. Does it mean that socket handle fits in a C int? Yes according to this article:

http://stackoverflow.com/questions/1953639/is-it-safe-to-cast-socket-to-int-under-win64

"Even though sizeof(SOCKET) is 8, it's safe to cast it to int, because the value constitutes an index in per-process table of limited size and not a real pointer."

"The per-process limit on kernel handles is 2^24."

I wrote a stress test creating and closing sockets in a loop. I ran the test on Windows 7 64 bit with 1 GB of memory. The maximum seen socket handle is 1,330,836 after creating 5,613,807 sockets (with a list of 331,343 open socekts), it's much smaller than 2^32.

OpenSSL stores socket handles in C int.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 17:52:22 2014
From: report at bugs.python.org (Alexander Belopolsky)
Date: Thu, 24 Jul 2014 15:52:22 +0000
Subject: [issue22058] datetime.datetime() should accept a datetime.date as
 init parameter
In-Reply-To: <1406212892.92.0.452471397422.issue22058@psf.upfronthosting.co.za>
Message-ID: <1406217142.86.0.352186401624.issue22058@psf.upfronthosting.co.za>


Alexander Belopolsky added the comment:

+1

There is currently no obvious way to convert either date or datetime instance to date.

The best solution I can think of is date(*x.timetuple()[:3]):

>>> d = date.today()
>>> t = datetime.now()
>>> date(*d.timetuple()[:3])
datetime.date(2014, 7, 24)
>>> date(*t.timetuple()[:3])
datetime.date(2014, 7, 24)

Certainly date(x) wins hands down over this atrocity.

----------
stage:  -> needs patch
type:  -> enhancement

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 18:17:46 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Thu, 24 Jul 2014 16:17:46 +0000
Subject: [issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't
 batch function arguments by chunks
In-Reply-To: <1298300689.71.0.822605356721.issue11271@psf.upfronthosting.co.za>
Message-ID: <1406218666.77.0.254789346834.issue11271@psf.upfronthosting.co.za>


Changes by Dan O'Reilly :


Removed file: http://bugs.python.org/file36059/map_chunksize.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 18:18:29 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Thu, 24 Jul 2014 16:18:29 +0000
Subject: [issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't
 batch function arguments by chunks
In-Reply-To: <1298300689.71.0.822605356721.issue11271@psf.upfronthosting.co.za>
Message-ID: <1406218709.48.0.914805168403.issue11271@psf.upfronthosting.co.za>


Changes by Dan O'Reilly :


Added file: http://bugs.python.org/file36064/map_chunksize.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 18:19:25 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Thu, 24 Jul 2014 16:19:25 +0000
Subject: [issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't
 batch function arguments by chunks
In-Reply-To: <1298300689.71.0.822605356721.issue11271@psf.upfronthosting.co.za>
Message-ID: <1406218765.82.0.3117166705.issue11271@psf.upfronthosting.co.za>


Changes by Dan O'Reilly :


Removed file: http://bugs.python.org/file36058/test_mult.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 18:20:26 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Thu, 24 Jul 2014 16:20:26 +0000
Subject: [issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't
 batch function arguments by chunks
In-Reply-To: <1298300689.71.0.822605356721.issue11271@psf.upfronthosting.co.za>
Message-ID: <1406218826.75.0.601467243874.issue11271@psf.upfronthosting.co.za>


Changes by Dan O'Reilly :


Added file: http://bugs.python.org/file36065/test_mult.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 18:21:00 2014
From: report at bugs.python.org (Demian Brecht)
Date: Thu, 24 Jul 2014 16:21:00 +0000
Subject: [issue22041] http POST request with python 3.3 through web proxy
In-Reply-To: <1406060360.4.0.822886887897.issue22041@psf.upfronthosting.co.za>
Message-ID: <1406218860.46.0.798101250575.issue22041@psf.upfronthosting.co.za>


Demian Brecht added the comment:

I've attached a patch that solves the issue I encountered. It would be great if you could confirm whether or not it also resolves the issue as reported.

----------
keywords: +patch
Added file: http://bugs.python.org/file36066/issue22041.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 18:21:41 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Thu, 24 Jul 2014 16:21:41 +0000
Subject: [issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't
 batch function arguments by chunks
In-Reply-To: <1298300689.71.0.822605356721.issue11271@psf.upfronthosting.co.za>
Message-ID: <1406218901.28.0.17269779236.issue11271@psf.upfronthosting.co.za>


Changes by Dan O'Reilly :


Removed file: http://bugs.python.org/file36064/map_chunksize.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 18:22:17 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Thu, 24 Jul 2014 16:22:17 +0000
Subject: [issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't
 batch function arguments by chunks
In-Reply-To: <1298300689.71.0.822605356721.issue11271@psf.upfronthosting.co.za>
Message-ID: <1406218937.04.0.321019899263.issue11271@psf.upfronthosting.co.za>


Changes by Dan O'Reilly :


Added file: http://bugs.python.org/file36067/map_chunksize.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 18:24:38 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Thu, 24 Jul 2014 16:24:38 +0000
Subject: [issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't
 batch function arguments by chunks
In-Reply-To: <1298300689.71.0.822605356721.issue11271@psf.upfronthosting.co.za>
Message-ID: <1406219078.93.0.301955831714.issue11271@psf.upfronthosting.co.za>


Dan O'Reilly added the comment:

I've added new versions of the patch/demonstration that ensures we actually submit all the futures before trying to yield from the returned iterator. Previously we were just returning a generator object when map was called, without actually submitting any futures.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 18:29:51 2014
From: report at bugs.python.org (Alecz)
Date: Thu, 24 Jul 2014 16:29:51 +0000
Subject: [issue17483] Can not tell urlopen not to check the hostname for https
 connections.
In-Reply-To: <1363715731.1.0.258453337852.issue17483@psf.upfronthosting.co.za>
Message-ID: <1406219391.44.0.159580330955.issue17483@psf.upfronthosting.co.za>


Alecz added the comment:

Actually, because of issue 18543, urlopen will not use the custom opener if one was defined, instead, it will create a new opener with check_hostname = True.

So it is impossible to skip hostname checking without overriding the urlopen method.

I don't understand why can't we allow check_hostmane to be set to False in urlopen and also why we don't allow custom openers to be used by urlopen if specifying a ca*.

Moreover this forced restriction is not documented. I had to go to the source code to figure out why it wasn't working.

This issue being resolved makes it even more misleading.

----------
nosy: +Alecz
Added file: http://bugs.python.org/file36068/urlopen-explained.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 18:34:21 2014
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 24 Jul 2014 16:34:21 +0000
Subject: [issue22059] incorrect type conversion from str to bytes in asynchat
 module in asynchat.py
In-Reply-To: <1406213210.3.0.145864066025.issue22059@psf.upfronthosting.co.za>
Message-ID: <1406219661.1.0.307329255327.issue22059@psf.upfronthosting.co.za>


Zachary Ware added the comment:

Hoxily: It's best to spell out the bug you have found, preferably with an error/exception message and a way to reproduce it.

My best guess at the problem you're reporting (after looking at that line about 4 times) is that "bytes(str, self.encoding)" should be "bytes(data, self.encoding)" and you're getting an error message like "TypeError: encoding or errors without a string argument".  Is that correct?

Also, note that asynchat is deprecated, you would probably be better off using asyncio.

----------
nosy: +zach.ware
versions: +Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 18:35:06 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 16:35:06 +0000
Subject: [issue22059] incorrect type conversion from str to bytes in asynchat
 module in asynchat.py
In-Reply-To: <1406213210.3.0.145864066025.issue22059@psf.upfronthosting.co.za>
Message-ID: <1406219706.62.0.353662219228.issue22059@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 18:36:25 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 16:36:25 +0000
Subject: [issue11266] asyncore does not handle EINTR in recv, send, connect,
 accept, 
In-Reply-To: <1298266290.98.0.867769013141.issue11266@psf.upfronthosting.co.za>
Message-ID: <1406219785.84.0.769911464926.issue11266@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
resolution:  -> duplicate
status: open -> closed
superseder:  -> handle EINTR in the stdlib

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 18:47:20 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 16:47:20 +0000
Subject: [issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN /
 EWOULDBLOCK
In-Reply-To: <1349366792.42.0.417654527681.issue16133@psf.upfronthosting.co.za>
Message-ID: <1406220440.25.0.222582410438.issue16133@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
Removed message: http://bugs.python.org/msg172160

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 18:52:27 2014
From: report at bugs.python.org (R. David Murray)
Date: Thu, 24 Jul 2014 16:52:27 +0000
Subject: [issue21725] RFC 6531 (SMTPUTF8) support in smtpd
In-Reply-To: <1402504950.99.0.486766973248.issue21725@psf.upfronthosting.co.za>
Message-ID: <1406220747.66.0.541807693157.issue21725@psf.upfronthosting.co.za>


R. David Murray added the comment:

I have updated your patch, changing wording of some of the documentation, and applying style tweaks to the code.  I have also done the refactoring of the _set_xxx_state method that I suggested.  Seemed easier to show you what I meant in code rather than try to explain it.

You should use Reitveld's 'patch diff' facility to look at the changes that I made to your patch. 

Things that remain to be done:

I'm getting warnings when I run the tests.  These should be either suppressed or checked for (assertWarns).  (Or fixed, in the case of assertEquals :)

In the process_message docs it says that it should use RFC 821 format for the return, but in the new process method it says RFC 6531.  This makes sense for the new method, but is there a more recent RFC the old method should be referring to?  Or is there an open issue about more modern return codes for smtpd?  I seem to remember something, but don't have time to look now.

There is an issue with the reset of the maximum command length, but that can be dealt with in the 'duplicate HELO/EHLO' issue.

process_smtputf8_message in DebuggingServer should be receiving bytes, and so should error when it tries to split via '\n'.  Presumably this means there is a missing test as well, and also the same issue if decode_data is False when using DebuggingServer.  (Unless I"m missing something; I didn't try to test it.)

Different issue, but have you given any thought to what it would take to make PureProxy support SMTPUTF8?

----------
Added file: http://bugs.python.org/file36069/issue21725v4.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 19:00:38 2014
From: report at bugs.python.org (R. David Murray)
Date: Thu, 24 Jul 2014 17:00:38 +0000
Subject: [issue17483] Can not tell urlopen not to check the hostname for https
 connections.
In-Reply-To: <1363715731.1.0.258453337852.issue17483@psf.upfronthosting.co.za>
Message-ID: <1406221238.65.0.403018198711.issue17483@psf.upfronthosting.co.za>


R. David Murray added the comment:

This issue was about setting hostname checking to false when the cert was being checked, and we rejected making that even possible in urlopen.

If there is an issue with not being able to use a custom opener, that would be a different issue and you should open a new ticket.  Also if you think there is a documentation bug, that should be a new issue, which can refer to this one for background.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 19:00:38 2014
From: report at bugs.python.org (Roundup Robot)
Date: Thu, 24 Jul 2014 17:00:38 +0000
Subject: [issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN /
 EWOULDBLOCK
In-Reply-To: <1349366792.42.0.417654527681.issue16133@psf.upfronthosting.co.za>
Message-ID: <3hK0D54lHnz7LjM@mail.python.org>


Roundup Robot added the comment:

New changeset b7f144d14798 by Victor Stinner in branch '3.4':
Issue #16133: The asynchat.async_chat.handle_read() method now ignores
http://hg.python.org/cpython/rev/b7f144d14798

New changeset aa150c7a5d24 by Victor Stinner in branch 'default':
(Merge 3.4) Issue #16133: The asynchat.async_chat.handle_read() method now
http://hg.python.org/cpython/rev/aa150c7a5d24

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 19:15:41 2014
From: report at bugs.python.org (Roundup Robot)
Date: Thu, 24 Jul 2014 17:15:41 +0000
Subject: [issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN /
 EWOULDBLOCK
In-Reply-To: <1349366792.42.0.417654527681.issue16133@psf.upfronthosting.co.za>
Message-ID: <3hK0YT0t3Wz7LjQ@mail.python.org>


Roundup Robot added the comment:

New changeset d422062d7d36 by Victor Stinner in branch '2.7':
Issue #16133: The asynchat.async_chat.handle_read() method now ignores
http://hg.python.org/cpython/rev/d422062d7d36

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 19:17:40 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 17:17:40 +0000
Subject: [issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN /
 EWOULDBLOCK
In-Reply-To: <1349366792.42.0.417654527681.issue16133@psf.upfronthosting.co.za>
Message-ID: <1406222260.83.0.0774238171239.issue16133@psf.upfronthosting.co.za>


STINNER Victor added the comment:

I modified EWOULDBLOCK.patch to use BlockingIOError on Python 3 and I added a unit test. I also added EALREADY and EINPROGRESS which are used by the BlockingIOError in Python 3, just in case.

Thanks Xavier for your patch, sorry for the delay.

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 19:20:49 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 17:20:49 +0000
Subject: [issue15982] asyncore.dispatcher does not handle windows socket error
 code correctly (namely WSAEWOULDBLOCK 10035)
In-Reply-To: <1348139570.15.0.496741951323.issue15982@psf.upfronthosting.co.za>
Message-ID: <1406222449.1.0.641042078971.issue15982@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
resolution:  -> duplicate
status: open -> closed
superseder:  -> asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 20:01:46 2014
From: report at bugs.python.org (Tim Peters)
Date: Thu, 24 Jul 2014 18:01:46 +0000
Subject: [issue22058] datetime.datetime() should accept a datetime.date as
 init parameter
In-Reply-To: <1406212892.92.0.452471397422.issue22058@psf.upfronthosting.co.za>
Message-ID: <1406224906.59.0.243618558365.issue22058@psf.upfronthosting.co.za>


Tim Peters added the comment:

Was the title of this meant to be

"datetime.date() should accept a datetime.datetime as init parameter"

instead?  That's what the example appears to be getting at.

If so, -1.  Datetime objects already have .date(), .time(), and .timetz() methods to extract, respectively, the date, naive time, and aware time portions of the datetime object.  In the other direction, the datetime .combine() constructor builds a datetime object out of date and time components.  As the docs say,

"For any datetime object d, d == datetime.combine(d.date(), d.timetz())"

Another way to spell this isn't needed.

> There is currently no obvious way to convert either date
> or datetime instance to date.

some_datetime_object.date() is the obvious way to extract a date object from a datetime object.

I don't know what it could mean to convert a date object to a date.  That's pretty much exactly like asking how to convert an int object to an int.  Huh? ;-)  date and int objects are immutable, so a need to make a copy (if that's what is meant) rarely arises.

----------
nosy: +tim.peters

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 20:02:27 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 18:02:27 +0000
Subject: [issue19884] Importing readline produces erroneous output
In-Reply-To: <1386158776.45.0.265770743985.issue19884@psf.upfronthosting.co.za>
Message-ID: <1406224947.93.0.157779964614.issue19884@psf.upfronthosting.co.za>


STINNER Victor added the comment:

The test fails on AMD64 OpenIndiana 2.7:

http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%202.7/builds/2354/steps/test/logs/stdio

test test_readline failed -- Traceback (most recent call last):
  File "/export/home/buildbot/64bits/2.7.cea-indiana-amd64/build/Lib/test/test_readline.py", line 52, in test_init
    self.assertEqual(stdout, b'')
AssertionError: '\x1b[?1034h' != ''

----------
resolution: fixed -> 
status: closed -> open

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 20:24:19 2014
From: report at bugs.python.org (Ned Deily)
Date: Thu, 24 Jul 2014 18:24:19 +0000
Subject: [issue19884] Importing readline produces erroneous output
In-Reply-To: <1386158776.45.0.265770743985.issue19884@psf.upfronthosting.co.za>
Message-ID: <1406226259.46.0.560153640606.issue19884@psf.upfronthosting.co.za>


Ned Deily added the comment:

The changes are also causing segfaults when readline is linked with BSD libedit (the default on OS X) rather than GNU readline:

======================================================================
FAIL: test_init (test.test_readline.TestReadline)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/py/dev/3x/source/Lib/test/test_readline.py", line 52, in test_init
    TERM='xterm-256color')
  File "/py/dev/3x/source/Lib/test/script_helper.py", line 69, in assert_python_ok
    return _assert_python(True, *args, **env_vars)
  File "/py/dev/3x/source/Lib/test/script_helper.py", line 55, in _assert_python
    "stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore')))
AssertionError: Process return code is -11, stderr follows:
Fatal Python error: Segmentation fault

Current thread 0x00007fff75489310 (most recent call first):
  File "", line 321 in _call_with_frames_removed
  File "", line 1664 in load_module
  File "", line 540 in _check_name_wrapper
  File "", line 1110 in _load_backward_compatible
  File "", line 1140 in _load_unlocked
  File "", line 2175 in _find_and_load_unlocked
  File "", line 2186 in _find_and_load
  File "", line 1 in 

----------
nosy: +ned.deily

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 20:29:29 2014
From: report at bugs.python.org (Alexander Belopolsky)
Date: Thu, 24 Jul 2014 18:29:29 +0000
Subject: [issue22058] datetime.datetime() should accept a datetime.date as
 init parameter
In-Reply-To: <1406212892.92.0.452471397422.issue22058@psf.upfronthosting.co.za>
Message-ID: <1406226569.73.0.867812119212.issue22058@psf.upfronthosting.co.za>


Alexander Belopolsky added the comment:

> some_datetime_object.date() is the obvious way to extract a
> date object from a datetime object.

Sorry if I was not clear enough about my use case.  I often have to deal with functions that are designed to take either date or datetime object as an argument, but only use date components.  In most cases this works automatically because datetime is a subclass of date.  However, there are some annoying exceptions.  For example, x > date(2001, 1, 1) will not work if x is a datetime instance.  If in this example I write x.date() > date(2001, 1, 1) - I get the opposite problem - it won't work when x is a date instance.

The "obvious" way would be date(x) > date(2001, 1, 1).

Can you suggest anything better than date(*x.timetuple()[:3]) > date(2001, 1, 1) here?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 20:32:54 2014
From: report at bugs.python.org (Alexander Belopolsky)
Date: Thu, 24 Jul 2014 18:32:54 +0000
Subject: [issue22058] datetime.datetime() should accept a datetime.date as
 init parameter
In-Reply-To: <1406212892.92.0.452471397422.issue22058@psf.upfronthosting.co.za>
Message-ID: <1406226774.97.0.15407786933.issue22058@psf.upfronthosting.co.za>


Alexander Belopolsky added the comment:

Another "solution" is date(2001, 1, 1).__lt__(x), but this is even uglier than the one with timetuple.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 20:46:25 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Thu, 24 Jul 2014 18:46:25 +0000
Subject: [issue19875] test_getsockaddrarg occasional failure
In-Reply-To: <1406190528.38.0.256466240181.issue19875@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

Here's a patch.

----------
keywords: +patch
Added file: http://bugs.python.org/file36070/find_unused_race.diff

_______________________________________
Python tracker 

_______________________________________
-------------- next part --------------
diff -r f7643c893587 Lib/test/test_socket.py
--- a/Lib/test/test_socket.py	Wed Jul 23 19:28:13 2014 +0100
+++ b/Lib/test/test_socket.py	Thu Jul 24 19:43:26 2014 +0100
@@ -3,6 +3,7 @@
 
 import errno
 import io
+import itertools
 import socket
 import select
 import tempfile
@@ -1147,17 +1148,24 @@
         sock.close()
 
     def test_getsockaddrarg(self):
-        host = '0.0.0.0'
+        sock = socket.socket()
+        self.addCleanup(sock.close)
         port = support.find_unused_port()
         big_port = port + 65536
         neg_port = port - 65536
-        sock = socket.socket()
-        try:
-            self.assertRaises(OverflowError, sock.bind, (host, big_port))
-            self.assertRaises(OverflowError, sock.bind, (host, neg_port))
-            sock.bind((host, port))
-        finally:
-            sock.close()
+        self.assertRaises(OverflowError, sock.bind, (HOST, big_port))
+        self.assertRaises(OverflowError, sock.bind, (HOST, neg_port))
+        # Since find_unused_port() is inherently subject to race conditions, we
+        # call it a couple times if necessary.
+        for i in itertools.count():
+            port = support.find_unused_port()
+            try:
+                sock.bind((HOST, port))
+            except OSError as e:
+                if e.errno != errno.EADDRINUSE or i == 5:
+                    raise
+            else:
+                break
 
     @unittest.skipUnless(os.name == "nt", "Windows specific")
     def test_sock_ioctl(self):

From report at bugs.python.org  Thu Jul 24 20:49:24 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Thu, 24 Jul 2014 18:49:24 +0000
Subject: [issue21367] multiprocessing.JoinableQueue requires new kwarg
In-Reply-To: <1398618734.12.0.810845662855.issue21367@psf.upfronthosting.co.za>
Message-ID: <1406227764.61.0.905896381722.issue21367@psf.upfronthosting.co.za>


Dan O'Reilly added the comment:

How are you importing JoinableQueue? You'll see this error if you import it from multiprocessing.queues instead of directly from multiprocessing. This is because multiprocessing.JoinableQueue is now a function:


    def JoinableQueue(self, maxsize=0):
        '''Returns a queue object'''
        from .queues import JoinableQueue
        return JoinableQueue(maxsize, ctx=self.get_context())

It provides the required context argument for you. Make sure your application is doing "from multiprocessing import JoinableQueue", rather than "from multiprocessing.queues import JoinableQueue".

----------
nosy: +dan.oreilly

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 20:50:35 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Thu, 24 Jul 2014 18:50:35 +0000
Subject: [issue21367] multiprocessing.JoinableQueue requires new kwarg
In-Reply-To: <1398618734.12.0.810845662855.issue21367@psf.upfronthosting.co.za>
Message-ID: <1406227835.61.0.708986483364.issue21367@psf.upfronthosting.co.za>


Changes by Dan O'Reilly :


----------
components: +Library (Lib) -Interpreter Core
type: compile error -> behavior

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 20:55:17 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Thu, 24 Jul 2014 18:55:17 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406228117.05.0.0644194429676.issue22018@psf.upfronthosting.co.za>


Charles-Fran?ois Natali added the comment:

As I said offline to Victor, I think it would be better to have a single function, i.e. keep set_wakeup_fd(). It makes the API simpler, less confusing and error prone: some people will wonder which one they should use, might end up using the wrong one, or both.
Furthermore, it makes writing portable Python code more difficult, since the user has to chose the right function.
If set_wakeup_fd() can do an fstat() (or whatever that it on Windows) to detect the FD type and call send() instead of write() on a socket, all the above issues would go away.
"Never let the user do what the library can do for him".

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 21:01:33 2014
From: report at bugs.python.org (Tim Peters)
Date: Thu, 24 Jul 2014 19:01:33 +0000
Subject: [issue22058] datetime.datetime() should accept a datetime.date as
 init parameter
In-Reply-To: <1406212892.92.0.452471397422.issue22058@psf.upfronthosting.co.za>
Message-ID: <1406228493.49.0.873968111331.issue22058@psf.upfronthosting.co.za>


Tim Peters added the comment:

Alexander, I don't see a need to make everything a one-liner.  Dealing with a mix of dates and datetimes is easily sorted out with an `if` statement, like

def func(thedate):
    if isinstance(thedate, datetime.datetime):
        thedate = thedate.date()
    # and now `thedate` is a bona fide datetime.date

Or stick the two lines in a utility function.

If you're determined to do it one line, because datetime is a subclass of date you could also use .combine() to force everything to class datetime.datetime in one line:

_ZEROT = datetime.time()

def func(thedatetime):
    thedatetime = datetime.combine(thedatetime, _ZEROT)
    # and now `thedatetime` is a bona fide datetime.datetime

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 21:04:29 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Thu, 24 Jul 2014 19:04:29 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406228669.86.0.533768725293.issue22018@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

I find Charles' argument pretty convincing. The whole point of this API is to have another thing you can add to the selector to deal with a race condition. You then pass this thing's fileno() to signal.set_wakeup_fd(). That should be totally portable.

I'm find with it requiring a fd that refers to a socket on Windows; plain files aren't selectable anyway (not even on UNIX).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 21:07:13 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 19:07:13 +0000
Subject: [issue19884] Importing readline produces erroneous output
In-Reply-To: <1406226259.46.0.560153640606.issue19884@psf.upfronthosting.co.za>
Message-ID: 


STINNER Victor added the comment:

> The changes are also causing segfaults when readline is linked with BSD libedit (the default on OS X) rather than GNU readline:

Oh wow. Do you have an idea of to fix the issue with libedit? Or make
the code condition, only use it with native readline?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 21:19:12 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Thu, 24 Jul 2014 19:19:12 +0000
Subject: [issue18174] Make regrtest with --huntrleaks check for fd leaks
In-Reply-To: <1370807273.91.0.83033499223.issue18174@psf.upfronthosting.co.za>
Message-ID: <1406229552.71.0.703661798691.issue18174@psf.upfronthosting.co.za>


Charles-Fran?ois Natali added the comment:

The patch looks good.
I just think it would be nice to expose _fdcount() in test.support.

----------
nosy: +neologix

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 21:21:02 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Thu, 24 Jul 2014 19:21:02 +0000
Subject: [issue21035] Python's HTTP server implementations hangs after 16.343
 requests on MacOSX
In-Reply-To: <1395573252.44.0.596727679776.issue21035@psf.upfronthosting.co.za>
Message-ID: <1406229662.82.0.35069232377.issue21035@psf.upfronthosting.co.za>


Charles-Fran?ois Natali added the comment:

I'm closing, since it's amlost certainly an OS-X bug (similar to time-wit socket exhaustion & Co).

----------
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 21:26:13 2014
From: report at bugs.python.org (Alexander Belopolsky)
Date: Thu, 24 Jul 2014 19:26:13 +0000
Subject: [issue22058] datetime.datetime() should accept a datetime.date as
 init parameter
In-Reply-To: <1406212892.92.0.452471397422.issue22058@psf.upfronthosting.co.za>
Message-ID: <1406229973.92.0.502135969485.issue22058@psf.upfronthosting.co.za>


Alexander Belopolsky added the comment:

It is not as mush about avoiding a one-liner as it is about duck-typing.  IMO, dates and datetime objects are numbers in disguise.  Many functions that are nominally numeric, can work with date/datetime/timedelta objects without modification.  The fact that date/datetime do not accept their own instances often results in the need to branch on isinstance() or write a separate set of functions depending on whether dates are represented by numbers or by date instances.

The example that I gave is one of many and the fact that you suggested using isinstance() in the solution is telling. 

My ideal design would be for date/datetime constructors to take one argument that can be a string, a 3+ elements iterable, or any object that has a .timetuple() method.  The varargs variants can of course stay as syntactic sugar.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 21:35:35 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Thu, 24 Jul 2014 19:35:35 +0000
Subject: [issue12184] socketserver.ForkingMixin collect_children routine needs
 to collect only it's children
In-Reply-To: <1306387193.28.0.997527138067.issue12184@psf.upfronthosting.co.za>
Message-ID: <1406230535.23.0.917043436275.issue12184@psf.upfronthosting.co.za>


Charles-Fran?ois Natali added the comment:

Closing as wont't fix, since we now have asyncio which handles this much better.

----------
resolution:  -> wont fix
stage: needs patch -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 21:42:58 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Thu, 24 Jul 2014 19:42:58 +0000
Subject: [issue12801] C realpath not used by os.path.realpath
In-Reply-To: <1313884051.29.0.336736419117.issue12801@psf.upfronthosting.co.za>
Message-ID: <1406230977.99.0.747930345071.issue12801@psf.upfronthosting.co.za>


Charles-Fran?ois Natali added the comment:

Shall we close this, since realpath(3) is fundamentally broken, and pathlib now does The Right Thing?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 21:44:20 2014
From: report at bugs.python.org (Ned Deily)
Date: Thu, 24 Jul 2014 19:44:20 +0000
Subject: [issue19884] Importing readline produces erroneous output
In-Reply-To: <1386158776.45.0.265770743985.issue19884@psf.upfronthosting.co.za>
Message-ID: <1406231060.17.0.554742380705.issue19884@psf.upfronthosting.co.za>


Ned Deily added the comment:

Currently, readline.c uses #ifdef __APPLE__ to guard libedit-specific code (there is another open issue to generalize libedit support to other platforms).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 21:46:18 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 19:46:18 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406231178.97.0.291175083986.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Ok, let's go with the option (B): use set_wakeup_fd() on all platforms, but only accept socket handles on Windows.

New patch wakeup_fd-7.patch:

- signal.set_wakeup_fd() now only accepts socket handles (int) on Windows, it raises TypeError for files. Note: it also raises TypeError for closed sockets (I don't think that it's possible to check if a integer is a closed file descriptor or a closed socket).

- PySignal_SetWakeupFd() uses Py_SAFE_DOWNCAST(wakeup.fd, SOCKET_T, int) to convert the socket handle to an int. It's safe according to msg223852.

Sorry, it took me several versions to design the API. I discovered that:

- files cannot be non-blocking on Windows (so signal.set_wakeu_fd() is almost useless on Windows in Python 3.4),

- socket handles should be stored in SOCKET_T (not int) which caused me issues with the PySignal_SetWakeupFd() prototype (result type is int),

- in fact, it's safe to cast SOCKET_T to int.

Guido wrote:
> My worry is that somehow a program has a fd that refers to both a file and a socket. But I agree that changing the API is not a great option either.

I don't think that it's possible that a file descriptor and a socket handle have the same value.

----------
Added file: http://bugs.python.org/file36071/wakeup_fd-7.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 21:50:03 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 19:50:03 +0000
Subject: [issue18174] Make regrtest with --huntrleaks check for fd leaks
In-Reply-To: <1370807273.91.0.83033499223.issue18174@psf.upfronthosting.co.za>
Message-ID: <1406231403.44.0.634037347863.issue18174@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Why not using os.fstat() instead of os.dup() to check if a file descriptor is open or not?

It's strange to create a new file descriptor with os.dup() to count the file descriptors.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 21:53:44 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Thu, 24 Jul 2014 19:53:44 +0000
Subject: [issue18174] Make regrtest with --huntrleaks check for fd leaks
In-Reply-To: <1406231403.44.0.634037347863.issue18174@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

> Why not using os.fstat() instead of os.dup() to check if a file descriptor is open or not?

I asked myself the same question, but IIRC, fstat() doesn't always
work on Windows (of course).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 21:53:55 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 19:53:55 +0000
Subject: [issue12801] C realpath not used by os.path.realpath
In-Reply-To: <1313884051.29.0.336736419117.issue12801@psf.upfronthosting.co.za>
Message-ID: <1406231635.62.0.137181257671.issue12801@psf.upfronthosting.co.za>


STINNER Victor added the comment:

I agree, Python should not use the C function realpath() for all the reasons give in the issue.

----------
resolution:  -> not a bug
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 21:55:58 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Thu, 24 Jul 2014 19:55:58 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406231758.04.0.47336158849.issue22018@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

I think if it's not a socket (or a closed one) it should raise ValueError or perhaps OSError -- TypeError would mean that it's not an int.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 21:57:20 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 19:57:20 +0000
Subject: [issue18174] Make regrtest with --huntrleaks check for fd leaks
In-Reply-To: <1370807273.91.0.83033499223.issue18174@psf.upfronthosting.co.za>
Message-ID: <1406231840.61.0.252496227476.issue18174@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> I asked myself the same question, but IIRC, fstat() doesn't always
work on Windows (of course).

Can you please elaborate?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 22:00:47 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 20:00:47 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406232047.94.0.474969429014.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> I think if it's not a socket (or a closed one) it should raise ValueError or perhaps OSError -- TypeError would mean that it's not an int.

Oh, you're right. Updated patch, version 8, now raises a ValueError.

----------
Added file: http://bugs.python.org/file36072/wakeup_fd-8.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 22:05:30 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Thu, 24 Jul 2014 20:05:30 +0000
Subject: [issue18174] Make regrtest with --huntrleaks check for fd leaks
In-Reply-To: <1406231840.61.0.252496227476.issue18174@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

> STINNER Victor added the comment:
>
>> I asked myself the same question, but IIRC, fstat() doesn't always
> work on Windows (of course).
>
> Can you please elaborate?

Not really, since I don't know much about Windows, but that's
something I think I heard.
Richard will be able to give more details.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 22:12:32 2014
From: report at bugs.python.org (Facundo Batista)
Date: Thu, 24 Jul 2014 20:12:32 +0000
Subject: [issue22058] datetime.datetime() should accept a datetime.date as
 init parameter
In-Reply-To: <1406224906.59.0.243618558365.issue22058@psf.upfronthosting.co.za>
Message-ID: <53D168AE.60209@taniquetil.com.ar>


Facundo Batista added the comment:

El 24/07/14 a las 15:01, Tim Peters escibi?:

> "datetime.date() should accept a datetime.datetime as init
> parameter"
> 
> instead?  That's what the example appears to be getting at.
> 
> If so, -1.  Datetime objects already have .date(), .time(), and
> .timetz() methods to extract, respectively, the date, naive time, and

Ah, I wasn't aware of the .date() method.

I guess because it's more natural to me to do int(a_float) than
a_float.integer().

So, unless anyody wants to pursue with this, I'll close the issue.

Thanks!

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 22:12:55 2014
From: report at bugs.python.org (Roundup Robot)
Date: Thu, 24 Jul 2014 20:12:55 +0000
Subject: [issue19884] Importing readline produces erroneous output
In-Reply-To: <1386158776.45.0.265770743985.issue19884@psf.upfronthosting.co.za>
Message-ID: <3hK4Ty2vnKz7LjV@mail.python.org>


Roundup Robot added the comment:

New changeset f0ab6f9f0603 by Victor Stinner in branch '2.7':
Issue #19884, readline: calling rl_variable_bind ("enable-meta-key", "off")
http://hg.python.org/cpython/rev/f0ab6f9f0603

New changeset 3f08c1156050 by Victor Stinner in branch '3.4':
Issue #19884, readline: calling rl_variable_bind ("enable-meta-key", "off")
http://hg.python.org/cpython/rev/3f08c1156050

New changeset 0ed1801bf4bd by Victor Stinner in branch 'default':
(Merge 3.4) Issue #19884, readline: calling rl_variable_bind
http://hg.python.org/cpython/rev/0ed1801bf4bd

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 22:30:58 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 20:30:58 +0000
Subject: [issue20611] socket.create_connection() doesn't handle EINTR properly
In-Reply-To: <1392218032.12.0.645790882431.issue20611@psf.upfronthosting.co.za>
Message-ID: <1406233858.83.0.745220788459.issue20611@psf.upfronthosting.co.za>


STINNER Victor added the comment:

The issue is just an example of the main issue #18885 which proposes to retry interrupted syscalls. I hesitate to mark it as duplicate, but it contains an interesting patch.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 22:32:06 2014
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 24 Jul 2014 20:32:06 +0000
Subject: [issue22060] Clean up ctypes.test, use unittest test discovery
Message-ID: <1406233925.87.0.452498118491.issue22060@psf.upfronthosting.co.za>


New submission from Zachary Ware:

Attached is a patch that aims to clean up the ctypes tests a bit, namely by removing the custom resource management (which conflicts with regrtest), the custom test discovery (which is better left to unittest), and the custom test running (which is better covered by unittest and regrtest).  The one thing I'm not entirely confident about removing is the custom refleak testing, but it does not seem to work correctly in 3.x anyway (though in 2.7, the custom refleak hunter reports "leaks" that the regrtest refleak hunter does not).

There were only a few uses of the custom resource management, all of which were replaced or removed.  test_SEH in test_win32 used "requires('SEH')", but that test should now be sufficiently guarded with unittest skip decorators (only trying the test on Windows, with Python built in Release configuration by MSVC).  test_PyLong_Long in test_python_api used "requires('refcount')", but that should be covered by the @support.refcount_test decorator (added long after the 'requires' call).  Two instances of "is_resource_enabled('printing')" were replaced by "if test.support.verbose".

The same number of tests run (all successfully) on Windows, I have not yet tested on any other platforms.

----------
components: Tests, ctypes
files: ctypes.test-cleanup.diff
keywords: patch
messages: 223891
nosy: amaury.forgeotdarc, belopolsky, meador.inge, serhiy.storchaka, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: Clean up ctypes.test, use unittest test discovery
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file36073/ctypes.test-cleanup.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 22:37:17 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Thu, 24 Jul 2014 20:37:17 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1406231178.97.0.291175083986.issue22018@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

> Ok, let's go with the option (B): use set_wakeup_fd() on all platforms, but only accept socket handles on Windows.

Sorry, why restrict it to sockets on Windows?
If someone wants to pass e.g. a pipe, why prevent it?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 22:41:48 2014
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 24 Jul 2014 20:41:48 +0000
Subject: [issue21314] Document '/' in signatures
In-Reply-To: <1397988439.5.0.703056699862.issue21314@psf.upfronthosting.co.za>
Message-ID: <1406234508.98.0.53591182535.issue21314@psf.upfronthosting.co.za>


Zachary Ware added the comment:

Apologies for the delay in answering, Emily.  And, unfortunately, I don't have a good answer.  If you would like to write a patch, I would suggest just sticking the documentation wherever you think is best and make sure there is a link to it from the Symbols index page.  Whoever commits your patch will either agree with your placement or have a better idea of where to put it, and will either move it themselves or work with you to move it.

Here are a few possible places it could go, off the top of my head and without really looking:
- in the pydoc docs
- in the help() builtin docs
- in or near the inspect.Signature docs
- in the Clinic HOWTO
- somewhere in the tutorial (though I'm not sure where would be good)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 22:46:47 2014
From: report at bugs.python.org (Alecz)
Date: Thu, 24 Jul 2014 20:46:47 +0000
Subject: [issue18543] urllib.parse.urlopen shouldn't ignore installed opener
 when called with any ca* argument
In-Reply-To: <1374668818.72.0.697922032573.issue18543@psf.upfronthosting.co.za>
Message-ID: <1406234807.39.0.72421760556.issue18543@psf.upfronthosting.co.za>


Alecz added the comment:

I just want to point out that the documentation states that an opener can be used with urlopen:

 urllib.request.install_opener(opener)

    Install an OpenerDirector instance as the default global opener. Installing an opener is only necessary if you want urlopen to use that opener; 

Reference:
https://docs.python.org/3/library/urllib.request.html?highlight=urllib.request#urllib.request.install_opener

Issue 17483 was closed (rejected) because it was considered that a custom opener can be used when opening https links.

----------
nosy: +Alecz
Added file: http://bugs.python.org/file36074/urlopen-explained.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 22:49:27 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Thu, 24 Jul 2014 20:49:27 +0000
Subject: [issue21308] PEP 466: backport ssl changes
In-Reply-To: <9f606957-c0fc-42fe-b0e1-52ea1cb44333@email.android.com>
Message-ID: <1406234967.41.0.57324434811.issue21308@psf.upfronthosting.co.za>


Alex Gaynor added the comment:

The attached patch (drafted by myself, and David Reid) backports all of the SSL module (and tests!!!) to Python 2.7. All tests pass on my machine (OS X 10.9), I haven't tested against other platforms.

I /suspect/ the best way to review this patch will be by looking at the diff between this patch, and the master branch, in the Lib/ssl.py, Doc/Library/ssl.html, and Modules/_ssl.c files, but of course feel free to review however you like :-)

You can see the complete branch history at: https://github.com/alex/cpython/commits/backport-ssl

For this to work you must apply the patch from http://bugs.python.org/issue22023 first.

----------
components: +Extension Modules, Library (Lib)
keywords: +needs review, patch, security_issue
Added file: http://bugs.python.org/file36075/ssl-backport.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 22:50:46 2014
From: report at bugs.python.org (Alecz)
Date: Thu, 24 Jul 2014 20:50:46 +0000
Subject: [issue17483] Can not tell urlopen not to check the hostname for https
 connections.
In-Reply-To: <1363715731.1.0.258453337852.issue17483@psf.upfronthosting.co.za>
Message-ID: <1406235046.1.0.83694556784.issue17483@psf.upfronthosting.co.za>


Alecz added the comment:

If this request was rejected shouldn't the Resolution be something such as "Rejected", "Not a Bug", or "Wont fix"?

At the first glance, I believe it is very misleading to see this as fixed.
I even installed the latest version and was surprised to see that "the fix" did not work as expected.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 22:53:07 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 20:53:07 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406235187.52.0.451160154281.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> Sorry, why restrict it to sockets on Windows?
> If someone wants to pass e.g. a pipe, why prevent it?

Pipes cannot be configured in non-blocking mode on Windows. It sounds dangerous to call a blocking syscall in a signal handler.

In fact, it works to write the signal number into a pipe on Windows, but I'm worried about the blocking behaviour.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 22:56:46 2014
From: report at bugs.python.org (Ian Cordasco)
Date: Thu, 24 Jul 2014 20:56:46 +0000
Subject: [issue21308] PEP 466: backport ssl changes
In-Reply-To: <9f606957-c0fc-42fe-b0e1-52ea1cb44333@email.android.com>
Message-ID: <1406235406.85.0.893311999086.issue21308@psf.upfronthosting.co.za>


Changes by Ian Cordasco :


----------
nosy: +icordasc

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 23:13:04 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Thu, 24 Jul 2014 21:13:04 +0000
Subject: [issue13533] Would like Py_Initialize to play friendly with host app
In-Reply-To: <1323099394.97.0.36914155274.issue13533@psf.upfronthosting.co.za>
Message-ID: <1406236384.74.0.336550642576.issue13533@psf.upfronthosting.co.za>


Changes by Antoine Pitrou :


----------
nosy: +ncoghlan

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 23:18:14 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Thu, 24 Jul 2014 21:18:14 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406236694.35.0.221107905519.issue22018@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

> In fact, it works to write the signal number into a pipe on Windows, but I'm worried about the blocking behaviour.

It wasn't different before, so I'm not sure why we should start to worry about it?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 23:43:23 2014
From: report at bugs.python.org (Lita Cho)
Date: Thu, 24 Jul 2014 21:43:23 +0000
Subject: [issue22061] turtledemo doesn't launch due to changes in tkinter
Message-ID: <1406238203.8.0.482945967482.issue22061@psf.upfronthosting.co.za>


New submission from Lita Cho:

I updated my source code, and it looks like turtledemo doesn't launch anymore. I get the following error:

Traceback (most recent call last):
  File "/Users/litacho/Development/cpython/Lib/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/litacho/Development/cpython/Lib/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/litacho/Development/cpython/Lib/turtledemo/__main__.py", line 328, in 
    main()
  File "/Users/litacho/Development/cpython/Lib/turtledemo/__main__.py", line 324, in main
    demo = DemoWindow()
  File "/Users/litacho/Development/cpython/Lib/turtledemo/__main__.py", line 124, in __init__
    self.mBar.tk_menuBar(self.ExamplesBtn, self.OptionsBtn)
AttributeError: 'Frame' object has no attribute 'tk_menuBar'

I dug into it and it looks like tk_menuBar was removed due to a fix in issue4350. If tk_menuBar needs to be removed, what method does turtledemo need to call instead to propagate its panels?

----------
messages: 223899
nosy: Lita.Cho, jesstess, serhiy.storchaka, terry.reedy
priority: normal
severity: normal
status: open
title: turtledemo doesn't launch due to changes in tkinter
type: crash
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 24 23:51:36 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 24 Jul 2014 21:51:36 +0000
Subject: [issue9882] abspath from directory
In-Reply-To: <1284682917.39.0.650396347526.issue9882@psf.upfronthosting.co.za>
Message-ID: <1406238696.0.0.738629342254.issue9882@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

Posted today on python-ideas with the mistaken title "os.path.argparse - optional startdir argument" by Wolfgang Maier (wolma). (He corrected in a second post, but too late.)  Juancarlo A?ez pointed to pathlib.Path.resolve as a better alternative. Path joins and resolve combines the functions of os.path.abspath and os.path.normpath with a nicer syntax, and with OS awareness.

>>> p.Path('../../../Python27/lib', 'ast.py').resolve()
WindowsPath('C:/Programs/Python27/Lib/ast.py')

If one starts with a base Path, one can use '/' to join.

>>> base = p.Path('.')
>>> (base / '../../../Python27/lib' / 'ast.py').resolve()
WindowsPath('C:/Programs/Python27/Lib/ast.py')

In light of the above, I agree with Serhiy that this issue should be closed unless there is a surge of approval for the proposal.

----------
nosy: +terry.reedy
status: pending -> open
versions: +Python 3.5 -Python 3.2

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 00:03:17 2014
From: report at bugs.python.org (Lita Cho)
Date: Thu, 24 Jul 2014 22:03:17 +0000
Subject: [issue22061] turtledemo doesn't launch due to changes in tkinter
In-Reply-To: <1406238203.8.0.482945967482.issue22061@psf.upfronthosting.co.za>
Message-ID: <1406239397.62.0.353795921291.issue22061@psf.upfronthosting.co.za>


Lita Cho added the comment:

Looks like this method was not doing anything. I removed it and the demo is working just fine. Here is a patch.

----------
keywords: +patch
Added file: http://bugs.python.org/file36076/tk_menubar_fix.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 00:11:02 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 24 Jul 2014 22:11:02 +0000
Subject: [issue22062] Fix pathlib.Path.(r)glob doc glitches.
Message-ID: <1406239862.0.0.293742999811.issue22062@psf.upfronthosting.co.za>


New submission from Terry J. Reedy:

1. The pattern argument for .(r)glob must be relative. I think the docstrings and doc should say so. /pattern/relative pattern/

For rglob: '''This is like calling glob() with ?**? added in front of the given pattern:'''

2. Currently "glob()" links to the glob module, which does not recognize '**'. It should link to back up to the Pathlib.glob entry, where the effect of '**' is defined. (I don't currently know the markup for that.)

3. I interpret '''?**? added in front of the given pattern:''' to mean '**' + pattern, so that '*.py' would become '***.py'. It actually becomes the equivalent of '**/*.p'. So I think '**' should be either '**/' or 'a "**" component'.

----------
messages: 223902
nosy: pitrou, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Fix pathlib.Path.(r)glob doc glitches.
type: behavior
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 00:23:24 2014
From: report at bugs.python.org (R. David Murray)
Date: Thu, 24 Jul 2014 22:23:24 +0000
Subject: [issue22062] Fix pathlib.Path.(r)glob doc glitches.
In-Reply-To: <1406239862.0.0.293742999811.issue22062@psf.upfronthosting.co.za>
Message-ID: <1406240604.37.0.772869882907.issue22062@psf.upfronthosting.co.za>


R. David Murray added the comment:

Do non-relative patterns even make sense?  I was surprised to get a NotImplementedError instead of a ValueError.

----------
nosy: +r.david.murray

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 00:28:54 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Thu, 24 Jul 2014 22:28:54 +0000
Subject: [issue13533] Would like Py_Initialize to play friendly with host app
In-Reply-To: <1323099394.97.0.36914155274.issue13533@psf.upfronthosting.co.za>
Message-ID: <1406240934.85.0.642238321585.issue13533@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Changing this isn't really feasible with the current design of the initialisation code - we call Py_FatalError in various places because we don't have the infrastructure set up to do anything else.

PEP 432 should help (and the basic design there still seems sound), since we'll have the core interpreter up and running much earlier, and hence be able to make use of the non-fatal exception machinery. However, it would still mean carefully reviewing everywhere we call Py_FatalError and ensuring there's an error returning path back up to the embedding application.

Unfortunately, I don't know when I'm going to find time to get back to that, and the startup process is sufficiently arcane that it wouldn't be a quick process for someone else to come up to speed on the current state of the draft implementation :(

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 00:36:19 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 22:36:19 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406241379.06.0.943976828007.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

>> In fact, it works to write the signal number into a pipe on Windows, but I'm worried about the blocking behaviour.

> It wasn't different before, so I'm not sure why we should start to worry about it?

Does you have an idea if set_wakeup_fd() is used on Windows? It's not possible to use it with select.select() because on Windows this function only accepts sockets. I don't know if it's possible to watch a pipe using IOCP. Is set_wakeup_fd() used by Twisted, Tornado or another project on Windows?

I would like to modify signal.set_wakeup_fd() to make the file descriptor (or socket) non-blocking: see issue #22042. I proposed this change to protect the user against misuse of the API, and to make the API more convinient. asyncore and asyncio modules also make files and sockets non-blocking: asyncore.dispatcher(sock) and asyncio.BaseEventLoop.connect_read_pipe() for example.

Oh, by the way, sock_xxx() methods of asyncio.BaseEventLoop don't make the socket non-blocking, and the documentation doesn't require that sockets are already set to non-blocking mode. It looks like a bug (at least in the documentation).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 00:36:26 2014
From: report at bugs.python.org (Lita Cho)
Date: Thu, 24 Jul 2014 22:36:26 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1406241386.61.0.228382760348.issue21933@psf.upfronthosting.co.za>


Lita Cho added the comment:

Here is an updated version of the patch now that Terry submitted the changes from issue21597.

----------
Added file: http://bugs.python.org/file36077/window_pane_font_size_v3.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 00:56:16 2014
From: report at bugs.python.org (David Wilson)
Date: Thu, 24 Jul 2014 22:56:16 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1406242576.25.0.369053959038.issue22003@psf.upfronthosting.co.za>


David Wilson added the comment:

This new patch abandons the buffer interface and specializes for Bytes per the comments on this issue.

Anyone care to glance at least at the general structure?

Tests could probably use a little more work.

Microbenchmark seems fine, at least for construction. It doesn't seem likely this patch would introduce severe performance troubles elsewhere, but I'd like to trying it out with some example heavy BytesIO consumers (any suggestions? Some popular template engine?)

cpython] ./python.exe -m timeit -s 'import i' 'i.readlines()'
lines: 54471
100 loops, best of 3: 13.3 msec per loop

[23:52:55 eldil!58 cpython] ./python-nocow -m timeit -s 'import i' 'i.readlines()'
lines: 54471
10 loops, best of 3: 19.6 msec per loop

[23:52:59 eldil!59 cpython] cat i.py
import io
word = b'word'
line = (word * int(79/len(word))) + b'\n'
ar = line * int((4 * 1048576) / len(line))
def readlines():
    return len(list(io.BytesIO(ar)))
print('lines: %s' % (readlines(),))

----------
Added file: http://bugs.python.org/file36078/cow5.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 00:58:07 2014
From: report at bugs.python.org (Roundup Robot)
Date: Thu, 24 Jul 2014 22:58:07 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <3hK88Z3TRZz7LjM@mail.python.org>


Roundup Robot added the comment:

New changeset 5ce01ee2a8f4 by Victor Stinner in branch 'default':
Issue #22018: Fix test_set_wakeup_fd_result(), use assertEqual() not
http://hg.python.org/cpython/rev/5ce01ee2a8f4

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 01:24:17 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 23:24:17 +0000
Subject: [issue22063] asyncio: sock_xxx() methods of event loops should make
 the socket non-blocking
Message-ID: <1406244257.84.0.711370901169.issue22063@psf.upfronthosting.co.za>


New submission from STINNER Victor:

The sock_xxx() methods of asyncio.BaseEventLoop don't make the socket non-blocking, and the documentation doesn't require that sockets are already set to non-blocking mode.

It looks like a bug, at least in the documentation.

If these methods should make the sockets non-blocking, should they also restore the previous timeout (blocking mode) at exit? ssl.SSLSocket.do_handshake(block=True) makes temporary the socket blocking, and then restore the previous timeout.

----------
components: asyncio
messages: 223909
nosy: gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: asyncio: sock_xxx() methods of event loops should make the socket non-blocking
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 01:36:14 2014
From: report at bugs.python.org (Demian Brecht)
Date: Thu, 24 Jul 2014 23:36:14 +0000
Subject: [issue22041] http POST request with python 3.3 through web proxy
In-Reply-To: <1406060360.4.0.822886887897.issue22041@psf.upfronthosting.co.za>
Message-ID: <1406244974.05.0.148105887361.issue22041@psf.upfronthosting.co.za>


Demian Brecht added the comment:

Attached a new patch with with a simple test.

----------
Added file: http://bugs.python.org/file36079/issue22041_1.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 01:40:36 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 24 Jul 2014 23:40:36 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1406241379.06.0.943976828007.issue22018@psf.upfronthosting.co.za>
Message-ID: 


STINNER Victor added the comment:

> Does you have an idea if set_wakeup_fd() is used on Windows? It's not possible to use it with select.select() because on Windows this function only accepts sockets. I don't know if it's possible to watch a pipe using IOCP. Is set_wakeup_fd() used by Twisted, Tornado or another project on Windows?

I checked Twisted: signal.set_wakeup_fd() is only used on POSIX, as
expected (since it doesn't work with select on Windows). But Twisted
sets a signal handler for SIGINT, SIGTERM and SIGBREAK.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 02:59:10 2014
From: report at bugs.python.org (wjssz)
Date: Fri, 25 Jul 2014 00:59:10 +0000
Subject: [issue21084] IDLE can't deal with characters above the range
 (U+0000-U+FFFF)
In-Reply-To: <1396008065.84.0.00802001667749.issue21084@psf.upfronthosting.co.za>
Message-ID: <1406249950.55.0.572723595254.issue21084@psf.upfronthosting.co.za>


wjssz added the comment:

Feel free to modify this patch.

----------
Added file: http://bugs.python.org/file36080/nonbmp_except_check.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 03:14:06 2014
From: report at bugs.python.org (Lita Cho)
Date: Fri, 25 Jul 2014 01:14:06 +0000
Subject: [issue17172] Add turtledemo to IDLE menu
In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za>
Message-ID: <1406250846.67.0.548114696872.issue17172@psf.upfronthosting.co.za>


Lita Cho added the comment:

Here is a new patch where it checks to see if turtledemo exists first before loading it onto the bindings.

----------
Added file: http://bugs.python.org/file36081/turtle_demo_v2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 04:07:41 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Fri, 25 Jul 2014 02:07:41 +0000
Subject: [issue22063] asyncio: sock_xxx() methods of event loops should make
 the socket non-blocking
In-Reply-To: <1406244257.84.0.711370901169.issue22063@psf.upfronthosting.co.za>
Message-ID: <1406254061.51.0.761865353427.issue22063@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

PEP 3156 is clear: "The socket argument has to be a non-blocking socket."  So it's a documentation issue.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 05:10:32 2014
From: report at bugs.python.org (wjssz)
Date: Fri, 25 Jul 2014 03:10:32 +0000
Subject: [issue21084] IDLE can't deal with characters above the range
 (U+0000-U+FFFF)
In-Reply-To: <1396008065.84.0.00802001667749.issue21084@psf.upfronthosting.co.za>
Message-ID: <1406257832.0.0.441402392789.issue21084@psf.upfronthosting.co.za>


wjssz added the comment:

nonbmp_except_check_v2.patch changes character numbers to 0-based, same as IDLE.

Quote from www.tkdocs.com :
"for historical conventions related to how programmers normally refer to lines and characters, line numbers are 1-based, and character numbers are 0-based."

----------
Added file: http://bugs.python.org/file36082/nonbmp_except_check_v2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 05:42:03 2014
From: report at bugs.python.org (paul j3)
Date: Fri, 25 Jul 2014 03:42:03 +0000
Subject: [issue22049] argparse: type= doesn't honor nargs > 1
In-Reply-To: <1406135782.37.0.476079892774.issue22049@psf.upfronthosting.co.za>
Message-ID: <1406259723.26.0.0398775751208.issue22049@psf.upfronthosting.co.za>


paul j3 added the comment:

Note that 

    '-t 1 2 3'.split()

becomes

    ['-t', '1', '2', '3']

Your 'type' function sees those 3 strings individually.  Try printing 'string' the first thing in your function to see what we mean.

----------
nosy: +paul.j3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 05:50:46 2014
From: report at bugs.python.org (paul j3)
Date: Fri, 25 Jul 2014 03:50:46 +0000
Subject: [issue22047] argparse improperly prints mutually exclusive options
 when they are in a group
In-Reply-To: <1406131424.14.0.0235697032218.issue22047@psf.upfronthosting.co.za>
Message-ID: <1406260246.18.0.135020391916.issue22047@psf.upfronthosting.co.za>


paul j3 added the comment:

That's an artifact of how the group usage is formatted (which isn't very robust).  It's not designed to handle nested groups.  

Mutually exclusive groups aren't meant to nest inside other mutually exclusive groups.  While it possible, it doesn't help you.  Effectively the arguments combined into one larger group.

See http://bugs.python.org/issue11588 for discussion on how nested groups might be implemented, and the difficulties in properly formatting their usage.

http://bugs.python.org/issue10984 has a more robust mutually exclusive group formatter, but even that is not designed for nesting.

----------
nosy: +paul.j3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 07:49:53 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 25 Jul 2014 05:49:53 +0000
Subject: [issue22061] turtledemo doesn't launch due to changes in tkinter
In-Reply-To: <1406238203.8.0.482945967482.issue22061@psf.upfronthosting.co.za>
Message-ID: <1406267393.9.0.934500030602.issue22061@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Indeed, unlike to other removed methods which raised an exception, removing this doing nothing method can break existing code. We should restore it and add deprecation warning.

Of course the use of obsolete method should be removed from turtledemo.

----------
components: +Tkinter
stage:  -> patch review
type: crash -> behavior
Added file: http://bugs.python.org/file36083/tkinter_restore_empty_methods.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 08:20:22 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Fri, 25 Jul 2014 06:20:22 +0000
Subject: [issue22064] Misleading message from 2to3 when skipping optional
 fixers
Message-ID: <1406269222.0.0.185162448191.issue22064@psf.upfronthosting.co.za>


New submission from Nick Coghlan:

>From https://stackoverflow.com/questions/5499897/converting-selenium-py-to-python-3-by-2to3, 2to3 prints the following messages when run:

===============
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
===============

That message is rather misleading - those four are the *optional* fixers that are only run when selected explicitly. Unlike the other fixers, they're essentially the *opposite* of implicit :)

Given that limiting the fixes to a specific subset (e.g. "-f dict") silences all such messages, and explicitly excluding an actual implicit fixer (e.g. "-x dict") doesn't generate a warning, I suggest the simplest fix is to just change the message to instead say "Skipping optional fixer".

----------
keywords: easy
messages: 223919
nosy: ncoghlan
priority: low
severity: normal
stage: needs patch
status: open
title: Misleading message from 2to3 when skipping optional fixers
type: behavior

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 08:27:08 2014
From: report at bugs.python.org (Roundup Robot)
Date: Fri, 25 Jul 2014 06:27:08 +0000
Subject: [issue22053] turtledemo: clean up start and stop, fix warning
In-Reply-To: <1406150673.05.0.480577347652.issue22053@psf.upfronthosting.co.za>
Message-ID: <3hKL6g2yKdz7LjM@mail.python.org>


Roundup Robot added the comment:

New changeset 7a55b34f1db2 by Terry Jan Reedy in branch '2.7':
Issue #22053: Make help work, after previous patch for this issue disabled it
http://hg.python.org/cpython/rev/7a55b34f1db2

New changeset c26862955342 by Terry Jan Reedy in branch '3.4':
Issue #22053: Make help work, after previous patch for this issue disabled it
http://hg.python.org/cpython/rev/c26862955342

New changeset 8c972d528f06 by Terry Jan Reedy in branch 'default':
Issue #22053: Make help work, after previous patch for this issue disabled it
http://hg.python.org/cpython/rev/8c972d528f06

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 08:43:00 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 25 Jul 2014 06:43:00 +0000
Subject: [issue22053] turtledemo: clean up start and stop, fix warning
In-Reply-To: <1406150673.05.0.480577347652.issue22053@psf.upfronthosting.co.za>
Message-ID: <1406270580.77.0.635089684677.issue22053@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

Removal of 'demo' as a global name disabled help callbacks. I could have added 'global demo' to main(), but I decided to refactor and remove duplicate code instead. For 3.5, however, refactor would not merge because of #10291, so I made the simplest fix pending a decision on what to do.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 08:43:07 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 25 Jul 2014 06:43:07 +0000
Subject: [issue22061] turtledemo doesn't launch due to changes in tkinter
In-Reply-To: <1406238203.8.0.482945967482.issue22061@psf.upfronthosting.co.za>
Message-ID: <1406270587.74.0.748081794061.issue22061@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Here is a patch which replaces obsolete and non-working menu creation code by modernized code. Now menu should be correctly displayed on MacOS.

----------
Added file: http://bugs.python.org/file36084/turtledemo_menu.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 08:59:44 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 25 Jul 2014 06:59:44 +0000
Subject: [issue10291] Clean-up turtledemo in-package documentation
In-Reply-To: <1288663412.18.0.821423720263.issue10291@psf.upfronthosting.co.za>
Message-ID: <1406271584.56.0.228210392182.issue10291@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

Is there any reason when turtledemo.__init__ and turtledemo.__main__ should not get docstrings in earlier versions? And the turtledemo.__main__ get the same changes in 3.4?

Not doing so introduced seeming gratuitous differences between the versions. The help refactoring I committed in 3.4 for #22053 could not be merged as it is. The demohelp.txt changes I have made for 3.4 have cleanly merged forward to file that is ignored and no longer displayed. With demohelp.txt moved to a docstring for 3.4 also, I would leave demohelp.txt in 3.4 but mark it 'unmaintained.

Why was demohelp.txt left after being copied to .__main__?  Expecting the file and docstring to remain in sync is not realistic.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 09:02:54 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Fri, 25 Jul 2014 07:02:54 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1406235187.52.0.451160154281.issue22018@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

> Pipes cannot be configured in non-blocking mode on Windows. It sounds dangerous to call a blocking syscall in a signal handler.
>
> In fact, it works to write the signal number into a pipe on Windows, but I'm worried about the blocking behaviour.

OK, but if someone passes a socket in blocking mode, it will be accepted.
I don't understand why, if you're worried about a blocking write, you
don't just check that the FD passed is in non-blocking mode. It's
conceptually cleaner, more direct and safer.

Also, I think there's another issue open on the tracker to check just
that, so I'd leave this check out here.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 09:08:43 2014
From: report at bugs.python.org (Roundup Robot)
Date: Fri, 25 Jul 2014 07:08:43 +0000
Subject: [issue22061] turtledemo doesn't launch due to changes in tkinter
In-Reply-To: <1406238203.8.0.482945967482.issue22061@psf.upfronthosting.co.za>
Message-ID: <3hKM2f1j0Pz7LjZ@mail.python.org>


Roundup Robot added the comment:

New changeset 3c4d45f73622 by Terry Jan Reedy in branch '2.7':
Issue #22061: remove call of useless function slated for removal.
http://hg.python.org/cpython/rev/3c4d45f73622

New changeset 976f31b2858b by Terry Jan Reedy in branch '3.4':
Issue #22061: remove call of useless function slated for removal.
http://hg.python.org/cpython/rev/976f31b2858b

New changeset 9e9e6e9f4cce by Terry Jan Reedy in branch 'default':
Issue #22061: remove call of useless function slated for removal.
http://hg.python.org/cpython/rev/9e9e6e9f4cce

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 09:25:50 2014
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 25 Jul 2014 07:25:50 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406273150.61.0.538898537893.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

2014-07-25 9:02 GMT+02:00 Charles-Fran?ois Natali :
>> Pipes cannot be configured in non-blocking mode on Windows. It sounds dangerous to call a blocking syscall in a signal handler.
>>
>> In fact, it works to write the signal number into a pipe on Windows, but I'm worried about the blocking behaviour.
>
> OK, but if someone passes a socket in blocking mode, it will be accepted.
> I don't understand why, if you're worried about a blocking write, you
> don't just check that the FD passed is in non-blocking mode. It's
> conceptually cleaner, more direct and safer.
>
> Also, I think there's another issue open on the tracker to check just
> that, so I'd leave this check out here.

In the issue #22042, I would like to make automatically the file desscriptor or socket handler in non-blocking mode. The problem is that you cannot make a file descriptor in non-blocking mode on Windows.

Or maybe you disagree with the issue #22042?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 09:45:42 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 25 Jul 2014 07:45:42 +0000
Subject: [issue22065] Update turtledemo menu creation
Message-ID: <1406274342.14.0.580030811774.issue22065@psf.upfronthosting.co.za>


New submission from Terry J. Reedy:

On #22061, Serhiy Storchaka posted turtledemo_menu.patch, which is unrelated to that issue. Issues in that patch.
* It mistakenly includes the tkinter_restore_empty_methods.patch that does belongs to 22061.
* It will not apply any more, especially to 3.4 as it is now.
* Removing the gridding of the Menu seems like a mistake, or else the rest of the grid code should be revised.  I will test this.

Serhiy claims the patch "replaces obsolete and non-working menu creation code by modernized code. Now menu should be correctly displayed on MacOS."

'Obsolete' is correct' The current code uses Menubutton, "obsolete since Tk8.0". Updating, even for 2.7, would probably be a good idea.

As for 'non-working': the current code works on Windows, but I have no idea on Linux or Mac. Can either of you comment?  I certainly would want an updated patch tested on more than Windows.

----------
assignee: terry.reedy
messages: 223927
nosy: Lita.Cho, ned.deily, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Update turtledemo menu creation
type: behavior
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 09:59:15 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 25 Jul 2014 07:59:15 +0000
Subject: [issue22061] Restore deleted tkinter functions with deprecaton
 dummies.
In-Reply-To: <1406238203.8.0.482945967482.issue22061@psf.upfronthosting.co.za>
Message-ID: <1406275155.04.0.361063989187.issue22061@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

The turtledemo part of this issue is over. (Lita, tracebacks are not 'crash' issues. Segfaults and the Windows equivalent are.)

The restoration patch could have been attached to 4350. But since it is here, I retitled this issue instead of closing it. Patch looks good to me.

Turtledemo menus are a different issue. I opened #22065 and plan to post a revised patch there.

----------
assignee:  -> serhiy.storchaka
stage: patch review -> commit review
title: turtledemo doesn't launch due to changes in tkinter -> Restore deleted tkinter functions with deprecaton dummies.

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 10:11:57 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 25 Jul 2014 08:11:57 +0000
Subject: [issue22061] Restore deleted tkinter functions with deprecaton
 dummies.
In-Reply-To: <1406238203.8.0.482945967482.issue22061@psf.upfronthosting.co.za>
Message-ID: <1406275917.65.0.973062275061.issue22061@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

May be add deprecation warnings in 2.7 and 3.4? This method's calls can be left in existing user code as in turtledemo and this code behaves differently from how it was designed and behaved with Tk <4.0. As far as now this methods are empty, this bug can be unnoticed long time.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 10:23:17 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 25 Jul 2014 08:23:17 +0000
Subject: [issue22065] Update turtledemo menu creation
In-Reply-To: <1406274342.14.0.580030811774.issue22065@psf.upfronthosting.co.za>
Message-ID: <1406276597.23.0.632234568894.issue22065@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Here is updated patch.

* Excluded the tkinter_restore_empty_methods.patch.
* Synchronized with tip.
* Corrected grid row indices (this doesn't matter, in any case menu was removed from grid on Mac).

Current code doesn't work as was designed (with using obsolete tk_menuBar()). There is no observable differences on Linux (where menu is just a widget inside main window, as other frames and buttons), but they should be on Windows (menu is special thing and created internally with special API) and on Mac (menu is displayed separately from a window, at the top of the screen). The purpose of tk_menuBar() was to create such system-specific menu.

----------
keywords: +patch
nosy: +serhiy.storchaka
Added file: http://bugs.python.org/file36085/turtledemo_menu.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 10:31:16 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 25 Jul 2014 08:31:16 +0000
Subject: [issue22061] Restore deleted tkinter functions with deprecaton
 dummies.
In-Reply-To: <1406238203.8.0.482945967482.issue22061@psf.upfronthosting.co.za>
Message-ID: <1406277076.35.0.229081862446.issue22061@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

Since Deprecation warnings are off by default, backporting seems like a good idea. There was talk on pydev about adding more py3 warnings to 2.7, which this essentially is (though the removal is delated to 3.6).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 10:36:13 2014
From: report at bugs.python.org (Ned Deily)
Date: Fri, 25 Jul 2014 08:36:13 +0000
Subject: [issue10291] Clean-up turtledemo in-package documentation
In-Reply-To: <1288663412.18.0.821423720263.issue10291@psf.upfronthosting.co.za>
Message-ID: <1406277373.34.0.526380349698.issue10291@psf.upfronthosting.co.za>


Ned Deily added the comment:

> Is there any reason when turtledemo.__init__ and turtledemo.__main__ should > not get docstrings in earlier versions? And the turtledemo.__main__ get the > same changes in 3.4?

I think my reasoning was that it was not a bug fix so it wasn't a strong candidate for a maintenance release.  But feel free to backport it if you think it important.

> Why was demohelp.txt left after being copied to .__main__?

It wasn't: 004fe3449193 deleted it.  It appears that an incorrect merge from 3.4 (3f4abe3107ce) in a subsequent set of changes for Issue21823 brought it back to life in default.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 11:31:53 2014
From: report at bugs.python.org (Roundup Robot)
Date: Fri, 25 Jul 2014 09:31:53 +0000
Subject: [issue22061] Restore deleted tkinter functions with deprecaton
 dummies.
In-Reply-To: <1406238203.8.0.482945967482.issue22061@psf.upfronthosting.co.za>
Message-ID: <3hKQCr70QXz7LjZ@mail.python.org>


Roundup Robot added the comment:

New changeset f7c84674bdec by Serhiy Storchaka in branch '2.7':
Issue #22061: Add deprecation warnings in empty obsolete methods.
http://hg.python.org/cpython/rev/f7c84674bdec

New changeset a50297e793f9 by Serhiy Storchaka in branch '3.4':
Issue #22061: Add deprecation warnings in empty obsolete methods.
http://hg.python.org/cpython/rev/a50297e793f9

New changeset 7e6beea0eeab by Serhiy Storchaka in branch 'default':
Issue #22061: Restored empty obsolete methods removed in issue #4350 and
http://hg.python.org/cpython/rev/7e6beea0eeab

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 11:31:54 2014
From: report at bugs.python.org (Roundup Robot)
Date: Fri, 25 Jul 2014 09:31:54 +0000
Subject: [issue4350] Remove dead code from Tkinter.py
In-Reply-To: <1227053659.32.0.711141995765.issue4350@psf.upfronthosting.co.za>
Message-ID: <3hKQCs5BnBz7LjZ@mail.python.org>


Roundup Robot added the comment:

New changeset 7e6beea0eeab by Serhiy Storchaka in branch 'default':
Issue #22061: Restored empty obsolete methods removed in issue #4350 and
http://hg.python.org/cpython/rev/7e6beea0eeab

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 12:12:54 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 25 Jul 2014 10:12:54 +0000
Subject: [issue22061] Restore deleted tkinter functions with deprecaton
 dummies.
In-Reply-To: <1406238203.8.0.482945967482.issue22061@psf.upfronthosting.co.za>
Message-ID: <1406283174.64.0.62332633641.issue22061@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 13:03:00 2014
From: report at bugs.python.org (Alejandro MJ)
Date: Fri, 25 Jul 2014 11:03:00 +0000
Subject: [issue22041] http POST request with python 3.3 through web proxy
In-Reply-To: <1406060360.4.0.822886887897.issue22041@psf.upfronthosting.co.za>
Message-ID: <1406286180.19.0.435690135848.issue22041@psf.upfronthosting.co.za>


Alejandro MJ added the comment:

Thanks a lot for your help!

I've tested it in Linux, Python version 3.3.5 and the message obtained is this: [404 Not Found]. The script is this one (changing of course the ip_address and the proxy_url values):

import http.client, urllib.parse
data = urllib.parse.urlencode({'nombre': 'HERVAS INFANTE ALBERTO'})
headers = {"Content-type": "application/x-www-form-urlencoded"}
conn = http.client.HTTPConnection(proxy_url,8080, source_address=(ip_address, 0))
conn.set_tunnel("www.telexplorer.es",port=80)  
conn.request("POST", "/?zone=namwp",data,headers)
response = conn.getresponse()
print("Test 1: TE - ", response.status, response.reason)
data = response.read()
conn.close()


How could I test that patch attached? I suppose that I have to install something on Suse? As I could read in some forums, I should launch this sentence:

patch -p1 --dry-run < issue22041_1.patch

Could you please help me with this points? thanks!

----------
nosy: +AlexMJ

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 13:53:08 2014
From: report at bugs.python.org (Roundup Robot)
Date: Fri, 25 Jul 2014 11:53:08 +0000
Subject: [issue18093] Move main functions to a separate Programs directory
In-Reply-To: <1369828290.2.0.750301008205.issue18093@psf.upfronthosting.co.za>
Message-ID: <3hKTLq2swLz7LjY@mail.python.org>


Roundup Robot added the comment:

New changeset 88a532a31eb3 by Nick Coghlan in branch 'default':
Issue #18093: Factor out the programs that embed the runtime
http://hg.python.org/cpython/rev/88a532a31eb3

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 13:55:28 2014
From: report at bugs.python.org (Roundup Robot)
Date: Fri, 25 Jul 2014 11:55:28 +0000
Subject: [issue18093] Move main functions to a separate Programs directory
In-Reply-To: <1369828290.2.0.750301008205.issue18093@psf.upfronthosting.co.za>
Message-ID: <3hKTPW5J4Lz7LjZ@mail.python.org>


Roundup Robot added the comment:

New changeset 7640af73c19d by Nick Coghlan in branch 'default':
Add missing NEWS entry for issue #18093
http://hg.python.org/cpython/rev/7640af73c19d

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 13:57:44 2014
From: report at bugs.python.org (Alejandro MJ)
Date: Fri, 25 Jul 2014 11:57:44 +0000
Subject: [issue22041] http POST request with python 3.3 through web proxy
In-Reply-To: <1406060360.4.0.822886887897.issue22041@psf.upfronthosting.co.za>
Message-ID: <1406289464.62.0.311780461769.issue22041@psf.upfronthosting.co.za>


Alejandro MJ added the comment:

I've wrote these sentences on my SUSE, python is installed on path: /usr/local/pr/python

computer002:/usr/local/pr/python # patch -p1 --dry-run 

_______________________________________

From report at bugs.python.org  Fri Jul 25 14:04:08 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Fri, 25 Jul 2014 12:04:08 +0000
Subject: [issue18093] Move main functions to a separate Programs directory
In-Reply-To: <1369828290.2.0.750301008205.issue18093@psf.upfronthosting.co.za>
Message-ID: <1406289848.94.0.564741268965.issue18093@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Prompted to finally get back to this by the python-dev discussion about PEP 432 (as separating these out helps keep the moving parts clear when working on the startup sequence)

In response to Eric's question, Modules/main.c is part of the CPython runtime, rather than a C application that embeds the runtime. The "main" in the name refers to the exported Py_Main, rather than a C main function.

The *actual* C level main function now lives in Programs/python.c (previously Modules/python.c) and calls Py_Main after doing a bit of fiddling about with the command line arguments and the floating point settings.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 14:44:00 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Fri, 25 Jul 2014 12:44:00 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1406273150.61.0.538898537893.issue22018@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

> In the issue #22042, I would like to make automatically the file desscriptor or socket handler in non-blocking mode. The problem is that you cannot make a file descriptor in non-blocking mode on Windows.

I don't think we should set it non-blocking automatically, but rather
check that it's non-blocking.
The first reason I can think of is that the user passing a blocking FD
could be a sign of a bug (e.g. if the other end is in blocking mode
too), and we shouldn't silently work-around it.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 14:49:59 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Fri, 25 Jul 2014 12:49:59 +0000
Subject: [issue18093] Move main functions to a separate Programs directory
In-Reply-To: <1369828290.2.0.750301008205.issue18093@psf.upfronthosting.co.za>
Message-ID: <1406292599.95.0.219334123903.issue18093@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Zach, regarding the Windows executables - up to you if you want to open an issue to move them. These ones I particularly wanted to move because I found having them in Modules to be genuinely confusing when working on the startup code.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 14:52:32 2014
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 25 Jul 2014 12:52:32 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406292752.96.0.155996913138.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Charles-Fran?ois wrote:

> I don't think we should set it non-blocking automatically, but rather
check that it's non-blocking.
> The first reason I can think of is that the user passing a blocking FD
could be a sign of a bug (e.g. if the other end is in blocking mode
too), and we shouldn't silently work-around it.

I hesitate between making the file descriptor non-blocking or raise an exception if it configured in blocking mode. Since I have no experience on such question, I prefer to follow your advices :-) So raise an exception if the FD is blocking.

It doesn't answer to my complain: I don't want to support file descriptors on Windows anymore because file descriptors cannot be configured in non-blocking mode.

If we raise an error if FD and sockets are blocking, calling set_wakeup_fd() on a FD on Windows would always fail. So raising an exception because the integer is a file descriptor or raising an exception because the file descriptor is blocking leads to same result: FD are not more supported on Windows.

What do you think?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 15:01:28 2014
From: report at bugs.python.org (Martin Panter)
Date: Fri, 25 Jul 2014 13:01:28 +0000
Subject: [issue1025395] email.Utils.parseaddr fails to parse valid addresses
Message-ID: <1406293288.36.0.775390261869.issue1025395@psf.upfronthosting.co.za>


Changes by Martin Panter :


----------
nosy: +vadmium

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 15:04:50 2014
From: report at bugs.python.org (Roundup Robot)
Date: Fri, 25 Jul 2014 13:04:50 +0000
Subject: [issue21947] `Dis` module doesn't know how to disassemble generators
In-Reply-To: <1404916109.31.0.935138955837.issue21947@psf.upfronthosting.co.za>
Message-ID: <3hKVxZ0l2Xz7LjS@mail.python.org>


Roundup Robot added the comment:

New changeset 2ae5709692ef by Nick Coghlan in branch 'default':
Issue #21947: handle generator-iterator objects in dis
http://hg.python.org/cpython/rev/2ae5709692ef

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 15:08:53 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Fri, 25 Jul 2014 13:08:53 +0000
Subject: [issue21947] `Dis` module doesn't know how to disassemble generators
In-Reply-To: <1404916109.31.0.935138955837.issue21947@psf.upfronthosting.co.za>
Message-ID: <1406293733.97.0.77266824635.issue21947@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Thanks for the patch Clement!

Could I also please request that you sign the Contributor License Agreement at https://www.python.org/psf/contrib/contrib-form/

While we have some discretion to accept "small" patches without one, a signed CLA helps assure that we have the necessary rights to incorporate and redistribute contributions worldwide.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 15:09:09 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Fri, 25 Jul 2014 13:09:09 +0000
Subject: [issue21947] `Dis` module doesn't know how to disassemble generators
In-Reply-To: <1404916109.31.0.935138955837.issue21947@psf.upfronthosting.co.za>
Message-ID: <1406293749.29.0.459714944483.issue21947@psf.upfronthosting.co.za>


Changes by Nick Coghlan :


----------
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 15:24:59 2014
From: report at bugs.python.org (Mark Summerfield)
Date: Fri, 25 Jul 2014 13:24:59 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406294699.35.0.866616452769.issue1602@psf.upfronthosting.co.za>


Mark Summerfield added the comment:

I used pip to install the win_unicode_console package on windows 7 python 3.3.

It works but wouldn't freeze with cx_freeze because there's no __init__.py file in the win_unicode_console directory.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 15:27:48 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Fri, 25 Jul 2014 13:27:48 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406294868.67.0.751642969435.issue1602@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Hmm, I'm not sure if that would be a bug in cxFreeze or CPython - I don't think we've tried freezing or zipimporting namespace packages... (either way, adding the __init__.py to win_unicode_console would likely be the quickest fix)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 15:28:43 2014
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 25 Jul 2014 13:28:43 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406294923.28.0.905130330605.issue1602@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Since there is now an external project fixing the support of Windows console, I suggest to close this issue as "wontfix". In a few months, if we get enough feedback on this project, we may reconsider integrating it into Python. What do you think?

https://pypi.python.org/pypi/win_unicode_console.

> I used pip to install the win_unicode_console package ...

Please don't use Python bug tracker to report bugs to the package.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 15:34:01 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Fri, 25 Jul 2014 13:34:01 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406295241.33.0.905261407258.issue1602@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

The poor interaction with the Windows command line is still a bug in CPython - we could mark it closed/later but I don't see any value in doing so.

I see Drekin's win_unicode_console module as similar to my own contextlib2 - used to prove the concept, and perhaps iterate on some of the details, but the ultimate long term solution is to fix CPython itself.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 15:40:42 2014
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 25 Jul 2014 13:40:42 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406295642.31.0.945057230636.issue1602@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> The poor interaction with the Windows command line is still a bug in CPython - we could mark it closed/later but I don't see any value in doing so.

I don't see any value in keeping the issue open since nobody worked on it last 7 years. I just want to make it clear that we will *not* fix this issue.

Well, in fact I spent a lot of hours trying to find a way to fix the issue, and my conclusion is that it's not possible to handle correctly Unicode (input and output) in a Windows console. Please read the whole issue for the detail.

The win_unicode_console project may improve the Unicode support, but I'm convinced that it still has various issues because it is just not possible to handle all cases.

A workaround is to not use the Windows console, but use IDLE or another shell... Try maybe PowerShell. But PowerShell has at least an issue with the code page 65001 (Microsoft UTF-8): see the issue #21927.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 15:52:23 2014
From: report at bugs.python.org (juj)
Date: Fri, 25 Jul 2014 13:52:23 +0000
Subject: [issue22066] subprocess.communicate() does not receive full output
 from the called process.
Message-ID: <1406296343.93.0.498702649636.issue22066@psf.upfronthosting.co.za>


New submission from juj:

When Python 2.7 executes a Node .js application that prints to stdout and subsequently exits, Python does not capture full output printed by that application.

Steps to repro:
1. Download and unzip http://clb.demon.fi/bugs/python_proc_bug.zip
2. Run run_test.bat

Observed result: The .bat script prints:

Executing 'node jsfile.js' directly from command line. The js file outputs:
Line 1
Line 2

Executing 'jsfile.js' via a python script that calls 'node jsfile.js'. Now the js file outputs:
Line 1

Expected result: The second run via invoking from python should also print "Line 2".

Tested on Python v2.7.8 64-bit and Node v0.10.28 on Windows 7 64-bit.

----------
components: Library (Lib)
messages: 223950
nosy: juj
priority: normal
severity: normal
status: open
title: subprocess.communicate() does not receive full output from the called process.
versions: Python 2.7

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 15:52:39 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Fri, 25 Jul 2014 13:52:39 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406296359.36.0.331563116687.issue1602@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Based on Steve's last post, the main challenge is that the IO model assumes a bytes-based streaming API - it isn't really set up to cope with a UTF-16 buffering layer.

However, that's not substantially different from the situation when the standard streams are replaced with StringIO objects, and they don't have an underlying buffer object at all. That may be a suitable model for Windows console IO as well - present it to the user in a way that doesn't expose an underlying bytes-based API at all.

Now, it may not be feasible to implement this until we get the startup code cleaned up, but I'm not going to squash interest in improving the situation when it's one of the major culprits behind the "Unicode is even more broken in Python 3 than it is in Python 2" meme.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 15:53:50 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Fri, 25 Jul 2014 13:53:50 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406296430.35.0.483949904603.issue1602@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Changing targets to Python 3.5, since this is almost certainly going to be too invasive for a maintenance release.

----------
versions: +Python 3.5 -Python 3.3, Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 15:58:26 2014
From: report at bugs.python.org (Roundup Robot)
Date: Fri, 25 Jul 2014 13:58:26 +0000
Subject: [issue18093] Move main functions to a separate Programs directory
In-Reply-To: <1369828290.2.0.750301008205.issue18093@psf.upfronthosting.co.za>
Message-ID: <3hKX7P0Pd9z7LjZ@mail.python.org>


Roundup Robot added the comment:

New changeset 766570a5d607 by Zachary Ware in branch 'default':
Issue #18093: Give the Windows build _testembed.c's new location.
http://hg.python.org/cpython/rev/766570a5d607

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 16:54:59 2014
From: report at bugs.python.org (Ian Cordasco)
Date: Fri, 25 Jul 2014 14:54:59 +0000
Subject: [issue3566] httplib persistent connections violate MUST in RFC2616
 sec 8.1.4.
In-Reply-To: <1218901279.9.0.954545383172.issue3566@psf.upfronthosting.co.za>
Message-ID: <1406300099.22.0.999965747922.issue3566@psf.upfronthosting.co.za>


Changes by Ian Cordasco :


----------
nosy: +icordasc

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 16:58:45 2014
From: report at bugs.python.org (Demian Brecht)
Date: Fri, 25 Jul 2014 14:58:45 +0000
Subject: [issue22041] http POST request with python 3.3 through web proxy
In-Reply-To: <1406060360.4.0.822886887897.issue22041@psf.upfronthosting.co.za>
Message-ID: <1406300325.76.0.0918348073101.issue22041@psf.upfronthosting.co.za>


Demian Brecht added the comment:

Sorry Alejandro, I should have clarified: The attached patch is for dev, so the failure you're seeing when attempting to apply the patch against 3.3 is expected. It effectively does the same thing as explicitly setting the port as you have already attempted.

At this point, I'm relatively confident that the issue is due to the proxy server in use. Using your latest code but a local squid proxy, I'm able to get 200 responses with the latest releases of 3.3 and 3.4 as well as against dev.

Do you absolutely need to tunnel? The most common use case for tunnelling is to use SSL, which doesn't seem to be the case here. Does the following code work for you? It still uses the proxy server, but without CONNECT.

import http.client, urllib.parse
data = urllib.parse.urlencode({'nombre': 'HERVAS INFANTE ALBERTO'})
headers = {"Content-type": "application/x-www-form-urlencoded"}
conn = http.client.HTTPConnection(proxy_url,8080, source_address=(ip_address, 0))
conn.request("POST", "http://www.telexplorer.es/?zone=namwp",data,headers)
response = conn.getresponse()
print("Test 1: TE - ", response.status, response.reason)
data = response.read()
conn.close()


If the above code doesn't fulfill your requirements, do you know the vendor/version of the proxy that you're using?


Note to self: 3.3 doesn't respect _tunnel_port when setting the host header for requests (this was added in 3.4), so CONNECT and subsequent host headers will appear to be correct as long as the ports match up. The problem 3.4+ is that rather than ensuring non-None value in set_tunnel, it's done in _tunnel as a step just before CONNECT. That step is not replicated when the host header is set in putrequest, which leads to the value of "None" being sent for the port in the case where the port is not explicitly set in set_tunnel. To me, it makes the most sense to use _set_hostport in set_tunnel as in the attached patch to ensure any other use of _tunnel_port can be done without special handling of None.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 17:05:07 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 25 Jul 2014 15:05:07 +0000
Subject: [issue22067] time_test fails after strptime()
Message-ID: <1406300706.97.0.297116152609.issue22067@psf.upfronthosting.co.za>


New submission from Serhiy Storchaka:

time_test fails when running after any test which uses strptime().

The bug can be easily reproduced by running test_time twice:

$ TZ=Europe/Kiev ./python -m test.regrtest -ugui -v test_time test_time
...
======================================================================
FAIL: test_strptime (test.test_time.TimeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython-2.7/Lib/test/test_time.py", line 120, in test_strptime
    (format, strf_output))
AssertionError: conversion specifier '%Z' failed with 'MSK' input.

----------------------------------------------------------------------

All works on 3.x and with TZ=UTC.

May be this is related to issue13309.

----------
components: Extension Modules, Tests
messages: 223955
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: time_test fails after strptime()
type: behavior
versions: Python 2.7

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 17:07:09 2014
From: report at bugs.python.org (Demian Brecht)
Date: Fri, 25 Jul 2014 15:07:09 +0000
Subject: [issue22041] http POST request with python 3.3 through web proxy
In-Reply-To: <1406060360.4.0.822886887897.issue22041@psf.upfronthosting.co.za>
Message-ID: <1406300829.45.0.264073096109.issue22041@psf.upfronthosting.co.za>


Demian Brecht added the comment:

To add a little more detail, from what I gather, CONNECT support may be unsupported or limited (i.e. only allowing SSL connections) on various proxy servers. If the code snippet in my previous post solves your issue, then I would assume that to be the case with the proxy you're using.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 17:15:10 2014
From: report at bugs.python.org (Zachary Ware)
Date: Fri, 25 Jul 2014 15:15:10 +0000
Subject: [issue18436] Add mapping of symbol to function to operator module
In-Reply-To: <1373662006.12.0.760343850871.issue18436@psf.upfronthosting.co.za>
Message-ID: <1406301310.24.0.307319037307.issue18436@psf.upfronthosting.co.za>


Zachary Ware added the comment:

With no one (including me) clamoring for this, I'm going to go ahead and reject it.  If someone in the future does really want this, I'd be happy to review a new patch.

----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed
versions: +Python 3.5 -Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 17:19:50 2014
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 25 Jul 2014 15:19:50 +0000
Subject: [issue21591] "exec(a, b, c)" not the same as "exec a in b,
 c" in nested functions
In-Reply-To: <1401266879.61.0.867969486588.issue21591@psf.upfronthosting.co.za>
Message-ID: <1406301590.67.0.727111601541.issue21591@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 17:34:59 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 25 Jul 2014 15:34:59 +0000
Subject: [issue22068] test_gc fails after test_idle
Message-ID: <1406302499.67.0.809982435329.issue22068@psf.upfronthosting.co.za>


New submission from Serhiy Storchaka:

$ ./python -m test.regrtest -ugui -v test_idle test_gc
...
======================================================================
FAIL: test_saveall (test.test_gc.GCTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython-2.7/Lib/test/test_gc.py", line 200, in test_saveall
    self.assertEqual(gc.garbage, [])
AssertionError: Lists differ: [

_______________________________________

From report at bugs.python.org  Fri Jul 25 17:45:21 2014
From: report at bugs.python.org (Victor Zhong)
Date: Fri, 25 Jul 2014 15:45:21 +0000
Subject: [issue14534] Add method to mark unittest.TestCases as "do not run".
In-Reply-To: <1333977053.0.0.776415854805.issue14534@psf.upfronthosting.co.za>
Message-ID: <1406303121.71.0.616634486975.issue14534@psf.upfronthosting.co.za>


Victor Zhong added the comment:

Hi Zach,

I've pulled from the default branch. Please find attached the diff for "hg diff -r default Lib/unittest" in the attached "issue14534.v3.diff".

Victor

----------
hgrepos: +266
Added file: http://bugs.python.org/file36086/issue14534.v3.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 17:50:42 2014
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 25 Jul 2014 15:50:42 +0000
Subject: [issue22068] test_gc fails after test_idle
In-Reply-To: <1406302499.67.0.809982435329.issue22068@psf.upfronthosting.co.za>
Message-ID: <1406303442.24.0.632904724933.issue22068@psf.upfronthosting.co.za>


STINNER Victor added the comment:

It looks like test_idle leaks uncollectable objects.

I modified regrtest to use tracemalloc, I attach the output: tracemalloc.txt. Good luck to find the leaks ;-)

----------
nosy: +haypo
Added file: http://bugs.python.org/file36087/tracemalloc.txt

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 17:52:27 2014
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 25 Jul 2014 15:52:27 +0000
Subject: [issue22068] test_gc fails after test_idle
In-Reply-To: <1406302499.67.0.809982435329.issue22068@psf.upfronthosting.co.za>
Message-ID: <1406303547.41.0.770592070419.issue22068@psf.upfronthosting.co.za>


STINNER Victor added the comment:

regrtest_tracemalloc.patch: my patch for regrtest.py to dump the traceback where garbage objects where allocated using tracemalloc.
http://pytracemalloc.readthedocs.org/

(Note: you need to recompile Python to use tracemalloc on Python < 3.4.)

----------
keywords: +patch
Added file: http://bugs.python.org/file36088/regrtest_tracemalloc.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 18:21:55 2014
From: report at bugs.python.org (Berker Peksag)
Date: Fri, 25 Jul 2014 16:21:55 +0000
Subject: [issue21867] Turtle returns TypeError when undobuffer is set to 0
 (aka no undo is allowed)
In-Reply-To: <1403679717.28.0.526098112146.issue21867@psf.upfronthosting.co.za>
Message-ID: <1406305315.72.0.521022512694.issue21867@psf.upfronthosting.co.za>


Changes by Berker Peksag :


----------
stage:  -> resolved
status: open -> closed
type:  -> behavior

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 18:26:57 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Fri, 25 Jul 2014 16:26:57 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1406305617.7.0.354495417405.issue22003@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

> It doesn't seem likely this patch would introduce severe performance troubles elsewhere, but I'd like to trying it out with some example heavy BytesIO consumers (any suggestions? Some popular template engine?)

I don't have any specific suggestions, but you could try the benchmark suite here:
http://hg.python.org/benchmarks

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 18:27:10 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Fri, 25 Jul 2014 16:27:10 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1406305630.69.0.130176745354.issue22003@psf.upfronthosting.co.za>


Changes by Antoine Pitrou :


----------
stage: needs patch -> patch review

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 18:34:36 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 25 Jul 2014 16:34:36 +0000
Subject: [issue22068] test_gc fails after test_idle
In-Reply-To: <1406302499.67.0.809982435329.issue22068@psf.upfronthosting.co.za>
Message-ID: <1406306076.07.0.940173321435.issue22068@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Indeed, there are a lot of small reference loops in ConfigDialog. Tk variables save reference to the dialog and the dialog saves references to variables. Either variables should be created with different argument (i.e. self.parent), or they should be deleted when ConfigDialog is destroyed.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 18:42:09 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Fri, 25 Jul 2014 16:42:09 +0000
Subject: [issue21308] PEP 466: backport ssl changes
In-Reply-To: <9f606957-c0fc-42fe-b0e1-52ea1cb44333@email.android.com>
Message-ID: <1406306529.65.0.584655487058.issue21308@psf.upfronthosting.co.za>


Alex Gaynor added the comment:

New version of this patch fixes a bunch of versionadded and changeds in the docs that referred to the wrong version.

----------
Added file: http://bugs.python.org/file36089/ssl-backport.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 18:43:43 2014
From: report at bugs.python.org (Akira Li)
Date: Fri, 25 Jul 2014 16:43:43 +0000
Subject: [issue22069] TextIOWrapper(newline="\n",
 line_buffering=True) mistakenly treat \r as a newline
Message-ID: <1406306623.81.0.633771356606.issue22069@psf.upfronthosting.co.za>


New submission from Akira Li:

TextIOWrapper(b, newline="\n", line_buffering=True) object calls flush() 
while writing "\r". See test_line_buffering() method in 
Lib/test/test_io.py:2114

The documentation says [1]:

> If line_buffering is True, flush() is implied when a call to write contains
> a newline character.

i.e., writing \r shouldn't force flush() if newline="\n"

[1] https://docs.python.org/3.4/library/io.html#io.TextIOWrapper

----------
components: IO
messages: 223965
nosy: akira
priority: normal
severity: normal
status: open
title: TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 18:44:34 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Fri, 25 Jul 2014 16:44:34 +0000
Subject: [issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't
 batch function arguments by chunks
In-Reply-To: <1298300689.71.0.822605356721.issue11271@psf.upfronthosting.co.za>
Message-ID: <1406306674.64.0.3924777196.issue11271@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

Thank you for posting this, I'm reopening the issue.

----------
nosy: +sbt
resolution: out of date -> 
status: closed -> open

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 18:46:19 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Fri, 25 Jul 2014 16:46:19 +0000
Subject: [issue22070] Use the _functools module to speed up
 functools.total_ordering
Message-ID: <1406306779.79.0.561653436369.issue22070@psf.upfronthosting.co.za>


New submission from Nick Coghlan:

Getting functools.total_ordering to handle NotImplemented correctly in issue 10042 came at the cost of slowing it down dramatically, as the simple use of normal operator syntax had to be replaced by explicit method calls. It also introduced the quirk of going through "self.method" lookup rather than "type(self).method" slot lookup (I didn't actually notice that part during the patch review).

It would be nice if we could regain some of that lost speed, and the most readily available approach would seem to be making use of the _functools accelerator module to move the slot dispatch down into C where it can compete with the eval loop based implementation used prior to 3.4.

Raymond, I recall you were doing some speed comparisons between writing out the methods manually and using functools.total_ordering, do you have a handy micro-benchmark readily available?

----------
messages: 223967
nosy: ncoghlan, rhettinger
priority: normal
severity: normal
status: open
title: Use the _functools module to speed up functools.total_ordering
type: performance
versions: Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 18:47:58 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Fri, 25 Jul 2014 16:47:58 +0000
Subject: [issue22070] Use the _functools module to speed up
 functools.total_ordering
In-Reply-To: <1406306779.79.0.561653436369.issue22070@psf.upfronthosting.co.za>
Message-ID: <1406306878.14.0.418033964395.issue22070@psf.upfronthosting.co.za>


Alex Gaynor added the comment:

If you're going to fix the semantics of the method lookup to go via the type, can you please do that for the pure python version as well? When the C and Python versions diverge on semantics, it becomes a real pain for alternate implementations which are perfectly happy with the performance of the pure python version ;-)

----------
nosy: +alex

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 18:51:38 2014
From: report at bugs.python.org (Milan Oberkirch)
Date: Fri, 25 Jul 2014 16:51:38 +0000
Subject: [issue22071] Remove long-time deprecated attributes from smtpd
Message-ID: <1406307098.0.0.954478358175.issue22071@psf.upfronthosting.co.za>


New submission from Milan Oberkirch:

I made a patch removing deprecated attributes from smtpd (as suggested by r.david.murray).

----------
components: Library (Lib)
files: smtpd_remove_deprecated_attrs.patch
keywords: patch
messages: 223969
nosy: jesstess, pitrou, r.david.murray, zvyn
priority: normal
severity: normal
status: open
title: Remove long-time deprecated attributes from smtpd
versions: Python 3.5
Added file: http://bugs.python.org/file36090/smtpd_remove_deprecated_attrs.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 19:01:30 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Fri, 25 Jul 2014 17:01:30 +0000
Subject: [issue22070] Use the _functools module to speed up
 functools.total_ordering
In-Reply-To: <1406306878.14.0.418033964395.issue22070@psf.upfronthosting.co.za>
Message-ID: 


Nick Coghlan added the comment:

Fixing the lookup semantics should arguably be a bug report in its own
right, but yes, if the C implementation uses _PyType_LookupSpecial,
then the Python version should definitely be changed to match.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 19:08:55 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Fri, 25 Jul 2014 17:08:55 +0000
Subject: [issue22057] The doc say all globals are copied on eval(),
 but only __builtins__ is copied
In-Reply-To: <1406210389.95.0.0796853252426.issue22057@psf.upfronthosting.co.za>
Message-ID: <1406308135.83.0.853488912085.issue22057@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

Thanks for noticing this.  Do you want to propose a patch?

----------
assignee: docs at python -> rhettinger
nosy: +rhettinger
stage:  -> needs patch
versions:  -Python 3.1, Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 19:14:00 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Fri, 25 Jul 2014 17:14:00 +0000
Subject: [issue21990] saxutils defines an inner class where a normal one would
 do
In-Reply-To: <1405520928.93.0.195566496029.issue21990@psf.upfronthosting.co.za>
Message-ID: <1406308440.29.0.868939452525.issue21990@psf.upfronthosting.co.za>


Changes by Raymond Hettinger :


----------
assignee:  -> rhettinger
nosy: +rhettinger

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 19:24:55 2014
From: report at bugs.python.org (paul j3)
Date: Fri, 25 Jul 2014 17:24:55 +0000
Subject: [issue22047] argparse improperly prints mutually exclusive options
 when they are in a group
In-Reply-To: <1406131424.14.0.0235697032218.issue22047@psf.upfronthosting.co.za>
Message-ID: <1406309095.05.0.129048206989.issue22047@psf.upfronthosting.co.za>


paul j3 added the comment:

On further thought, I think

   group2 = group1.add_mutually_exclusive_group()

should have raised an error, stating that a group (argument or mutually exclusive) cannot be added to a mutually exclusive group.

Also an argument group should not be added to another argument group.

However, adding a mutually exclusive group to an argument group is ok, though only for the undocumented (though tested) purpose of giving it a title.

----------
versions: +Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 19:26:44 2014
From: report at bugs.python.org (Roundup Robot)
Date: Fri, 25 Jul 2014 17:26:44 +0000
Subject: [issue21990] saxutils defines an inner class where a normal one would
 do
In-Reply-To: <1405520928.93.0.195566496029.issue21990@psf.upfronthosting.co.za>
Message-ID: <3hKcll6fjDz7LjZ@mail.python.org>


Roundup Robot added the comment:

New changeset a5cb10f2dbaa by Raymond Hettinger in branch '2.7':
Issue #21990:  Cleanup unnecessary inner class definition in saxutils.
http://hg.python.org/cpython/rev/a5cb10f2dbaa

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 19:28:34 2014
From: report at bugs.python.org (Sam Kerr)
Date: Fri, 25 Jul 2014 17:28:34 +0000
Subject: [issue22047] argparse improperly prints mutually exclusive options
 when they are in a group
In-Reply-To: <1406131424.14.0.0235697032218.issue22047@psf.upfronthosting.co.za>
Message-ID: <1406309314.61.0.189910554763.issue22047@psf.upfronthosting.co.za>


Sam Kerr added the comment:

What I was going for was the ability to have a group contain a mutually exclusive group and a non-exclusive group, but using the mutually exclusive group meant you could not use the non-exclusive group.

Such as:

[ [ -opt1 | -opt2 | -opt3   ] [ [-opt4] [-opt5] [-opt6] ] ]

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 19:29:46 2014
From: report at bugs.python.org (Chris Bruner)
Date: Fri, 25 Jul 2014 17:29:46 +0000
Subject: [issue22049] argparse: type= doesn't honor nargs > 1
In-Reply-To: <1406259723.26.0.0398775751208.issue22049@psf.upfronthosting.co.za>
Message-ID: 


Chris Bruner added the comment:

Yes, I know. My function just sees '1', but I think it should see '1 2 3' so that it can figure out what to do. That's impossible (well, impossible without saving state between calls) when it sees the arguments piecemeal. 

Sent from my iPhone

> On Jul 24, 2014, at 9:42 PM, paul j3  wrote:
> 
> 
> paul j3 added the comment:
> 
> Note that 
> 
>    '-t 1 2 3'.split()
> 
> becomes
> 
>    ['-t', '1', '2', '3']
> 
> Your 'type' function sees those 3 strings individually.  Try printing 'string' the first thing in your function to see what we mean.
> 
> ----------
> nosy: +paul.j3
> 
> _______________________________________
> Python tracker 
> 
> _______________________________________

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 19:31:11 2014
From: report at bugs.python.org (Derek Wilson)
Date: Fri, 25 Jul 2014 17:31:11 +0000
Subject: [issue3982] support .format for bytes
In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za>
Message-ID: <1406309471.63.0.990812199389.issue3982@psf.upfronthosting.co.za>


Derek Wilson added the comment:

First off, +1 for this feature. It's not just for twisted, but anyone doing anything with binary data (storage, compression, encryption and networking for me) with python since 2.6 will very likely have been using .format for building messages. I know I have and obviously others have been doing so as well.

The advantages of .format to me are:

* compatible with 2.6 (porting and single code base support easier)
* ease of composition (the format langauge makes it easy to build complex data structures out of bytes)
* readability (named fields make complex formats obvious)
* consistency (manipulating a block of bytes or characters can be done in a similar way)

Specific comments on the patch supplied by terry.reedy:

* it doesn't support named fields
* it doesn't handle padding
* it doesn't handle nested formats (like '{0:{1}>{2}}'.format(data,pad_char,pad_width)
* formatting byte strings with a width embedds the repr of the byte string ( bf(b'{:>10}', [b'test']) == b"   b'test'" )

Really this isn't a good way to solve the problem.

Has a PEP been created for this? If not how can I help make that happen?

Including this in 3.5 would be so helpful for us low level systems programmers out there who have lots of code using .format for binary interfaces in python 2.6/2.7 already.

Also, not to add to derailment, but if we're adding a .format for python3 bytes it would be great if .format could pad with the null byte ('\0') which it currently converts to spaces internally (which is strange). Since this unexpected conversion is bad (so padding with null doesn't happen in python2) its more like a bug fix... actually - maybe that's a separate bug to file on the current .format for text...

----------
nosy: +underrun

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 19:37:40 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Fri, 25 Jul 2014 17:37:40 +0000
Subject: [issue22018] Add a new signal.set_wakeup_socket() function
In-Reply-To: <1406292752.96.0.155996913138.issue22018@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

> It doesn't answer to my complain: I don't want to support file descriptors on Windows anymore because file descriptors cannot be configured in non-blocking mode.

I think it does : if an exception is raised if an FD/handler is not in
non-blocking mode, this should include Windows file descriptors,
right?

> If we raise an error if FD and sockets are blocking, calling set_wakeup_fd() on a FD on Windows would always fail. So raising an exception because the integer is a file descriptor or raising an exception because the file descriptor is blocking leads to same result: FD are not more supported on Windows.

See above, I'm not sure what you're complaining about: since file
descriptors can't be made non-blocking on Windows, trying to register
them will raise an error. And since there's another issue for this, I
don't think the check belong in this patch (although it would proably
make more sense to commit the other patch first).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 19:37:52 2014
From: report at bugs.python.org (Sam Kerr)
Date: Fri, 25 Jul 2014 17:37:52 +0000
Subject: [issue22047] argparse improperly prints mutually exclusive options
 when they are in a group
In-Reply-To: <1406131424.14.0.0235697032218.issue22047@psf.upfronthosting.co.za>
Message-ID: <1406309872.31.0.809762223538.issue22047@psf.upfronthosting.co.za>


Sam Kerr added the comment:

I fat fingered the example, sorry:

[ [ -opt1 | -opt2 | -opt3   ] | [ [-opt4] [-opt5] [-opt6] ] ]

Note the new pipe between the 2 subgroups

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 19:42:29 2014
From: report at bugs.python.org (Derek Wilson)
Date: Fri, 25 Jul 2014 17:42:29 +0000
Subject: [issue3982] support .format for bytes
In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za>
Message-ID: <1406310149.77.0.54564200215.issue3982@psf.upfronthosting.co.za>


Derek Wilson added the comment:

sorry, terry's patch does handle padding - just with the caveats i listed later. i should have removed that bullet.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 19:45:59 2014
From: report at bugs.python.org (Roundup Robot)
Date: Fri, 25 Jul 2014 17:45:59 +0000
Subject: [issue19875] test_getsockaddrarg occasional failure
In-Reply-To: <1386065859.81.0.4295023541.issue19875@psf.upfronthosting.co.za>
Message-ID: <3hKd9y3zMcz7LjP@mail.python.org>


Roundup Robot added the comment:

New changeset 897c9e6ddb1a by Charles-Fran?ois Natali in branch '3.4':
Issue #19875: Fix random test_getsockaddrarg() failure.
http://hg.python.org/cpython/rev/897c9e6ddb1a

New changeset 619feea86ce4 by Charles-Fran?ois Natali in branch 'default':
Issue #19875: Fix random test_getsockaddrarg() failure.
http://hg.python.org/cpython/rev/619feea86ce4

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 19:54:33 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Fri, 25 Jul 2014 17:54:33 +0000
Subject: [issue19875] test_getsockaddrarg occasional failure
In-Reply-To: <1386065859.81.0.4295023541.issue19875@psf.upfronthosting.co.za>
Message-ID: <1406310873.75.0.190321737878.issue19875@psf.upfronthosting.co.za>


Charles-Fran?ois Natali added the comment:

Should be fixed now, thanks!

----------
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 20:27:17 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Fri, 25 Jul 2014 18:27:17 +0000
Subject: [issue22072] Fix typos in SSL's documentation
Message-ID: <1406312837.87.0.669904436457.issue22072@psf.upfronthosting.co.za>


New submission from Alex Gaynor:

Attached patch fixes a pair of typos.

----------
assignee: docs at python
components: Documentation
files: ssl-docs.diff
keywords: easy, needs review, patch
messages: 223982
nosy: alex, docs at python
priority: normal
severity: normal
status: open
title: Fix typos in SSL's documentation
versions: Python 3.5
Added file: http://bugs.python.org/file36091/ssl-docs.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 20:30:47 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Fri, 25 Jul 2014 18:30:47 +0000
Subject: [issue21990] saxutils defines an inner class where a normal one would
 do
In-Reply-To: <1405520928.93.0.195566496029.issue21990@psf.upfronthosting.co.za>
Message-ID: <1406313047.73.0.63449676296.issue21990@psf.upfronthosting.co.za>


Changes by Raymond Hettinger :


----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 20:32:07 2014
From: report at bugs.python.org (Roundup Robot)
Date: Fri, 25 Jul 2014 18:32:07 +0000
Subject: [issue22072] Fix typos in SSL's documentation
In-Reply-To: <1406312837.87.0.669904436457.issue22072@psf.upfronthosting.co.za>
Message-ID: <3hKfCC1mZGz7LjP@mail.python.org>


Roundup Robot added the comment:

New changeset 1c7567ec6292 by Zachary Ware in branch '3.4':
Issue #22072: Fix a couple of SSL doc typos.  Patch by Alex Gaynor.
http://hg.python.org/cpython/rev/1c7567ec6292

New changeset 967311e6c0d2 by Zachary Ware in branch 'default':
Closes #22072: Merge typo fixes from 3.4
http://hg.python.org/cpython/rev/967311e6c0d2

----------
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 20:32:48 2014
From: report at bugs.python.org (Zachary Ware)
Date: Fri, 25 Jul 2014 18:32:48 +0000
Subject: [issue22072] Fix typos in SSL's documentation
In-Reply-To: <1406312837.87.0.669904436457.issue22072@psf.upfronthosting.co.za>
Message-ID: <1406313168.85.0.375524235666.issue22072@psf.upfronthosting.co.za>


Zachary Ware added the comment:

Thanks, Alex!

----------
nosy: +zach.ware
versions: +Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 20:40:10 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Fri, 25 Jul 2014 18:40:10 +0000
Subject: [issue22073] Reference links in PEP466 are broken
Message-ID: <1406313610.77.0.0816993092292.issue22073@psf.upfronthosting.co.za>


New submission from Alex Gaynor:

Specifically, the links in the "Acknowledgements" section http://legacy.python.org/dev/peps/pep-0466/#acknowledgements

----------
messages: 223985
nosy: alex, ncoghlan
priority: normal
severity: normal
status: open
title: Reference links in PEP466 are broken

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 20:41:54 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 25 Jul 2014 18:41:54 +0000
Subject: [issue10291] Clean-up turtledemo in-package documentation
In-Reply-To: <1288663412.18.0.821423720263.issue10291@psf.upfronthosting.co.za>
Message-ID: <1406313714.35.0.773581491613.issue10291@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

Thanks for the explanation. I will re-delete the file after copying 3.4 version to docstring and marking the original .txt as frozen.
I will do same with other files deleted in 3.5.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 21:23:26 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Fri, 25 Jul 2014 19:23:26 +0000
Subject: [issue22058] datetime.datetime() should accept a datetime.date as
 init parameter
In-Reply-To: <1406212892.92.0.452471397422.issue22058@psf.upfronthosting.co.za>
Message-ID: <1406316206.84.0.980047904274.issue22058@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

[David]
> There is already a spelling for that operation, and it is d.date()

[Tim]
Alexander, I don't see a need to make everything a one-liner

[Facundo]
> So, unless anyody wants to pursue with this, I'll close the issue.

Marking as closed, rejected for the reasons listed and because making a function signature more complicated just isn't worth it.

----------
nosy: +rhettinger
resolution:  -> rejected
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 21:23:45 2014
From: report at bugs.python.org (Tshepang Lekhonkhobe)
Date: Fri, 25 Jul 2014 19:23:45 +0000
Subject: [issue22045] Python make issue
In-Reply-To: <1406117862.23.0.135696000898.issue22045@psf.upfronthosting.co.za>
Message-ID: <1406316225.45.0.751809230583.issue22045@psf.upfronthosting.co.za>


Changes by Tshepang Lekhonkhobe :


----------
nosy: +tshepang

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 21:26:20 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Fri, 25 Jul 2014 19:26:20 +0000
Subject: [issue22033] Subclass friendly reprs
In-Reply-To: <1406020084.96.0.790015152809.issue22033@psf.upfronthosting.co.za>
Message-ID: <1406316380.48.0.257496434075.issue22033@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

+1 These all look worthwhile and correct.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 21:42:17 2014
From: report at bugs.python.org (Roundup Robot)
Date: Fri, 25 Jul 2014 19:42:17 +0000
Subject: [issue18093] Move main functions to a separate Programs directory
In-Reply-To: <1369828290.2.0.750301008205.issue18093@psf.upfronthosting.co.za>
Message-ID: <3hKgm837bjz7LjM@mail.python.org>


Roundup Robot added the comment:

New changeset 413017768dde by Ned Deily in branch 'default':
Issue #18093: Create Programs directory in build location for
http://hg.python.org/cpython/rev/413017768dde

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 21:48:47 2014
From: report at bugs.python.org (Roundup Robot)
Date: Fri, 25 Jul 2014 19:48:47 +0000
Subject: [issue21958] Allow python 2.7 to compile with Visual Studio 2013
In-Reply-To: <1405099204.33.0.886354272035.issue21958@psf.upfronthosting.co.za>
Message-ID: <3hKgvg1Vpyz7LjM@mail.python.org>


Roundup Robot added the comment:

New changeset cb2e1b3a395f by Zachary Ware in branch '2.7':
Issue #21958: Define HAVE_ROUND when building with VS 2013 and above.
http://hg.python.org/cpython/rev/cb2e1b3a395f

New changeset 1c35cefd25b7 by Zachary Ware in branch '3.4':
Issue #21958: Define HAVE_ROUND when building with VS 2013 and above.
http://hg.python.org/cpython/rev/1c35cefd25b7

New changeset 1f5e8380f791 by Zachary Ware in branch 'default':
Issue #21958: Merge with 3.4
http://hg.python.org/cpython/rev/1f5e8380f791

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 21:57:03 2014
From: report at bugs.python.org (Zachary Ware)
Date: Fri, 25 Jul 2014 19:57:03 +0000
Subject: [issue21958] Allow python 2.7 to compile with Visual Studio 2013
In-Reply-To: <1405099204.33.0.886354272035.issue21958@psf.upfronthosting.co.za>
Message-ID: <1406318223.94.0.736634833206.issue21958@psf.upfronthosting.co.za>


Zachary Ware added the comment:

Thanks for the patch, I've committed it.  For future reference, the devguide should answer any questions you may have about how to contribute to Python, or you can ask on any of the various mailing lists (where you'll either get an answer or be pointed to a list better suited to the question).  In this particular case, I just removed the VS2013 build files myself, and only particular people (those with a Python logo next to their name on the tracker, like myself or Steve) are allowed to push to hg.python.org.

Also, if you haven't already, please take a moment to sign a contributor agreement (https://www.python.org/psf/contrib/).  In this case, the patch was fairly trivial and almost a direct copy from elsewhere in the source tree, so I went ahead and pushed it.  For larger or more involved patches, the PSF will require a contributor agreement to be on file before your patch can be accepted.

Thanks again for your contribution!

----------
assignee:  -> zach.ware
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 22:15:28 2014
From: report at bugs.python.org (Roundup Robot)
Date: Fri, 25 Jul 2014 20:15:28 +0000
Subject: [issue22073] Reference links in PEP466 are broken
In-Reply-To: <1406313610.77.0.0816993092292.issue22073@psf.upfronthosting.co.za>
Message-ID: <3hKhVR6rprz7LjY@mail.python.org>


Roundup Robot added the comment:

New changeset 3b3dc5fafb82 by Ned Deily in branch 'default':
Issue #22073: fix footnote references.
http://hg.python.org/peps/rev/3b3dc5fafb82

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 22:16:46 2014
From: report at bugs.python.org (Ned Deily)
Date: Fri, 25 Jul 2014 20:16:46 +0000
Subject: [issue22073] Reference links in PEP466 are broken
In-Reply-To: <1406313610.77.0.0816993092292.issue22073@psf.upfronthosting.co.za>
Message-ID: <1406319406.23.0.900806115628.issue22073@psf.upfronthosting.co.za>


Ned Deily added the comment:

Fixed, thanks!

----------
nosy: +ned.deily
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 22:21:08 2014
From: report at bugs.python.org (Akira Li)
Date: Fri, 25 Jul 2014 20:21:08 +0000
Subject: [issue563491] Add separator argument to readline()
Message-ID: <1406319668.25.0.641389420563.issue563491@psf.upfronthosting.co.za>


Akira Li added the comment:

Reincarnation: issue #1152248: Add support for reading records with 
arbitrary separators to the standard IO stack

----------
nosy: +akira

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 22:21:23 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Fri, 25 Jul 2014 20:21:23 +0000
Subject: [issue21308] PEP 466: backport ssl changes
In-Reply-To: <9f606957-c0fc-42fe-b0e1-52ea1cb44333@email.android.com>
Message-ID: <1406319683.67.0.754140204692.issue21308@psf.upfronthosting.co.za>


Alex Gaynor added the comment:

Try #3: This fixes a bug with NPN (I hadn't tested with an OpenSSL that supports NPN, I have now), and cherry-picks the typo fixes from 967311e6c0d2

----------
Added file: http://bugs.python.org/file36092/ssl-backport.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 22:22:35 2014
From: report at bugs.python.org (Akira Li)
Date: Fri, 25 Jul 2014 20:22:35 +0000
Subject: [issue17083] can't specify newline string for readline for binary
 files
In-Reply-To: <1359570725.1.0.7766942653.issue17083@psf.upfronthosting.co.za>
Message-ID: <1406319755.55.0.0899539378837.issue17083@psf.upfronthosting.co.za>


Akira Li added the comment:

Related issue #1152248: Add support for reading records with 
arbitrary separators to the standard IO stack

It suggests to extend the newline support for both text and
binary files.

----------
nosy: +akira

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 22:36:16 2014
From: report at bugs.python.org (Roundup Robot)
Date: Fri, 25 Jul 2014 20:36:16 +0000
Subject: [issue22033] Subclass friendly reprs
In-Reply-To: <1406020084.96.0.790015152809.issue22033@psf.upfronthosting.co.za>
Message-ID: <3hKhyS132fz7LjY@mail.python.org>


Roundup Robot added the comment:

New changeset 42276ad3acef by Serhiy Storchaka in branch 'default':
Issue #22033: Reprs of most Python implemened classes now contain actual
http://hg.python.org/cpython/rev/42276ad3acef

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 22:38:35 2014
From: report at bugs.python.org (Mark Nottingham)
Date: Fri, 25 Jul 2014 20:38:35 +0000
Subject: [issue20188] ALPN support for TLS
In-Reply-To: <1389153179.88.0.510995543218.issue20188@psf.upfronthosting.co.za>
Message-ID: <1406320715.94.0.132744127058.issue20188@psf.upfronthosting.co.za>


Mark Nottingham added the comment:

HTTP/2 requires ALPN, BTW.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 22:40:49 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 25 Jul 2014 20:40:49 +0000
Subject: [issue22033] Subclass friendly reprs
In-Reply-To: <1406020084.96.0.790015152809.issue22033@psf.upfronthosting.co.za>
Message-ID: <1406320849.67.0.669580302207.issue22033@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Thanks Raymond for the review.

----------
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 22:47:34 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 25 Jul 2014 20:47:34 +0000
Subject: [issue21802] Reader of BufferedRWPair is not closed if writer's
 close() fails
In-Reply-To: <1403113942.14.0.852744973704.issue21802@psf.upfronthosting.co.za>
Message-ID: <1406321254.24.0.521917830617.issue21802@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Antoine, what do you think about this?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 22:56:48 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 25 Jul 2014 20:56:48 +0000
Subject: [issue21585] Run Tkinter tests with wantobjects=False
In-Reply-To: <1401137639.41.0.24885887123.issue21585@psf.upfronthosting.co.za>
Message-ID: <1406321808.96.0.6677315361.issue21585@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Thanks Lita, but I think it would be better if all Tkinter tests will automatically run in both wantobjects=0 and wantobjects=1 modes.

As for your patch, ttk.Button() creates default root with current wantobjects value, this default root can be unintentionally used in tests with other wantobjects value. We should ensure that default root is not used in tests.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 22:59:49 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 25 Jul 2014 20:59:49 +0000
Subject: [issue21574] Port image types detections from PIL to the imghdr module
In-Reply-To: <1401010621.11.0.919611847501.issue21574@psf.upfronthosting.co.za>
Message-ID: <1406321989.92.0.3776682984.issue21574@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Claudiu, are you working on this issue? If not, I'll start writing a patch.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 23:12:19 2014
From: report at bugs.python.org (Ned Deily)
Date: Fri, 25 Jul 2014 21:12:19 +0000
Subject: [issue22065] Update turtledemo menu creation
In-Reply-To: <1406274342.14.0.580030811774.issue22065@psf.upfronthosting.co.za>
Message-ID: <1406322739.21.0.133877339035.issue22065@psf.upfronthosting.co.za>


Ned Deily added the comment:

Nice insight, Serhly!  The patch addresses the menu concern I brought up in msg223631 of Issue21933.  I evaluated the patch with all three OS X Tk variants (Cocoa, Carbon, and X11) and it looked good to me.  The only review comment I have is that ideally, with Cocoa or Carbon Tk's, the "About ..." menu item in the "Apple" menu row would be customized to display the "aboutTurtleDemo" window; as it stands, it defaults to a Tk-supplied "about Tk" window.  The problem with doing that is that there are Tk-variant-specfic (Cocoa vs Carbon) ways to do that and it shouldn't be done at all for X11 so the implementation would get a bit messy;  the relevant code for IDLE is in macosxSupport.py towards the end of overrideRootMenu().  It's probably overkill for turtledemo so I'm OK with the patch as it stands (note I did not try it on any other platform).

----------
stage: needs patch -> patch review

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 23:15:01 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Fri, 25 Jul 2014 21:15:01 +0000
Subject: [issue22044] Premature Py_DECREF while generating a TypeError in
 call_tzinfo_method
In-Reply-To: <1406091182.12.0.549229771581.issue22044@psf.upfronthosting.co.za>
Message-ID: <1406322901.55.0.513991261333.issue22044@psf.upfronthosting.co.za>


Changes by Raymond Hettinger :


----------
assignee:  -> rhettinger
nosy: +rhettinger
versions:  -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 23:37:22 2014
From: report at bugs.python.org (paul j3)
Date: Fri, 25 Jul 2014 21:37:22 +0000
Subject: [issue22047] argparse improperly prints mutually exclusive options
 when they are in a group
In-Reply-To: <1406131424.14.0.0235697032218.issue22047@psf.upfronthosting.co.za>
Message-ID: <1406324242.32.0.461743579813.issue22047@psf.upfronthosting.co.za>


paul j3 added the comment:

Here's a preliminary patch that raises an error if there's an attempt to nest a mutually exclusive group in another, or there's an attempt to add an argument group to either kind of group.

It still needs test_argparse.py and argparse.rst changes

I'm raising a ValueError, since that is what most of the other add_argument errors do.  An alternative is a NotImplementedError, since that is, in effect, what I am doing, blocking the implementation of particular 'add' methods.

An alternative to adding this patch as high priority bug issue, is to include it in the UsageGroup patch (11588) which will implement nestable groups.

----------
keywords: +patch
Added file: http://bugs.python.org/file36093/issue22047_1.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Jul 25 23:54:41 2014
From: report at bugs.python.org (Claudiu Popa)
Date: Fri, 25 Jul 2014 21:54:41 +0000
Subject: [issue21574] Port image types detections from PIL to the imghdr module
In-Reply-To: <1401010621.11.0.919611847501.issue21574@psf.upfronthosting.co.za>
Message-ID: <1406325281.85.0.710857820665.issue21574@psf.upfronthosting.co.za>


Claudiu Popa added the comment:

No, I didn't start any work on this and right now, with EuroPython, I don't have that much time to start, so feel free to take it and write a patch.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 00:00:37 2014
From: report at bugs.python.org (Roundup Robot)
Date: Fri, 25 Jul 2014 22:00:37 +0000
Subject: [issue22044] Premature Py_DECREF while generating a TypeError in
 call_tzinfo_method
In-Reply-To: <1406091182.12.0.549229771581.issue22044@psf.upfronthosting.co.za>
Message-ID: <3hKkqm1WDqz7LjM@mail.python.org>


Roundup Robot added the comment:

New changeset 01c6d2893092 by Raymond Hettinger in branch '3.4':
Issue #22044: Fixed premature DECREF in call_tzinfo_method.
http://hg.python.org/cpython/rev/01c6d2893092

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 00:02:41 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Fri, 25 Jul 2014 22:02:41 +0000
Subject: [issue22044] Premature Py_DECREF while generating a TypeError in
 call_tzinfo_method
In-Reply-To: <1406091182.12.0.549229771581.issue22044@psf.upfronthosting.co.za>
Message-ID: <1406325761.32.0.654029964541.issue22044@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

Thanks for the patch.

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 00:08:08 2014
From: report at bugs.python.org (Gennadiy Zlobin)
Date: Fri, 25 Jul 2014 22:08:08 +0000
Subject: [issue21862] cProfile command-line should accept "-m module_name" as
 an alternative to script path
In-Reply-To: <1403640414.18.0.449527177368.issue21862@psf.upfronthosting.co.za>
Message-ID: <1406326088.46.0.469221660017.issue21862@psf.upfronthosting.co.za>


Gennadiy Zlobin added the comment:

I added runpy import mechanism

----------
nosy: +gennad
Added file: http://bugs.python.org/file36094/21862.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 00:17:03 2014
From: report at bugs.python.org (paul j3)
Date: Fri, 25 Jul 2014 22:17:03 +0000
Subject: [issue22049] argparse: type= doesn't honor nargs > 1
In-Reply-To: <1406135782.37.0.476079892774.issue22049@psf.upfronthosting.co.za>
Message-ID: <1406326623.31.0.332890989494.issue22049@psf.upfronthosting.co.za>


paul j3 added the comment:

What you want is a custom Action rather than a custom Type.  

from the documentation:

    >>> class FooAction(argparse.Action):
    ...     def __call__(self, parser, namespace, values, option_string=None):
    ...         print('%r %r %r' % (namespace, values, option_string))
    ...         setattr(namespace, self.dest, values)

'values' will be the list ['1','2','3'], which you test and manipulate, before finally saving it to the 'namespace'.

    ret = (int(values[0]), int(values[1]), float(values[2]))
    setattr(namespace, self.dest, ret)

Setting 'nargs=3' ensures that this action will always get a 3 item list.  If the parser can't give it 3 items, it will raise an error rather than call your Action.

'optparse' passed the remaining argument strings to Option's callback, which could consume as many as it wanted.  'argparse' does not give the Actions that power.  There is a fundamental difference in the parsing algorithm.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 00:52:22 2014
From: report at bugs.python.org (paul j3)
Date: Fri, 25 Jul 2014 22:52:22 +0000
Subject: [issue22047] argparse improperly prints mutually exclusive options
 when they are in a group
In-Reply-To: <1406131424.14.0.0235697032218.issue22047@psf.upfronthosting.co.za>
Message-ID: <1406328742.64.0.342417012148.issue22047@psf.upfronthosting.co.za>


paul j3 added the comment:

ArgumentGroups and MutuallyExclusiveGroups, as currently defined, won't give you that kind of usage.  I have appended a script that uses UsageGroups, which I am developing for http://bugs.python.org/issue11588, 
to solve this.

It defines 2 'mxg' groups (groups with the xor logic of mutually exclusive groups), and 1 'any' group.  They can be nested.

The resulting usage line is:

    usage: PROG [-h] [[--opt1 | --opt2 | --opt3] | [--opt4 --opt5 --opt6]]

Normally '|' is used for simple logical 'or'.  But in mutually exclusive groups it denotes 'xor'.  So what should join 'any' lists?  You chose ' ', I was using ','.  Defining a usage notation that is simple, intuitive, and also flexible, is not easy.

----------
Added file: http://bugs.python.org/file36095/issue22047.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 01:08:25 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Fri, 25 Jul 2014 23:08:25 +0000
Subject: [issue22074] Lib/test/make_ssl_certs.py fails with NameError
Message-ID: <1406329705.02.0.672506438124.issue22074@psf.upfronthosting.co.za>


New submission from Alex Gaynor:

This is on default:


$ python3 Lib/test/make_ssl_certs.py
creating cert for localhost
Generating a 1024 bit RSA private key
.++++++
....................................................++++++
writing new private key to '/var/folders/fm/57qdjdrx6gzgcq1zlym0xwfc0000gn/T/tmpbfrqx7mo'
-----
password protecting ssl_key.pem in ssl_key.passwd.pem
writing RSA key
writing RSA key
Traceback (most recent call last):
  File "Lib/test/make_ssl_certs.py", line 158, in 
    make_ca()
  File "Lib/test/make_ssl_certs.py", line 118, in make_ca
    r.write("00")
NameError: name 'r' is not defined


I can't see anything that ought to be assigning `r`, perhaps it's supposed to be `f`?

----------
components: Library (Lib), Tests
messages: 224011
nosy: alex
priority: normal
severity: normal
status: open
title: Lib/test/make_ssl_certs.py fails with NameError
versions: Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 01:08:32 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Fri, 25 Jul 2014 23:08:32 +0000
Subject: [issue22074] Lib/test/make_ssl_certs.py fails with NameError
In-Reply-To: <1406329705.02.0.672506438124.issue22074@psf.upfronthosting.co.za>
Message-ID: <1406329712.9.0.735230738195.issue22074@psf.upfronthosting.co.za>


Changes by Alex Gaynor :


----------
nosy: +christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 01:36:33 2014
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 25 Jul 2014 23:36:33 +0000
Subject: [issue19884] Importing readline produces erroneous output
In-Reply-To: <1386158776.45.0.265770743985.issue19884@psf.upfronthosting.co.za>
Message-ID: <1406331393.61.0.787987528332.issue19884@psf.upfronthosting.co.za>


STINNER Victor added the comment:

The test fails also on OpenBSD:

http://buildbot.python.org/all/builders/x86%20OpenBSD%205.5%203.x/builds/671/steps/test/logs/stdio

======================================================================
FAIL: test_init (test.test_readline.TestReadline)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/python-builds/3.x.borja-openbsd-x86/build/Lib/test/test_readline.py", line 53, in test_init
    self.assertEqual(stdout, b'')
AssertionError: b'\x1b[?1034h' != b''

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 01:40:23 2014
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 25 Jul 2014 23:40:23 +0000
Subject: [issue22063] asyncio: sock_xxx() methods of event loops should check
 ath sockets are non-blocking
In-Reply-To: <1406244257.84.0.711370901169.issue22063@psf.upfronthosting.co.za>
Message-ID: <1406331623.11.0.36593217345.issue22063@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
title: asyncio: sock_xxx() methods of event loops should make the socket non-blocking -> asyncio: sock_xxx() methods of event loops should check ath sockets are non-blocking

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 01:50:18 2014
From: report at bugs.python.org (Adam Tauno Williams)
Date: Fri, 25 Jul 2014 23:50:18 +0000
Subject: [issue15858] tarfile missing entries due to omitted uid/gid fields
In-Reply-To: <1346701660.86.0.976031645545.issue15858@psf.upfronthosting.co.za>
Message-ID: <1406332218.71.0.55432739546.issue15858@psf.upfronthosting.co.za>


Adam Tauno Williams added the comment:

test fails for me with provided bad.tar [as described in comment] but test passed after applying patch to tarfile.

----------
nosy: +whitemice

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 02:06:33 2014
From: report at bugs.python.org (Matt Behrens)
Date: Sat, 26 Jul 2014 00:06:33 +0000
Subject: [issue21987] TarFile.getmember on directory requires trailing slash
 iff over 100 chars
In-Reply-To: <1405482059.28.0.321220843423.issue21987@psf.upfronthosting.co.za>
Message-ID: <1406333193.25.0.90777719358.issue21987@psf.upfronthosting.co.za>


Matt Behrens added the comment:

Here is a 3.5 fix based on Lars Gust?bel's, with test.

----------
nosy: +zigg
versions: +Python 3.5
Added file: http://bugs.python.org/file36096/issue21987_py3.5_with_test.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 02:10:59 2014
From: report at bugs.python.org (Adam Tauno Williams)
Date: Sat, 26 Jul 2014 00:10:59 +0000
Subject: [issue12319] [http.client] HTTPConnection.putrequest not support
 "chunked" Transfer-Encodings to send data
In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za>
Message-ID: <1406333459.53.0.169994652083.issue12319@psf.upfronthosting.co.za>


Changes by Adam Tauno Williams :


----------
nosy: +whitemice

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 03:15:14 2014
From: report at bugs.python.org (Demian Brecht)
Date: Sat, 26 Jul 2014 01:15:14 +0000
Subject: [issue12319] [http.client] HTTPConnection.putrequest not support
 "chunked" Transfer-Encodings to send data
In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za>
Message-ID: <1406337314.84.0.700690725724.issue12319@psf.upfronthosting.co.za>


Changes by Demian Brecht :


----------
nosy: +demian.brecht

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 04:00:11 2014
From: report at bugs.python.org (wilson campusano)
Date: Sat, 26 Jul 2014 02:00:11 +0000
Subject: [issue22075] Lambda, enumerate and list comprehensins crash
Message-ID: <1406340011.09.0.682256920065.issue22075@psf.upfronthosting.co.za>


New submission from wilson campusano:

SO: Ubuntu 14.04

When i run this code my pc crash

----------
components: Interpreter Core
files: test_c.py
messages: 224015
nosy: wilsoncampusano
priority: normal
severity: normal
status: open
title: Lambda, enumerate and list comprehensins crash
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file36097/test_c.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 04:06:43 2014
From: report at bugs.python.org (Akira Li)
Date: Sat, 26 Jul 2014 02:06:43 +0000
Subject: [issue1152248] Add support for reading records with arbitrary
 separators to the standard IO stack
Message-ID: <1406340403.31.0.351356723704.issue1152248@psf.upfronthosting.co.za>


Akira Li added the comment:

To make the discussion more specific, here's a patch that adds support
for alternative newlines in _pyio.TextIOWrapper. It aslo updates the
documentation and adds more io tests. It does not provide C
implementation or the extended newline support for binary files.

As a side-effect it also fixes the bug in line_buffering=True
behavior, see issue22069O.

Note: The implementation does no newline translations unless in legacy
special cases i.e., newline='\0' behaves like newline='\n'. This is a 
key distinction from the behavior described in
http://bugs.python.org/file36008/pep-newline.txt

The initial specification is from
https://mail.python.org/pipermail/python-ideas/2014-July/028381.html

----------
keywords: +patch
nosy: +akira
Added file: http://bugs.python.org/file36098/io-newline-issue1152248.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 04:11:22 2014
From: report at bugs.python.org (wilson campusano)
Date: Sat, 26 Jul 2014 02:11:22 +0000
Subject: [issue22075] Lambda, Enumerate and List comprehensions crash
In-Reply-To: <1406340011.09.0.682256920065.issue22075@psf.upfronthosting.co.za>
Message-ID: <1406340682.95.0.319726057204.issue22075@psf.upfronthosting.co.za>


Changes by wilson campusano :


----------
title: Lambda, enumerate and list comprehensins crash -> Lambda, Enumerate and List comprehensions crash

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 04:15:00 2014
From: report at bugs.python.org (wilson campusano)
Date: Sat, 26 Jul 2014 02:15:00 +0000
Subject: [issue22075] Lambda, Enumerate and List comprehensions crash
In-Reply-To: <1406340011.09.0.682256920065.issue22075@psf.upfronthosting.co.za>
Message-ID: <1406340900.45.0.746816022398.issue22075@psf.upfronthosting.co.za>


wilson campusano added the comment:

SO: Ubuntu 14.04

When i run this code my pc crash

----------
Added file: http://bugs.python.org/file36099/test_c.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 04:46:41 2014
From: report at bugs.python.org (Ned Deily)
Date: Sat, 26 Jul 2014 02:46:41 +0000
Subject: [issue22075] Lambda, Enumerate and List comprehensions crash
In-Reply-To: <1406340011.09.0.682256920065.issue22075@psf.upfronthosting.co.za>
Message-ID: <1406342801.48.0.219775956564.issue22075@psf.upfronthosting.co.za>


Ned Deily added the comment:

It may be hard to see what's going on with the code written as a list comprehension.  We could expand it out to something roughly equivalent and print the first n iterations:

def main():
    lista =[1, 4, 5 , 5, 6 , 3 ,1]
    def ins(x):
        return lista.insert(x,0)

    for idx, v in enumerate(lista):
        if v == 5:
            ins(idx)
            print(idx, lista)
        if idx > 10:
            break

if __name__ == '__main__':
	main()


(2, [1, 4, 0, 5, 5, 6, 3, 1])
(3, [1, 4, 0, 0, 5, 5, 6, 3, 1])
(4, [1, 4, 0, 0, 0, 5, 5, 6, 3, 1])
(5, [1, 4, 0, 0, 0, 0, 5, 5, 6, 3, 1])
(6, [1, 4, 0, 0, 0, 0, 0, 5, 5, 6, 3, 1])
(7, [1, 4, 0, 0, 0, 0, 0, 0, 5, 5, 6, 3, 1])
(8, [1, 4, 0, 0, 0, 0, 0, 0, 0, 5, 5, 6, 3, 1])
(9, [1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 6, 3, 1])
(10, [1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 6, 3, 1])
(11, [1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 6, 3, 1])

Because the list is mutating by inserting the 0 before the 5, once the 5 entry is found, it keeps "moving" to the right so the loop never terminates and lista keeps expanding until Python runs out of memory.  Don't do that!

----------
nosy: +ned.deily
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 06:30:47 2014
From: report at bugs.python.org (Glenn Linderman)
Date: Sat, 26 Jul 2014 04:30:47 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406349047.0.0.522558508541.issue1602@psf.upfronthosting.co.za>


Glenn Linderman added the comment:

This bug deserves to stay open with its high priority (for whatever good that does these last seven years, although I appreciate all the efforts put forth, and have been making heavy use of the workarounds in the patches), because when working with Unicode data in programs, even exception messages are not properly displayed... instead, they cause a secondary exception of not being able to display the data of the original exception to the console.

And writing Unicode data to the console as part of an interactive or command line program has to either be done with the hopes that the data only includes characters in the console, to avoid the failures, or with lots of special encoding calls and character substitutions for code points not in the console repertoire. Remember that the console is supposed to be human readable, not encoded numerically as ascii() would do. 

ascii() is sort of OK for for exception messages, but since that doesn't happen by default, the initial message to the console with Unicode data often doesn't appear, and an extra repetition after a failed message and a rework of the message parameters is required, which impedes productivity.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 07:48:57 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Sat, 26 Jul 2014 05:48:57 +0000
Subject: [issue1152248] Add support for reading records with arbitrary
 separators to the standard IO stack
Message-ID: <1406353737.57.0.0449674019142.issue1152248@psf.upfronthosting.co.za>


Changes by Raymond Hettinger :


----------
versions: +Python 3.5 -Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 08:05:38 2014
From: report at bugs.python.org (paul j3)
Date: Sat, 26 Jul 2014 06:05:38 +0000
Subject: [issue22047] argparse improperly prints mutually exclusive options
 when they are in a group
In-Reply-To: <1406131424.14.0.0235697032218.issue22047@psf.upfronthosting.co.za>
Message-ID: <1406354738.07.0.0570950697848.issue22047@psf.upfronthosting.co.za>


paul j3 added the comment:

This patch adds a 

    class TestMutuallyExclusiveGroupErrors
        test_invalid_add_group() test,

closely modeled on

        test_invalid_add_argument()

I'm using ValueError in group add methods (maintaining the similarity with add_argument errors).

I haven't changed the documentation.  add_argument_group and add_mutually_exclusive_group methods are described as belonging to an ArgumentParser, and the examples are consistent with that. An admonition against nesting groups would not fit with the current flow.

However to be accurate, these methods belong to _ActionsContainer, the parent class for both the parser and groups.  The documentation glosses over this detail.  So an alternative way of addressing this issue is to move these 2 methods to the ArgumentParser class.

----------
Added file: http://bugs.python.org/file36100/issue22047_2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 08:43:31 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 26 Jul 2014 06:43:31 +0000
Subject: [issue22068] test_gc fails after test_idle
In-Reply-To: <1406302499.67.0.809982435329.issue22068@psf.upfronthosting.co.za>
Message-ID: <1406357011.74.0.60723349769.issue22068@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

ConfigDialog is a good guess as I added a minimal test this month.
I will try to revise to not create loops in the first place.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 08:51:40 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 26 Jul 2014 06:51:40 +0000
Subject: [issue3982] support .format for bytes
In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za>
Message-ID: <1406357500.96.0.212585683473.issue3982@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

http://legacy.python.org/dev/peps/pep-0461/
adds % formatting for bytes and bytes array.

Nick, I have the impression that there was a decision to not add bytes.format. Correct? If so, this issue should be closed. If not, what, if anything, has been decided?

----------
nosy: +ncoghlan

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 09:00:02 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Sat, 26 Jul 2014 07:00:02 +0000
Subject: [issue3982] support .format for bytes
In-Reply-To: <1222530641.39.0.0764973101836.issue3982@psf.upfronthosting.co.za>
Message-ID: <1406358002.71.0.37663594214.issue3982@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Right, bytes.format was considered as part of the PEP 461 discussions, and rejected as an operation that only made sense in the text domain: http://www.python.org/dev/peps/pep-0461/#proposed-variations

With PEP 461 accepted, and PEP 460 withdrawn, that means we won't be adding bytes.format and bytearray.format.

Issue 20284 covers the implementation of PEP 461.

----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 09:03:11 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Sat, 26 Jul 2014 07:03:11 +0000
Subject: [issue20284] patch to implement PEP 461 (%-interpolation for bytes)
In-Reply-To: <1389907989.35.0.952766608541.issue20284@psf.upfronthosting.co.za>
Message-ID: <1406358191.17.0.62067161017.issue20284@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Just noting I'm working on some significant updates to the bytes and bytearray docs in issue 21777. I'll try to get that ready for review and merged relatively soon, so the docs for this can build on top of those changes.

----------
nosy: +ncoghlan

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 09:44:42 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Sat, 26 Jul 2014 07:44:42 +0000
Subject: [issue21777] Separate out documentation of binary sequence methods
In-Reply-To: <1402918605.38.0.604956966245.issue21777@psf.upfronthosting.co.za>
Message-ID: <1406360682.83.0.293958480773.issue21777@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

OK, I've completed the initial pass through all the methods. Remaining items:

* add back the guarantees where str will return the same object, add those guarantees for bytes where applicable
* address the review comments from Zach and Ezio

There are a couple of review comments about removing duplication that I'd like to skip addressing for now. I think they're reasonable ideas, but I also think it's a lot easier to go wrong with DRY in docs than it is in code. Indeed, this whole matter of not documenting the bytes behaviour in the first place was a matter of assuming folks could just infer the binary behaviour from the text behaviour.

----------
Added file: http://bugs.python.org/file36101/separate_binary_sequence_docs_v4.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 09:49:27 2014
From: report at bugs.python.org (Ned Deily)
Date: Sat, 26 Jul 2014 07:49:27 +0000
Subject: [issue17172] Add turtledemo to IDLE menu
In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za>
Message-ID: <1406360967.24.0.306792643676.issue17172@psf.upfronthosting.co.za>


Ned Deily added the comment:

Here are some review comments on turtle_demo_v2.patch.

First, the subprocess call to start turtledemo may work ok in your build directory but it will not work in general.  Using the standard idiom for invoking a new process running the current instance of python, the call should look something like:

    cmd = [sys.executable, '-c', 'from turtledemo.__main__ import main; main()']
    p = subprocess.Popen(cmd)

Also, note that the imp module is deprecated in 3.4 in favor of importlib:

    https://docs.python.org/dev/library/imp.html#imp.find_module

I'm not sure there is much point in having this test, though.  The only thing it would catch is if some third-party distributor decided to move turtledemo into a separate package or not ship it altogether.  It would not work for 2.7, even if Demo/turtle was shipped, since, in 2.7, turtledemo is not structured as an importable package.

(And, to answer Terry's earlier question: no, the Demo directory is also not shipped with the python.org OS X installers for 2.7.  I expect that the standard practice among Unix distributors would also be not to ship it by default; for one thing, they have to figure out where to install it since we don't provide a standard location to do so.  I see that Debian does package up Demo into an optional "python2.7-examples" Debian package.  So there seems to be no point in applying this change to 2.7 without also backporting the turtledemo repackaging done in 3.x and that would be a larger undertaking needing discussion and approval.)

(Ah, but looking at current Debian and Ubuntu, for Python 3.4 I see that they have packaged turtledemo as part of their optional 'libpython3.4-testsuite' source package.  Plus, they have long packaged IDLE separately ('idle-python3.4').  That means end users will need to ensure both packages are installed to be able to use turtledemo with IDLE.  So I guess that says that there *is* a point to the import test.  Ugh.  I'm not sure what other popular distributions do.)

Then there is a specific and serious usability problem with this feature on OS X.  The subprocess call starts a new process with a second Python interpreter to run a second Tcl/Tk instance to run turtledemo next to IDLE.  The turtledemo appears *but* the keyboard and mouse focus remains on IDLE which also means that the IDLE menu remains active (recall that there is only one menu bar on OS X and it shows only the menus from the currently "focused" GUI application).  Especially with the proposed menu changes in Issue22065, it would be very confusing to the novice user to see the turtledemo window appear, possibly covering any IDLE windows, but with the IDLE menu still active and keyboard/mouse focus still on IDLE.  It turns out to be a bit tricky to reliably "activate" tbe turtledemo application programmatically from Python code without resorting to some hacks.  Here is one hack, making use of a bit of AppleScript, that seems to work.  It would need to be tested in non-English OS X environments to make sure it works there also.  

diff Lib/turtledemo/__main__.py
--- a/Lib/turtledemo/__main__.py        Fri Jul 25 15:01:18 2014 -0700
+++ b/Lib/turtledemo/__main__.py        Fri Jul 25 22:43:58 2014 -0700
@@ -69,6 +69,7 @@
 """
 import sys
 import os
+import subprocess

 from tkinter import *
 from idlelib.Percolator import Percolator
@@ -111,6 +112,20 @@
         self.root = root = turtle._root = Tk()
         root.title('Python turtle-graphics examples')
         root.wm_protocol("WM_DELETE_WINDOW", self._destroy)
+        if sys.platform == 'darwin':
+            # Make sure we are the currently activated OS X application
+            # so that our menu bar appears.
+            p = subprocess.Popen(
+                    [
+                        'osascript',
+                        '-e', 'tell application "System Events"',
+                        '-e', 'set frontmost of the first process whose '
+                              'unix id is {} to true'.format(os.getpid()),
+                        '-e', 'end tell',
+                    ],
+                    stderr=subprocess.DEVNULL,
+                    stdout=subprocess.DEVNULL,
+            )

         root.grid_rowconfigure(0, weight=1)
         root.grid_columnconfigure(0, weight=1)

There are deprecated OS X Carbon interfaces to do the equivalent, as was used in the third-party package appscript. I'm noseying Ronald to see if he has any better suggestions for a non-deprecated way to do this (via Cocoa perhaps) and that could possibly be made available more generally: IDLE itself could benefit from it and would be a better solution than what was used in Issue11571.

I have not tried the patch on Windows or X11 Tk to see if there are similar usability issues.  If so, it's possible the "wm attribtues . -topmost" dance, as in Issue11571, might help.

And last, Lita, please don't forget to run "make patchcheck" before uploading a patch; there are several whitespace problems with the patch that makes applying and reviewing it more difficult.

----------
keywords:  -easy
nosy: +ned.deily, ronaldoussoren

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 09:57:47 2014
From: report at bugs.python.org (Claudiu Popa)
Date: Sat, 26 Jul 2014 07:57:47 +0000
Subject: [issue19776] Provide expanduser() on Path objects
In-Reply-To: <1385409778.55.0.842571848249.issue19776@psf.upfronthosting.co.za>
Message-ID: <1406361467.78.0.920991887185.issue19776@psf.upfronthosting.co.za>


Claudiu Popa added the comment:

Here's a version of the patch which raises ValueError when the path can't be expanded. Hopefully, the used approach is good enough.

----------
Added file: http://bugs.python.org/file36102/issue19776_4.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 10:08:02 2014
From: report at bugs.python.org (Ralph Heinkel)
Date: Sat, 26 Jul 2014 08:08:02 +0000
Subject: [issue16535] json encoder unable to handle decimal
In-Reply-To: <1353624338.46.0.574343718645.issue16535@psf.upfronthosting.co.za>
Message-ID: <1406362082.9.0.932102008869.issue16535@psf.upfronthosting.co.za>


Changes by Ralph Heinkel :


----------
nosy: +christian.heimes

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 10:24:20 2014
From: report at bugs.python.org (Phil Connell)
Date: Sat, 26 Jul 2014 08:24:20 +0000
Subject: [issue1152248] Add support for reading records with arbitrary
 separators to the standard IO stack
Message-ID: <1406363060.68.0.788684629673.issue1152248@psf.upfronthosting.co.za>


Changes by Phil Connell :


----------
nosy: +pconnell

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 10:39:07 2014
From: report at bugs.python.org (Martin Matusiak)
Date: Sat, 26 Jul 2014 08:39:07 +0000
Subject: [issue22076] csv module bad grammar in exception message
Message-ID: <1406363947.96.0.930759215871.issue22076@psf.upfronthosting.co.za>


New submission from Martin Matusiak:

The csv module has an exception message with bad grammar:

- delimiter" must be an 1-character string

"an" should be "a"

----------
components: Library (Lib)
files: csv_grammar_fix.diff
keywords: patch
messages: 224028
nosy: haypo, numerodix, serhiy.storchaka
priority: normal
severity: normal
status: open
title: csv module bad grammar in exception message
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file36103/csv_grammar_fix.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 10:52:10 2014
From: report at bugs.python.org (Claudiu Popa)
Date: Sat, 26 Jul 2014 08:52:10 +0000
Subject: [issue22077] Improve the error message for various sequences
Message-ID: <1406364730.89.0.733726269195.issue22077@psf.upfronthosting.co.za>


New submission from Claudiu Popa:

For a couple of sequences (bytes, list, tuple, bytearray), the error when using an invalid sequence index is misleading, because it says that only integers are allowed, while slices are allowed too.

>>> a = []
>>> a['python']
Traceback (most recent call last):
  File "", line 1, in 
TypeError: list indices must be integers, not str
>>>

For instance, here's how range does it:

>>> range(1)['a']
Traceback (most recent call last):
  File "", line 1, in 
TypeError: range indices must be integers or slices, not str


The attached patch improves these error messages.

----------
files: proper_error.patch
keywords: patch
messages: 224029
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: Improve the error message for various sequences
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file36104/proper_error.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 10:56:07 2014
From: report at bugs.python.org (Ronald Oussoren)
Date: Sat, 26 Jul 2014 08:56:07 +0000
Subject: [issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX
In-Reply-To: <1405794628.01.0.592426531891.issue22012@psf.upfronthosting.co.za>
Message-ID: <1406364967.13.0.067103571449.issue22012@psf.upfronthosting.co.za>


Ronald Oussoren added the comment:

Does anyone have feedback for my proposed patch (other the bug in test code when sizeof(bool) != 1,  the test values for big and little endian are in the wrong order)?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 10:58:07 2014
From: report at bugs.python.org (Ronald Oussoren)
Date: Sat, 26 Jul 2014 08:58:07 +0000
Subject: [issue15730] Silence unused value warnings under Mac OS X 10.8/clang
In-Reply-To: <1345423593.46.0.41871412241.issue15730@psf.upfronthosting.co.za>
Message-ID: <1406365087.35.0.14264862426.issue15730@psf.upfronthosting.co.za>


Changes by Ronald Oussoren :


----------
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 11:04:46 2014
From: report at bugs.python.org (Christian Heimes)
Date: Sat, 26 Jul 2014 09:04:46 +0000
Subject: [issue21308] PEP 466: backport ssl changes
In-Reply-To: <9f606957-c0fc-42fe-b0e1-52ea1cb44333@email.android.com>
Message-ID: <1406365486.44.0.760073051616.issue21308@psf.upfronthosting.co.za>


Christian Heimes added the comment:

Awesome! :)

I'll try to find some time to check your work when I'm back from EuroPython.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 11:13:05 2014
From: report at bugs.python.org (Christian Heimes)
Date: Sat, 26 Jul 2014 09:13:05 +0000
Subject: [issue16535] json encoder unable to handle decimal
In-Reply-To: <1353624338.46.0.574343718645.issue16535@psf.upfronthosting.co.za>
Message-ID: <1406365985.64.0.139106181773.issue16535@psf.upfronthosting.co.za>


Christian Heimes added the comment:

I'm EuroPython 2014 in Berlin. Ralph has approached me and asked me about progress on the progress of this patch. I'm reluctant to implement a special case for decimals for two reasons:

1) JSON just support floats and decimals are IMHO incompatible with floats. The conversion of decial to JSON floats is a loosely operation.

2) Rather than having a special case I would rather go with a general implementation that uses an ABC to JSON dump some float-like objects.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 11:16:38 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 26 Jul 2014 09:16:38 +0000
Subject: [issue22068] test_gc fails after test_idle
In-Reply-To: <1406302499.67.0.809982435329.issue22068@psf.upfronthosting.co.za>
Message-ID: <1406366198.0.0.500795040624.issue22068@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Here is a patch against 2.7 which get rid of reference loops in Tk variables and Font. This will fix not only ConfigDialog, but any similar user code.

In 3.4+ such reference loops are successfully resolved, but I think we should foreport this path to 3.4+ because it also fixes other minor bug: callbacks registered to trace variable now live while the variable lives, not while widget lives.

----------
assignee:  -> serhiy.storchaka
components: +Tkinter
stage:  -> patch review
Added file: http://bugs.python.org/file36105/tkinter_refloops-2.7.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 11:37:58 2014
From: report at bugs.python.org (Ronald Oussoren)
Date: Sat, 26 Jul 2014 09:37:58 +0000
Subject: [issue19325] _osx_support imports many modules
In-Reply-To: <1382346544.59.0.0118958375765.issue19325@psf.upfronthosting.co.za>
Message-ID: <1406367478.81.0.657864237714.issue19325@psf.upfronthosting.co.za>


Ronald Oussoren added the comment:

The use of context lib in _read_output should not be necessary anymore as file objects and NamedTemporaryFile objects already are context managers with the right semantics. 

I'm not sure how to avoid the import of tempfile other than adding a minimal implementation of tempfile.mkstemp to _osx_support, in particular because the fallback code in _osx_support is insecure: It uses a named temporary file in /tmp with builtin.open and because the name of the file is predictable there is a small risk of overwriting arbitrary files when an attacker has access to /tmp. I guess the fallback is there to use during bootstrap, it should really be avoided afterwards. 

BTW. A small unscientific test on my laptop didn't see any differences between the regular _osx_support and a version where "import re" was moved inside the functions that use that module.  But: that's on a fast laptop with SSD for storage, there could easily be a difference on systems with slower storage.

Ned: do you remember what your idea was w.r.t. avoid the use of re? I guess its easy enough to replace the current re-using code by code that only uses str methods, but your phrasing seems to indicate another plan.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 11:40:49 2014
From: report at bugs.python.org (Ronald Oussoren)
Date: Sat, 26 Jul 2014 09:40:49 +0000
Subject: [issue15398] intermittence on UnicodeFileTests.test_rename at
 test_pep277 on MacOS X
In-Reply-To: <1342722837.32.0.395738739848.issue15398@psf.upfronthosting.co.za>
Message-ID: <1406367649.62.0.112831095196.issue15398@psf.upfronthosting.co.za>


Ronald Oussoren added the comment:

I'd be in favour of closing this issue, I haven't seen the problem in a while and it is almost certainly due to a platform bug on OSX 10.6.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 11:47:46 2014
From: report at bugs.python.org (Ronald Oussoren)
Date: Sat, 26 Jul 2014 09:47:46 +0000
Subject: [issue10964] Mac installer need not add things to /usr/local
In-Reply-To: <1295566233.42.0.612397787907.issue10964@psf.upfronthosting.co.za>
Message-ID: <1406368066.19.0.342478609868.issue10964@psf.upfronthosting.co.za>


Ronald Oussoren added the comment:

There'd still need to be some way to update the shell environment, but I agree that there needs to be something better than we have now.

One option is to add a small shell script that can be sourced from the shell profile and adds the various python frameworks at the right place in sys.path (dynamically checks what's there instead of hardcoding a version in the command file we now use).

A nice option to add is to optionally use a configuration file in ~/Library/Python to control the order in which directories are added to have some control on which version of python is used when starting it without a full version.  There would then also need to be a script that manages that configuration file.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 11:49:48 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 26 Jul 2014 09:49:48 +0000
Subject: [issue19776] Provide expanduser() on Path objects
In-Reply-To: <1385409778.55.0.842571848249.issue19776@psf.upfronthosting.co.za>
Message-ID: <1406368188.44.0.896992586849.issue19776@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Here is alternative patch which doesn't use os.path.expanduser() and reimplement it's logic. Differences:

* expanduser() is part of concrete path API. This method access environment.
* RuntimeError is raised when user home can't be determined.
* Currently ntpath.expanduser() uses heuristic to expand path with specified username. This works with default homedirs but can return wrong result when homedirs was moved to different locations. WindowsPath.expanduser() also uses heuristic, but more robust. Of course it would be better to get other users homedirs from Windows API, and perhaps we should defer this issue until implementing pwd or like on Windows.
* Expanded tests.

Interesting, common idiom to escape tilda in relative path (adding "./" prefix) doesn't work with pathlib, because "." components are ignored.

----------
Added file: http://bugs.python.org/file36106/pathlib_expanduser.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 11:54:53 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 26 Jul 2014 09:54:53 +0000
Subject: [issue22076] csv module bad grammar in exception message
In-Reply-To: <1406363947.96.0.930759215871.issue22076@psf.upfronthosting.co.za>
Message-ID: <1406368493.29.0.879275129311.issue22076@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
nosy:  -serhiy.storchaka

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 11:57:32 2014
From: report at bugs.python.org (Ronald Oussoren)
Date: Sat, 26 Jul 2014 09:57:32 +0000
Subject: [issue12243] getpass.getuser works on OSX
In-Reply-To: <1307029704.02.0.858553376312.issue12243@psf.upfronthosting.co.za>
Message-ID: <1406368652.79.0.222573609114.issue12243@psf.upfronthosting.co.za>


Ronald Oussoren added the comment:

The issue still is present, wouldn't it be better to just remove the availability annotation from the docs (2.7, 3.4 and trunk) while waiting for a better solution? 

That would at least remove confusion for these docs. At the very least the "Macintosh" availability note should be removed, that was used to document that a function is available on MacOS 9, which hasn't been supported in a long time now.

----------
nosy: +ronaldoussoren
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 12:03:10 2014
From: report at bugs.python.org (Claudiu Popa)
Date: Sat, 26 Jul 2014 10:03:10 +0000
Subject: [issue19776] Provide expanduser() on Path objects
In-Reply-To: <1385409778.55.0.842571848249.issue19776@psf.upfronthosting.co.za>
Message-ID: <1406368990.08.0.360353998244.issue19776@psf.upfronthosting.co.za>


Claudiu Popa added the comment:

Looks good.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 13:20:54 2014
From: report at bugs.python.org (Claudiu Popa)
Date: Sat, 26 Jul 2014 11:20:54 +0000
Subject: [issue22078] io.BufferedReader hides ResourceWarnings when garbage
 collected
Message-ID: <1406373654.18.0.791588376314.issue22078@psf.upfronthosting.co.za>


New submission from Claudiu Popa:

Given the following example, Python 3.5 doesn't emit any resource warning:

import io, gc
f = open("a")
bufio = io.BufferedReader(f)
gc.collect()


Here's a small patch that enables this.

----------
components: IO
files: buffered_io_resource_warning.patch
keywords: patch
messages: 224040
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: io.BufferedReader hides ResourceWarnings when garbage collected
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file36107/buffered_io_resource_warning.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 13:40:09 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 26 Jul 2014 11:40:09 +0000
Subject: [issue22078] io.BufferedReader hides ResourceWarnings when garbage
 collected
In-Reply-To: <1406373654.18.0.791588376314.issue22078@psf.upfronthosting.co.za>
Message-ID: <1406374809.05.0.923117709272.issue22078@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

All works to me.

$ ./python -Wall -c "open('/dev/null', 'rb')"
-c:1: ResourceWarning: unclosed file <_io.BufferedReader name='/dev/null'>

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 13:41:03 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sat, 26 Jul 2014 11:41:03 +0000
Subject: [issue22068] test_gc fails after test_idle
In-Reply-To: <1406366198.0.0.500795040624.issue22068@psf.upfronthosting.co.za>
Message-ID: 


STINNER Victor added the comment:

I agree that the patch shoukd also br applied to 3.4.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 13:42:09 2014
From: report at bugs.python.org (Claudiu Popa)
Date: Sat, 26 Jul 2014 11:42:09 +0000
Subject: [issue22078] io.BufferedReader hides ResourceWarnings when garbage
 collected
In-Reply-To: <1406373654.18.0.791588376314.issue22078@psf.upfronthosting.co.za>
Message-ID: <1406374929.58.0.421034880635.issue22078@psf.upfronthosting.co.za>


Claudiu Popa added the comment:

That's not the same, try with my example. open("a") will be a TextIOWrapper.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 13:42:57 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Sat, 26 Jul 2014 11:42:57 +0000
Subject: [issue21308] PEP 466: backport ssl changes
In-Reply-To: <9f606957-c0fc-42fe-b0e1-52ea1cb44333@email.android.com>
Message-ID: <1406374977.52.0.40130732829.issue21308@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Thanks for working through this!

I've kicked it in the direction of the Fedora Python SIG folks (https://lists.fedoraproject.org/pipermail/python-devel/2014-July/000611.html), since it would be good if we could get it tested before it makes its way into an upstream release.

----------
nosy: +bkabrda

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 13:47:09 2014
From: report at bugs.python.org (Claudiu Popa)
Date: Sat, 26 Jul 2014 11:47:09 +0000
Subject: [issue22078] io.BufferedReader hides ResourceWarnings when garbage
 collected
In-Reply-To: <1406373654.18.0.791588376314.issue22078@psf.upfronthosting.co.za>
Message-ID: <1406375229.49.0.798551590424.issue22078@psf.upfronthosting.co.za>


Claudiu Popa added the comment:

I mean this one:

$ python_d -Wall -c "f=open('a', 'r'); import io; io.BufferedReader(f)"

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 13:49:27 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 26 Jul 2014 11:49:27 +0000
Subject: [issue22078] io.BufferedReader hides ResourceWarnings when garbage
 collected
In-Reply-To: <1406373654.18.0.791588376314.issue22078@psf.upfronthosting.co.za>
Message-ID: <1406375367.84.0.0659269818939.issue22078@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

This example is not correct.

1) Argument of BufferedReader should be binary stream.

>>> import io, gc
>>> f = open('/dev/null')
>>> bufio = io.BufferedReader(f)
>>> bufio.read(1)
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: '_io.TextIOWrapper' object has no attribute 'readinto'

2) gc.collect() doesn't collect file streams because references to them are saved in local variables.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 13:54:04 2014
From: report at bugs.python.org (Claudiu Popa)
Date: Sat, 26 Jul 2014 11:54:04 +0000
Subject: [issue22078] io.BufferedReader hides ResourceWarnings when garbage
 collected
In-Reply-To: <1406373654.18.0.791588376314.issue22078@psf.upfronthosting.co.za>
Message-ID: <1406375644.36.0.966068902739.issue22078@psf.upfronthosting.co.za>


Claudiu Popa added the comment:

You're right, thanks for the new information. You can close the issue then.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 14:01:24 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 26 Jul 2014 12:01:24 +0000
Subject: [issue22078] io.BufferedReader hides ResourceWarnings when garbage
 collected
In-Reply-To: <1406373654.18.0.791588376314.issue22078@psf.upfronthosting.co.za>
Message-ID: <1406376084.46.0.59655227058.issue22078@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 14:27:47 2014
From: report at bugs.python.org (koobs)
Date: Sat, 26 Jul 2014 12:27:47 +0000
Subject: [issue19875] test_getsockaddrarg occasional failure
In-Reply-To: <1386065859.81.0.4295023541.issue19875@psf.upfronthosting.co.za>
Message-ID: <1406377667.4.0.769892519044.issue19875@psf.upfronthosting.co.za>


koobs added the comment:

Thank you for taking care of this Charles-Fran?ois :) Requesting backport to 3.3 and 2.7 too please, both are open for fixes.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 14:36:39 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 26 Jul 2014 12:36:39 +0000
Subject: [issue22079] Ensure in PyType_Ready() that base class of static type
 is static
Message-ID: <1406378199.04.0.952325428414.issue22079@psf.upfronthosting.co.za>


New submission from Serhiy Storchaka:

It would be good if PyType_Ready() will check that base class of static type is static.

----------
components: Interpreter Core
messages: 224049
nosy: alex, haypo, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: Ensure in PyType_Ready() that base class of static type is static
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 14:39:33 2014
From: report at bugs.python.org (Claudiu Popa)
Date: Sat, 26 Jul 2014 12:39:33 +0000
Subject: [issue22080] Add windows_helper module helper
Message-ID: <1406378373.46.0.337360125553.issue22080@psf.upfronthosting.co.za>


New submission from Claudiu Popa:

Hi. This patch adds a new test helper module, initially added in issue21518, for controlling various aspects on Windows platform, like acquiring / releasing privileges etc. At the same time, it contains a modification in test.support.skip_unless_symlink, so that it tries to acquire the privilege, failing otherwise. The only downside is that acquiring SeCreateSymbolicLinkPrivilege is only possible for admins and it seems to be that they have the privilege by default. On the other hand, for SeBackupPrivilege must be explicitly acquired, so the purpose of this module isn't redundant.

The part of acquiring a privilege using ctypes is based on similar code by Jason R. Coombs.

----------
components: Tests
files: windows_helper.patch
keywords: patch
messages: 224050
nosy: Claudiu.Popa, zach.ware
priority: normal
severity: normal
status: open
title: Add windows_helper module helper
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file36108/windows_helper.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 14:42:49 2014
From: report at bugs.python.org (Claudiu Popa)
Date: Sat, 26 Jul 2014 12:42:49 +0000
Subject: [issue21518] Expose RegUnloadKey in winreg
In-Reply-To: <1400346760.52.0.0203244636304.issue21518@psf.upfronthosting.co.za>
Message-ID: <1406378569.41.0.338853459053.issue21518@psf.upfronthosting.co.za>


Changes by Claudiu Popa :


----------
dependencies: +Add windows_helper module helper

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 14:45:37 2014
From: report at bugs.python.org (Roundup Robot)
Date: Sat, 26 Jul 2014 12:45:37 +0000
Subject: [issue19875] test_getsockaddrarg occasional failure
In-Reply-To: <1386065859.81.0.4295023541.issue19875@psf.upfronthosting.co.za>
Message-ID: <3hL6Sw2Q26z7LjZ@mail.python.org>


Roundup Robot added the comment:

New changeset 57e3c4ae37ea by Charles-Fran?ois Natali in branch '2.7':
Issue #19875: Fix random test_getsockaddrarg() failure.
http://hg.python.org/cpython/rev/57e3c4ae37ea

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 14:46:33 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Sat, 26 Jul 2014 12:46:33 +0000
Subject: [issue19875] test_getsockaddrarg occasional failure
In-Reply-To: <1406377667.4.0.769892519044.issue19875@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

Backported to 2.7 (don't know how Iforgot it).
3.3 is only open for security issues, so not backporting.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 15:06:02 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sat, 26 Jul 2014 13:06:02 +0000
Subject: [issue22081] Backport repr(socket.socket) from Python 3.5 to Python
 2.7
Message-ID: <1406379962.85.0.838709000205.issue22081@psf.upfronthosting.co.za>


New submission from STINNER Victor:

Currently, the C module _socket has an useful representation of socket: it gives the file descriptor, family, type, etc. The Python socket module only shows the memory address. Example:

$ ./python -c 'import _socket; s=_socket.socket(); print(repr(s));'


$ ./python -c 'import socket; s=socket.socket(); print(repr(s));'


I propose to backport repr(socket.socket) from Python 3.5 to Python 2.7. With the patch, the Python socket even contains *more* information than the C module (laddr and raddr). Example with the patch applied:

$ ./python -c 'import socket; s=socket.socket(); print(repr(s));'


In Python 2.7, when a socket is closed, it drops the underlying C _socket object. So it's not possible to provide a better representation than:

$ ./python -c 'import socket; s=socket.socket(); s.close(); print(repr(s));'


I don't want to change the design of the Python module, Python 2.7 is very stable. I don't want to take the risk of breaking anything.

----------
files: socket_repr.patch
keywords: patch
messages: 224053
nosy: haypo
priority: normal
severity: normal
status: open
title: Backport repr(socket.socket) from Python 3.5 to Python 2.7
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file36109/socket_repr.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 15:06:09 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sat, 26 Jul 2014 13:06:09 +0000
Subject: [issue22081] Backport repr(socket.socket) from Python 3.5 to Python
 2.7
In-Reply-To: <1406379962.85.0.838709000205.issue22081@psf.upfronthosting.co.za>
Message-ID: <1406379969.42.0.10736527692.issue22081@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
nosy: +alex

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 15:07:00 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sat, 26 Jul 2014 13:07:00 +0000
Subject: [issue22081] Backport repr(socket.socket) from Python 3.5 to Python
 2.7
In-Reply-To: <1406379962.85.0.838709000205.issue22081@psf.upfronthosting.co.za>
Message-ID: <1406380020.08.0.613545781324.issue22081@psf.upfronthosting.co.za>


STINNER Victor added the comment:

I also fixed repr(_socket.socket) on Windows 64-bit for closed sockets (on Python 2.7, 3.4 and 3.5):

changeset:   91881:04c916a1e82f
branch:      2.7
tag:         tip
user:        Victor Stinner 
date:        Sat Jul 26 14:52:55 2014 +0200
files:       Lib/test/test_socket.py Misc/NEWS Modules/socketmodule.c
description:
Fix repr(_socket.socket) on Windows 64-bit: don't fail with OverflowError
on closed socket.


changeset:   91880:a86c273a1270
branch:      2.7
user:        Victor Stinner 
date:        Sat Jul 26 14:47:56 2014 +0200
files:       Modules/socketmodule.c
description:
socketmodule.c: backport INVALID_SOCKET from Python 3.5 to simplify the code

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 15:12:02 2014
From: report at bugs.python.org (koobs)
Date: Sat, 26 Jul 2014 13:12:02 +0000
Subject: [issue19875] test_getsockaddrarg occasional failure
In-Reply-To: <1386065859.81.0.4295023541.issue19875@psf.upfronthosting.co.za>
Message-ID: <1406380322.58.0.802717653003.issue19875@psf.upfronthosting.co.za>


koobs added the comment:

Updating versions to reflect branch changes. Will come in handy for those tracking for manual packaging backports

----------
versions: +Python 2.7, Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 16:31:03 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Sat, 26 Jul 2014 14:31:03 +0000
Subject: [issue22081] Backport repr(socket.socket) from Python 3.5 to Python
 2.7
In-Reply-To: <1406379962.85.0.838709000205.issue22081@psf.upfronthosting.co.za>
Message-ID: <1406385063.74.0.23498172462.issue22081@psf.upfronthosting.co.za>


Changes by Antoine Pitrou :


----------
nosy: +gvanrossum

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 16:33:39 2014
From: report at bugs.python.org (Larry Hastings)
Date: Sat, 26 Jul 2014 14:33:39 +0000
Subject: [issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails
 on FreeBSD with ZFS
In-Reply-To: <1385801049.84.0.483097954762.issue19838@psf.upfronthosting.co.za>
Message-ID: <1406385219.17.0.560654425615.issue19838@psf.upfronthosting.co.za>


Larry Hastings added the comment:

This test also fails on Linux when using ZFS.

----------
nosy: +larry

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 16:38:33 2014
From: report at bugs.python.org (Brandon Milam)
Date: Sat, 26 Jul 2014 14:38:33 +0000
Subject: [issue8232] webbrowser.open incomplete on Windows
In-Reply-To: <1269541962.46.0.762619344208.issue8232@psf.upfronthosting.co.za>
Message-ID: <1406385513.81.0.0109388195729.issue8232@psf.upfronthosting.co.za>


Brandon Milam added the comment:

In order to fix the issue I added on to the WindowsDefault class so that it is the main browser class for windows platforms as opposed to being a default when no other browser is given. I gave the class an init where it specifies specific flags for firefox, chrome, and internet explorer (from what I could find there aren't really new window or new tab flags for internet explorer). If the flags for other browsers are known they should be easy to add to this section.

        def __init__(self,browser = "windows-default"):
            # Grab the different flags for the different browser types
            browser.lower()
            self.browsername = browser
            # If get() is used without arguments browser will be passed None
            if browser == "windows_default" or browser == None:
                self.cmd = "start"
            elif browser == 'iexplore' or browser == 'internet explorer':
                self.cmd = "start iexplore"
                self.newwindow = ""
                self.newtab = ""
            elif browser == "chrome":
                self.cmd = "start chrome.exe"
                self.newwindow = "-new-window"
                self.newtab = "-new-tab"
            elif browser == "firefox":
                self.cmd = "start firefox.exe"
                self.newwindow = "-new-window"
                self.newtab = "-new-tab"
            else:
                raise Error('The browser you entered (%s) is not currently supported on windows' % browser)

In the open method of the WindowsDefault class I changed how the browser is opened by building a command from the flags and the cmd for the specific browser and used subprocess,call.

            # Format the command for optional arguments and add the url
            if new == 1:
                self.cmd += " " + self.newwindow
            elif new == 2:
                self.cmd += " " + self.newtab
            self.cmd += " " + url

            subprocess.call(self.cmd,shell = True)

This allows the user to input different new arguments to open a new window or new tab like the documentation says they should be able to do. I added a little bit to the beginning of the get function so that it passes its argument to the WindowsDefault class and returns that object on Windows systems.

    # Let the windows default class handle different browsers on windows
    if sys.platform[:3] == "win":
        return WindowsDefault(using)

This adds some of the desired compatibility but does not completely address the module's issues. I did not see a way to open a web page in a currently open page on any of the browsers, just new windows and new tabs (when no flags are passed the browsers default to one of these two options). Also the _isexecutable function's attempt at windows compatibility is still not working because I was unsure of how to use just a string of a browser name like 'chrome' to determine if a file is on a system. This leaves _tryorder not properly containing the browsers on the system. This leaves the module's open, open_new and open_new_tab not properly working either just the WindowsDefault open method.
Any feed back and direction from here is most welcome.

----------
nosy: +jbmilam
Added file: http://bugs.python.org/file36110/webbrowserdebug.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 16:42:49 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Sat, 26 Jul 2014 14:42:49 +0000
Subject: [issue22082] Clear interned strings listed in slotdefs
Message-ID: <1406385769.4.0.261949014577.issue22082@psf.upfronthosting.co.za>


New submission from Martin v. L?wis:

I'm chasing objects left at shutdown. I found that the string objects in slotdefs are still around at the end; this patch removes them.

----------
files: type.diff
keywords: patch
messages: 224058
nosy: loewis
priority: normal
severity: normal
status: open
title: Clear interned strings listed in slotdefs
Added file: http://bugs.python.org/file36111/type.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 16:44:20 2014
From: report at bugs.python.org (Roundup Robot)
Date: Sat, 26 Jul 2014 14:44:20 +0000
Subject: [issue22082] Clear interned strings listed in slotdefs
In-Reply-To: <1406385769.4.0.261949014577.issue22082@psf.upfronthosting.co.za>
Message-ID: <3hL95v27DCz7Lk6@mail.python.org>


Roundup Robot added the comment:

New changeset c55300337932 by Martin v. L?wis in branch 'default':
Issue #22082: Clear interned strings in slotdefs.
http://hg.python.org/cpython/rev/c55300337932

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 16:50:12 2014
From: report at bugs.python.org (Brandon Milam)
Date: Sat, 26 Jul 2014 14:50:12 +0000
Subject: [issue8232] webbrowser.open incomplete on Windows
In-Reply-To: <1269541962.46.0.762619344208.issue8232@psf.upfronthosting.co.za>
Message-ID: <1406386212.68.0.000441749897553.issue8232@psf.upfronthosting.co.za>


Brandon Milam added the comment:

How the _isexecutable function is set up now it would require a full path name in order to be able to tell if a specific browser is on the system. The area under platform support for windows checks for multiple browsers using this function but only passes it browser names and so it always returns false and does not add any browsers to _tryorder. I found a way to fix this using os.walk so that the simple strings of the browser names like "firefox.exe" is able to actually able to be found on the system. This method is rather slow though and the module wants to check for 8 browsers when imported.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 16:54:03 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Sat, 26 Jul 2014 14:54:03 +0000
Subject: [issue22081] Backport repr(socket.socket) from Python 3.5 to Python
 2.7
In-Reply-To: <1406379962.85.0.838709000205.issue22081@psf.upfronthosting.co.za>
Message-ID: <1406386443.26.0.964509847015.issue22081@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

Antoine, what do you want me to do?  I think improving __repr__ of a socket sounds fine for some Python 2.7 bugfix release.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 17:06:23 2014
From: report at bugs.python.org (Saimadhav Heblikar)
Date: Sat, 26 Jul 2014 15:06:23 +0000
Subject: [issue22083] Refactor PyShell's breakpoint related methods
Message-ID: <1406387183.56.0.280615170045.issue22083@psf.upfronthosting.co.za>


New submission from Saimadhav Heblikar:

This refactoring is required to enable setting/clearing breakpoints, using linenumbering( whether using a Canvas implementation or a Text implementation http://bugs.python.org/issue17535)
The patch ensures consistency between the set_breakpoint(_here) and
clear_breakpoint(_here) methods. The clear_breakpoint_here, which is not present currently has been added.
No functionality has been added or removed, so I think it should be safe to go forward.

----------
components: IDLE
files: pyshell-breakpoint-refactor.diff
keywords: patch
messages: 224062
nosy: jesstess, sahutd, taleinat, terry.reedy
priority: normal
severity: normal
status: open
title: Refactor PyShell's breakpoint related methods
versions: Python 2.7, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36112/pyshell-breakpoint-refactor.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 17:08:37 2014
From: report at bugs.python.org (Larry Hastings)
Date: Sat, 26 Jul 2014 15:08:37 +0000
Subject: [issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails
 on FreeBSD with ZFS
In-Reply-To: <1385801049.84.0.483097954762.issue19838@psf.upfronthosting.co.za>
Message-ID: <1406387317.46.0.0549571446654.issue19838@psf.upfronthosting.co.za>


Larry Hastings added the comment:

Sorry to have such an awful configuration, but this approach won't fix the problem for me.

I use a Linux "encrypted home directory", which uses crazy loopback mount logic to create an on-the-fly decrypted representation of my home directory.  So my home directory is actually on an "ecryptfs" device:

    % df -T
    Filesystem            Type      Mounted on
    ...
    home                  zfs       /home
    /home/larry/.Private  ecryptfs  /home/larry

Maybe we could ignore deltas below a certain race-condition threshold?  Perhaps a millisecond?  I think there are already tests like that.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 17:09:14 2014
From: report at bugs.python.org (Larry Hastings)
Date: Sat, 26 Jul 2014 15:09:14 +0000
Subject: [issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails
 on FreeBSD with ZFS
In-Reply-To: <1385801049.84.0.483097954762.issue19838@psf.upfronthosting.co.za>
Message-ID: <1406387354.7.0.23127432465.issue19838@psf.upfronthosting.co.za>


Larry Hastings added the comment:

(By "this approach" I meant "the approach employed in the first patch posted".  Sorry for the ambiguity.)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 17:09:24 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 26 Jul 2014 15:09:24 +0000
Subject: [issue22081] Backport repr(socket.socket) from Python 3.5 to Python
 2.7
In-Reply-To: <1406379962.85.0.838709000205.issue22081@psf.upfronthosting.co.za>
Message-ID: <1406387364.5.0.757033692234.issue22081@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

I afraid this can break doctests. Isn't this against policy?

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 17:09:35 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Sat, 26 Jul 2014 15:09:35 +0000
Subject: [issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails
 on FreeBSD with ZFS
In-Reply-To: <1385801049.84.0.483097954762.issue19838@psf.upfronthosting.co.za>
Message-ID: <1406387375.0.0.148995974249.issue19838@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

So, I'm not against the patch, but it would be nice to diagnose where exactly the issue comes from.

----------
stage:  -> patch review

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 17:18:14 2014
From: report at bugs.python.org (Roundup Robot)
Date: Sat, 26 Jul 2014 15:18:14 +0000
Subject: [issue22074] Lib/test/make_ssl_certs.py fails with NameError
In-Reply-To: <1406329705.02.0.672506438124.issue22074@psf.upfronthosting.co.za>
Message-ID: <3hL9s16Ywbz7Ljx@mail.python.org>


Roundup Robot added the comment:

New changeset 83628d9e1035 by Antoine Pitrou in branch '3.4':
Issue #22074: Fix Lib/test/make_ssl_certs.py
http://hg.python.org/cpython/rev/83628d9e1035

New changeset 17f46a7b1125 by Antoine Pitrou in branch 'default':
Issue #22074: Fix Lib/test/make_ssl_certs.py
http://hg.python.org/cpython/rev/17f46a7b1125

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 17:18:44 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Sat, 26 Jul 2014 15:18:44 +0000
Subject: [issue22074] Lib/test/make_ssl_certs.py fails with NameError
In-Reply-To: <1406329705.02.0.672506438124.issue22074@psf.upfronthosting.co.za>
Message-ID: <1406387924.44.0.277945235333.issue22074@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

Good catch, this is now solved.

----------
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type:  -> behavior
versions: +Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 17:32:51 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Sat, 26 Jul 2014 15:32:51 +0000
Subject: [issue22081] Backport repr(socket.socket) from Python 3.5 to Python
 2.7
In-Reply-To: <1406379962.85.0.838709000205.issue22081@psf.upfronthosting.co.za>
Message-ID: <1406388771.89.0.611038987626.issue22081@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

I don't think it's against policy. Do doctests even work for objects that have an address as part of their repr()?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 17:47:29 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 26 Jul 2014 15:47:29 +0000
Subject: [issue22081] Backport repr(socket.socket) from Python 3.5 to Python
 2.7
In-Reply-To: <1406388771.89.0.611038987626.issue22081@psf.upfronthosting.co.za>
Message-ID: <1476638.O9AXTMuFz8@raxxla>


Serhiy Storchaka added the comment:

See for example test_generators, test_genexps, test_xml_etree or 
ctypes.test.test_objects.

    >>> dict(a = (i for i in xrange(10))) #doctest: +ELLIPSIS
    {'a':  at ...>}

    >>> repr(element)   # doctest: +ELLIPSIS
    ""

But unit tests can be broken too. When I enhanced reprs this week (issue22031, 
issue22032), I needed to correct failed tests. Due to this facts I applied 
patches only to 3.5.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 17:52:21 2014
From: report at bugs.python.org (Aaron Brady)
Date: Sat, 26 Jul 2014 15:52:21 +0000
Subject: [issue22084] Mutating while iterating
Message-ID: <1406389941.41.0.168391014696.issue22084@psf.upfronthosting.co.za>


New submission from Aaron Brady:

Hi, I asked about the inconsistency of the "RuntimeError" being raised when mutating a container while iterating over it here [1], "set and dict iteration" on Aug 16, 2012.

[1] http://www.gossamer-threads.com/lists/python/python/1004659

I posted a patch on the ML but never submitted it.  People's reaction seemed ambivalent.  Now I have an idea for a different implementation.  I'd like to take another shot at it.

It's one of the worst silent errors, since there's an error in the *iterator* when we call a *set* method.  We're going to add something to make it safer, at least in the sense of getting a clear failure, if the programmer does something that's always been ill-advised.

We have a number of options for the implementation.  We still have the option to introduce "IterationError", possibly a subclass of "RuntimeError".  These options are still applicable:

1) Collection of iterators
. Invalidate all "open" iterators on mutating
. a) Linked list
.. i) Uncounted references
.. ii) Counted references
.. iii) Weak references
. b) Weak set
2) Version index / timestamp / "memo"
. Iterators check whether the container has been mutated
    since they were created
. a) No overflow - Python longs
.. i) Reset index if no iterators left
. b) Overflow - C ints / shorts (silent error)
3) Iterator count
. Raise exception on mutation, not iteration

The new option is:

2d) Use a dedicated empty *object* for a timestamp or "memo".  A new memo is created on every mutation.  Before advancing, the iterator checks whether the current memo is a different object than it was when it was created.

Costs: The existing silent error is fairly rare.  The container gains a pointer to its current memo.  The iterator loses the cached length but gains a pointer to a memo.  The memos are blank objects: a "Py ssize t" and a pointer with certain flags at time of writing.  Speed is the same: comparing the lengths is replaced with comparing the memos.

Some caveats: The memory manager is used to obtain perpetually unique IDs.  A unique algorithm could be used instead of the memory manager, though the memo needs to contain a reference count more or less regardless.  There can at most be one memo per iterator.  The approach is outlined in pseudocode here [2]. Implementation could be optimized slightly by only creating new memos if iterators have been opened, shown here [3].

[2] http://home.comcast.net/~castironpi-misc/irc-0168%20mutating%20while%20iterating%20markup.html

[3] http://home.comcast.net/~castironpi-misc/irc-0168%20mutating%20while%20iterating%202%20markup.html

----------
components: Library (Lib)
messages: 224071
nosy: castironpi
priority: normal
severity: normal
status: open
title: Mutating while iterating
type: behavior
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  Sat Jul 26 18:18:39 2014
From: report at bugs.python.org (Matthias Klose)
Date: Sat, 26 Jul 2014 16:18:39 +0000
Subject: [issue20093] Wrong OSError message from os.rename() when dst is a
 non-empty directory
In-Reply-To: <1388278227.56.0.603151192526.issue20093@psf.upfronthosting.co.za>
Message-ID: <1406391519.7.0.943109388392.issue20093@psf.upfronthosting.co.za>


Matthias Klose added the comment:

3.4.0 has this fixed. resolutions in http://bugs.python.org/issue16074 and http://bugs.python.org/issue20517

----------
nosy: +doko
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 18:32:00 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 26 Jul 2014 16:32:00 +0000
Subject: [issue22084] Mutating while iterating
In-Reply-To: <1406389941.41.0.168391014696.issue22084@psf.upfronthosting.co.za>
Message-ID: <1406392320.13.0.87059706553.issue22084@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

It would be better discuss such ideas on python-ideas mailing list (http://mail.python.org/mailman/listinfo/python-ideas).

Option 3 breaks existing code such as

    for k, v in d.items():
        if pred(k, v):
            d[k] = newvalue
            break

Option 1 is memory inefficient. It requires a list of iterators in every dict (well, in almost every dict). And it doesn't look more time efficient than option 2.

Implementation of option 2 was provided and rejected in issue19332.

----------
nosy: +rhettinger, serhiy.storchaka

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 18:42:26 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Sat, 26 Jul 2014 16:42:26 +0000
Subject: [issue22081] Backport repr(socket.socket) from Python 3.5 to Python
 2.7
In-Reply-To: <1476638.O9AXTMuFz8@raxxla>
Message-ID: 


Guido van Rossum added the comment:

OK, I'm convinced. Sorry Victor.

On Saturday, July 26, 2014, Serhiy Storchaka  wrote:

>
> Serhiy Storchaka added the comment:
>
> See for example test_generators, test_genexps, test_xml_etree or
> ctypes.test.test_objects.
>
>     >>> dict(a = (i for i in xrange(10))) #doctest: +ELLIPSIS
>     {'a':  at ...>}
>
>     >>> repr(element)   # doctest: +ELLIPSIS
>     ""
>
> But unit tests can be broken too. When I enhanced reprs this week
> (issue22031,
> issue22032), I needed to correct failed tests. Due to this facts I applied
> patches only to 3.5.
>
> ----------
>
> _______________________________________
> Python tracker >
> 
> _______________________________________
>

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 18:44:57 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Sat, 26 Jul 2014 16:44:57 +0000
Subject: [issue22081] Backport repr(socket.socket) from Python 3.5 to Python
 2.7
In-Reply-To: <1406379962.85.0.838709000205.issue22081@psf.upfronthosting.co.za>
Message-ID: <1406393097.79.0.338836614755.issue22081@psf.upfronthosting.co.za>


Alex Gaynor added the comment:

Personally I don't think it is (or should) be against policy to change reprs, there's not really any way to improve them otherwise.

That said, my excitement level about this issue is pretty low, so I won't argue more than this :-)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 18:49:24 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Sat, 26 Jul 2014 16:49:24 +0000
Subject: [issue21308] PEP 466: backport ssl changes
In-Reply-To: <9f606957-c0fc-42fe-b0e1-52ea1cb44333@email.android.com>
Message-ID: <1406393364.73.0.441345754052.issue21308@psf.upfronthosting.co.za>


Alex Gaynor added the comment:

New patch cherry pick's the fix from issue22074.

----------
Added file: http://bugs.python.org/file36113/ssl-backport.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 19:00:59 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 26 Jul 2014 17:00:59 +0000
Subject: [issue22069] TextIOWrapper(newline="\n",
 line_buffering=True) mistakenly treat \r as a newline
In-Reply-To: <1406306623.81.0.633771356606.issue22069@psf.upfronthosting.co.za>
Message-ID: <1406394059.49.0.581845454788.issue22069@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 19:02:19 2014
From: report at bugs.python.org (Akira Li)
Date: Sat, 26 Jul 2014 17:02:19 +0000
Subject: [issue1152248] Add support for reading records with arbitrary
 separators to the standard IO stack
Message-ID: <1406394139.22.0.903486684304.issue1152248@psf.upfronthosting.co.za>


Akira Li added the comment:

> As a side-effect it also fixes the bug in line_buffering=True
> behavior, see issue22069O.

It should be issue22069 "TextIOWrapper(newline="\n", line_buffering=True) 
mistakenly treat \r as a newline"

Reuploaded the patch so that it applies cleanly on the current tip.

----------
Added file: http://bugs.python.org/file36114/io-newline-issue1152248-2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 19:11:57 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 26 Jul 2014 17:11:57 +0000
Subject: [issue22069] TextIOWrapper(newline="\n",
 line_buffering=True) mistakenly treat \r as a newline
In-Reply-To: <1406306623.81.0.633771356606.issue22069@psf.upfronthosting.co.za>
Message-ID: <1406394717.5.0.488912869007.issue22069@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Looks as this behavior is intentional. Documentation should be corrected.

----------
assignee:  -> docs at python
components: +Documentation
nosy: +benjamin.peterson, docs at python, hynek, pitrou, stutzbach

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 19:33:25 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sat, 26 Jul 2014 17:33:25 +0000
Subject: [issue22081] Backport repr(socket.socket) from Python 3.5 to Python
 2.7
In-Reply-To: <1406379962.85.0.838709000205.issue22081@psf.upfronthosting.co.za>
Message-ID: <1406396005.44.0.792067145536.issue22081@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> I afraid this can break doctests. Isn't this against policy?

Ok, I close the issue. A workaround is to use repr(sock._sock) to use repr(_socket.socket) which contains a lot of information.

----------
resolution:  -> wont fix
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 19:33:27 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 26 Jul 2014 17:33:27 +0000
Subject: [issue22085] Update deprecated Tcl commands in Tkinter
Message-ID: <1406396007.9.0.890469508876.issue22085@psf.upfronthosting.co.za>


New submission from Serhiy Storchaka:

Command used to monitor Tcl variable access ("trace variable", "trace vdelete", "trace vinfo") are deprecated and will likely be removed in a future version of Tcl. Proposed patch replaces them to modern equivalents.

The problem is that new commands was introduced in Tcl 8.4, but minimal supported by Tkinter version is 8.3. This patch should wait until dropping support of Tcl 8.3.

----------
components: Tkinter
messages: 224080
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Update deprecated Tcl commands in Tkinter
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 19:34:20 2014
From: report at bugs.python.org (Erik Andersen)
Date: Sat, 26 Jul 2014 17:34:20 +0000
Subject: [issue22086] Tab indent no longer works in interpreter
Message-ID: <1406396060.4.0.777513387491.issue22086@psf.upfronthosting.co.za>


New submission from Erik Andersen:

Please see http://bugs.python.org/issue5845, especially the last two comments: http://bugs.python.org/issue5845#msg215784, which requested that a new bug report be opened for this issue.

To summarize, the previous bug was to enable tab completion in the interpreter. There was discussion and it was figured out that it could be arranged that tab indentation and completion could work at the same time. (If you are at the start of a line, possibly a "... " prompt line, tab should indent. If you are to the right of any non-whitespace character, then you should tab complete).

>From the other bug:

"This issue [tab indent] should have gone back to being a release blocker after the alpha release to fix the tab-as-indent issue, but obviously that didn't happen (I forgot about it myself).  Please open a new issue requesting a fix for this bug (that tab doesn't work as indent at the ... prompt), referencing the discussion in this issue."

----------
components: Library (Lib)
messages: 224081
nosy: Azendale
priority: normal
severity: normal
status: open
title: Tab indent no longer works in interpreter
type: behavior
versions: Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 19:34:28 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 26 Jul 2014 17:34:28 +0000
Subject: [issue22085] Update deprecated Tcl commands in Tkinter
In-Reply-To: <1406396007.9.0.890469508876.issue22085@psf.upfronthosting.co.za>
Message-ID: <1406396068.12.0.268915864743.issue22085@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
keywords: +patch
Added file: http://bugs.python.org/file36115/tkinter_trace_variable.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 20:01:10 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Sat, 26 Jul 2014 18:01:10 +0000
Subject: [issue22087] _UnixDefaultEventLoop policy should either create a new
 loop or explicilty fail when get_event_loop() is called from a
 multiprocessing child process
Message-ID: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za>


New submission from Dan O'Reilly:

On non-Windows platforms, if a user attempts to use asyncio.get_event_loop() in a child process created by multiprocessing.Process using the fork context, and an asyncio event loop is also being used in the main process, the same _UnixSelectorEventLoop object will be used by both processes. This, of course, won't work properly; the child will raise a "RuntimeError: Event loop is running" exception as soon as it tries using the loop object.

However, this may or may not actually make it back to the parent: If the parent is expecting to get items from a queue from that child publishes to, rather than yielding from it immediately, the program will deadlock. Even if the child is yielded from, it may not be immediately obvious why "Event loop is running" was raised, and the behavior is inconsistent with the behavior if a method other than os.fork is used to create the child process, since the child will get a new event loop in that case.

So, it'd be better if _UnixDefaultEventLoopPolicy detected that get_event_loop was being called in a child process, and either 

1) Created a new loop for the child (this would make the behavior appear consistent no matter what platform/method for launching children is used)
2) Raised an exception stating that no default event loop exists for this process, similar to the assert used for threads currently.

I've attached a test script that demonstrates the different between forked/spawned processes, and a patch that implements #1 above.

----------
components: asyncio
files: handle_mp_unix.diff
keywords: patch
messages: 224082
nosy: dan.oreilly, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: _UnixDefaultEventLoop policy should either create a new loop or explicilty fail when get_event_loop() is called from a multiprocessing child process
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36116/handle_mp_unix.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 20:01:38 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Sat, 26 Jul 2014 18:01:38 +0000
Subject: [issue22087] _UnixDefaultEventLoop policy should either create a new
 loop or explicilty fail when get_event_loop() is called from a
 multiprocessing child process
In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za>
Message-ID: <1406397698.47.0.746285074072.issue22087@psf.upfronthosting.co.za>


Changes by Dan O'Reilly :


Added file: http://bugs.python.org/file36117/test_loop.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 20:02:47 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Sat, 26 Jul 2014 18:02:47 +0000
Subject: [issue22087] _UnixDefaultEventLoop policy should either create a new
 loop or explicilty fail when get_event_loop() is called from a
 multiprocessing child process
In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za>
Message-ID: <1406397767.94.0.404795059201.issue22087@psf.upfronthosting.co.za>


Changes by Dan O'Reilly :


----------
type:  -> behavior

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 20:04:03 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Sat, 26 Jul 2014 18:04:03 +0000
Subject: [issue22087] _UnixDefaultEventLoopPolicy should either create a new
 loop or explicilty fail when get_event_loop() is called from a
 multiprocessing child process
In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za>
Message-ID: <1406397843.25.0.903021610261.issue22087@psf.upfronthosting.co.za>


Changes by Dan O'Reilly :


----------
title: _UnixDefaultEventLoop policy should either create a new loop or explicilty fail when get_event_loop() is called from a multiprocessing child process -> _UnixDefaultEventLoopPolicy should either create a new loop or explicilty fail when get_event_loop() is called from a multiprocessing child process

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 20:18:37 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Sat, 26 Jul 2014 18:18:37 +0000
Subject: [issue22087] _UnixDefaultEventLoopPolicy should either create a new
 loop or explicilty fail when get_event_loop() is called from a
 multiprocessing child process
In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za>
Message-ID: <1406398717.54.0.872121965363.issue22087@psf.upfronthosting.co.za>


Changes by Dan O'Reilly :


Removed file: http://bugs.python.org/file36116/handle_mp_unix.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 20:20:15 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Sat, 26 Jul 2014 18:20:15 +0000
Subject: [issue22087] _UnixDefaultEventLoopPolicy should either create a new
 loop or explicilty fail when get_event_loop() is called from a
 multiprocessing child process
In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za>
Message-ID: <1406398815.63.0.105073976866.issue22087@psf.upfronthosting.co.za>


Changes by Dan O'Reilly :


Added file: http://bugs.python.org/file36118/handle_mp_unix.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 20:59:03 2014
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Sat, 26 Jul 2014 18:59:03 +0000
Subject: [issue22014] Add summary table for OS exception <-> errno mapping
In-Reply-To: <1405839624.34.0.825236607584.issue22014@psf.upfronthosting.co.za>
Message-ID: <1406401143.84.0.57215707345.issue22014@psf.upfronthosting.co.za>


?ric Araujo added the comment:

literalinclude lets you select only some lines of the file: http://sphinx-doc.org/markup/code.html#includes

----------
nosy: +eric.araujo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 21:23:31 2014
From: report at bugs.python.org (Ned Deily)
Date: Sat, 26 Jul 2014 19:23:31 +0000
Subject: [issue15398] intermittence on UnicodeFileTests.test_rename at
 test_pep277 on MacOS X
In-Reply-To: <1342722837.32.0.395738739848.issue15398@psf.upfronthosting.co.za>
Message-ID: <1406402611.36.0.136869558443.issue15398@psf.upfronthosting.co.za>


Changes by Ned Deily :


----------
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 21:55:30 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Sat, 26 Jul 2014 19:55:30 +0000
Subject: [issue22087] _UnixDefaultEventLoopPolicy should either create a new
 loop or explicilty fail when get_event_loop() is called from a
 multiprocessing child process
In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za>
Message-ID: <1406404530.73.0.347486446723.issue22087@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

Good point.  Asyncio definitely should not share event loops across forked processes.  However, I don't like the dependency on multiprocessing (even though it's in the stdlib) -- can't the policy just use os.getpid()?

Also, I've got a feeling that maybe the pid should be part of the policy state instead of the loop state?  The policy could just reset self._local when the pid doesn't match.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 22:02:41 2014
From: report at bugs.python.org (Drekin)
Date: Sat, 26 Jul 2014 20:02:41 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406404961.33.0.892551671479.issue1602@psf.upfronthosting.co.za>


Changes by Drekin :


Removed file: http://bugs.python.org/file27261/win_unicode_console_2.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 22:05:03 2014
From: report at bugs.python.org (Drekin)
Date: Sat, 26 Jul 2014 20:05:03 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406405103.2.0.444481276133.issue1602@psf.upfronthosting.co.za>


Changes by Drekin :


Removed file: http://bugs.python.org/file29563/i.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 22:05:58 2014
From: report at bugs.python.org (Drekin)
Date: Sat, 26 Jul 2014 20:05:58 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406405158.94.0.740334690027.issue1602@psf.upfronthosting.co.za>


Changes by Drekin :


Removed file: http://bugs.python.org/file29564/win_unicode_console_3.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 22:07:12 2014
From: report at bugs.python.org (Drekin)
Date: Sat, 26 Jul 2014 20:07:12 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406405232.36.0.41245525201.issue1602@psf.upfronthosting.co.za>


Changes by Drekin :


Removed file: http://bugs.python.org/file31756/streams.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 22:07:52 2014
From: report at bugs.python.org (Drekin)
Date: Sat, 26 Jul 2014 20:07:52 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406405272.35.0.132445996722.issue1602@psf.upfronthosting.co.za>


Changes by Drekin :


Removed file: http://bugs.python.org/file31770/win_unicode_console.zip

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 22:09:47 2014
From: report at bugs.python.org (Drekin)
Date: Sat, 26 Jul 2014 20:09:47 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406405387.3.0.53213017928.issue1602@psf.upfronthosting.co.za>


Changes by Drekin :


Removed file: http://bugs.python.org/file35990/win_unicode_console.zip

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 22:13:57 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Sat, 26 Jul 2014 20:13:57 +0000
Subject: [issue22087] _UnixDefaultEventLoopPolicy should either create a new
 loop or explicilty fail when get_event_loop() is called from a
 multiprocessing child process
In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za>
Message-ID: <1406405637.63.0.426170449213.issue22087@psf.upfronthosting.co.za>


Dan O'Reilly added the comment:

Yep, agreed on both points. The latter suggestion also has the benefit of not requiring any test changes. Here's an updated patch.

----------
Added file: http://bugs.python.org/file36119/map_chunksize2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 22:33:55 2014
From: report at bugs.python.org (Drekin)
Date: Sat, 26 Jul 2014 20:33:55 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406406835.91.0.443542233137.issue1602@psf.upfronthosting.co.za>


Drekin added the comment:

I have deleted all my old files and added only my current implementation of the stream objects as the only relevant part to this issue.

@Mark Summerfield: I have added __init__.py to the new version of win_unicode_console. If there is any problem, you can start an issue on project GitHub site or contact me.

@Victor Stinner, @Nick Coghlan: What's wrong with looking on Windows wide strings as on UTF-16-LE encoded bytes and building the raw stream objects around this?

----------
Added file: http://bugs.python.org/file36120/streams.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 23:09:54 2014
From: report at bugs.python.org (Ned Deily)
Date: Sat, 26 Jul 2014 21:09:54 +0000
Subject: [issue22085] Update deprecated Tcl commands in Tkinter
In-Reply-To: <1406396007.9.0.890469508876.issue22085@psf.upfronthosting.co.za>
Message-ID: <1406408994.94.0.488911292382.issue22085@psf.upfronthosting.co.za>


Ned Deily added the comment:

Is there any reason to not drop support for Tk 8.3?  It appears that the last release of it, 8.3.5, was in 2002.  Is anyone aware of any use of it on currently supported platforms?  The final planned release of 8.4 (8.4.20) was just a year ago and 8.4 is still being shipped on some platforms, i.e. OS X, so we should keep supporting it for the time being.

----------
nosy: +ned.deily

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 23:35:42 2014
From: report at bugs.python.org (R. David Murray)
Date: Sat, 26 Jul 2014 21:35:42 +0000
Subject: [issue16005] smtplib.SMTP().sendmail() and rset()
In-Reply-To: <1348402885.58.0.691449233826.issue16005@psf.upfronthosting.co.za>
Message-ID: <1406410542.91.0.639875556626.issue16005@psf.upfronthosting.co.za>


Changes by R. David Murray :


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> error responses from server are masked in smtplib when server closes connection

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Jul 26 23:56:32 2014
From: report at bugs.python.org (R. David Murray)
Date: Sat, 26 Jul 2014 21:56:32 +0000
Subject: [issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize
 reported killed by shell
In-Reply-To: <1404254403.84.0.153705596072.issue21901@psf.upfronthosting.co.za>
Message-ID: <1406411792.37.0.70095720066.issue21901@psf.upfronthosting.co.za>


R. David Murray added the comment:

Test passes for me now, thanks.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 00:44:09 2014
From: report at bugs.python.org (Julian Berman)
Date: Sat, 26 Jul 2014 22:44:09 +0000
Subject: [issue22088] base64 module still ignores non-alphabet characters
Message-ID: <1406414649.83.0.15731376973.issue22088@psf.upfronthosting.co.za>


New submission from Julian Berman:

The base64 module documentation claims that decode methods raise exceptions for non-base64 input, but they do not.

There was a patch for Py3 done in issue1466065, but the documentation was not updated for Py2. I have not read that ticket carefully enough to be able to tell what the expected resolution was for Py2 (fixing the bug or just updating the docs).

----------
assignee: docs at python
components: Documentation, Library (Lib)
messages: 224089
nosy: Julian, docs at python, r.david.murray
priority: normal
severity: normal
status: open
title: base64 module still ignores non-alphabet characters
type: behavior
versions: Python 2.7

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 00:44:38 2014
From: report at bugs.python.org (Julian Berman)
Date: Sat, 26 Jul 2014 22:44:38 +0000
Subject: [issue1466065] base64 module ignores non-alphabet characters
Message-ID: <1406414678.27.0.585021958682.issue1466065@psf.upfronthosting.co.za>


Julian Berman added the comment:

Created issue22088 to address not having fixed Py2 here.

----------
nosy: +Julian

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 01:52:57 2014
From: report at bugs.python.org (Lita Cho)
Date: Sat, 26 Jul 2014 23:52:57 +0000
Subject: [issue17172] Add turtledemo to IDLE menu
In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za>
Message-ID: <1406418777.51.0.0690148547353.issue17172@psf.upfronthosting.co.za>


Lita Cho added the comment:

I wasn't aware of make patchcheck. I will run this script when submitting patches in the future. Thanks, Ned!

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 02:11:49 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Sun, 27 Jul 2014 00:11:49 +0000
Subject: [issue22068] test_gc fails after test_idle
In-Reply-To: <1406302499.67.0.809982435329.issue22068@psf.upfronthosting.co.za>
Message-ID: <1406419909.72.0.702971365664.issue22068@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

F:\Python\dev>2\py27\pcbuild\python_d.exe -m test.regrtest -R :: -uall test_idle
test_idle leaked [1945, 1945, 1945, 1945] references, sum=7780

There are none with 3.4, so the new gc is doing its job.
There are also none with test_configdialog renamed xtest... ,

GetCfgSectionNameDialog.__init__ in configSectionNameDialog.py saves self.parent for later use as the parent for XyxVars.  I am looking at doing the same for config dialog.

----------
versions: +Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 02:24:48 2014
From: report at bugs.python.org (Lita Cho)
Date: Sun, 27 Jul 2014 00:24:48 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1406420688.38.0.167045140143.issue21933@psf.upfronthosting.co.za>


Lita Cho added the comment:

I was going to add a dropdown menu to change the font size as well, but I am going to wait till Serhiy's patch gets committed in issue22065 before I submit my patch.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 03:53:58 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Sun, 27 Jul 2014 01:53:58 +0000
Subject: [issue22014] Add summary table for OS exception <-> errno mapping
In-Reply-To: <1405839624.34.0.825236607584.issue22014@psf.upfronthosting.co.za>
Message-ID: <1406426038.28.0.587569584121.issue22014@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Oh, nice - the "start-after" and "end-before" options look like they might be the way to go.

If I'm reading the docs right, a block like the following would include the OSError section of the tree:

   .. literalinclude exceptions.txt
      :start-after: OSError
      :end-before: ReferenceError
      :prepend:

I think that's really the section that could most benefit from showing the structure inline.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 03:55:57 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Sun, 27 Jul 2014 01:55:57 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406426157.88.0.5958464978.issue1602@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Drekin, you're right, that's a much better way to go, I just didn't think it through :)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 04:08:13 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Sun, 27 Jul 2014 02:08:13 +0000
Subject: [issue22082] Clear interned strings listed in slotdefs
In-Reply-To: <1406385769.4.0.261949014577.issue22082@psf.upfronthosting.co.za>
Message-ID: <1406426893.08.0.48702751713.issue22082@psf.upfronthosting.co.za>


Changes by Martin v. L?wis :


----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 04:17:06 2014
From: report at bugs.python.org (Chris Rebert)
Date: Sun, 27 Jul 2014 02:17:06 +0000
Subject: [issue16535] json encoder unable to handle decimal
In-Reply-To: <1353624338.46.0.574343718645.issue16535@psf.upfronthosting.co.za>
Message-ID: <1406427426.94.0.0728107851647.issue16535@psf.upfronthosting.co.za>


Chris Rebert added the comment:

> 1) JSON just support floats

If you read the JSON standards documents, you'll see that this isn't accurate.

Regardless, a general solution for non-built-in numeric types does seem preferable.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 05:12:58 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Sun, 27 Jul 2014 03:12:58 +0000
Subject: [issue22087] _UnixDefaultEventLoopPolicy should either create a new
 loop or explicilty fail when get_event_loop() is called from a
 multiprocessing child process
In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za>
Message-ID: <1406430778.11.0.328432550111.issue22087@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

I think there should still be a new unittest -- we're adding a behavior we're promising, so we should test it.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 05:15:38 2014
From: report at bugs.python.org (Lita Cho)
Date: Sun, 27 Jul 2014 03:15:38 +0000
Subject: [issue17172] Add turtledemo to IDLE menu
In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za>
Message-ID: <1406430938.33.0.426024258583.issue17172@psf.upfronthosting.co.za>


Lita Cho added the comment:

I've updated this patch to include the changes Ned mentioned. I am waiting to hear from Ronald if he has a better solution about dealing with the focus problem with the keyboard and mouse.

----------
Added file: http://bugs.python.org/file36121/turtle_demo_v3.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 05:25:01 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Sun, 27 Jul 2014 03:25:01 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1406431501.83.0.494415630946.issue21933@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

v3 missed 3 of the 4 fixes I requested. I would like to commit the attached simplified version of v3 that includes all fixes, leaves txtfont global as a list, and uses subscripting consistently instead of .config.  But I would first like confirmation that this version works well enough on Mac to do do.

Ned, with this binding, (ignored on Mac?)
        widget.bind_all('', self._updateFont)
plain wheel moves scroll as desired while Control-wheel changes font sizes. This is standard behavior on Windows.

I am not sure a menu entry is needed, but if one were added, you are right that it should follow Serhiy's menu patch

Serhiy, a question partly for you: various places specify a tuple when a font is specified by family, size, style. By experiment, tkinter.font.Font requires a tuple for such a sequence. However, a list seems to work fine in 2.7 and 3.x when setting the font attribute of text:
   text['font'] = txtfont 
Does tkinter or _tkinter convert to tuple? Can we depend on this, or is it an accident? To  be safe, for now, I am leaving tuple(txtfont), but I wonder if it is needed.

----------
nosy: +serhiy.storchaka
stage:  -> commit review
type:  -> behavior
Added file: http://bugs.python.org/file36122/tdemo-font-34.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 05:33:49 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Sun, 27 Jul 2014 03:33:49 +0000
Subject: [issue22084] Mutating while iterating
In-Reply-To: <1406389941.41.0.168391014696.issue22084@psf.upfronthosting.co.za>
Message-ID: <1406432029.1.0.862201728182.issue22084@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Raymond's answer at http://bugs.python.org/issue19332#msg202287 still stands: the checks for mutation while iterating are there primarily to *protect the interpreter itself*, rather than to help detect bugs where the user code misses some items because it mutated the dict during iteration. The fact it helps detect user errors is a helpful side effect of the interpreter protecting itself, rather than the *purpose* of the change.

Mutations that don't change the mapping size don't do the interpreter any harm, even if they're not what the user intended:

>>> d = dict(a=1, b=2, c=3)
>>> for k, v in d.items():
...     del d[k]
...     d[v] = k
... 
>>> d
{1: 'a', 2: 'b', 3: 'c'}
>>> for k, v in d.items():
...     del d[k]
...     d[v] = k
...                                                                                                              
>>> d
{'a': 1, 'b': 2, 'c': 3}

There are *lots* of ways to write buggy code that are significantly less obscure than this, and we don't change the way core data types work to prevent them.

For example, list iterators don't care if the underlying list is mutated at all, as again, such mutation poses no threat to the interpreter:

>>> seq = [x for x in range(10)]
>>> for i, x in enumerate(seq):
...     print(i, x)
...     del seq[i]
...
0 0
1 2
2 4
3 6
4 8

This kind of quirky behaviour is why "be careful when mutating containers you're iterating over" is sound advice. It *isn't* a reason to change the behaviour of the language to make currently legal (albeit odd) code a runtime error.

----------
nosy: +ncoghlan
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
versions:  -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 06:13:09 2014
From: report at bugs.python.org (Andrew Kubera)
Date: Sun, 27 Jul 2014 04:13:09 +0000
Subject: [issue1234674] filecmp.cmp's "shallow" option
Message-ID: <1406434389.8.0.69581591678.issue1234674@psf.upfronthosting.co.za>


Andrew Kubera added the comment:

Attached is a couple extra tests which run filecmp on two files with different content but the same length and relevant stat() info. This appears to successfully check if the shallow options works correctly. 

It uses time.sleep(1) to ensure the files start out with different creation times, checks that filecmp returns false, then sets the creation time with os.utime to ensure filecmp is true.

These tests currently run successfully on 3.5, so if there was an issue, it has been resolved.

----------
nosy: +Andrew.Kubera
versions:  -Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file36123/filecmp_extra_shallow_file_check.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 06:13:22 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Sun, 27 Jul 2014 04:13:22 +0000
Subject: [issue22079] Ensure in PyType_Ready() that base class of static type
 is static
In-Reply-To: <1406378199.04.0.952325428414.issue22079@psf.upfronthosting.co.za>
Message-ID: <1406434402.63.0.216134979417.issue22079@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

By static, you mean not a heap type?

----------
nosy: +pitrou

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 06:15:46 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Sun, 27 Jul 2014 04:15:46 +0000
Subject: [issue22079] Ensure in PyType_Ready() that base class of static type
 is static
In-Reply-To: <1406378199.04.0.952325428414.issue22079@psf.upfronthosting.co.za>
Message-ID: <1406434546.05.0.0144802983934.issue22079@psf.upfronthosting.co.za>


Alex Gaynor added the comment:

Yup.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 06:47:44 2014
From: report at bugs.python.org (Lita Cho)
Date: Sun, 27 Jul 2014 04:47:44 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1406436464.29.0.975385506351.issue21933@psf.upfronthosting.co.za>


Lita Cho added the comment:

Hi Terry,

I originally had txtfont as a list, but I guess I was worried about readability and accessing attributes by indices being unpythonic. But I might have been over-doing it for this case. :)

In Mac, you don't need to divide event.delta by 120, only Windows and X11 systems. This is according to a Stackoverflow answer: http://stackoverflow.com/questions/17355902/python-tkinter-binding-mousewheel-to-scrollbar

But maybe I'm wrong? I've attached my small change.

----------
Added file: http://bugs.python.org/file36124/tdemo-font-34_lita.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 08:06:34 2014
From: report at bugs.python.org (Roy Wellington)
Date: Sun, 27 Jul 2014 06:06:34 +0000
Subject: [issue22089] collections.MutableSet does not provide update method
Message-ID: <1406441194.56.0.0212102514052.issue22089@psf.upfronthosting.co.za>


New submission from Roy Wellington:

Inheriting from collections.MutableSet mixes in several methods, however, it does not mix in a .update method. This can cause a variety of confusion if you expect a MutableSet to act like a set. Moreover, MutableMapping does provide a .update method, which makes me think this is a bug.

I've attached a file that creates a bare-bones MutableSet, and shows the difference.

Is this a bug, or is there some reason that MutableSet doesn't provide an update method?

----------
components: Library (Lib)
files: ms.py
messages: 224105
nosy: roy.wellington
priority: normal
severity: normal
status: open
title: collections.MutableSet does not provide update method
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file36125/ms.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 09:04:41 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Sun, 27 Jul 2014 07:04:41 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1406444681.02.0.50114039411.issue21933@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

While we are at it, lets compute "sys.platform == 'darwin'" just once and use conditional expressions.  (I just condensed config_gui() with conditional expressions, but avoided changing the context for the patches here.)

----------
Added file: http://bugs.python.org/file36126/tdemo-font-34-t2.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 09:25:35 2014
From: report at bugs.python.org (Ned Deily)
Date: Sun, 27 Jul 2014 07:25:35 +0000
Subject: [issue21308] PEP 466: backport ssl changes
In-Reply-To: <9f606957-c0fc-42fe-b0e1-52ea1cb44333@email.android.com>
Message-ID: <1406445935.81.0.0224705003255.issue21308@psf.upfronthosting.co.za>


Ned Deily added the comment:

Some results from a quick build/test on OS X 10.9.4 with Xcode 5.1.1 clang and openssl 1.0.1h from MacPorts (similar results when built with Apple-supplied openssl 0.9.8y and on OS X 10.5.8 ppc with Apple-supplied openssl 0.9.7l):

- Modules/_ssl.c:2861:52: warning: invalid conversion specifier 'R'
      [-Wformat-invalid-specifier]
                     "unknown elliptic curve name %R", name);
                                                  ~^
- segfault on test_load_cert_chain (lldb traceback in attached file)

./python -m test.regrtest -v -uall,-largefile test_ssl
== CPython 2.7.8+ (default, Jul 26 2014, 23:44:13) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)]
==   Darwin-13.3.0-x86_64-i386-64bit little-endian
==   /py/dev/27/source/build/test_python_22427
Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0, hash_randomization=0)
test_ssl
test_ssl: testing with 'OpenSSL 1.0.1h 5 Jun 2014' (1, 0, 1, 8, 15)
          under Mac ('10.9.4', ('', '', ''), 'x86_64')
          HAS_SNI = True
          OP_ALL = 0x800003ff
          OP_NO_TLSv1_1 = 0x10000000
test__create_stdlib_context (test.test_ssl.ContextTests) ... ok
test_cert_store_stats (test.test_ssl.ContextTests) ... ok
test_check_hostname (test.test_ssl.ContextTests) ... ok
test_ciphers (test.test_ssl.ContextTests) ... ok
test_constructor (test.test_ssl.ContextTests) ... ok
test_create_default_context (test.test_ssl.ContextTests) ... ok
test_get_ca_certs (test.test_ssl.ContextTests) ... ok
test_load_cert_chain (test.test_ssl.ContextTests) ... Segmentation fault: 11

- test_poplib hangs, requiring ctrl-c interrupt

/python -m test.regrtest -v -uall test_poplib
== CPython 2.7.8+ (default, Jul 26 2014, 23:44:13) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)]
==   Darwin-13.3.0-x86_64-i386-64bit little-endian
==   /py/dev/27/source/build/test_python_33661
Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0, hash_randomization=0)
test_poplib
test_dele (test.test_poplib.TestPOP3Class) ... ok
test_exceptions (test.test_poplib.TestPOP3Class) ... ok
test_getwelcome (test.test_poplib.TestPOP3Class) ... ok
test_list (test.test_poplib.TestPOP3Class) ... ok
test_noop (test.test_poplib.TestPOP3Class) ... ok
test_pass_ (test.test_poplib.TestPOP3Class) ... ok
test_retr (test.test_poplib.TestPOP3Class) ... ok
test_rpop (test.test_poplib.TestPOP3Class) ... ok
test_stat (test.test_poplib.TestPOP3Class) ... ok
test_top (test.test_poplib.TestPOP3Class) ... ok
test_uidl (test.test_poplib.TestPOP3Class) ... ok
test_user (test.test_poplib.TestPOP3Class) ... ok
testTimeoutDefault (test.test_poplib.TestTimeouts) ... ok
testTimeoutNone (test.test_poplib.TestTimeouts) ... ok
testTimeoutValue (test.test_poplib.TestTimeouts) ... ok
test__all__ (test.test_poplib.TestPOP3_SSLClass) ... Exception in thread Thread-16:
Traceback (most recent call last):
  File "/py/dev/27/source/Lib/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/py/dev/27/source/Lib/test/test_poplib.py", line 132, in run
    asyncore.loop(timeout=0.1, count=1)
  File "/py/dev/27/source/Lib/asyncore.py", line 220, in loop
    poll_fun(timeout, map)
  File "/py/dev/27/source/Lib/asyncore.py", line 156, in poll
    read(obj)
  File "/py/dev/27/source/Lib/asyncore.py", line 87, in read
    obj.handle_error()
  File "/py/dev/27/source/Lib/asyncore.py", line 83, in read
    obj.handle_read_event()
  File "/py/dev/27/source/Lib/asyncore.py", line 443, in handle_read_event
    self.handle_accept()
  File "/py/dev/27/source/Lib/test/test_poplib.py", line 143, in handle_accept
    self.handler = self.handler(conn)
  File "/py/dev/27/source/Lib/test/test_poplib.py", line 242, in __init__
    self.push('+OK dummy pop3 server ready.')
  File "/py/dev/27/source/Lib/test/test_poplib.py", line 63, in push
    asynchat.async_chat.push(self, data + '\r\n')
  File "/py/dev/27/source/Lib/asynchat.py", line 193, in push
    self.initiate_send()
  File "/py/dev/27/source/Lib/asynchat.py", line 244, in initiate_send
    self.handle_error()
  File "/py/dev/27/source/Lib/asynchat.py", line 242, in initiate_send
    num_sent = self.send(data)
  File "/py/dev/27/source/Lib/asyncore.py", line 374, in send
    result = self.socket.send(data)
  File "/py/dev/27/source/Lib/ssl.py", line 662, in send
    return self._sslobj.write(data)
SSLWantReadError: The operation did not complete (read) (_ssl.c:1611)

^CWarning -- asyncore.socket_map was modified by test_poplib

Test suite interrupted by signal SIGINT.
1 test omitted:
    test_poplib
[51620 refs]

- new test/capath directory needs to be added to LIBSUBDIRS in Makefile.pre.in

----------
nosy: +ned.deily
stage: needs patch -> patch review
Added file: http://bugs.python.org/file36127/segfault_osx_10_9_openssl_101h.txt

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 09:29:41 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Sun, 27 Jul 2014 07:29:41 +0000
Subject: [issue21308] PEP 466: backport ssl changes
In-Reply-To: <9f606957-c0fc-42fe-b0e1-52ea1cb44333@email.android.com>
Message-ID: <1406446181.56.0.593382666401.issue21308@psf.upfronthosting.co.za>


Alex Gaynor added the comment:

Ned, did you apply the patch from http://bugs.python.org/issue22023 first? That bt looks like what you'd see without it.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 09:54:10 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 27 Jul 2014 07:54:10 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1406431501.83.0.494415630946.issue21933@psf.upfronthosting.co.za>
Message-ID: <2982013.QTquYMujxq@raxxla>


Serhiy Storchaka added the comment:

In 3.5 lists should work as fine as tuples. But in earlier version it would be 
safer to convert list to tuple.

Configure's value is preprocessed in Misc._options. If it is a tuple or a list 
with only int and str items, it will stringified. But if a list contains non-
int or non-str items, it will passed as is, and _tkinter in pre-3.5 will fail 
because lists are not supported.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 09:57:13 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 27 Jul 2014 07:57:13 +0000
Subject: [issue22079] Ensure in PyType_Ready() that base class of static type
 is static
In-Reply-To: <1406434402.63.0.216134979417.issue22079@psf.upfronthosting.co.za>
Message-ID: <1450704.pEWb8fJAnT@raxxla>


Serhiy Storchaka added the comment:

> By static, you mean not a heap type?

Yes. Sorry for bad wording.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 10:05:29 2014
From: report at bugs.python.org (Mark Dickinson)
Date: Sun, 27 Jul 2014 08:05:29 +0000
Subject: [issue22089] collections.MutableSet does not provide update method
In-Reply-To: <1406441194.56.0.0212102514052.issue22089@psf.upfronthosting.co.za>
Message-ID: <1406448329.23.0.686358613081.issue22089@psf.upfronthosting.co.za>


Changes by Mark Dickinson :


----------
nosy: +rhettinger

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 10:43:31 2014
From: report at bugs.python.org (Christian Heimes)
Date: Sun, 27 Jul 2014 08:43:31 +0000
Subject: [issue21308] PEP 466: backport ssl changes
In-Reply-To: <9f606957-c0fc-42fe-b0e1-52ea1cb44333@email.android.com>
Message-ID: <1406450611.48.0.723476357976.issue21308@psf.upfronthosting.co.za>


Christian Heimes added the comment:

Does https://github.com/alex/cpython/commits/backport-ssl contain all relevant code changes? I like to review the changes during my train ride home.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 11:55:55 2014
From: report at bugs.python.org (Alon Mishne)
Date: Sun, 27 Jul 2014 09:55:55 +0000
Subject: [issue22057] The doc say all globals are copied on eval(),
 but only __builtins__ is copied
In-Reply-To: <1406210389.95.0.0796853252426.issue22057@psf.upfronthosting.co.za>
Message-ID: <1406454955.16.0.414272703243.issue22057@psf.upfronthosting.co.za>


Alon Mishne added the comment:

Patch for 2.7.8.

The patch is just changing "globals are" to "mapping of ?__builtins__? is", and subsequent paragraph reformatting.

----------
keywords: +patch
Added file: http://bugs.python.org/file36128/evalglobals2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 11:57:43 2014
From: report at bugs.python.org (Alon Mishne)
Date: Sun, 27 Jul 2014 09:57:43 +0000
Subject: [issue22057] The doc say all globals are copied on eval(),
 but only __builtins__ is copied
In-Reply-To: <1406210389.95.0.0796853252426.issue22057@psf.upfronthosting.co.za>
Message-ID: <1406455063.28.0.122205342147.issue22057@psf.upfronthosting.co.za>


Alon Mishne added the comment:

Patch for 3.5.x

The patch is just changing "globals are" to "mapping of ?__builtins__? is", and subsequent paragraph reformatting.

Nearly identical to 2.7.8 patch.

----------
Added file: http://bugs.python.org/file36129/evalglobals3.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 12:08:43 2014
From: report at bugs.python.org (Mark Dickinson)
Date: Sun, 27 Jul 2014 10:08:43 +0000
Subject: [issue22090] Decimal and float formatting treat '%' differently for
 infinities and nans.
Message-ID: <1406455723.52.0.997283705437.issue22090@psf.upfronthosting.co.za>


New submission from Mark Dickinson:

There's a minor inconsistency between Decimal and float formatting for the `%` format type when handling infinities and nans:

>>> from decimal import Decimal
>>> format(float('inf'), '.2%')  # includes trailing '%'
'inf%'
>>> format(Decimal('inf'), '.2%')  # no trailing '%'
'Infinity'

I think the Decimal result should have a '%' on it.

----------
messages: 224114
nosy: eric.smith, mark.dickinson, skrah
priority: normal
severity: normal
status: open
title: Decimal and float formatting treat '%' differently for infinities and nans.
type: behavior
versions: Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 12:11:02 2014
From: report at bugs.python.org (Eric V. Smith)
Date: Sun, 27 Jul 2014 10:11:02 +0000
Subject: [issue22090] Decimal and float formatting treat '%' differently for
 infinities and nans.
In-Reply-To: <1406455723.52.0.997283705437.issue22090@psf.upfronthosting.co.za>
Message-ID: <1406455862.18.0.57141033919.issue22090@psf.upfronthosting.co.za>


Eric V. Smith added the comment:

I agree that Decimal is wrong here. PEP 3101 says the result should include the trailing '%'.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 12:22:43 2014
From: report at bugs.python.org (Ned Deily)
Date: Sun, 27 Jul 2014 10:22:43 +0000
Subject: [issue21308] PEP 466: backport ssl changes
In-Reply-To: <9f606957-c0fc-42fe-b0e1-52ea1cb44333@email.android.com>
Message-ID: <1406456563.93.0.814382752861.issue21308@psf.upfronthosting.co.za>


Ned Deily added the comment:

> did you apply the patch from http://bugs.python.org/issue22023 first?

Sorry, missed that.  Let's try again with that applied as well:

OS X 10.9.4 with Xcode 5.1.1 clang and openssl 1.0.1h from MacPorts

- Modules/_ssl.c:2861:52: warning: invalid conversion specifier 'R' (see above)

- test_poplib hangs, requiring ctrl-c interrupt (see above)

- certificate verify failed in test_algorithms of test_ssl

test_ssl: testing with 'OpenSSL 1.0.1h 5 Jun 2014' (1, 0, 1, 8, 15)
          under Mac ('10.9.4', ('', '', ''), 'x86_64')
          HAS_SNI = True
          OP_ALL = 0x800003ff
          OP_NO_TLSv1_1 = 0x10000000
[...]
======================================================================
ERROR: test_algorithms (test.test_ssl.NetworkedTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/py/dev/27/root/uxd_macports/lib/python2.7/test/test_ssl.py", line 1475, in test_algorithms
    s.connect(remote)
  File "/py/dev/27/root/uxd_macports/lib/python2.7/ssl.py", line 810, in connect
    self._real_connect(addr, False)
  File "/py/dev/27/root/uxd_macports/lib/python2.7/ssl.py", line 801, in _real_connect
    self.do_handshake()
  File "/py/dev/27/root/uxd_macports/lib/python2.7/ssl.py", line 774, in do_handshake
    self._sslobj.do_handshake()
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:579)

----------------------------------------------------------------------
Ran 99 tests in 13.035s

FAILED (errors=1, skipped=4)

when built with Apple-supplied openssl 0.9.8y on OS X 10.9.4:

- test_algorithms does not fail:

test_ssl: testing with 'OpenSSL 0.9.8y 5 Feb 2013' (0, 9, 8, 25, 15)
          under Mac ('10.9.4', ('', '', ''), 'x86_64')
          HAS_SNI = True
          OP_ALL = 0x     7ff
[...]
test_algorithms (test.test_ssl.NetworkedTests) ...
Cipher with ('sha256.tbs-internet.com', 443) is ('RC4-SHA', 'TLSv1/SSLv3', 128)
Certificate is:
{'OCSP': (u'http://ocsp.tbs-x509.com',),
 'caIssuers': (u'http://crt.tbs-internet.com/TBSX509CASGC.crt',
               u'http://crt.tbs-x509.com/TBSX509CASGC.crt'),
 'crlDistributionPoints': (u'http://crl.tbs-internet.com/TBSX509CASGC.crl',
                           u'http://crl.tbs-x509.com/TBSX509CASGC.crl'),
[...]

- a non-fatal broken pipe exception is seen

test_nonblocking_send (test.test_ssl.ThreadedTests) ...  server:  new connection from ('127.0.0.1', 50583)
 server: connection cipher is now ('AES256-SHA', 'TLSv1/SSLv3', 256)
 server: selected protocol is now None
Exception in thread Thread-36:
Traceback (most recent call last):
  File "/py/dev/27/root/uxd/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/py/dev/27/root/uxd/lib/python2.7/test/test_ssl.py", line 1636, in run
    self.write(msg.lower())
  File "/py/dev/27/root/uxd/lib/python2.7/test/test_ssl.py", line 1581, in write
    return self.sslconn.write(bytes)
  File "/py/dev/27/root/uxd/lib/python2.7/ssl.py", line 622, in write
    return self._sslobj.write(data)
error: [Errno 32] Broken pipe

ok

on OS X 10.5.8 ppc with Apple-supplied openssl 0.9.7l:

- test_rude_shutdown fails

test_ssl: testing with 'OpenSSL 0.9.7l 28 Sep 2006' (0, 9, 7, 12, 15)
          under Mac ('10.5.8', ('', '', ''), 'PowerPC')
          HAS_SNI = False
          OP_ALL = 0x     7ff
[...]
======================================================================
ERROR: test_rude_shutdown (test.test_ssl.ThreadedTests)
A brutal shutdown of an SSL server should raise an OSError
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Volumes/cache/py/pyb5g4/27/unix/root/lib/python2.7/test/test_ssl.py", line 2139, in test_rude_shutdown
    connector()
  File "/Volumes/cache/py/pyb5g4/27/unix/root/lib/python2.7/test/test_ssl.py", line 2130, in connector
    ssl_sock = ssl.wrap_socket(c)
  File "/Volumes/cache/py/pyb5g4/27/unix/root/lib/python2.7/ssl.py", line 868, in wrap_socket
    ciphers=ciphers)
  File "/Volumes/cache/py/pyb5g4/27/unix/root/lib/python2.7/ssl.py", line 561, in __init__
    self.do_handshake()
  File "/Volumes/cache/py/pyb5g4/27/unix/root/lib/python2.7/ssl.py", line 774, in do_handshake
    self._sslobj.do_handshake()
error: [Errno 54] Connection reset by peer

----------------------------------------------------------------------
Ran 99 tests in 14.843s

FAILED (errors=1, skipped=21)

- new test/capath directory needs to be added to LIBSUBDIRS in Makefile.pre.in

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 12:23:24 2014
From: report at bugs.python.org (moijes12)
Date: Sun, 27 Jul 2014 10:23:24 +0000
Subject: [issue8489] Support RFC 6531 in smptlib
In-Reply-To: <1271877469.99.0.897777864709.issue8489@psf.upfronthosting.co.za>
Message-ID: <1406456604.18.0.899163383911.issue8489@psf.upfronthosting.co.za>


Changes by moijes12 :


----------
nosy: +moijes12

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 13:02:21 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Sun, 27 Jul 2014 11:02:21 +0000
Subject: [issue20170] Derby #1: Convert 137 sites to Argument Clinic in
 Modules/posixmodule.c
In-Reply-To: <1389138185.8.0.104398826507.issue20170@psf.upfronthosting.co.za>
Message-ID: <1406458941.86.0.35647215455.issue20170@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

This patch doesn't apply anymore (to c55300337932); please update it.

----------
nosy: +loewis

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 13:20:52 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Sun, 27 Jul 2014 11:20:52 +0000
Subject: [issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4
 files (Windows)
In-Reply-To: <1389138308.61.0.497102640792.issue20172@psf.upfronthosting.co.za>
Message-ID: <1406460052.15.0.0913107442001.issue20172@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

2 hunks of _winapi.c currently fail to apply. Can you please update the patch?

----------
nosy: +loewis

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 13:32:00 2014
From: report at bugs.python.org (Armin Rigo)
Date: Sun, 27 Jul 2014 11:32:00 +0000
Subject: [issue22091] __debug__ in compile(optimize=1)
Message-ID: <1406460720.31.0.52304616259.issue22091@psf.upfronthosting.co.za>


New submission from Armin Rigo:

The documentation of the built-in compile() function is not 100% clear but I think it says that giving the "optimize=1" argument turns "__debug__" to false in the compiled code ( https://docs.python.org/3.5/library/functions.html?highlight=compile#compile ).  It doesn't work this way in practice, though:

    python3.5
    >>> exec(compile("print(__debug__)", "exec", "exec", optimize=1))
    True

I'd recommend to fix either the documentation or the source code.

----------
messages: 224119
nosy: arigo
priority: normal
severity: normal
status: open
title: __debug__ in compile(optimize=1)

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 13:43:17 2014
From: report at bugs.python.org (SilentGhost)
Date: Sun, 27 Jul 2014 11:43:17 +0000
Subject: [issue22091] __debug__ in compile(optimize=1)
In-Reply-To: <1406460720.31.0.52304616259.issue22091@psf.upfronthosting.co.za>
Message-ID: <1406461397.68.0.610601563914.issue22091@psf.upfronthosting.co.za>


SilentGhost added the comment:

I can reproduce your example on 3.4, but for the comparison:

>>> exec(compile("if __debug__: print(42)", "exec", "exec", optimize=1))

>>> exec(compile("if __debug__: print(42)", "exec", "exec", optimize=0))
42

So, it's not as straightforward as one might imagine.

----------
components: +Interpreter Core
nosy: +SilentGhost
versions: +Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 14:05:27 2014
From: report at bugs.python.org (David Wilson)
Date: Sun, 27 Jul 2014 12:05:27 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1406462727.37.0.897889937231.issue22003@psf.upfronthosting.co.za>


David Wilson added the comment:

Hey Antoine,

Thanks for the link. I'm having trouble getting reproducible results at present, and running out of ideas as to what might be causing it. Even after totally isolating a CPU for e.g. django_v2 and with frequency scaling disabled, numbers still jump around for the same binary by as much as 3%.

I could not detect any significant change between runs of the old and new binary that could not be described as noise, given the isolation issues above.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 14:20:45 2014
From: report at bugs.python.org (Roundup Robot)
Date: Sun, 27 Jul 2014 12:20:45 +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: <3hLjsm6SKyz7LjX@mail.python.org>


Roundup Robot added the comment:

New changeset 5a2ec0a15017 by Martin v. L?wis in branch 'default':
Issue #20173: Convert sha1, sha256, sha512 and md5 to ArgumentClinic.
http://hg.python.org/cpython/rev/5a2ec0a15017

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 14:21:41 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Sun, 27 Jul 2014 12:21:41 +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: <1406463701.97.0.579393842254.issue20173@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

The codecsmodule still remains to be done.

----------
nosy: +loewis

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 14:22:16 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Sun, 27 Jul 2014 12:22:16 +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: <1406463736.49.0.316867172592.issue20173@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

BTW, Vajrasky: Thanks for the patch!

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 14:31:05 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sun, 27 Jul 2014 12:31:05 +0000
Subject: [issue22087] _UnixDefaultEventLoopPolicy should either create a new
 loop or explicilty fail when get_event_loop() is called from a
 multiprocessing child process
In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za>
Message-ID: <1406464265.96.0.968112217154.issue22087@psf.upfronthosting.co.za>


STINNER Victor added the comment:

See aslo issue #21998: "asyncio: a new self-pipe should be created in the child process after fork".

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 14:56:27 2014
From: report at bugs.python.org (eryksun)
Date: Sun, 27 Jul 2014 12:56:27 +0000
Subject: [issue22091] __debug__ in compile(optimize=1)
In-Reply-To: <1406460720.31.0.52304616259.issue22091@psf.upfronthosting.co.za>
Message-ID: <1406465787.31.0.167467834776.issue22091@psf.upfronthosting.co.za>


eryksun added the comment:

If __debug__ were referenced from the code object's co_consts instead of checking locals, globals and builtins (LOAD_NAME), then optimize=1 would work consistently for a given code object. 

Currently in 3.4.1:

    >>> dis.dis(compile("if __debug__: x = 1", "", "exec", optimize=0))
      1           0 LOAD_CONST               0 (1)
                  3 STORE_NAME               0 (x)
                  6 LOAD_CONST               1 (None)
                  9 RETURN_VALUE

    >>> dis.dis(compile("if __debug__: x = 1", "", "exec", optimize=1))
      1           0 LOAD_CONST               0 (None)
                  3 RETURN_VALUE

    >>> dis.dis(compile("x = __debug__", "", "exec", optimize=0))
      1           0 LOAD_NAME                0 (__debug__)
                  3 STORE_NAME               1 (x)
                  6 LOAD_CONST               0 (None)
                  9 RETURN_VALUE

    >>> dis.dis(compile("x = __debug__", "", "exec", optimize=1))
      1           0 LOAD_NAME                0 (__debug__)
                  3 STORE_NAME               1 (x)
                  6 LOAD_CONST               0 (None)
                  9 RETURN_VALUE

With the current design, an exec can override builtins.__debug__ in globals or locals:

    >>> exec("print(__debug__)", globals(), {"__debug__": "spam"})
    spam

----------
nosy: +eryksun

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 14:59:31 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Sun, 27 Jul 2014 12:59:31 +0000
Subject: [issue20174] Derby #5: Convert 50 sites to Argument Clinic across 3
 files
In-Reply-To: <1389138461.92.0.709656306175.issue20174@psf.upfronthosting.co.za>
Message-ID: <1406465971.38.0.432483274756.issue20174@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

Ryan, 4 hunks of your patch fail to apply now. Can you please update the patch?

----------
nosy: +loewis

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 15:12:03 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sun, 27 Jul 2014 13:12:03 +0000
Subject: [issue22018] signal.set_wakeup_fd() should accept sockets on Windows
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406466723.45.0.79966270484.issue22018@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
title: Add a new signal.set_wakeup_socket() function -> signal.set_wakeup_fd() should accept sockets on Windows

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 15:22:46 2014
From: report at bugs.python.org (Steven Barker)
Date: Sun, 27 Jul 2014 13:22:46 +0000
Subject: [issue1234674] filecmp.cmp's "shallow" option
Message-ID: <1406467366.42.0.199671501835.issue1234674@psf.upfronthosting.co.za>


Steven Barker added the comment:

I think that your test patch misses the confusing/possibly wrong case. That case is when two files have the same contents, but different mtimes. If you attempt a shallow comparison, you'll actually get a deep comparison (reading the whole files) and a result of True rather than the expected (though incorrect) False.

Try the test part of my patch (without the behavior change), and you'll see the failure of "test_shallow_false_negative". In your first assertion (that "filecmp.cmp(self.name, self.name_uppercase)" is False), you get the expected result, but for the wrong reason (you get it because the file contents differ, not because they have different mtimes).

Now, it might be that the "bad" case is actually working as we want it to (or at least, the behavior is established enough that we don't want to change it, for risk of breaking running code). If so, we should instead change the documentation (and especially the docstring) to explicit state that even if you request a shallow comparison, you might get a deep comparison instead.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 15:29:54 2014
From: report at bugs.python.org (Akira Li)
Date: Sun, 27 Jul 2014 13:29:54 +0000
Subject: [issue19829] _pyio.BufferedReader and _pyio.TextIOWrapper destructor
 don't emit ResourceWarning if the file is not closed
In-Reply-To: <1385721421.95.0.384748799117.issue19829@psf.upfronthosting.co.za>
Message-ID: <1406467794.81.0.170933194699.issue19829@psf.upfronthosting.co.za>


Akira Li added the comment:

Related issue21859 "Add Python implementation of FileIO"

----------
nosy: +akira

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 15:39:47 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sun, 27 Jul 2014 13:39:47 +0000
Subject: [issue22042] signal.set_wakeup_fd(fd): raise an exception if the fd
 is in blocking mode
In-Reply-To: <1406076570.98.0.190305939229.issue22042@psf.upfronthosting.co.za>
Message-ID: <1406468387.53.0.623715686186.issue22042@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
title: signal.set_wakeup_fd(fd): set the fd to non-blocking mode -> signal.set_wakeup_fd(fd): raise an exception if the fd is in blocking mode

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 15:44:23 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sun, 27 Jul 2014 13:44:23 +0000
Subject: [issue22018] signal.set_wakeup_fd() should accept sockets on Windows
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406468663.12.0.928469509768.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

New version 9 of my patch:

- signal.set_wakeup_fd() now also supports socket handles on Windows

(That's all: files are still supported on Windows.)

----------
Added file: http://bugs.python.org/file36130/wakeup_fd-9.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 15:50:11 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sun, 27 Jul 2014 13:50:11 +0000
Subject: [issue22042] signal.set_wakeup_fd(fd): raise an exception if the fd
 is in blocking mode
In-Reply-To: <1406076570.98.0.190305939229.issue22042@psf.upfronthosting.co.za>
Message-ID: <1406469011.14.0.903518195796.issue22042@psf.upfronthosting.co.za>


Changes by STINNER Victor :


Removed file: http://bugs.python.org/file36054/os_blocking-2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 15:50:38 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sun, 27 Jul 2014 13:50:38 +0000
Subject: [issue22054] Add os.get_blocking() and os.set_blocking() functions
In-Reply-To: <1406151014.25.0.918263340821.issue22054@psf.upfronthosting.co.za>
Message-ID: <1406469038.13.0.17529619283.issue22054@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Can someone please review my patch?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 16:10:38 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sun, 27 Jul 2014 14:10:38 +0000
Subject: [issue22042] signal.set_wakeup_fd(fd): raise an exception if the fd
 is in blocking mode
In-Reply-To: <1406076570.98.0.190305939229.issue22042@psf.upfronthosting.co.za>
Message-ID: <1406470238.92.0.162372068634.issue22042@psf.upfronthosting.co.za>


STINNER Victor added the comment:

signal_check_nonblocking.patch: signal.set_wakeup_fd() now raises a ValueError if the file descriptor is in blocking mode.

The patch depends on the patch of the issue #22054.

I didn't test the patch on Windows, but all calls to signal.set_wakeup_fd() must fail with ValueError since it's not possible to set a file in non-blocking mode. See the issue #22018 which proposes to support sockets for signal.set_wakeup_fd().

----------
Added file: http://bugs.python.org/file36131/signal_check_nonblocking.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 16:12:05 2014
From: report at bugs.python.org (Roundup Robot)
Date: Sun, 27 Jul 2014 14:12:05 +0000
Subject: [issue22082] Clear interned strings listed in slotdefs
In-Reply-To: <1406385769.4.0.261949014577.issue22082@psf.upfronthosting.co.za>
Message-ID: <3hLmLF2GYYz7LjN@mail.python.org>


Roundup Robot added the comment:

New changeset c2d3feeb61ed by Victor Stinner in branch 'default':
Issue #22082: Fix a compiler warning (function is not a prototype)
http://hg.python.org/cpython/rev/c2d3feeb61ed

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 16:25:22 2014
From: report at bugs.python.org (Roundup Robot)
Date: Sun, 27 Jul 2014 14:25:22 +0000
Subject: [issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4
 files
In-Reply-To: <1389140120.63.0.492860390436.issue20179@psf.upfronthosting.co.za>
Message-ID: <3hLmdY4gPCz7LjW@mail.python.org>


Roundup Robot added the comment:

New changeset 4d3d0659b55e by Martin v. L?wis in branch 'default':
Issue #20179: Apply Argument Clinic to bytes and bytearray.
http://hg.python.org/cpython/rev/4d3d0659b55e

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 16:26:37 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Sun, 27 Jul 2014 14:26:37 +0000
Subject: [issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4
 files
In-Reply-To: <1389140120.63.0.492860390436.issue20179@psf.upfronthosting.co.za>
Message-ID: <1406471197.47.0.64735230206.issue20179@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

Tal: Thanks for the patch. I applied it with updates to the current Argument Clinic.

_ssl and _overlapped are still to be done.

----------
nosy: +loewis

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 16:50:45 2014
From: report at bugs.python.org (Vajrasky Kok)
Date: Sun, 27 Jul 2014 14:50:45 +0000
Subject: [issue22092] Executing some tests inside Lib/unittest/test
 individually throws Error
Message-ID: <1406472645.11.0.803987239444.issue22092@psf.upfronthosting.co.za>


New submission from Vajrasky Kok:

For examples:

$ ./python Lib/unittest/test/test_runner.py 
Traceback (most recent call last):
  File "Lib/unittest/test/test_runner.py", line 10, in 
    from .support import LoggingResult, ResultWithNoStartTestRunStopTestRun
SystemError: Parent module '' not loaded, cannot perform relative import

$ ./python Lib/unittest/test/test_program.py 
..................E
======================================================================
ERROR: test_discovery_from_dotted_path (__main__.Test_TestProgram)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/unittest/test/test_program.py", line 15, in test_discovery_from_dotted_path
    expectedPath = os.path.abspath(os.path.dirname(unittest.test.__file__))
AttributeError: module 'unittest' has no attribute 'test'

----------------------------------------------------------------------
Ran 19 tests in 0.331s

FAILED (errors=1)


Here is the patch.

----------
components: Tests
files: fix_test_inside_unittest.patch
keywords: patch
messages: 224136
nosy: vajrasky
priority: normal
severity: normal
status: open
title: Executing some tests inside Lib/unittest/test individually throws Error
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36132/fix_test_inside_unittest.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 17:00:02 2014
From: report at bugs.python.org (Vajrasky Kok)
Date: Sun, 27 Jul 2014 15:00:02 +0000
Subject: [issue22092] Executing some tests inside Lib/unittest/test
 individually throws Error
In-Reply-To: <1406472645.11.0.803987239444.issue22092@psf.upfronthosting.co.za>
Message-ID: <1406473202.77.0.296670620534.issue22092@psf.upfronthosting.co.za>


Changes by Vajrasky Kok :


Removed file: http://bugs.python.org/file36132/fix_test_inside_unittest.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 17:00:10 2014
From: report at bugs.python.org (Vajrasky Kok)
Date: Sun, 27 Jul 2014 15:00:10 +0000
Subject: [issue22092] Executing some tests inside Lib/unittest/test
 individually throws Error
In-Reply-To: <1406472645.11.0.803987239444.issue22092@psf.upfronthosting.co.za>
Message-ID: <1406473210.44.0.711811593722.issue22092@psf.upfronthosting.co.za>


Changes by Vajrasky Kok :


Added file: http://bugs.python.org/file36133/fix_test_inside_unittest.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 17:31:00 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Sun, 27 Jul 2014 15:31:00 +0000
Subject: [issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9
 files
In-Reply-To: <1389140162.94.0.578256004005.issue20180@psf.upfronthosting.co.za>
Message-ID: <1406475060.91.0.486474054218.issue20180@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

For the unicodeobject changes, see Rietveld. In addition, it produces many cast errors from PyUnicodeObject* to PyObject*. Otherwise, it looks fine - please apply (after these fixes).

----------
nosy: +loewis

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 17:41:23 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Sun, 27 Jul 2014 15:41:23 +0000
Subject: [issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5
 files
In-Reply-To: <1389140257.44.0.42523119139.issue20182@psf.upfronthosting.co.za>
Message-ID: <1406475683.65.0.409925892731.issue20182@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

The patch does not apply anymore. Can you please update it, and rerun AC on it?

----------
nosy: +loewis

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 17:48:35 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Sun, 27 Jul 2014 15:48:35 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1406476115.65.0.20126922081.issue22003@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

> Even after totally isolating a CPU for e.g. django_v2 and with frequency scaling disabled, numbers still jump around for the same binary by as much as 3%.

That's expected. If the difference doesn't go above 5-10%, then you IMO can pretty much consider your patch didn't have any impact on those benchmarks.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 18:09:53 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Sun, 27 Jul 2014 16:09:53 +0000
Subject: [issue22087] _UnixDefaultEventLoopPolicy should either create a new
 loop or explicilty fail when get_event_loop() is called from a
 multiprocessing child process
In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za>
Message-ID: <1406477393.01.0.997510626022.issue22087@psf.upfronthosting.co.za>


Dan O'Reilly added the comment:

I've added a unit test that spawns a new forked process via multiprocessing, and verifies that the loop returned by get_event_loop is not the same as the one we have in the parent.

----------
Added file: http://bugs.python.org/file36134/handle_mp_unix_with_test.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 18:10:01 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Sun, 27 Jul 2014 16:10:01 +0000
Subject: [issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9
 files
In-Reply-To: <1389039493.34.0.923814328387.issue20152@psf.upfronthosting.co.za>
Message-ID: <1406477401.59.0.131286257565.issue20152@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

multibytecodec_derby.diff looks fine, please apply.

----------
nosy: +loewis

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 18:21:09 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Sun, 27 Jul 2014 16:21:09 +0000
Subject: [issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9
 files
In-Reply-To: <1389039493.34.0.923814328387.issue20152@psf.upfronthosting.co.za>
Message-ID: <1406478069.55.0.406593751974.issue20152@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

The cmath patch fails to apply; please update it.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 18:21:36 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Sun, 27 Jul 2014 16:21:36 +0000
Subject: [issue22087] _UnixDefaultEventLoopPolicy should either create a new
 loop or explicilty fail when get_event_loop() is called from a
 multiprocessing child process
In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za>
Message-ID: <1406478096.09.0.230037679774.issue22087@psf.upfronthosting.co.za>


Dan O'Reilly added the comment:

re: #21998, perhaps it's time to revive #16500? Without that, I'm not sure what can be done aside from documenting the need to call "loop = asyncio.get_event_loop()" in the child immediately after forking.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 18:34:05 2014
From: report at bugs.python.org (Berker Peksag)
Date: Sun, 27 Jul 2014 16:34:05 +0000
Subject: [issue21990] saxutils defines an inner class where a normal one would
 do
In-Reply-To: <1405520928.93.0.195566496029.issue21990@psf.upfronthosting.co.za>
Message-ID: <1406478845.94.0.774933127339.issue21990@psf.upfronthosting.co.za>


Changes by Berker Peksag :


----------
stage: commit review -> resolved

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 18:45:55 2014
From: report at bugs.python.org (STINNER Victor)
Date: Sun, 27 Jul 2014 16:45:55 +0000
Subject: [issue22087] _UnixDefaultEventLoopPolicy should either create a new
 loop or explicilty fail when get_event_loop() is called from a
 multiprocessing child process
In-Reply-To: <1406478096.09.0.230037679774.issue22087@psf.upfronthosting.co.za>
Message-ID: 


STINNER Victor added the comment:

A simple pid check in the policy should be enough.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 18:51:40 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Sun, 27 Jul 2014 16:51:40 +0000
Subject: [issue22087] _UnixDefaultEventLoopPolicy should either create a new
 loop or explicilty fail when get_event_loop() is called from a
 multiprocessing child process
In-Reply-To: <1406397670.19.0.283234608675.issue22087@psf.upfronthosting.co.za>
Message-ID: <1406479900.0.0.646088929024.issue22087@psf.upfronthosting.co.za>


Dan O'Reilly added the comment:

Hmm, I'm not sure what you mean. What check in the policy would prevent this issue you described in #21998?:

import asyncio, os
loop = asyncio.get_event_loop()
pid = os.fork()
if pid:
    print("parent", loop._csock.fileno(), loop._ssock.fileno())
else:
    print("child", loop._csock.fileno(), loop._ssock.fileno())

Output:
---
parent 6 5
child 6 5

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 19:06:49 2014
From: report at bugs.python.org (juj)
Date: Sun, 27 Jul 2014 17:06:49 +0000
Subject: [issue22066] subprocess.communicate() does not receive full output
 from the called process.
In-Reply-To: <1406296343.93.0.498702649636.issue22066@psf.upfronthosting.co.za>
Message-ID: <1406480809.78.0.35673044671.issue22066@psf.upfronthosting.co.za>


juj added the comment:

Further testing suggests that this is not a Python issue, but instead an issue in node.js, reported already earlier here https://github.com/joyent/node/issues/1669

Closing this as invalid.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 19:07:02 2014
From: report at bugs.python.org (juj)
Date: Sun, 27 Jul 2014 17:07:02 +0000
Subject: [issue22066] subprocess.communicate() does not receive full output
 from the called process.
In-Reply-To: <1406296343.93.0.498702649636.issue22066@psf.upfronthosting.co.za>
Message-ID: <1406480822.86.0.585377673711.issue22066@psf.upfronthosting.co.za>


Changes by juj :


----------
resolution:  -> not a bug

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 19:10:10 2014
From: report at bugs.python.org (Ezio Melotti)
Date: Sun, 27 Jul 2014 17:10:10 +0000
Subject: [issue22066] subprocess.communicate() does not receive full output
 from the called process.
In-Reply-To: <1406296343.93.0.498702649636.issue22066@psf.upfronthosting.co.za>
Message-ID: <1406481010.9.0.656076472533.issue22066@psf.upfronthosting.co.za>


Changes by Ezio Melotti :


----------
stage:  -> resolved
status: open -> closed
type:  -> behavior

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 22:23:35 2014
From: report at bugs.python.org (Roundup Robot)
Date: Sun, 27 Jul 2014 20:23:35 +0000
Subject: [issue22076] csv module bad grammar in exception message
In-Reply-To: <1406363947.96.0.930759215871.issue22076@psf.upfronthosting.co.za>
Message-ID: <3hLwZt4pq6z7LjN@mail.python.org>


Roundup Robot added the comment:

New changeset c0c7da9f0069 by Berker Peksag in branch 'default':
Issue #22076: Minor grammar fix.
http://hg.python.org/cpython/rev/c0c7da9f0069

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Jul 27 22:24:41 2014
From: report at bugs.python.org (Berker Peksag)
Date: Sun, 27 Jul 2014 20:24:41 +0000
Subject: [issue22076] csv module bad grammar in exception message
In-Reply-To: <1406363947.96.0.930759215871.issue22076@psf.upfronthosting.co.za>
Message-ID: <1406492681.38.0.945480725567.issue22076@psf.upfronthosting.co.za>


Berker Peksag added the comment:

Thanks for the patch, Martin.

----------
assignee:  -> berker.peksag
nosy: +berker.peksag
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 00:45:42 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Sun, 27 Jul 2014 22:45:42 +0000
Subject: [issue7949] IDLE: problems with dark GTK or KDE color schemes
In-Reply-To: <1266372113.11.0.0197701157976.issue7949@psf.upfronthosting.co.za>
Message-ID: <1406501142.56.0.277265031262.issue7949@psf.upfronthosting.co.za>


Changes by Terry J. Reedy :


----------
versions: +Python 3.5 -Python 3.1, Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 00:45:50 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Sun, 27 Jul 2014 22:45:50 +0000
Subject: [issue17942] IDLE Debugger: names, values misaligned
In-Reply-To: <1368076818.55.0.00268388045116.issue17942@psf.upfronthosting.co.za>
Message-ID: <1406501150.86.0.943743824094.issue17942@psf.upfronthosting.co.za>


Changes by Terry J. Reedy :


----------
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 00:46:03 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Sun, 27 Jul 2014 22:46:03 +0000
Subject: [issue15335] IDLE - debugger steps through run.py internals
In-Reply-To: <1342111374.05.0.899363686539.issue15335@psf.upfronthosting.co.za>
Message-ID: <1406501163.22.0.815409923022.issue15335@psf.upfronthosting.co.za>


Changes by Terry J. Reedy :


----------
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 00:46:47 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Sun, 27 Jul 2014 22:46:47 +0000
Subject: [issue16023] IDLE freezes on ^5 or ^6 (Un-)Tabify Region with OS X
 Cocoa Tk 8.5
In-Reply-To: <1348500115.21.0.649772246938.issue16023@psf.upfronthosting.co.za>
Message-ID: <1406501207.1.0.520140972899.issue16023@psf.upfronthosting.co.za>


Changes by Terry J. Reedy :


----------
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 04:14:36 2014
From: report at bugs.python.org (Andrew Barnert)
Date: Mon, 28 Jul 2014 02:14:36 +0000
Subject: [issue1152248] Add support for reading records with arbitrary
 separators to the standard IO stack
Message-ID: <1406513676.23.0.255736417899.issue1152248@psf.upfronthosting.co.za>


Andrew Barnert added the comment:

Akira, your patch does this:

-        self._writetranslate = newline != ''
-        self._writenl = newline or os.linesep
+        self._writetranslate = newline in (None, '\r', '\r\n')
+        self._writenl = newline if newline is not None else os.linesep

Any reason you made the second change? Why change the value assigned to _writenl for newline='\n' when you don't want to actually change the behavior for those cases? Just so you can double-check at write time that _writetranslate is never set unless _writenl is '\r', '\r\n', or os.linesep?

----------
versions: +Python 3.4 -Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 04:53:49 2014
From: report at bugs.python.org (Anthony Kong)
Date: Mon, 28 Jul 2014 02:53:49 +0000
Subject: [issue13272] 2to3 fix_renames doesn't rename
 string.lowercase/uppercase/letters
In-Reply-To: <1319700425.9.0.635731429373.issue13272@psf.upfronthosting.co.za>
Message-ID: <1406516029.26.0.558462149536.issue13272@psf.upfronthosting.co.za>


Changes by Anthony Kong :


----------
nosy: +Anthony.Kong

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 04:53:50 2014
From: report at bugs.python.org (Ned Deily)
Date: Mon, 28 Jul 2014 02:53:50 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1406516030.64.0.258726254565.issue21933@psf.upfronthosting.co.za>


Ned Deily added the comment:

Several review comments on tdemo-font-34-t2.diff:

- Terry's question:
>Ned, with this binding, (ignored on Mac?)
>        widget.bind_all('', self._updateFont)
>plain wheel moves scroll as desired while Control-wheel changes font sizes. >This is standard behavior on Windows.

That seems to work on OS X as well (with both the Cocoa and Carbon Tks), although IMO having a control-mousescroll affect the font size is not something an OS X user would expect; I know of no other GUI application on OS X with that behavior.  But it doesn't hurt.

- That said, the "sign" of the mousescroll is reversed on OS X (as Kevin Walzer's comment implies here (http://wiki.tcl.tk/3893): note the minus sign).

- AFAICT, "=" is not a legal Tk keysym (http://www.tcl.tk/man/tcl8.6/TkCmd/keysyms.htm), some Tk variants either ignore it, others (e.g. OS X X11) raise an exception.  Should be "equal".

- If the user repeatedly decrements the font size (either with the control(or command) "-" or with control-mousescroll, txtfont[1] can go negative but it appears Tk effectively uses its absolute value.  So the font decreases to near invisibility then starts to increase again.  Suggest adding a "minimum font size" (perhaps 8) and not allow txtfont[1] to decrease below it.

Attached patch tdemo-font-34-t3.patch addresses the above issues.

Someone should test this all with a Linux X11 setup with a mouse wheel and/or trackpad.  The OS X X11 Tk variant does not seem to support the mouse wheel events and there are hints in the above Tk mousewheel link that no X11 Tk's do without some hackery.  The documentation for turtledemo should be clear about which platforms are supported.

----------
Added file: http://bugs.python.org/file36135/tdemo-font-34-t3.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 06:35:02 2014
From: report at bugs.python.org (Vajrasky Kok)
Date: Mon, 28 Jul 2014 04:35:02 +0000
Subject: [issue22093] Compiling python on OS X gives warning about compact
 unwind
Message-ID: <1406522102.91.0.00091279814431.issue22093@psf.upfronthosting.co.za>


New submission from Vajrasky Kok:

OS X version 10.9.4.

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix

This is the warning:

...
gcc -bundle -undefined dynamic_lookup build/temp.macosx-10.9-x86_64-3.5-pydebug/Users/sky/Code/python/cpython/Modules/_ctypes/_ctypes.o build/temp.macosx-10.9-x86_64-3.5-pydebug/Users/sky/Code/python/cpython/Modules/_ctypes/callbacks.o build/temp.macosx-10.9-x86_64-3.5-pydebug/Users/sky/Code/python/cpython/Modules/_ctypes/callproc.o build/temp.macosx-10.9-x86_64-3.5-pydebug/Users/sky/Code/python/cpython/Modules/_ctypes/stgdict.o build/temp.macosx-10.9-x86_64-3.5-pydebug/Users/sky/Code/python/cpython/Modules/_ctypes/cfield.o build/temp.macosx-10.9-x86_64-3.5-pydebug/Users/sky/Code/python/cpython/Modules/_ctypes/malloc_closure.o build/temp.macosx-10.9-x86_64-3.5-pydebug/Users/sky/Code/python/cpython/Modules/_ctypes/darwin/dlfcn_simple.o build/temp.macosx-10.9-x86_64-3.5-pydebug/Users/sky/Code/python/cpython/Modules/_ctypes/libffi_osx/ffi.o build/temp.macosx-10.9-x86_64-3.5-pydebug/Users/sky/Code/python/cpython/Modules/_ctypes/libffi_osx/x86/darwin64.o build/temp.macosx-10.9-x86_64-3.5-pydebug/Users/sky/Code/python/cpython/Modules/_ctypes/libffi_osx/x86/x86-darwin.o build/temp.macosx-10.9-x86_64-3.5-pydebug/Users/sky/Code/python/cpython/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.o build/temp.macosx-10.9-x86_64-3.5-pydebug/Users/sky/Code/python/cpython/Modules/_ctypes/libffi_osx/x86/x86-ffi64.o build/temp.macosx-10.9-x86_64-3.5-pydebug/Users/sky/Code/python/cpython/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.o build/temp.macosx-10.9-x86_64-3.5-pydebug/Users/sky/Code/python/cpython/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.o build/temp.macosx-10.9-x86_64-3.5-pydebug/Users/sky/Code/python/cpython/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.o build/temp.macosx-10.9-x86_64-3.5-pydebug/Users/sky/Code/python/cpython/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.o -L/usr/local/lib -o build/lib.macosx-10.9-x86_64-3.5-pydebug/_ctypes.so
ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame

Python build finished successfully!

----------
messages: 224151
nosy: vajrasky
priority: normal
severity: normal
status: open
title: Compiling python on OS X gives warning about compact unwind
versions: Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 07:37:34 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 28 Jul 2014 05:37:34 +0000
Subject: [issue22092] Executing some tests inside Lib/unittest/test
 individually throws Error
In-Reply-To: <1406472645.11.0.803987239444.issue22092@psf.upfronthosting.co.za>
Message-ID: <1406525854.53.0.0656139729419.issue22092@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
nosy: +ezio.melotti, michael.foord

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 08:07:53 2014
From: report at bugs.python.org (Ned Deily)
Date: Mon, 28 Jul 2014 06:07:53 +0000
Subject: [issue22093] Compiling python on OS X gives warning about compact
 unwind
In-Reply-To: <1406522102.91.0.00091279814431.issue22093@psf.upfronthosting.co.za>
Message-ID: <1406527673.37.0.347298887245.issue22093@psf.upfronthosting.co.za>


Ned Deily added the comment:

That warning has been around for some time.  The question is: is it something to be concerned about?  I don't know of any ctypes test failures on OS X.  There have been various discussions of the warning in other (non-Python) contexts, for example, https://sourceware.org/ml/libffi-discuss/2011/msg00109.html.

----------
nosy: +amaury.forgeotdarc, belopolsky, meador.inge, ned.deily, ronaldoussoren

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 08:19:30 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Mon, 28 Jul 2014 06:19:30 +0000
Subject: [issue22089] collections.MutableSet does not provide update method
In-Reply-To: <1406441194.56.0.0212102514052.issue22089@psf.upfronthosting.co.za>
Message-ID: <1406528370.93.0.722124426163.issue22089@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

It's not  a bug.  Guido designed the Set ABC to use operators instead of the named methods.  The += operator for the __iadd__() method that provides much of the same functionality.

Mutable mapping has an update() method because it is an essential part of the mapping API and because there is no operator equivalent as there is for the set API.

----------
assignee:  -> rhettinger
type:  -> enhancement
versions: +Python 3.5 -Python 3.3, Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 09:01:17 2014
From: report at bugs.python.org (Ned Deily)
Date: Mon, 28 Jul 2014 07:01:17 +0000
Subject: [issue17172] Add turtledemo to IDLE menu
In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za>
Message-ID: <1406530877.33.0.430479457989.issue17172@psf.upfronthosting.co.za>


Ned Deily added the comment:

turtle_demo_v3.patch looks good to me.  I have satisfied myself that the AppleScript works OK with a non-English system.  And, while it is a bit of a kludge for OS X and assuming the rest of the change works OK on Windows and Linux, I would recommend to Terry that we proceed with this approach for 3.5, 3.4 if someone feels strongly about it, and skip 2.7.  If a better way to do it turns up, we can add that later.  Time to move on to other things.

----------
stage: needs patch -> commit review

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 10:01:37 2014
From: report at bugs.python.org (Akira Li)
Date: Mon, 28 Jul 2014 08:01:37 +0000
Subject: [issue1152248] Add support for reading records with arbitrary
 separators to the standard IO stack
In-Reply-To: <1406513676.23.0.255736417899.issue1152248@psf.upfronthosting.co.za>
 (Andrew Barnert's message of "Mon, 28 Jul 2014 02:14:36 +0000")
Message-ID: <87zjftj4is.fsf@gmail.com>


Akira Li added the comment:

> Akira, your patch does this:
>
> -        self._writetranslate = newline != ''
> -        self._writenl = newline or os.linesep
> +        self._writetranslate = newline in (None, '\r', '\r\n')
> +        self._writenl = newline if newline is not None else os.linesep
>
> Any reason you made the second change? Why change the value assigned
> to _writenl for newline='\n' when you don't want to actually change
> the behavior for those cases? Just so you can double-check at write
> time that _writetranslate is never set unless _writenl is '\r',
> \r\n', or os.linesep?

If newline='\n' then writenl is '\n' with and without the patch.
If newline='\n' then write('\n\r') writes '\n\r' with and without the
patch.

If newline='\n' then writetranslate=False (with the patch). It does not
change the result for newline='\n' as it is documented now [1]:

  [newline] can be None, '', '\n', '\r', and '\r\n'.
  ...
  If newline is any of the other legal values [namely '\r', '\n',
  '\r\n'], any '\n' characters written are translated to the given
  string.

[...] are added by me for clarity.

[1] https://docs.python.org/3.4/library/io.html#io.TextIOWrapper

writetranslate=False so that if newline='\0' then write('\0\n') would
write '\0\n' i.e., embed '\n' are not corrupted if newline='\0'. That is
why it is the "no translation" patch:

+    When writing output to the stream:
+
+    - if newline is None, any '\n' characters written are translated to
+      the system default line separator, os.linesep
+    - if newline is '\r' or '\r\n', any '\n' characters written are
+      translated to the given string
+    - no translation takes place for any other newline value [any string].

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 10:11:55 2014
From: report at bugs.python.org (Alejandro MJ)
Date: Mon, 28 Jul 2014 08:11:55 +0000
Subject: [issue22041] http POST request with python 3.3 through web proxy
In-Reply-To: <1406060360.4.0.822886887897.issue22041@psf.upfronthosting.co.za>
Message-ID: <1406535115.03.0.234537764673.issue22041@psf.upfronthosting.co.za>


Alejandro MJ added the comment:

Thanks a lot for your help, as you suggested the problem was because of the method set_tunnel. I've tested the code that you have posted and now works perfectly.

I'll keep in mind this for future works. We can conclude that it's not really a bug of Python, so that this problem is related to proxy configuration. However, I'll take in count which version of Python to use if I have to do a similar job.

Regards,
Alejandro

----------
resolution:  -> not a bug

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 11:00:22 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 28 Jul 2014 09:00:22 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1406538022.73.0.200181869834.issue21933@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

On X11  and  events are generated on mouse wheel roll. So you should add

        widget.bind('', self._increaseFont)
        widget.bind('', self._decreaseFont)

But mouse wheel events still are sent to widget and text is scrolled together with font size changing.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 11:10:14 2014
From: report at bugs.python.org (Larry Hastings)
Date: Mon, 28 Jul 2014 09:10:14 +0000
Subject: [issue20170] Derby #1: Convert 137 sites to Argument Clinic in
 Modules/posixmodule.c
In-Reply-To: <1389138185.8.0.104398826507.issue20170@psf.upfronthosting.co.za>
Message-ID: <1406538614.21.0.370608406269.issue20170@psf.upfronthosting.co.za>


Larry Hastings added the comment:

Here's an updated patch.  I cleaned it up a little.  I think it's about ready to go in.

Zachary, iirc you're a Windows guy and have helped with ensuring patches apply cleanly to Windows in the past.  Can you give this a try on Windows?

----------
Added file: http://bugs.python.org/file36136/larry.clinicize.posixmodule.4.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 12:29:20 2014
From: report at bugs.python.org (Akira Li)
Date: Mon, 28 Jul 2014 10:29:20 +0000
Subject: [issue22094] test_ossaudiodev fails unnecessarily
Message-ID: <1406543360.46.0.562125681265.issue22094@psf.upfronthosting.co.za>


New submission from Akira Li:

$ ./python -mtest -uaudio test_ossaudiodev
[1/1] test_ossaudiodev
test test_ossaudiodev failed -- Traceback (most recent call last):
  File "./Lib/test/test_ossaudiodev.py", line 148, in test_playback
    self.play_sound_file(*sound_info)
  File "./Lib/test/test_ossaudiodev.py", line 89, in play_sound_file
    (elapsed_time, expected_time))
AssertionError: False is not true : elapsed time (0.0590214729309082) > 10% off of expected time (3.5127309036445333)

1 test failed:
    test_ossaudiodev

The failure is caused by dsp.write(data) that doesn't write all data
on my machine.  If it is replaced with dsp.writeall(data) then the test
passes.

The docs [1] say that dsp.write() should write all data by default:

  oss_audio_device.write(data)
  Write the Python string data to the audio device and return the
  number of bytes written. If the audio device is in blocking mode
  (the default), the entire string is always written

[1] https://docs.python.org/3.4/library/ossaudiodev.html


The comments in Modules/ossaudiodev.c suggest that dsp.write(data) should
write *all* data unless dsp.nonblock() is called:

    /* Open with O_NONBLOCK to avoid hanging on devices that only allow
       one open at a time.  This does *not* affect later I/O; OSS
       provides a special ioctl() for non-blocking read/write, which is
       exposed via oss_nonblock() below. */
    fd = _Py_open(devicename, imode|O_NONBLOCK);
    ...
    /* And (try to) put it back in blocking mode so we get the
       expected write() semantics. */
    if (fcntl(fd, F_SETFL, 0) == -1) {
        close(fd);
        PyErr_SetFromErrnoWithFilename(PyExc_IOError, devicename);
        return NULL;
    }

----------
components: Tests
messages: 224159
nosy: akira
priority: normal
severity: normal
status: open
title: test_ossaudiodev fails unnecessarily
type: behavior
versions: Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 12:30:16 2014
From: report at bugs.python.org (Akira Li)
Date: Mon, 28 Jul 2014 10:30:16 +0000
Subject: [issue22094] oss_audio_device.write(data) produces short writes
In-Reply-To: <1406543360.46.0.562125681265.issue22094@psf.upfronthosting.co.za>
Message-ID: <1406543416.08.0.401717958664.issue22094@psf.upfronthosting.co.za>


Changes by Akira Li <4kir4.1i at gmail.com>:


----------
title: test_ossaudiodev fails unnecessarily -> oss_audio_device.write(data) produces short writes

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 12:35:40 2014
From: report at bugs.python.org (Akira Li)
Date: Mon, 28 Jul 2014 10:35:40 +0000
Subject: [issue22094] oss_audio_device.write(data) produces short writes
In-Reply-To: <1406543360.46.0.562125681265.issue22094@psf.upfronthosting.co.za>
Message-ID: <1406543740.46.0.79739561781.issue22094@psf.upfronthosting.co.za>


Akira Li added the comment:

>From Modules/ossaudiodev.c:

    /* NB. writeall() is only useful in non-blocking mode: according to
       Guenter Geiger  on the linux-audio-dev list
       (http://eca.cx/lad/2002/11/0380.html), OSS guarantees that
       write() in blocking mode consumes the whole buffer.  In blocking
       mode, the behaviour of write() and writeall() from Python is
       indistinguishable. */

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 12:48:25 2014
From: report at bugs.python.org (Ronald Oussoren)
Date: Mon, 28 Jul 2014 10:48:25 +0000
Subject: [issue17172] Add turtledemo to IDLE menu
In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za>
Message-ID: <1406544505.94.0.904075945974.issue17172@psf.upfronthosting.co.za>


Ronald Oussoren added the comment:

I don't have a better solution for this, although I'd slightly prefer to add a hack to the turtledemo main function to force itself to the foreground on startup. That way the hack also works when the user starts the script in a Terminal window.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 12:48:57 2014
From: report at bugs.python.org (Akira Li)
Date: Mon, 28 Jul 2014 10:48:57 +0000
Subject: [issue22094] oss_audio_device.write(data) produces short writes
In-Reply-To: <1406543360.46.0.562125681265.issue22094@psf.upfronthosting.co.za>
Message-ID: <1406544537.09.0.628228807698.issue22094@psf.upfronthosting.co.za>


Changes by Akira Li <4kir4.1i at gmail.com>:


----------
components: +Library (Lib) -Tests

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 13:07:35 2014
From: report at bugs.python.org (Akira Li)
Date: Mon, 28 Jul 2014 11:07:35 +0000
Subject: [issue22054] Add os.get_blocking() and os.set_blocking() functions
In-Reply-To: <1406151014.25.0.918263340821.issue22054@psf.upfronthosting.co.za>
Message-ID: <1406545655.79.0.119120522355.issue22054@psf.upfronthosting.co.za>


Akira Li added the comment:

Maybe is_something() is a better name than get_something()
if something is a boolean?

----------
nosy: +akira

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 13:26:55 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Mon, 28 Jul 2014 11:26:55 +0000
Subject: [issue22085] Update deprecated Tcl commands in Tkinter
In-Reply-To: <1406396007.9.0.890469508876.issue22085@psf.upfronthosting.co.za>
Message-ID: <1406546815.08.0.103253460983.issue22085@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

Dropping support for 8.3 sounds fine with me (for Python 3.5 only, of course). Otherwise, the patch looks also fine, so please apply.

----------
nosy: +loewis

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 14:30:29 2014
From: report at bugs.python.org (David Wilson)
Date: Mon, 28 Jul 2014 12:30:29 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1406550629.95.0.371457002804.issue22003@psf.upfronthosting.co.za>


David Wilson added the comment:

Newest patch incorporates Antoine's review comments. The final benchmark results are below. Just curious, what causes e.g. telco to differ up to 7% between runs? That's really huge

Report on Linux k2 3.14-1-amd64 #1 SMP Debian 3.14.9-1 (2014-06-30) x86_64
Total CPU cores: 4

### call_method_slots ###
Min: 0.329869 -> 0.340487: 1.03x slower
Avg: 0.330512 -> 0.341786: 1.03x slower
Significant (t=-216.69)
Stddev: 0.00067 -> 0.00060: 1.1111x smaller

### call_method_unknown ###
Min: 0.351167 -> 0.343961: 1.02x faster
Avg: 0.351731 -> 0.344580: 1.02x faster
Significant (t=238.89)
Stddev: 0.00033 -> 0.00040: 1.2271x larger

### call_simple ###
Min: 0.257487 -> 0.277366: 1.08x slower
Avg: 0.257942 -> 0.277809: 1.08x slower
Significant (t=-845.64)
Stddev: 0.00029 -> 0.00029: 1.0126x smaller

### etree_generate ###
Min: 0.377985 -> 0.365952: 1.03x faster
Avg: 0.381797 -> 0.369452: 1.03x faster
Significant (t=31.15)
Stddev: 0.00314 -> 0.00241: 1.3017x smaller

### etree_iterparse ###
Min: 0.545668 -> 0.565437: 1.04x slower
Avg: 0.554188 -> 0.576807: 1.04x slower
Significant (t=-17.00)
Stddev: 0.00925 -> 0.00956: 1.0340x larger

### etree_process ###
Min: 0.294158 -> 0.286617: 1.03x faster
Avg: 0.296354 -> 0.288877: 1.03x faster
Significant (t=36.22)
Stddev: 0.00149 -> 0.00143: 1.0435x smaller

### fastpickle ###
Min: 0.458961 -> 0.475828: 1.04x slower
Avg: 0.460226 -> 0.481228: 1.05x slower
Significant (t=-109.38)
Stddev: 0.00082 -> 0.00173: 2.1051x larger

### nqueens ###
Min: 0.305883 -> 0.295858: 1.03x faster
Avg: 0.308085 -> 0.297755: 1.03x faster
Significant (t=90.22)
Stddev: 0.00077 -> 0.00085: 1.0942x larger

### silent_logging ###
Min: 0.074152 -> 0.075818: 1.02x slower
Avg: 0.074345 -> 0.076005: 1.02x slower
Significant (t=-96.29)
Stddev: 0.00013 -> 0.00012: 1.0975x smaller

### spectral_norm ###
Min: 0.355738 -> 0.364419: 1.02x slower
Avg: 0.356691 -> 0.365764: 1.03x slower
Significant (t=-126.23)
Stddev: 0.00054 -> 0.00047: 1.1533x smaller

### telco ###
Min: 0.012152 -> 0.013038: 1.07x slower
Avg: 0.012264 -> 0.013157: 1.07x slower
Significant (t=-83.98)
Stddev: 0.00008 -> 0.00007: 1.0653x smaller

The following not significant results are hidden, use -v to show them:
2to3, call_method, chaos, django_v2, etree_parse, fannkuch, fastunpickle, float, formatted_logging, go, hexiom2, iterative_count, json_dump, json_dump_v2, json_load, mako, mako_v2, meteor_contest, nbody, normal_startup, pathlib, pickle_dict, pickle_list, pidigits, raytrace, regex_compile, regex_effbot, regex_v8, richards, simple_logging, startup_nosite, threaded_count, tornado_http, unpack_sequence, unpickle_list.

----------
Added file: http://bugs.python.org/file36137/cow6.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 14:39:20 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 28 Jul 2014 12:39:20 +0000
Subject: [issue22054] Add os.get_blocking() and os.set_blocking() functions
In-Reply-To: <1406151014.25.0.918263340821.issue22054@psf.upfronthosting.co.za>
Message-ID: <1406551160.89.0.051155539073.issue22054@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> Maybe is_something() is a better name than get_something()
> if something is a boolean?

os and socket modules already use getxxx() / setxxx() names:

- os.get_inheritable() / os.set_inheritable()
- os.getuid() / os.setuid()
- os.getgroups() / os.setgroups()
- os.getxattr() os.setxattr()
- socket.gettimeout() / socket.settimeout()
- socket.get_inheritable() / socket.set_inheritable()
- etc.

There is only one "is" function: os.isatty(), but it does not have a "os.settty" method.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 14:45:35 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 28 Jul 2014 12:45:35 +0000
Subject: [issue1602] windows console doesn't print or input Unicode
In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za>
Message-ID: <1406551535.03.0.408892219547.issue1602@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
nosy:  -haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 15:06:14 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 28 Jul 2014 13:06:14 +0000
Subject: [issue12970] os.walk() consider some symlinks as dirs instead of
 non-dirs
In-Reply-To: <1315918932.02.0.810529185276.issue12970@psf.upfronthosting.co.za>
Message-ID: <1406552774.11.0.990455856401.issue12970@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
nosy: +benhoyt

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 15:50:22 2014
From: report at bugs.python.org (Charles-Axel Dein)
Date: Mon, 28 Jul 2014 13:50:22 +0000
Subject: [issue20351] Add doc examples for DictReader and DictWriter
In-Reply-To: <1390414077.91.0.281809568509.issue20351@psf.upfronthosting.co.za>
Message-ID: <1406555422.02.0.579604185009.issue20351@psf.upfronthosting.co.za>


Charles-Axel Dein added the comment:

Anything else I need to do?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 15:51:32 2014
From: report at bugs.python.org (Brett Cannon)
Date: Mon, 28 Jul 2014 13:51:32 +0000
Subject: [issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9
 files
In-Reply-To: <1389039493.34.0.923814328387.issue20152@psf.upfronthosting.co.za>
Message-ID: <1406555492.35.0.600680153374.issue20152@psf.upfronthosting.co.za>


Changes by Brett Cannon :


----------
assignee: larry -> brett.cannon

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 16:16:38 2014
From: report at bugs.python.org (Akira Li)
Date: Mon, 28 Jul 2014 14:16:38 +0000
Subject: [issue12970] os.walk() consider some symlinks as dirs instead of
 non-dirs
In-Reply-To: <1315918932.02.0.810529185276.issue12970@psf.upfronthosting.co.za>
Message-ID: <1406556998.97.0.373868428284.issue12970@psf.upfronthosting.co.za>


Akira Li added the comment:

I've updated os.walk() documentation to mention that *dirnames* list
includes symlinks to directories.

To imitate the other two cases:

- treat the symlinks as files:

    for dirpath, dirnames, files in os.walk(top):
        dirs = []
        for name in dirnames:
            (files if islink(join(dirpath, name)) else dirs).append(name)
        dirnames = dirs

- don't include in either of the lists:

    for dirpath, dirnames, files in os.walk(top):
        dirnames[:] = [name for name in dirnames
                       if not islink(join(dirpath, name))]

where islink = os.path.islink and join = os.path.join.

I've uploaded the documentation patch. Please, review.

----------
nosy: +akira
Added file: http://bugs.python.org/file36138/docs-walk-issue12970.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 16:23:08 2014
From: report at bugs.python.org (Stefan Krah)
Date: Mon, 28 Jul 2014 14:23:08 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1406557388.06.0.360686904958.issue22003@psf.upfronthosting.co.za>


Stefan Krah added the comment:

> Just curious, what causes e.g. telco to differ up to 7% between runs? That's really huge.

telco.py always varies a lot between runs (up to 10%), even in the
big version "telco.py full":

http://bytereef.org/mpdecimal/quickstart.html#telco-benchmark


Using the average of 10 runs, I can't really see a slowdown.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 16:26:38 2014
From: report at bugs.python.org (Stefan Krah)
Date: Mon, 28 Jul 2014 14:26:38 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1406557598.84.0.530863681158.issue22003@psf.upfronthosting.co.za>


Stefan Krah added the comment:

So I wonder why the benchmark suite says that the telco slowdown is significant. :)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 16:52:46 2014
From: report at bugs.python.org (Akira Li)
Date: Mon, 28 Jul 2014 14:52:46 +0000
Subject: [issue22054] Add os.get_blocking() and os.set_blocking() functions
In-Reply-To: <1406551160.89.0.051155539073.issue22054@psf.upfronthosting.co.za>
 (STINNER Victor's message of "Mon, 28 Jul 2014 12:39:20 +0000")
Message-ID: <87sillilhi.fsf@gmail.com>


Akira Li added the comment:

> os and socket modules already use getxxx() / setxxx() names:
>
> - os.get_inheritable() / os.set_inheritable()
> - os.getuid() / os.setuid()
> - os.getgroups() / os.setgroups()
> - os.getxattr() os.setxattr()
> - socket.gettimeout() / socket.settimeout()
> - socket.get_inheritable() / socket.set_inheritable()
> - etc.

egid, euid, gid, groups, pgid, pgrp, priority, resgid, sid, uid, xatrr,
hostname, timeout, sockopt are not boolean. Though
get_inheritable() spoils the pot.

Compare:

  if os.get_blocking(fd): # is it a bug? Does it return some mode bits?
     # Do I need stat.IS_BLK(os.get_blocking(fd)) here instead?

And:

  if os.is_blocking(fd):
     # it is clear that fd is blocking

There could be an argument that get_inheritable should be renamed to
is_inheritable instead.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 17:39:15 2014
From: report at bugs.python.org (Brian Curtin)
Date: Mon, 28 Jul 2014 15:39:15 +0000
Subject: [issue8232] webbrowser.open incomplete on Windows
In-Reply-To: <1269541962.46.0.762619344208.issue8232@psf.upfronthosting.co.za>
Message-ID: <1406561955.57.0.778335411352.issue8232@psf.upfronthosting.co.za>


Changes by Brian Curtin :


----------
nosy:  -brian.curtin

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 18:54:18 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Mon, 28 Jul 2014 16:54:18 +0000
Subject: [issue22054] Add os.get_blocking() and os.set_blocking() functions
In-Reply-To: <87sillilhi.fsf@gmail.com>
Message-ID: 


Charles-Fran?ois Natali added the comment:

I agree with Akira, although it's probably too late now to rename.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 19:47:27 2014
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 28 Jul 2014 17:47:27 +0000
Subject: [issue20170] Derby #1: Convert 137 sites to Argument Clinic in
 Modules/posixmodule.c
In-Reply-To: <1389138185.8.0.104398826507.issue20170@psf.upfronthosting.co.za>
Message-ID: <1406569647.21.0.441549288155.issue20170@psf.upfronthosting.co.za>


Zachary Ware added the comment:

MSVC is not happy, here's some build output:

"P:\ath\to\cpython\PCbuild\pcbuild.sln" (Build target) (1) ->
"P:\ath\to\cpython\PCbuild\python.vcxproj" (default target) (2) ->
"P:\ath\to\cpython\PCbuild\pythoncore.vcxproj" (default target) (3) ->
(ClCompile target) ->
  ..\Modules\posixmodule.c(2886): warning C4047: 'initializing' : 'int' differs in levels of indirection from 'void *' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(2896): warning C4047: 'return' : 'int' differs in levels of indirection from 'void *' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(2900): warning C4047: 'return' : 'int' differs in levels of indirection from 'void *' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(4865): warning C4047: '=' : 'int' differs in levels of indirection from 'Py_UNICODE *' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(4866): warning C4047: '==' : 'int' differs in levels of indirection from 'void *' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(4877): warning C4047: 'function' : 'LPCWSTR' differs in levels of indirection from 'int' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(4877): warning C4024: 'CreateFileW' : different types for formal and actual parameter 1 [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(5368): warning C4047: 'function' : 'path_t *' differs in levels of indirection from 'path_t **' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(5368): warning C4024: 'path_error2' : different types for formal and actual parameter 1 [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(5368): warning C4047: 'function' : 'path_t *' differs in levels of indirection from 'path_t **' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(5368): warning C4024: 'path_error2' : different types for formal and actual parameter 2 [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(7010): warning C4031: second formal parameter list longer than the first list [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(9894): warning C4013: 'waitpid' undefined; assuming extern returning int [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(10428): warning C4047: 'function' : 'path_t *' differs in levels of indirection from 'path_t **' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(10428): warning C4024: 'path_error2' : different types for formal and actual parameter 1 [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(10428): warning C4047: 'function' : 'path_t *' differs in levels of indirection from 'path_t **' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(10428): warning C4024: 'path_error2' : different types for formal and actual parameter 2 [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(16433): warning C4047: 'return' : 'int' differs in levels of indirection from 'void *' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]


"P:\ath\to\cpython\PCbuild\pcbuild.sln" (Build target) (1) ->
"P:\ath\to\cpython\PCbuild\python.vcxproj" (default target) (2) ->
"P:\ath\to\cpython\PCbuild\pythoncore.vcxproj" (default target) (3) ->
(ClCompile target) ->
  ..\Modules\posixmodule.c(3324): error C2231: '.wide' : left operand points to 'struct', use '->' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(4863): error C2082: redefinition of formal parameter 'path' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(4865): error C2065: 'path_wchar' : undeclared identifier [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(4866): error C2065: 'path_wchar' : undeclared identifier [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(4877): error C2065: 'path_wchar' : undeclared identifier [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(7004): error C2370: 'os_spawnv__doc__' : redefinition; different storage class [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(7014): error C2084: function 'PyObject *os_spawnv(PyModuleDef *,PyObject *)' already has a body [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(7037): error C2084: function 'PyObject *os_spawnv_impl(PyModuleDef *,int,PyObject *,PyObject *,PyObject *)' already has a body [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(9019): error C2082: redefinition of formal parameter 'pid' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(10936): error C2231: '.wide' : left operand points to 'struct', use '->' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(13997): error C2085: 'win32__getdiskusage' : not informal parameter list [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(13997): error C2143: syntax error : missing ';' before '{' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(16483): error C2085: 'posix_set_handle_inheritable' : not in formal parameter list [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(16483): error C2143: syntax error : missing ';' before '{' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17051): error C2065: 'OS_SPAWNVE_METHODDEF' : undeclared identifier [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17051): error C2099: initializer is not a constant [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17051): error C2059: syntax error : '{' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17051): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17053): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17055): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17056): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17060): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17078): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17084): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17085): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17086): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17087): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17088): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17089): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17091): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17092): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17095): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17102): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17103): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17104): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17115): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17117): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17119): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17136): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17138): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17139): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17141): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17142): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17143): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17145): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17157): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17159): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17160): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17161): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17162): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17163): error C2059: syntax error : ',' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17165): error C2059: syntax error : '}' [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]
  ..\Modules\posixmodule.c(17175): fatal error C1903: unable to recover from previous error(s); stopping compilation [P:\ath\to\cpython\PCbuild\pythoncore.vcxproj]

    18 Warning(s)
    53 Error(s)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 19:47:47 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Mon, 28 Jul 2014 17:47:47 +0000
Subject: [issue21308] PEP 466: backport ssl changes
In-Reply-To: <9f606957-c0fc-42fe-b0e1-52ea1cb44333@email.android.com>
Message-ID: <1406569667.79.0.530509023633.issue21308@psf.upfronthosting.co.za>


Alex Gaynor added the comment:

Investigations:

The test_poplib failures are caused by the backporting of http://bugs.python.org/issue20951, does anyone have opinions on whether we should backport Antoine's fix for poplib, or revert that particular change?

I'm not sure how to fix that compilation warning, any suggestions?

I've uploaded a new patch which fixes the test_algorithm's failure with non-system OS X.

----------
Added file: http://bugs.python.org/file36139/ssl-backport.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 20:03:18 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Mon, 28 Jul 2014 18:03:18 +0000
Subject: [issue20351] Add doc examples for DictReader and DictWriter
In-Reply-To: <1390414077.91.0.281809568509.issue20351@psf.upfronthosting.co.za>
Message-ID: <1406570598.57.0.809956965803.issue20351@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

> Anything else I need to do?

Nothing else.  I've got it from here :-)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 20:09:44 2014
From: report at bugs.python.org (Demian Brecht)
Date: Mon, 28 Jul 2014 18:09:44 +0000
Subject: [issue22095] Use of set_tunnel with default port results in incorrect
 post value in host header
Message-ID: <1406570983.98.0.143155526303.issue22095@psf.upfronthosting.co.za>


New submission from Demian Brecht:

Creating this bug for clarity, but was encountered while investigating 22041 (now set as not a bug).

When using set_tunnel with default port, the port value in the host header is set to "None":

"send: b'POST [PATH] HTTP/1.1\r\nHost: [HOST]:None\r\nAccept-Encoding: identity\r\nContent-Length: 41\r\nAccept: text/plain\r\nContent-type: application/x-www-form-urlencoded\r\n\r\n[FORM_DATA]'"

This issue seems to have been introduced in 3.4 when _tunnel_host and _tunnel_port were introduced to decouple the destination host and port from the proxy host and port.

----------
components: Library (Lib)
messages: 224175
nosy: demian.brecht
priority: normal
severity: normal
status: open
title: Use of set_tunnel with default port results in incorrect post value in host header
type: behavior
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 20:11:43 2014
From: report at bugs.python.org (Demian Brecht)
Date: Mon, 28 Jul 2014 18:11:43 +0000
Subject: [issue22095] Use of set_tunnel with default port results in incorrect
 post value in host header
In-Reply-To: <1406570983.98.0.143155526303.issue22095@psf.upfronthosting.co.za>
Message-ID: <1406571103.48.0.651543580557.issue22095@psf.upfronthosting.co.za>


Changes by Demian Brecht :


----------
keywords: +patch
Added file: http://bugs.python.org/file36140/issue22095.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 20:37:38 2014
From: report at bugs.python.org (Lita Cho)
Date: Mon, 28 Jul 2014 18:37:38 +0000
Subject: [issue17172] Add turtledemo to IDLE menu
In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za>
Message-ID: <1406572658.75.0.623036401776.issue17172@psf.upfronthosting.co.za>


Lita Cho added the comment:

Thanks for the input Ronald! How would I go about forcing the turtledemo to be in the foreground? Do I just need to call 'fg' on the subprocess? I've been Googling and couldn't find anything obvious.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 20:43:15 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Mon, 28 Jul 2014 18:43:15 +0000
Subject: [issue19980] Improve help('non-topic') response
In-Reply-To: <1386984892.27.0.919528696836.issue19980@psf.upfronthosting.co.za>
Message-ID: <1406572995.64.0.821568600483.issue19980@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

I suppose that technically this can only go into 3.5, but is there any real reason that this couldn't be backported?

----------
versions: +Python 3.5 -Python 3.4
Added file: http://bugs.python.org/file36141/Issue19980.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 20:55:25 2014
From: report at bugs.python.org (Alex Gaynor)
Date: Mon, 28 Jul 2014 18:55:25 +0000
Subject: [issue21308] PEP 466: backport ssl changes
In-Reply-To: <9f606957-c0fc-42fe-b0e1-52ea1cb44333@email.android.com>
Message-ID: <1406573725.32.0.24423833979.issue21308@psf.upfronthosting.co.za>


Alex Gaynor added the comment:

Latest patch makes the needed change to Makefile.pre.in

----------
Added file: http://bugs.python.org/file36142/ssl-backport.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 21:07:14 2014
From: report at bugs.python.org (Demian Brecht)
Date: Mon, 28 Jul 2014 19:07:14 +0000
Subject: [issue22041] http POST request with python 3.3 through web proxy
In-Reply-To: <1406060360.4.0.822886887897.issue22041@psf.upfronthosting.co.za>
Message-ID: <1406574434.11.0.642873034454.issue22041@psf.upfronthosting.co.za>


Demian Brecht added the comment:

No problem, happy you were able to get things sorted. Feel free to close this issue as I've opened #22095 to address the host port header issue.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 21:10:11 2014
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 28 Jul 2014 19:10:11 +0000
Subject: [issue20586] Argument Clinic: functions with valid sig but no
 docstring have no __text_signature__
In-Reply-To: <1392064106.25.0.899710933953.issue20586@psf.upfronthosting.co.za>
Message-ID: <1406574611.82.0.978094896689.issue20586@psf.upfronthosting.co.za>


Changes by Zachary Ware :


----------
versions: +Python 3.5
Added file: http://bugs.python.org/file36143/issue20586.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 21:10:19 2014
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 28 Jul 2014 19:10:19 +0000
Subject: [issue20586] Argument Clinic: functions with valid sig but no
 docstring have no __text_signature__
In-Reply-To: <1392064106.25.0.899710933953.issue20586@psf.upfronthosting.co.za>
Message-ID: <1406574619.81.0.72145023135.issue20586@psf.upfronthosting.co.za>


Changes by Zachary Ware :


Removed file: http://bugs.python.org/file34025/clinic_sig_no_docstring.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 21:11:25 2014
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 28 Jul 2014 19:11:25 +0000
Subject: [issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4
 files (Windows)
In-Reply-To: <1389138308.61.0.497102640792.issue20172@psf.upfronthosting.co.za>
Message-ID: <1406574685.1.0.398255735719.issue20172@psf.upfronthosting.co.za>


Zachary Ware added the comment:

Certainly, Martin.  I'm in the process of getting it updated and self-reviewing again.  This patch will require #20586 and possibly another new Clinic feature (allowing output to multiple destinations; I have a change for that feature on my issue20172 sandbox branch, but don't remember why and never got an issue made for it) before commit.

I'll try to have a fresh patch up here within a week or so.

----------
dependencies: +Argument Clinic: functions with valid sig but no docstring have no __text_signature__

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 21:24:49 2014
From: report at bugs.python.org (Ned Deily)
Date: Mon, 28 Jul 2014 19:24:49 +0000
Subject: [issue17172] Add turtledemo to IDLE menu
In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za>
Message-ID: <1406575489.69.0.282444273328.issue17172@psf.upfronthosting.co.za>


Ned Deily added the comment:

Ronald:
> I'd slightly prefer to add a hack to the turtledemo main function to force
> itself to the foreground on startup. That way the hack also works when the
> user starts the script in a Terminal window.

That's exactly what the proposed patch does.  The AppleScript "activate" causes turtledemo, however started, to move to the foreground.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 21:51:31 2014
From: report at bugs.python.org (Ned Deily)
Date: Mon, 28 Jul 2014 19:51:31 +0000
Subject: [issue22041] http POST request with python 3.3 through web proxy
In-Reply-To: <1406060360.4.0.822886887897.issue22041@psf.upfronthosting.co.za>
Message-ID: <1406577091.25.0.110603813433.issue22041@psf.upfronthosting.co.za>


Changes by Ned Deily :


----------
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 22:05:58 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Mon, 28 Jul 2014 20:05:58 +0000
Subject: [issue17763] test_pydoc fails with the installed testsuite
In-Reply-To: <1366125816.55.0.847870350484.issue17763@psf.upfronthosting.co.za>
Message-ID: <1406577958.37.0.338885450558.issue17763@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Can our testing gurus shed any light on this?

----------
nosy: +BreamoreBoy, ezio.melotti, michael.foord, pitrou
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 22:14:11 2014
From: report at bugs.python.org (Larry Hastings)
Date: Mon, 28 Jul 2014 20:14:11 +0000
Subject: [issue20170] Derby #1: Convert 137 sites to Argument Clinic in
 Modules/posixmodule.c
In-Reply-To: <1389138185.8.0.104398826507.issue20170@psf.upfronthosting.co.za>
Message-ID: <1406578451.87.0.647866787808.issue20170@psf.upfronthosting.co.za>


Larry Hastings added the comment:

thanks!  I'm flying from London to Brisbane (via Singapore), gonna take about a day.  Now I have something to do on the flight ;-)

(that and nullable ints)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 22:30:51 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 28 Jul 2014 20:30:51 +0000
Subject: [issue22054] Add os.get_blocking() and os.set_blocking() functions
In-Reply-To: <1406151014.25.0.918263340821.issue22054@psf.upfronthosting.co.za>
Message-ID: <1406579451.56.0.89403166321.issue22054@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Guido van Rossum told me that he's ok for "get": "I'd go with get, since that seems the tradition in the os module."

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 22:32:48 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 28 Jul 2014 20:32:48 +0000
Subject: [issue22063] asyncio: sock_xxx() methods of event loops should check
 ath sockets are non-blocking
In-Reply-To: <1406244257.84.0.711370901169.issue22063@psf.upfronthosting.co.za>
Message-ID: <1406579568.52.0.676013104318.issue22063@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Ok, I will write a a patch to raise an exception in debug mode if the socket is in blocking mode.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 22:41:43 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Mon, 28 Jul 2014 20:41:43 +0000
Subject: [issue10572] Move test sub-packages to Lib/test
In-Reply-To: <1290991979.58.0.262973706564.issue10572@psf.upfronthosting.co.za>
Message-ID: <1406580103.11.0.349500238803.issue10572@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Can we get this into 3.5 for the reasons given in msg179596 ?

----------
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 23:02:31 2014
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 28 Jul 2014 21:02:31 +0000
Subject: [issue22096] Argument Clinic: add ability to specify an existing impl
 function
Message-ID: <1406581351.41.0.878887990882.issue22096@psf.upfronthosting.co.za>


Changes by Zachary Ware :


----------
components: Demos and Tools
nosy: larry, zach.ware
priority: normal
severity: normal
status: open
title: Argument Clinic: add ability to specify an existing impl function
type: enhancement
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 23:05:31 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Mon, 28 Jul 2014 21:05:31 +0000
Subject: [issue4264] Patch: optimize code to use LIST_APPEND instead of
 calling list.append
In-Reply-To: <1225913493.68.0.578631463812.issue4264@psf.upfronthosting.co.za>
Message-ID: <1406581531.87.0.0419370046341.issue4264@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Is this ever likely to be implemented or is it more likely to be rejected owing to the reasons given in msg75587 ?

----------
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 23:08:56 2014
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 28 Jul 2014 21:08:56 +0000
Subject: [issue22096] Argument Clinic: add ability to specify an existing impl
 function
Message-ID: <1406581736.61.0.192085386043.issue22096@psf.upfronthosting.co.za>


New submission from Zachary Ware:

It would be nice to be able to specify an existing function as the _impl function, for cases like winreg.OpenKey and OpenKeyEx which are the same function by different names, or _winapi.GetCurrentProcess, whose impl function is "return GetCurrentProcess()".

This is pretty minor, but would allow for some shorter and cleaner code.  Unfortunately, I don't have any great ideas for syntax for this, so it may be rejected just on that basis.

----------
priority: normal -> low

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 23:10:56 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Mon, 28 Jul 2014 21:10:56 +0000
Subject: [issue5833] readline update
In-Reply-To: <1240605993.87.0.323265568101.issue5833@psf.upfronthosting.co.za>
Message-ID: <1406581856.31.0.417091783969.issue5833@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Looking at msg128306 and msg128319 I believe this can be closed.

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 23:15:34 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Mon, 28 Jul 2014 21:15:34 +0000
Subject: [issue11212] Python memory limit on AIX
In-Reply-To: <1297697475.44.0.286339686291.issue11212@psf.upfronthosting.co.za>
Message-ID: <1406582134.38.0.26574455093.issue11212@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

@David (Edelsohn) what is your take on this?

----------
nosy: +BreamoreBoy, David.Edelsohn
versions: +Python 3.4, Python 3.5 -Python 2.6, Python 3.1, Python 3.2

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 23:30:29 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Mon, 28 Jul 2014 21:30:29 +0000
Subject: [issue22097] Linked list API for ordereddict
Message-ID: <1406583029.35.0.857255601544.issue22097@psf.upfronthosting.co.za>


New submission from Antoine Pitrou:

Right now Python doesn't have an ordered container which allows O(1) insertion at any place. It would be nice to have such an API on ordered dicts (e.g. insert_after() / insert_before()).

----------
messages: 224191
nosy: pitrou, rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Linked list API for ordereddict
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 23:33:28 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 28 Jul 2014 21:33:28 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <1406583029.35.0.857255601544.issue22097@psf.upfronthosting.co.za>
Message-ID: <1406583208.26.0.538736189692.issue22097@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 23:39:00 2014
From: report at bugs.python.org (Ezio Melotti)
Date: Mon, 28 Jul 2014 21:39:00 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <1406583029.35.0.857255601544.issue22097@psf.upfronthosting.co.za>
Message-ID: <1406583540.85.0.179741406782.issue22097@psf.upfronthosting.co.za>


Changes by Ezio Melotti :


----------
nosy: +ezio.melotti

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 23:43:07 2014
From: report at bugs.python.org (Richard Oudkerk)
Date: Mon, 28 Jul 2014 21:43:07 +0000
Subject: [issue18174] Make regrtest with --huntrleaks check for fd leaks
In-Reply-To: <1370807273.91.0.83033499223.issue18174@psf.upfronthosting.co.za>
Message-ID: <1406583787.47.0.728227362981.issue18174@psf.upfronthosting.co.za>


Richard Oudkerk added the comment:

I can't remember why I did not use fstat() -- probably it did not occur to me.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 23:44:05 2014
From: report at bugs.python.org (Puneeth Chaganti)
Date: Mon, 28 Jul 2014 21:44:05 +0000
Subject: [issue19217] Calling assertEquals for moderately long list takes too
 long
In-Reply-To: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za>
Message-ID: <1406583845.83.0.287519460404.issue19217@psf.upfronthosting.co.za>


Puneeth Chaganti added the comment:

Hi, 

The attached patch is an attempt to write tests for this issue, and get all the tests passing.  

Since a new threshold has been introduced, `maxDiff` doesn't always make a difference and this required changing the `testAssertSequenceEqualMaxDiff` test. Serhiy Storchaka suggestion makes sense, since we want to be showing the diff when it is smaller than the error message being shown, but I'm not sure what's the best way to do this.

----------
nosy: +Puneeth.Chaganti
Added file: http://bugs.python.org/file36144/issue19217-1.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 23:49:41 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 28 Jul 2014 21:49:41 +0000
Subject: [issue21946] 'python -u' yields trailing carriage return '\r'
 (Python2 for Windows)
In-Reply-To: <1404910318.13.0.0636532194943.issue21946@psf.upfronthosting.co.za>
Message-ID: <1406584181.83.0.692706928653.issue21946@psf.upfronthosting.co.za>


STINNER Victor added the comment:

I backported and adapted most Python 3 fixes related to the Windows binary mode for stdout/stderr used when Python is started with the -u command line option. See attached binary.patch.

My change to file.write() looks wrong because the function returns None and does not loop until all bytes are written.

By the way, string_write() doesn't check if fwrite(n) wrote less than n bytes or failed with an error.

See also the issue #21090 which improves error handling in the file object.

----------
keywords: +patch
Added file: http://bugs.python.org/file36145/binary.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 23:58:29 2014
From: report at bugs.python.org (Florian Dold)
Date: Mon, 28 Jul 2014 21:58:29 +0000
Subject: [issue22098] Behavior of Structure inconsistent with
 BigEndianStructure when using __slots__
Message-ID: <1406584709.24.0.956833774104.issue22098@psf.upfronthosting.co.za>


New submission from Florian Dold:

Habimg __slots__ = [] on a class inheriting from ctypes.Structure prevents undefined fields from being set, as expected.

When inheriting from ctypes.BigEndianStructure, however, it is possible to set undefined fields.

See the attached file for small test case for the behavior.

----------
components: ctypes
files: bug-ctypes-slots.py
messages: 224195
nosy: Florian.Dold
priority: normal
severity: normal
status: open
title: Behavior of Structure inconsistent with BigEndianStructure when using __slots__
versions: Python 3.4
Added file: http://bugs.python.org/file36146/bug-ctypes-slots.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Jul 28 23:59:24 2014
From: report at bugs.python.org (Florian Dold)
Date: Mon, 28 Jul 2014 21:59:24 +0000
Subject: [issue22098] Behavior of Structure inconsistent with
 BigEndianStructure when using __slots__
In-Reply-To: <1406584709.24.0.956833774104.issue22098@psf.upfronthosting.co.za>
Message-ID: <1406584764.99.0.295290570201.issue22098@psf.upfronthosting.co.za>


Changes by Florian Dold :


----------
type:  -> behavior

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 00:07:12 2014
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 28 Jul 2014 22:07:12 +0000
Subject: [issue19612] test_subprocess: sporadic failure of
 test_communicate_epipe() on Windows 8
In-Reply-To: <1384532999.66.0.279652262495.issue19612@psf.upfronthosting.co.za>
Message-ID: <3hMZr01rsjz7LkY@mail.python.org>


Roundup Robot added the comment:

New changeset 039ac3f01c4e by Victor Stinner in branch '2.7':
Issue #19612: subprocess.communicate() now also ignores EINVAL when using at
http://hg.python.org/cpython/rev/039ac3f01c4e

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 00:09:42 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 28 Jul 2014 22:09:42 +0000
Subject: [issue21946] 'python -u' yields trailing carriage return '\r'
 (Python2 for Windows)
In-Reply-To: <1404910318.13.0.0636532194943.issue21946@psf.upfronthosting.co.za>
Message-ID: <1406585382.33.0.432183769202.issue21946@psf.upfronthosting.co.za>


STINNER Victor added the comment:

While testing binary.patch, test_subprocess failed because of the issue #19612. I backported the fix:

changeset:   91905:039ac3f01c4e
branch:      2.7
parent:      91895:bffa0b8a16e8
user:        Victor Stinner 
date:        Tue Jul 29 00:04:54 2014 +0200
files:       Lib/subprocess.py Misc/NEWS
description:
Issue #19612: subprocess.communicate() now also ignores EINVAL when using at
least two pipes.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 00:10:58 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 28 Jul 2014 22:10:58 +0000
Subject: [issue19612] test_subprocess: sporadic failure of
 test_communicate_epipe() on Windows 8
In-Reply-To: <1384532999.66.0.279652262495.issue19612@psf.upfronthosting.co.za>
Message-ID: <1406585458.47.0.209228296131.issue19612@psf.upfronthosting.co.za>


STINNER Victor added the comment:

I didnd't see the failure recently on Windows, so I close the issue.

I backported the fix on Python 2.7 for the issue #21946.

----------
resolution:  -> fixed
status: open -> closed
versions: +Python 2.7

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 00:16:33 2014
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 28 Jul 2014 22:16:33 +0000
Subject: [issue21704] _multiprocessing module builds incorrectly when POSIX
 semaphores are disabled
In-Reply-To: <1402396404.2.0.758262532851.issue21704@psf.upfronthosting.co.za>
Message-ID: <3hMb2n0J87z7Ljs@mail.python.org>


Roundup Robot added the comment:

New changeset f618f6739200 by Richard Oudkerk in branch '3.4':
Issue #21704: Fix build error for _multiprocessing when semaphores
http://hg.python.org/cpython/rev/f618f6739200

New changeset a9637b29954d by Richard Oudkerk in branch 'default':
Issue #21704: Merge.
http://hg.python.org/cpython/rev/a9637b29954d

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 00:18:24 2014
From: report at bugs.python.org (Yoann Aubineau)
Date: Mon, 28 Jul 2014 22:18:24 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <1406583029.35.0.857255601544.issue22097@psf.upfronthosting.co.za>
Message-ID: <1406585904.26.0.229684444538.issue22097@psf.upfronthosting.co.za>


Changes by Yoann Aubineau :


----------
nosy: +yaubi

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 00:43:51 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 28 Jul 2014 22:43:51 +0000
Subject: [issue20746] test_pdb fails in refleak mode
In-Reply-To: <1393175989.77.0.544484586748.issue20746@psf.upfronthosting.co.za>
Message-ID: <1406587431.54.0.804829350653.issue20746@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 00:43:59 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 28 Jul 2014 22:43:59 +0000
Subject: [issue20766] reference leaks in pdb
In-Reply-To: <1393326154.87.0.194575074306.issue20766@psf.upfronthosting.co.za>
Message-ID: <1406587439.33.0.861994792728.issue20766@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 00:49:38 2014
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 28 Jul 2014 22:49:38 +0000
Subject: [issue18174] Make regrtest with --huntrleaks check for fd leaks
In-Reply-To: <1370807273.91.0.83033499223.issue18174@psf.upfronthosting.co.za>
Message-ID: <1406587778.75.0.8583637208.issue18174@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Modified patch to use os.fstat(), and try to use /proc/self/fd/ on Linux.

----------
Added file: http://bugs.python.org/file36147/fdleak-2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 01:01:59 2014
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 28 Jul 2014 23:01:59 +0000
Subject: [issue18174] Make regrtest with --huntrleaks check for fd leaks
In-Reply-To: <1370807273.91.0.83033499223.issue18174@psf.upfronthosting.co.za>
Message-ID: <3hMc3B3VMWz7LjQ@mail.python.org>


Roundup Robot added the comment:

New changeset 379aad232000 by Victor Stinner in branch '3.4':
Issue #11453, #18174: Fix leak of file descriptor in test_asyncore
http://hg.python.org/cpython/rev/379aad232000

New changeset 0ced2d2325fb by Victor Stinner in branch 'default':
(Merge 3.4) Issue #11453, #18174: Fix leak of file descriptor in test_asyncore
http://hg.python.org/cpython/rev/0ced2d2325fb

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 01:01:59 2014
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 28 Jul 2014 23:01:59 +0000
Subject: [issue11453] asyncore.file_wrapper should implement __del__ and call
 close there to prevent resource leaks and behave like
 socket.socket does.
In-Reply-To: <1299698993.48.0.0930746174281.issue11453@psf.upfronthosting.co.za>
Message-ID: <3hMc3C1gZlz7LjQ@mail.python.org>


Roundup Robot added the comment:

New changeset 379aad232000 by Victor Stinner in branch '3.4':
Issue #11453, #18174: Fix leak of file descriptor in test_asyncore
http://hg.python.org/cpython/rev/379aad232000

New changeset 0ced2d2325fb by Victor Stinner in branch 'default':
(Merge 3.4) Issue #11453, #18174: Fix leak of file descriptor in test_asyncore
http://hg.python.org/cpython/rev/0ced2d2325fb

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 01:15:56 2014
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 28 Jul 2014 23:15:56 +0000
Subject: [issue18174] Make regrtest with --huntrleaks check for fd leaks
In-Reply-To: <1370807273.91.0.83033499223.issue18174@psf.upfronthosting.co.za>
Message-ID: <3hMcMH30PPz7Ljx@mail.python.org>


Roundup Robot added the comment:

New changeset 746339776f19 by Victor Stinner in branch '3.4':
Issue #18174: Fix leak of file descriptor in test_tempfile
http://hg.python.org/cpython/rev/746339776f19

New changeset 017d701116d5 by Victor Stinner in branch 'default':
(Merge 3.4) Issue #18174: Fix leak of file descriptor in test_tempfile
http://hg.python.org/cpython/rev/017d701116d5

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 01:40:41 2014
From: report at bugs.python.org (Adam Kimbrough)
Date: Mon, 28 Jul 2014 23:40:41 +0000
Subject: [issue22099] Two "Save As" Windows
Message-ID: <1406590841.29.0.686223159208.issue22099@psf.upfronthosting.co.za>


New submission from Adam Kimbrough:

I am on a Mac running Mavericks 10.9.4. Whenever I press shift+command+s to save a file as a specific name, it opens two windows. But, if I "Save As" through the button in the menu bar, it only opens one window.

----------
components: IDLE
messages: 224204
nosy: Adam.Kimbrough
priority: normal
severity: normal
status: open
title: Two "Save As" Windows
type: behavior
versions: Python 2.7

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 02:08:34 2014
From: report at bugs.python.org (Ned Deily)
Date: Tue, 29 Jul 2014 00:08:34 +0000
Subject: [issue22099] Two "Save As" Windows
In-Reply-To: <1406590841.29.0.686223159208.issue22099@psf.upfronthosting.co.za>
Message-ID: <1406592514.33.0.341891013929.issue22099@psf.upfronthosting.co.za>


Ned Deily added the comment:

This is due to a bug in earlier versions of Cocoa Tk 8.5.x, originally documented in Issue11055.  Unfortunately, Apple is still shipping such a version in current versions of OS X.  One solution is to install a newer version of Tk 8.5, such as ActiveTcl 8.5.15 and use a version of Python that links with it, such as from the python.org OS X installers (currently 2.7.8).  More details here:

https://www.python.org/download/mac/tcltk/

----------
nosy: +ned.deily
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> OS X IDLE 3.2 Save As menu accelerator opens two Save windows

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 02:27:32 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Tue, 29 Jul 2014 00:27:32 +0000
Subject: [issue17172] Add turtledemo to IDLE menu
In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za>
Message-ID: <1406593652.93.0.687569442117.issue17172@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

I agree with skipping 2.7. The current patch is based on importing turtledemo, while on 2.7, turtleDemo.py is in Demo/turtle/ and cannot be imported. It could run with execfile, but the viewer will only run if /turtle is the current directory. On Windows, this would still be useless as the 2.7 installer does not install Demo or anything therein. When turtleDemo is installed, the location is system dependent. An extended version of the new checker extension, #21880, would allow users to configure 'run turtledemo' to work on a system that has it.

The patch works fine on Windows, including not blocking other actions with Idle. The only change I might make is
   cmd = [sys.executable, '-m', 'turtledemo']
which is more readable and does the same as the current version. But see below. (Lita, don't make a new patch for this or anything else in this message.)

The main remaining demo viewer fix is font re-sizing, #21933, which I expect we should finish within a week.

'Run turtledemo' should go on the Run menu, along with other 'run ' menu items.  The Run menu is easily enabled in the Shell window by adding '("run", "_Run"),' to menu_specs before options (line 842). However, putting the entry where it would belong, after Run Module, means that the addition has to be delayed until after the ScriptBinding extension is loaded. That would be done most easily as part of loading the checker extension #21880.  The open_turtle_demo function would be moved and perhaps generalized.

The change to make turtledemo run properly in a subprocess on Mac appears to be a separate issue from adding it to Idle's menu. I presume that if turtledemo.__main__ is loaded into Idle, and run with F5, as I have been doing, there is the same problem (on a Mac). I would guess that the same would be true of any tkinter app run in a subprocess from Idle. How about non-gui apps that are not mac-aware? If any of these are true, the fix would be generally useful outside of turtledemo and would seem to belong somewhere in the tkinter package.  (Is the same true for some of maxosxSupport).

If the activate code is moved to macosxSupport.activate(), does the following work in EditorWindow.open_turtle_demo?
cmd = [sys.executable, '-c',
  'from idlelib.macosxSupport import activate as A; A()\n'
  'from turtledemo.__main__ import main; main()']
Does the activate code have to be called after, say, the tkinter import in turtledemo, or is anytime in the process ok?  While something like this is not needed to run turtledemo, which we can edit, it would be to run tkinter (or mac-unaware gui apps) that we cannot edit.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 02:49:54 2014
From: report at bugs.python.org (Yoann Aubineau)
Date: Tue, 29 Jul 2014 00:49:54 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <1406583029.35.0.857255601544.issue22097@psf.upfronthosting.co.za>
Message-ID: <1406594993.99.0.90820355546.issue22097@psf.upfronthosting.co.za>


Yoann Aubineau added the comment:

Here is an attempt to implement such an API. The patch adds 4 methods to OrderedDict: move_before, move_after, insert_before and insert_after with corresponding tests.

The method signatures do not feel right though. I am not sure where the reference key should be placed in the argument list. It is especially ambiguous with move_* methods which simply take two keys with no hint on the one that will actually be moved.

----------
keywords: +patch
Added file: http://bugs.python.org/file36148/issue22097.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 02:58:39 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Tue, 29 Jul 2014 00:58:39 +0000
Subject: [issue22089] collections.MutableSet does not provide update method
In-Reply-To: <1406441194.56.0.0212102514052.issue22089@psf.upfronthosting.co.za>
Message-ID: <1406595519.66.0.816298186339.issue22089@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

It's not  a bug.  Guido designed the Set ABC to use operators instead of the named methods.  The += operator for the __ior__() method that provides much of the same functionality.

In your concrete class, you can add an update() method easily:

   class MySet(Set):
       update = Set.__ior__()

Mutable mapping has an update() method because it is an essential part of the mapping API and because there is no operator equivalent as there is for the set API.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 02:58:51 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Tue, 29 Jul 2014 00:58:51 +0000
Subject: [issue22089] collections.MutableSet does not provide update method
In-Reply-To: <1406441194.56.0.0212102514052.issue22089@psf.upfronthosting.co.za>
Message-ID: <1406595531.81.0.605204430071.issue22089@psf.upfronthosting.co.za>


Changes by Raymond Hettinger :


----------
Removed message: http://bugs.python.org/msg224153

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 03:16:24 2014
From: report at bugs.python.org (Ned Deily)
Date: Tue, 29 Jul 2014 01:16:24 +0000
Subject: [issue17172] Add turtledemo to IDLE menu
In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za>
Message-ID: <1406596584.94.0.953577255855.issue17172@psf.upfronthosting.co.za>


Ned Deily added the comment:

>If the activate code is moved to macosxSupport.activate(), does the
>following work in EditorWindow.open_turtle_demo?
>cmd = [sys.executable, '-c',
  'from idlelib.macosxSupport import activate as A; A()\n'
  'from turtledemo.__main__ import main; main()']
>Does the activate code have to be called after, say, the tkinter import in
>turtledemo, or is anytime in the process ok?

The activate code has to be called in the subprocess after Tk() has been called because only then is the subprocess guaranteed to have been promoted to an OS X GUI process.  So that suggestion will not work.  The idea of adding something to tkinter was discussed in msg192523 of issue11571, though not this specific solution.  If you want to pursue more generalized issues of GUI application behaviors on OS X, that should be the subject of another issue.  I suggest that this issue remain focused on the original topic.  I also would be concerned about adding the Run menu to the Shell window (or system menu bar when the Shell window is active) merely to accommodate this feature.  Having turtledemo in the Help menu seems fine to me.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 03:22:18 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Tue, 29 Jul 2014 01:22:18 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <1406583029.35.0.857255601544.issue22097@psf.upfronthosting.co.za>
Message-ID: <1406596938.65.0.887261299863.issue22097@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

I would like any proposed API extensions to be use case driven.

The omission of these methods wasn't accidental.  I studied pre-existing OD implementations for Python and looked at how they were used in the real-world (back when we still had Google Code Search available as a research tool).

For now, I *really* like the learning curve for OD is near zero and would like to keep it that way unless there is a compelling advantage.

----------
assignee:  -> rhettinger

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 03:22:32 2014
From: report at bugs.python.org (Yoann Aubineau)
Date: Tue, 29 Jul 2014 01:22:32 +0000
Subject: [issue21740] doctest doesn't allow duck-typing callables
In-Reply-To: <1402606753.04.0.326464066676.issue21740@psf.upfronthosting.co.za>
Message-ID: <1406596952.25.0.318125143079.issue21740@psf.upfronthosting.co.za>


Changes by Yoann Aubineau :


----------
nosy: +yaubi

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 03:26:36 2014
From: report at bugs.python.org (Yoann Aubineau)
Date: Tue, 29 Jul 2014 01:26:36 +0000
Subject: [issue21724] resetwarnings doesn't reset warnings registry
In-Reply-To: <1402503104.19.0.836333157517.issue21724@psf.upfronthosting.co.za>
Message-ID: <1406597196.7.0.523169176499.issue21724@psf.upfronthosting.co.za>


Changes by Yoann Aubineau :


----------
nosy: +yaubi

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 03:27:12 2014
From: report at bugs.python.org (Yoann Aubineau)
Date: Tue, 29 Jul 2014 01:27:12 +0000
Subject: [issue21710] --install-base option ignored?
In-Reply-To: <1402436563.61.0.260081261103.issue21710@psf.upfronthosting.co.za>
Message-ID: <1406597232.15.0.340897173705.issue21710@psf.upfronthosting.co.za>


Changes by Yoann Aubineau :


----------
nosy: +yaubi

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 03:45:43 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Tue, 29 Jul 2014 01:45:43 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <1406583029.35.0.857255601544.issue22097@psf.upfronthosting.co.za>
Message-ID: <1406598343.4.0.753779564911.issue22097@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

My current use case is manipulation of Numba IR code. I'm working on a transformation pass that adds instructions at arbitrary places in existing IR. The primitive I need is "add an instruction after another one" (which is exactly the insert_after() primitive proposed here :-)). Since Python lacks a linked list-like structure, my current solution is to use a regular list, meaning O(n) inserts.

(a tedious solution with a regular list would be lazy inserts and batching)

The code has nothing special but you can see it here:
https://github.com/pitrou/numba/blob/7538d4c96b64a19691c2f9b6ec894f777db1a996/numba/ir.py#L538

It may be argued that the general problem more has to do with the lack of a linked-list structure rather than ordereddict itself. However, I can't think of a nice plain linked-list API in Python, while the ordereddict abstraction is adequate.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 03:56:59 2014
From: report at bugs.python.org (Milan Oberkirch)
Date: Tue, 29 Jul 2014 01:56:59 +0000
Subject: [issue21725] RFC 6531 (SMTPUTF8) support in smtpd
In-Reply-To: <1402504950.99.0.486766973248.issue21725@psf.upfronthosting.co.za>
Message-ID: <1406599019.49.0.55285797882.issue21725@psf.upfronthosting.co.za>


Milan Oberkirch added the comment:

Thanks for the review and improvements!

I fixed the warnings (didn't see them with running tests as described in the dev guide; I may improve that later), updated the docs to RFC 5321 (issue 19679 is referring to RFC 3463 which is not required/updated/obsoleted by RFC 5321), and fixed the _print_message method of the DebuggingServer.

Testing DebuggingServer seems difficult because it prints to stdout so I'm just checking that no exceptions are raised.

I'm aware of the maximum command length thing but would fix it in issue 21783 (because it becomes a bug when dealing with that).

----------
Added file: http://bugs.python.org/file36149/issue21725v5.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 04:24:40 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 29 Jul 2014 02:24:40 +0000
Subject: [issue17172] Add turtledemo to IDLE menu
In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za>
Message-ID: <3hMhY40jBNz7LkR@mail.python.org>


Roundup Robot added the comment:

New changeset 04dd26ca02f4 by Terry Jan Reedy in branch '3.4':
Issue #17172: Add the ability to run turtledemo from Idle.
http://hg.python.org/cpython/rev/04dd26ca02f4

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 04:26:10 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Tue, 29 Jul 2014 02:26:10 +0000
Subject: [issue17172] Add turtledemo to IDLE menu
In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za>
Message-ID: <1406600770.51.0.431611289621.issue17172@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

I would have made the turtledemo fix a separate issue. Given the combined patch, I will just make separate NEWS entries (which I am working on now).

I expect there to be other new entries for Shell/Run, and will move when that is true.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 04:40:29 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 29 Jul 2014 02:40:29 +0000
Subject: [issue17172] Add turtledemo to IDLE menu
In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za>
Message-ID: <3hMhvK17LZz7Ljj@mail.python.org>


Roundup Robot added the comment:

New changeset e344539cda11 by Terry Jan Reedy in branch '3.4':
Issue #17172: add NEWS
http://hg.python.org/cpython/rev/e344539cda11

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 04:41:07 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Tue, 29 Jul 2014 02:41:07 +0000
Subject: [issue17172] Add turtledemo to IDLE menu
In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za>
Message-ID: <1406601667.65.0.377052229093.issue17172@psf.upfronthosting.co.za>


Changes by Terry J. Reedy :


----------
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 04:41:18 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Tue, 29 Jul 2014 02:41:18 +0000
Subject: [issue17172] Add turtledemo to IDLE menu
In-Reply-To: <1360441966.18.0.528447885335.issue17172@psf.upfronthosting.co.za>
Message-ID: <1406601678.11.0.135578741819.issue17172@psf.upfronthosting.co.za>


Changes by Terry J. Reedy :


----------
assignee: ezio.melotti -> terry.reedy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 04:51:43 2014
From: report at bugs.python.org (Yoann Aubineau)
Date: Tue, 29 Jul 2014 02:51:43 +0000
Subject: [issue22098] Behavior of Structure inconsistent with
 BigEndianStructure when using __slots__
In-Reply-To: <1406584709.24.0.956833774104.issue22098@psf.upfronthosting.co.za>
Message-ID: <1406602303.89.0.315153861013.issue22098@psf.upfronthosting.co.za>


Changes by Yoann Aubineau :


----------
nosy: +yaubi

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 04:58:55 2014
From: report at bugs.python.org (Yoann Aubineau)
Date: Tue, 29 Jul 2014 02:58:55 +0000
Subject: [issue22086] Tab indent no longer works in interpreter
In-Reply-To: <1406396060.4.0.777513387491.issue22086@psf.upfronthosting.co.za>
Message-ID: <1406602735.17.0.547094597924.issue22086@psf.upfronthosting.co.za>


Changes by Yoann Aubineau :


----------
nosy: +yaubi

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 05:40:04 2014
From: report at bugs.python.org (Yoann Aubineau)
Date: Tue, 29 Jul 2014 03:40:04 +0000
Subject: [issue22090] Decimal and float formatting treat '%' differently for
 infinities and nans.
In-Reply-To: <1406455723.52.0.997283705437.issue22090@psf.upfronthosting.co.za>
Message-ID: <1406605204.1.0.571917879643.issue22090@psf.upfronthosting.co.za>


Changes by Yoann Aubineau :


----------
nosy: +yaubi

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 07:53:10 2014
From: report at bugs.python.org (Josh Rosenberg)
Date: Tue, 29 Jul 2014 05:53:10 +0000
Subject: [issue22089] collections.MutableSet does not provide update method
In-Reply-To: <1406441194.56.0.0212102514052.issue22089@psf.upfronthosting.co.za>
Message-ID: <1406613190.72.0.102709191853.issue22089@psf.upfronthosting.co.za>


Josh Rosenberg added the comment:

Minor correction to example. That should be:


   class MySet(Set):
       update = Set.__ior__

(no paren after __ior__, since we're assigning, not calling)

----------
nosy: +josh.rosenberg

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 11:40:04 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Tue, 29 Jul 2014 09:40:04 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <1406583029.35.0.857255601544.issue22097@psf.upfronthosting.co.za>
Message-ID: <1406626804.09.0.370877512095.issue22097@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

ISTM that a dictionary is not the proper data structure for an instruction list. The support for the Mapping interface is not needed at all (AFAICT).

It's possible to make a list implementation with O(1) insert_after, using the same strategy that OrderedDict uses (i.e. maintain a mapping from value to link element).

----------
nosy: +loewis

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 11:44:14 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Tue, 29 Jul 2014 09:44:14 +0000
Subject: [issue22096] Argument Clinic: add ability to specify an existing impl
 function
In-Reply-To: <1406581736.61.0.192085386043.issue22096@psf.upfronthosting.co.za>
Message-ID: <1406627054.79.0.577095460064.issue22096@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

I don't think it it is worth the effort. You would need two different entry functions still, to allow error messages to refer to the function name. Since the _impl functions can trivially call each other, the saving in lines of code are minimal, and from a code reading point of view, having aliases actually complicates the code.

----------
nosy: +loewis

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 12:54:36 2014
From: report at bugs.python.org (Akira Li)
Date: Tue, 29 Jul 2014 10:54:36 +0000
Subject: [issue22089] collections.MutableSet does not provide update method
In-Reply-To: <1406441194.56.0.0212102514052.issue22089@psf.upfronthosting.co.za>
Message-ID: <1406631276.29.0.331609431288.issue22089@psf.upfronthosting.co.za>


Akira Li added the comment:

Set has no __ior__ method but MutableSet has:

  class MySet(MutableSet):
      update = MutableSet.__ior__

Unlike set.__ior__; MutableSet.__ior__ accepts an arbitrary iterable
and therefore MutableSet.update is redundant.

set.__ior__ doesn't accept an arbitrary iterable:

  >>> s = set()
  >>> s.update('ab')
  >>> s |= 'ab'
  Traceback (most recent call last):
    File "", line 1, in 
  TypeError: unsupported operand type(s) for |=: 'set' and 'str'
  >>> s |= set('ab')
  >>> s
  {'a', 'b'}

MutableSet.__ior__ does accept an arbitrary iterable:

  from collections.abc import MutableSet
  
  class UpperSet(MutableSet):
      """Like set() but stores items in upper case."""
      def __init__(self, iterable=()):
          self._set = set()
          self |= iterable
      def _key(self, item):
          return item.upper()
      update = MutableSet.__ior__
  
      # implement MutableSet abstract methods
      def __contains__(self, item):
          return self._key(item) in self._set
      def __iter__(self):
          return iter(self._set)
      def __len__(self):
          return len(self._set)
      def add(self, item):
          self._set.add(self._key(item))
      def discard(self, item):
          self._set.discard(self._key(item))
  
Example:

  s = UpperSet('?s')
  assert '?' in s and '?' in s and 'S' in s and '?' in s and '?' in s
  s.update('??') # or s |= '??'
  assert '?' in s and '?' in s and '?' not in s and 'SS' not in s
  s |= '?' # or s.update('?')
  assert s == {'?', 'S', '?', '?', 'SS'}

----------
nosy: +akira

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 13:04:20 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 29 Jul 2014 11:04:20 +0000
Subject: [issue22086] Tab indent no longer works in interpreter
In-Reply-To: <1406396060.4.0.777513387491.issue22086@psf.upfronthosting.co.za>
Message-ID: <1406631860.28.0.298595950836.issue22086@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
nosy: +pitrou

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 13:09:22 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 29 Jul 2014 11:09:22 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <1406583029.35.0.857255601544.issue22097@psf.upfronthosting.co.za>
Message-ID: <1406632162.24.0.193668646427.issue22097@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

About your use case. Note that all indices after inserted element should be shifted. If you inserted more than one statement in the same ir_block, all but first insertions can be at wrong position.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 13:20:42 2014
From: report at bugs.python.org (Larry Hastings)
Date: Tue, 29 Jul 2014 11:20:42 +0000
Subject: [issue22096] Argument Clinic: add ability to specify an existing impl
 function
In-Reply-To: <1406581736.61.0.192085386043.issue22096@psf.upfronthosting.co.za>
Message-ID: <1406632842.08.0.403220979522.issue22096@psf.upfronthosting.co.za>


Larry Hastings added the comment:

I'm with Martin. It would be a funny exception, where the reader'd get confused... why is the impl missing? 

Also, any halfway-decent optimizer will inline the impl into the parsing function, so this has no runtime cost.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 13:42:37 2014
From: report at bugs.python.org (Ezio Melotti)
Date: Tue, 29 Jul 2014 11:42:37 +0000
Subject: [issue22086] Tab indent no longer works in interpreter
In-Reply-To: <1406396060.4.0.777513387491.issue22086@psf.upfronthosting.co.za>
Message-ID: <1406634157.7.0.627008621855.issue22086@psf.upfronthosting.co.za>


Changes by Ezio Melotti :


----------
nosy: +ezio.melotti
stage:  -> needs patch
versions: +Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 14:03:54 2014
From: report at bugs.python.org (R. David Murray)
Date: Tue, 29 Jul 2014 12:03:54 +0000
Subject: [issue21725] RFC 6531 (SMTPUTF8) support in smtpd
In-Reply-To: <1402504950.99.0.486766973248.issue21725@psf.upfronthosting.co.za>
Message-ID: <1406635434.93.0.84936199898.issue21725@psf.upfronthosting.co.za>


R. David Murray added the comment:

You can use test.support.captured_stdout or whatever its name is.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 14:38:21 2014
From: report at bugs.python.org (Daniel Pocock)
Date: Tue, 29 Jul 2014 12:38:21 +0000
Subject: [issue14452] SysLogHandler sends invalid messages when using unicode
In-Reply-To: <1333105941.84.0.159307303218.issue14452@psf.upfronthosting.co.za>
Message-ID: <1406637501.18.0.514843481978.issue14452@psf.upfronthosting.co.za>


Daniel Pocock added the comment:

As a workaround, Python 3.2 users can clobber the global variable codecs like this from their own init code:

    logging.handlers.codec = None

There is a more complete example here:

https://github.com/dpocock/python-rfc5424-logging-formatter

----------
nosy: +pocock

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 15:27:21 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Tue, 29 Jul 2014 13:27:21 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <1406632162.24.0.193668646427.issue22097@psf.upfronthosting.co.za>
Message-ID: <53D7A118.7040103@free.fr>


Antoine Pitrou added the comment:

Le 29/07/2014 07:09, Serhiy Storchaka a ?crit :
>
> About your use case. Note that all indices after inserted element
should be shifted. If you inserted more than one statement in the same
ir_block, all but first insertions can be at wrong position.

Thanks for noticing! This is precisely why I'm not using indices, and 
why a regular sequence isn't fit for the use case.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 15:28:32 2014
From: report at bugs.python.org (David Edelsohn)
Date: Tue, 29 Jul 2014 13:28:32 +0000
Subject: [issue11212] Python memory limit on AIX
In-Reply-To: <1297697475.44.0.286339686291.issue11212@psf.upfronthosting.co.za>
Message-ID: <1406640512.5.0.489022685952.issue11212@psf.upfronthosting.co.za>


David Edelsohn added the comment:

Setting the environment variable LDR_CNTRL is discouraged.  It is much better to set the value in the executable header. Best to set it at link time, but one can use ldedit.

The issue with the segments in 32 bit mode is a trade off between heap memory and shmat attached shared memory. If one wanted to use Python with some forms of shared memory, one cannot allocate all of the segments to heap. Setting maxdata too large can cause unexpected failures if shared memory is used.

Increasing the default maxdata value seems like a good idea. The default GCC for AIX builds with a larger value. But it adds the command to LDFLAGS, which is applied everywhere, but not a significant problem and cc1* do not use shared memory.

One subtlety with LDFLAG is XLC wants the flag directly (-bmaxdata:0x40000000) but GCC needs to use -Wl,-bmaxdata.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 15:34:53 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Tue, 29 Jul 2014 13:34:53 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <1406626804.09.0.370877512095.issue22097@psf.upfronthosting.co.za>
Message-ID: <53D7A2FA.6010805@free.fr>


Antoine Pitrou added the comment:

Le 29/07/2014 05:40, Martin v. L?wis a ?crit :
>
> ISTM that a dictionary is not the proper data structure for an
instruction list. The support for the Mapping interface is not needed at
all (AFAICT).

This is true.

> It's possible to make a list implementation with O(1) insert_after,
using the same strategy that OrderedDict uses (i.e. maintain a mapping
from value to link element).

Are you suggesting the collections module is ready for a linked list 
implementation to go into it?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 16:36:38 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 29 Jul 2014 14:36:38 +0000
Subject: [issue21704] _multiprocessing module builds incorrectly when POSIX
 semaphores are disabled
In-Reply-To: <1402396404.2.0.758262532851.issue21704@psf.upfronthosting.co.za>
Message-ID: <3hN0nf0kJFz7Lsn@mail.python.org>


Roundup Robot added the comment:

New changeset 1a00be3d79bc by Ezio Melotti in branch '3.4':
#21704: remove duplicate name in Misc/ACKS.
http://hg.python.org/cpython/rev/1a00be3d79bc

New changeset 723e0a7c4914 by Ezio Melotti in branch 'default':
#21704: merge with 3.4.
http://hg.python.org/cpython/rev/723e0a7c4914

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 16:38:12 2014
From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis)
Date: Tue, 29 Jul 2014 14:38:12 +0000
Subject: [issue21704] _multiprocessing module builds incorrectly when POSIX
 semaphores are disabled
In-Reply-To: <1402396404.2.0.758262532851.issue21704@psf.upfronthosting.co.za>
Message-ID: <1406644692.61.0.325491302561.issue21704@psf.upfronthosting.co.za>


Changes by Arfrever Frehtes Taifersar Arahesis :


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 17:25:59 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 29 Jul 2014 15:25:59 +0000
Subject: [issue21591] "exec(a, b, c)" not the same as "exec a in b,
 c" in nested functions
In-Reply-To: <1401266879.61.0.867969486588.issue21591@psf.upfronthosting.co.za>
Message-ID: <3hN1tb06BGz7Ljf@mail.python.org>


Roundup Robot added the comment:

New changeset 33fb5600e9a1 by Dirkjan Ochtman in branch '2.7':
Issue #21591: Handle exec backwards compatibility in the AST builder.
http://hg.python.org/cpython/rev/33fb5600e9a1

New changeset 6c47c6d2033e by Robert Jordens in branch '2.7':
Issue #21591: add test for qualified exec in tuple form.
http://hg.python.org/cpython/rev/6c47c6d2033e

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 17:27:11 2014
From: report at bugs.python.org (Dirkjan Ochtman)
Date: Tue, 29 Jul 2014 15:27:11 +0000
Subject: [issue21591] "exec(a, b, c)" not the same as "exec a in b,
 c" in nested functions
In-Reply-To: <1401266879.61.0.867969486588.issue21591@psf.upfronthosting.co.za>
Message-ID: <1406647631.34.0.8618303113.issue21591@psf.upfronthosting.co.za>


Dirkjan Ochtman added the comment:

Thanks to Victor Stinner for the review!

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 17:34:02 2014
From: report at bugs.python.org (Shiz)
Date: Tue, 29 Jul 2014 15:34:02 +0000
Subject: [issue22100] Use $HOSTPYTHON when determining candidate interpreter
 for $PYTHON_FOR_BUILD.
Message-ID: <1406648042.0.0.0162670058613.issue22100@psf.upfronthosting.co.za>


New submission from Shiz:

Currently, when cross-compiling, the configure script doesn't take $HOSTPYTHON into account when determining $PYTHON_FOR_BUILD. This can lead to a wrong Python interpreter being used for several critical cross-compilation stages, leading to compilation errors[1].

Attached is a patch which makes it take $HOSTPYTHON into account, thus solving said issues, diffed against the current hg tip, 723e0a7c4914.

[1]: https://github.com/rave-engine/python3-android/issues/1 (the last issue in the report)

----------
components: Cross-Build
files: Python-hg-723e0a7c4914-fix-PYTHON_FOR_BUILD-detection.patch
keywords: patch
messages: 224230
nosy: shiz
priority: normal
severity: normal
status: open
title: Use $HOSTPYTHON when determining candidate interpreter for $PYTHON_FOR_BUILD.
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file36150/Python-hg-723e0a7c4914-fix-PYTHON_FOR_BUILD-detection.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 17:39:37 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Tue, 29 Jul 2014 15:39:37 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <53D7A2FA.6010805@free.fr>
Message-ID: <53D7C03E.6030107@v.loewis.de>


Martin v. L?wis added the comment:

> Are you suggesting the collections module is ready for a linked list 
> implementation to go into it?

I don't know about the collections module. All I'm saying is that
a linked list with an efficient insert_after(x) could be implemented.
I'm not seeing one on PyPI, so if this was a desirable thing to have
in the standard library, it should probably have a life on PyPI first.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 17:41:18 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Tue, 29 Jul 2014 15:41:18 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <53D7C03E.6030107@v.loewis.de>
Message-ID: <53D7C09B.9070106@free.fr>


Antoine Pitrou added the comment:

> I don't know about the collections module. All I'm saying is that
> a linked list with an efficient insert_after(x) could be implemented.
> I'm not seeing one on PyPI

See https://pypi.python.org/pypi/llist/
(and probably others)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 18:09:11 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Tue, 29 Jul 2014 16:09:11 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <53D7C09B.9070106@free.fr>
Message-ID: <53D7C72C.2080709@v.loewis.de>


Martin v. L?wis added the comment:

Am 29.07.14 17:41, schrieb Antoine Pitrou:
> 
> Antoine Pitrou added the comment:
> 
>> I don't know about the collections module. All I'm saying is that
>> a linked list with an efficient insert_after(x) could be implemented.
>> I'm not seeing one on PyPI
> 
> See https://pypi.python.org/pypi/llist/
> (and probably others)

This does not meet your requirement of supporting insert_after(x),
its insert(x, before) requires to give a dllistnode. To support that,
it would need a mapping from list item value to list link element,
which it doesn't have.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 18:17:42 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Tue, 29 Jul 2014 16:17:42 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <1406583029.35.0.857255601544.issue22097@psf.upfronthosting.co.za>
Message-ID: <1406650662.75.0.471335287875.issue22097@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

> This does not meet your requirement of supporting insert_after(x),
> its insert(x, before) requires to give a dllistnode.

Indeed it lacks that piece of prettiness in the API. And adding a mapping to allow lookups from item to node really means using a orderedset or ordereddict-like structure. Which is why I was proposing to reuse the existing infrastructure.

(note that I *cannot* reuse it from my own third-party class, since the necessary bits are all internal)

Still you may make the point that ordereddict is not appropriate, andorderedset would be better for this API. Raymond, would you support adding an orderedset to the collections module?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 18:46:07 2014
From: report at bugs.python.org (Vitor de Lima)
Date: Tue, 29 Jul 2014 16:46:07 +0000
Subject: [issue22038] Implement atomic operations on non-x86 platforms
In-Reply-To: <1406049852.33.0.466915172772.issue22038@psf.upfronthosting.co.za>
Message-ID: <1406652367.98.0.258552423246.issue22038@psf.upfronthosting.co.za>


Vitor de Lima added the comment:

Implemented a new version of the patch using either gcc builtins or the stdatomic.h header (this is detected by the configure script).

----------
Added file: http://bugs.python.org/file36151/atomicv2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 19:29:39 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Tue, 29 Jul 2014 17:29:39 +0000
Subject: [issue18174] Make regrtest with --huntrleaks check for fd leaks
In-Reply-To: <1406583787.47.0.728227362981.issue18174@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

> Richard Oudkerk added the comment:
>
> I can't remember why I did not use fstat() -- probably it did not occur to me.

I probably have Alzeihmer, I was sure I heard a reasonable case for
dup() vs fstat().
The only thing I can think of is that fstat() can incur I/O, whereas
dup() shouldn't.

In any case, I too prefer fstat(), since it doesn't require creating a
new FD (which could fail with EMFILE/ENFILE), and is more logical.

The only comment I have about this patch is I think that the helper
function to detect the number of open FD might have its place in
test.support.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 19:43:37 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Tue, 29 Jul 2014 17:43:37 +0000
Subject: [issue17751] ctypes/test/test_macholib.py fails when run from the
 installed location
In-Reply-To: <1366109212.26.0.351017025931.issue17751@psf.upfronthosting.co.za>
Message-ID: <1406655817.18.0.71347438076.issue17751@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Can we have the opinions of our testing experts please.

----------
nosy: +BreamoreBoy, ezio.melotti, michael.foord, pitrou
versions: +Python 3.5 -Python 3.3, Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 19:56:47 2014
From: report at bugs.python.org (Shiz)
Date: Tue, 29 Jul 2014 17:56:47 +0000
Subject: [issue22100] Use $HOSTPYTHON when determining candidate interpreter
 for $PYTHON_FOR_BUILD.
In-Reply-To: <1406648042.0.0.0162670058613.issue22100@psf.upfronthosting.co.za>
Message-ID: <1406656607.96.0.2995647393.issue22100@psf.upfronthosting.co.za>


Changes by Shiz :


----------
versions: +Python 3.3, Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 20:24:10 2014
From: report at bugs.python.org (David Wilson)
Date: Tue, 29 Jul 2014 18:24:10 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1406658250.49.0.936900134324.issue22003@psf.upfronthosting.co.za>


David Wilson added the comment:

I suspect it's all covered now, but is there anything else I can help with to get this patch pushed along its merry way?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 20:31:43 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Tue, 29 Jul 2014 18:31:43 +0000
Subject: [issue18174] Make regrtest with --huntrleaks check for fd leaks
In-Reply-To: <1370807273.91.0.83033499223.issue18174@psf.upfronthosting.co.za>
Message-ID: <1406658703.95.0.729895108299.issue18174@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

fstat() can do I/O, or can fail for other reasons. If you don't want to create a new fd, I think you can do dup2(fd, fd).

I don't understand the reason for the following code:

+    def check_handle_deltas(deltas):
+        return abs(sum(deltas)) >= min(3, len(deltas))

Can you add a comment?

----------
nosy: +pitrou

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 21:53:26 2014
From: report at bugs.python.org (Chris Bruner)
Date: Tue, 29 Jul 2014 19:53:26 +0000
Subject: [issue22049] argparse: type= doesn't honor nargs > 1
In-Reply-To: <1406326623.31.0.332890989494.issue22049@psf.upfronthosting.co.za>
Message-ID: 


Chris Bruner added the comment:

Just had a chance to try this, and this does exactly what I wanted from
"type=". Thank you!

On Fri, Jul 25, 2014 at 4:17 PM, paul j3  wrote:

>
> paul j3 added the comment:
>
> What you want is a custom Action rather than a custom Type.
>
> from the documentation:
>
>     >>> class FooAction(argparse.Action):
>     ...     def __call__(self, parser, namespace, values,
> option_string=None):
>     ...         print('%r %r %r' % (namespace, values, option_string))
>     ...         setattr(namespace, self.dest, values)
>
> 'values' will be the list ['1','2','3'], which you test and manipulate,
> before finally saving it to the 'namespace'.
>
>     ret = (int(values[0]), int(values[1]), float(values[2]))
>     setattr(namespace, self.dest, ret)
>
> Setting 'nargs=3' ensures that this action will always get a 3 item list.
>  If the parser can't give it 3 items, it will raise an error rather than
> call your Action.
>
> 'optparse' passed the remaining argument strings to Option's callback,
> which could consume as many as it wanted.  'argparse' does not give the
> Actions that power.  There is a fundamental difference in the parsing
> algorithm.
>
> ----------
>
> _______________________________________
> Python tracker 
> 
> _______________________________________
>

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 21:57:26 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 29 Jul 2014 19:57:26 +0000
Subject: [issue18174] Make regrtest with --huntrleaks check for fd leaks
In-Reply-To: <1370807273.91.0.83033499223.issue18174@psf.upfronthosting.co.za>
Message-ID: <1406663846.59.0.178947355749.issue18174@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> fstat() can do I/O, or can fail for other reasons.

Oh, I forgot this reason. Maybe we should add a comment to explain that. I mean in the patch for this issue but also in is_valid_fd() (Python/pythonrun.c).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 22:04:04 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Tue, 29 Jul 2014 20:04:04 +0000
Subject: [issue11969] Can't launch multiproccessing.Process on methods
In-Reply-To: <1304256356.26.0.816198245723.issue11969@psf.upfronthosting.co.za>
Message-ID: <1406664244.15.0.493581948365.issue11969@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

This works perfectly on 64 bit Windows 8.1 for 3.4.1 and 3.5.0a0.

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 22:07:48 2014
From: report at bugs.python.org (Ram Rachum)
Date: Tue, 29 Jul 2014 20:07:48 +0000
Subject: [issue11969] Can't launch multiproccessing.Process on methods
In-Reply-To: <1304256356.26.0.816198245723.issue11969@psf.upfronthosting.co.za>
Message-ID: <1406664468.45.0.687818254855.issue11969@psf.upfronthosting.co.za>


Ram Rachum added the comment:

Confirmed here it's working in Python 3.4, I guess it was fixed sometime in the last few years.

I guess the only thing we'd care about now is ensuring a test for this was added to the test suite, so there wouldn't be a regression. Can anyone confirm that?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 22:24:28 2014
From: report at bugs.python.org (Ned Deily)
Date: Tue, 29 Jul 2014 20:24:28 +0000
Subject: [issue21710] --install-base option ignored?
In-Reply-To: <1402436563.61.0.260081261103.issue21710@psf.upfronthosting.co.za>
Message-ID: <1406665468.14.0.370783996555.issue21710@psf.upfronthosting.co.za>


Ned Deily added the comment:

See also Issue1382562 "--install-base not honored on win32".

----------
nosy: +ned.deily

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 22:28:36 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Tue, 29 Jul 2014 20:28:36 +0000
Subject: [issue11990] redirected output - stdout writes newline as \n in
 windows
In-Reply-To: <1304458030.29.0.258748957891.issue11990@psf.upfronthosting.co.za>
Message-ID: <1406665716.38.0.263784815153.issue11990@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

It states in msg136119 that this is already fixed and I've confirmed this in 3.4.1 and 3.5.0a0 so believe this can be closed.

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 22:29:52 2014
From: report at bugs.python.org (Brian Curtin)
Date: Tue, 29 Jul 2014 20:29:52 +0000
Subject: [issue11990] redirected output - stdout writes newline as \n in
 windows
In-Reply-To: <1304458030.29.0.258748957891.issue11990@psf.upfronthosting.co.za>
Message-ID: <1406665792.38.0.157897976069.issue11990@psf.upfronthosting.co.za>


Changes by Brian Curtin :


----------
nosy:  -brian.curtin

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 22:31:14 2014
From: report at bugs.python.org (Ned Deily)
Date: Tue, 29 Jul 2014 20:31:14 +0000
Subject: [issue22100] Use $HOSTPYTHON when determining candidate interpreter
 for $PYTHON_FOR_BUILD.
In-Reply-To: <1406648042.0.0.0162670058613.issue22100@psf.upfronthosting.co.za>
Message-ID: <1406665874.92.0.869037554066.issue22100@psf.upfronthosting.co.za>


Changes by Ned Deily :


----------
nosy: +doko
versions:  -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 22:31:29 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Tue, 29 Jul 2014 20:31:29 +0000
Subject: [issue8171] bdist_wininst builds wrongly for --plat-name=win-amd64
In-Reply-To: <1268913911.34.0.452575740724.issue8171@psf.upfronthosting.co.za>
Message-ID: <1406665889.36.0.580194795032.issue8171@psf.upfronthosting.co.za>


Changes by Mark Lawrence :


----------
components:  -Distutils2, Windows
nosy: +dstufft
versions: +Python 3.4, Python 3.5 -3rd party, Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 22:34:50 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Tue, 29 Jul 2014 20:34:50 +0000
Subject: [issue8170] Wrong Paths for distutils build --plat-name=win-amd64
In-Reply-To: <1268913333.33.0.305416760988.issue8170@psf.upfronthosting.co.za>
Message-ID: <1406666090.22.0.84135444776.issue8170@psf.upfronthosting.co.za>


Changes by Mark Lawrence :


----------
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 22:36:55 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 29 Jul 2014 20:36:55 +0000
Subject: [issue11990] redirected output - stdout writes newline as \n in
 windows
In-Reply-To: <1304458030.29.0.258748957891.issue11990@psf.upfronthosting.co.za>
Message-ID: <1406666215.82.0.200206551426.issue11990@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Yes, the fix was probably one of these issues:

 - #10841: "binary stdio"
 - #11272: "input() has trailing carriage return on windows", fixed in Python 3.2.1
 - #11395: "print(s) fails on Windows with long strings", fixed in Python 3.2.1
 - #13119: "Newline for print() is \n on Windows, and not \r\n as expected", will be fixed in Python 3.2.4 and 3.3 (not released yet)

Python 3 now always use standard streams in binary mode on Windows.

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 22:38:50 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 29 Jul 2014 20:38:50 +0000
Subject: [issue22054] Add os.get_blocking() and os.set_blocking() functions
In-Reply-To: <1406151014.25.0.918263340821.issue22054@psf.upfronthosting.co.za>
Message-ID: <3hN8qZ0q90z7LjQ@mail.python.org>


Roundup Robot added the comment:

New changeset 8f0b8ddbb66b by Victor Stinner in branch 'default':
Issue #22054: Add os.get_blocking() and os.set_blocking() functions to get and
http://hg.python.org/cpython/rev/8f0b8ddbb66b

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 22:39:06 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 29 Jul 2014 20:39:06 +0000
Subject: [issue22054] Add os.get_blocking() and os.set_blocking() functions
In-Reply-To: <1406151014.25.0.918263340821.issue22054@psf.upfronthosting.co.za>
Message-ID: <1406666346.05.0.955692501315.issue22054@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 22:46:54 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Tue, 29 Jul 2014 20:46:54 +0000
Subject: [issue1508864] threading.Timer/timeouts break on change of win32
 local time
Message-ID: <1406666814.05.0.610176093234.issue1508864@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

PEP 418 states "time.monotonic(): timeout and scheduling, not affected by system clock updates" and has also deprecated time.clock() so I believe this can be closed as "out of date".

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 22:58:03 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 29 Jul 2014 20:58:03 +0000
Subject: [issue1508864] threading.Timer/timeouts break on change of win32
 local time
Message-ID: <1406667483.53.0.799007236981.issue1508864@psf.upfronthosting.co.za>


STINNER Victor added the comment:

As Antoine wrote, Condition.wait() was rewritten in Python 3.2 to implement timeout using the native OS "acquire a lock with a timeout" function. So the initial concern is already fixed. This change is huge, we are not going to backport new lock timeouts in Python 2.7, it's too risky. It's time to upgrade to Python 3!

There is still a *corner case* when the function is interrupted by a signal, we use the system clock to recompute the new timeout. This corner case is addresses by the issue #22043.

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 22:58:43 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Tue, 29 Jul 2014 20:58:43 +0000
Subject: [issue4198] os.path.normcase gets fooled on windows with mapped linux
 network drive
In-Reply-To: <1224885833.7.0.0397055051655.issue4198@psf.upfronthosting.co.za>
Message-ID: <1406667523.54.0.344195820938.issue4198@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

How does the new pathlib module handle this?  Also note from the docs for os.samefile() "Changed in version 3.4: Windows now uses the same implementation as all other platforms.".

----------
nosy: +BreamoreBoy, steve.dower, zach.ware

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 23:06:27 2014
From: report at bugs.python.org (Akira Li)
Date: Tue, 29 Jul 2014 21:06:27 +0000
Subject: [issue22089] collections.MutableSet does not provide update method
In-Reply-To: <1406441194.56.0.0212102514052.issue22089@psf.upfronthosting.co.za>
Message-ID: <1406667987.46.0.890865504326.issue22089@psf.upfronthosting.co.za>


Akira Li added the comment:

On the other hand update() method may accept multiple iterables at once:

  def update(self, *iterables):
      for it in iterables:
          self |= it

and therefore it is not equivalent to __ior__ method. In this case:
'difference', 'intersection', 'union' set methods could also be added to
Set and 'difference_update', 'intersection_update', 'update' to
MutableSet.

Negative consequences:

- no use-case?

- there are more than one way to spell an operation e.g., &= and
  intersection_update for a single iterable case

- documentation, tests, methods implementation have to be maintained in
  sync with frozenset/set

Positive:

- Set/MutableSet can be a drop in replacement for frozenset/set without
  manually reimplementing the named methods even if multiple iterables
  are not used

- documentation, tests, methods implementation are maintained only in
  stdlib and therefore bugs are fixed in a single place and the same
  behavior everywhere

I've uploaded a prototype patch that implements the named methods,
mentions them in Set/MutableSet documentation, and adds sanity tests.

If somebody provides a compelling use-case for adding the named methods
then further work on the patch could be done.

----------
keywords: +patch
Added file: http://bugs.python.org/file36152/set-update.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 23:09:26 2014
From: report at bugs.python.org (Roumen Petrov)
Date: Tue, 29 Jul 2014 21:09:26 +0000
Subject: [issue22100] Use $HOSTPYTHON when determining candidate interpreter
 for $PYTHON_FOR_BUILD.
In-Reply-To: <1406648042.0.0.0162670058613.issue22100@psf.upfronthosting.co.za>
Message-ID: <1406668166.51.0.690504824805.issue22100@psf.upfronthosting.co.za>


Changes by Roumen Petrov :


----------
nosy: +rpetrov

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 23:10:00 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Tue, 29 Jul 2014 21:10:00 +0000
Subject: [issue9665] Buid issues on Cygwin - _curses, _curses_panel, and _io
In-Reply-To: <1282599121.2.0.918330648156.issue9665@psf.upfronthosting.co.za>
Message-ID: <1406668200.38.0.99368782911.issue9665@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Stage needs setting to "patch review", any volunteers to undertake a review?

----------
components: +Cross-Build -Extension Modules, Windows
nosy: +BreamoreBoy, jlt63
versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 23:11:23 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 29 Jul 2014 21:11:23 +0000
Subject: [issue22063] asyncio: sock_xxx() methods of event loops should check
 ath sockets are non-blocking
In-Reply-To: <1406244257.84.0.711370901169.issue22063@psf.upfronthosting.co.za>
Message-ID: <3hN9Y70tdkz7LjV@mail.python.org>


Roundup Robot added the comment:

New changeset 7e70ec207889 by Victor Stinner in branch '3.4':
Close #22063: socket operations (socket,recv, sock_sendall, sock_connect,
http://hg.python.org/cpython/rev/7e70ec207889

New changeset 8967d9a1bc17 by Victor Stinner in branch 'default':
Merge with Python 3.4 (asyncio)
http://hg.python.org/cpython/rev/8967d9a1bc17

----------
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 23:12:46 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 29 Jul 2014 21:12:46 +0000
Subject: [issue22063] asyncio: sock_xxx() methods of event loops should check
 ath sockets are non-blocking
In-Reply-To: <1406244257.84.0.711370901169.issue22063@psf.upfronthosting.co.za>
Message-ID: <3hN9Zk18mqz7LjR@mail.python.org>


Roundup Robot added the comment:

New changeset 95ceec174baf by Victor Stinner in branch '3.4':
Issue #22063: Mention in asyncio documentation that socket operations require
http://hg.python.org/cpython/rev/95ceec174baf

New changeset 741e58bcaa65 by Victor Stinner in branch 'default':
(Merge 3.4) Issue #22063: Mention in asyncio documentation that socket
http://hg.python.org/cpython/rev/741e58bcaa65

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 23:23:17 2014
From: report at bugs.python.org (Brian Curtin)
Date: Tue, 29 Jul 2014 21:23:17 +0000
Subject: [issue4198] os.path.normcase gets fooled on windows with mapped linux
 network drive
In-Reply-To: <1224885833.7.0.0397055051655.issue4198@psf.upfronthosting.co.za>
Message-ID: <1406668997.55.0.10780034345.issue4198@psf.upfronthosting.co.za>


Changes by Brian Curtin :


----------
nosy:  -brian.curtin

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 23:28:19 2014
From: report at bugs.python.org (Akira Li)
Date: Tue, 29 Jul 2014 21:28:19 +0000
Subject: [issue22101] collections.abc.Set doesn't provide copy() method
Message-ID: <1406669299.88.0.807816572925.issue22101@psf.upfronthosting.co.za>


New submission from Akira Li:

The documentation for standard types says [1]:

  clear() and copy() are included for consistency with the interfaces of
  mutable containers that don?t support slicing operations (such as dict
  and set)

  New in version 3.3: clear() and copy() methods.

[1] https://docs.python.org/3.4/library/stdtypes.html#immutable-sequence-types

but collections.abc documentation mentions only clear() method.

I've uploaded a patch that implements Set.copy() method, mentions it in
Set's documentation, and adds a sanity test.

----------
components: Library (Lib)
files: set-copy.patch
keywords: patch
messages: 224255
nosy: akira
priority: normal
severity: normal
status: open
title: collections.abc.Set doesn't provide copy() method
type: behavior
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36153/set-copy.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 23:34:39 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 29 Jul 2014 21:34:39 +0000
Subject: [issue22018] signal.set_wakeup_fd() should accept sockets on Windows
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <3hNB3y3rnHz7Ljc@mail.python.org>


Roundup Robot added the comment:

New changeset fbd104359ef8 by Victor Stinner in branch 'default':
Issue #22018: On Windows, signal.set_wakeup_fd() now also supports sockets.
http://hg.python.org/cpython/rev/fbd104359ef8

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 23:35:57 2014
From: report at bugs.python.org (Brian Curtin)
Date: Tue, 29 Jul 2014 21:35:57 +0000
Subject: [issue9665] Buid issues on Cygwin - _curses, _curses_panel, and _io
In-Reply-To: <1282599121.2.0.918330648156.issue9665@psf.upfronthosting.co.za>
Message-ID: <1406669757.66.0.561668344068.issue9665@psf.upfronthosting.co.za>


Changes by Brian Curtin :


----------
nosy:  -brian.curtin

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 23:42:10 2014
From: report at bugs.python.org (Guillaume Carre)
Date: Tue, 29 Jul 2014 21:42:10 +0000
Subject: [issue22102] Zipfile generates Zipfile error in zip with 0 total
 number of disk in Zip64 end of central directory locator
Message-ID: <1406670130.27.0.606950005482.issue22102@psf.upfronthosting.co.za>


New submission from Guillaume Carre:

I've got a zip file with a Zip64 end of central directory locator in which:
- total number of disks = 0000
- number of the disk with the start of the zip64 end of central directory = 0000

According to the test line 176 in zipfile.py this fails:
    if diskno != 0 or disks != 1:
        raise BadZipfile("zipfiles that span multiple disks are not supported")

I believe the test should be changed to  
    if diskno != 0 or disks > 1:

----------
components: Library (Lib)
messages: 224257
nosy: Guillaume.Carre
priority: normal
severity: normal
status: open
title: Zipfile generates Zipfile error in zip with 0 total number of disk in Zip64 end of central directory locator
type: behavior
versions: Python 2.7

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 23:44:12 2014
From: report at bugs.python.org (=?utf-8?q?Michael_B=C3=BCsch?=)
Date: Tue, 29 Jul 2014 21:44:12 +0000
Subject: [issue22103] bdist_wininst does not run install script
Message-ID: <1406670252.28.0.0982043111898.issue22103@psf.upfronthosting.co.za>


New submission from Michael B?sch:

The bdist_wininst installer does not run the specified --install-script.

Attached is an example project foo.zip.
setup.py is invoked as follows:
py setup.py bdist_wininst --install-script foo_postinstall.py

The installer shows that it successfully ran the install script, but it did not do this. The file C:\foo.txt is not created. If I add print()s to the install script, these messages are not shown either.

I tested this on Python 3.4, 64-bit (Win7) and 32-bit (XP)

----------
components: Installation
files: foo.zip
messages: 224258
nosy: mb_
priority: normal
severity: normal
status: open
title: bdist_wininst does not run install script
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file36154/foo.zip

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 23:49:54 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 29 Jul 2014 21:49:54 +0000
Subject: [issue22018] signal.set_wakeup_fd() should accept sockets on Windows
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <1406670594.58.0.443165017095.issue22018@psf.upfronthosting.co.za>


STINNER Victor added the comment:

I pushed my latest patch. Thank you for helping me to design the API of this new feature.

Let's move to the issue #22042 to discuss if signal.set_wakeup_fd() should raise an exception if the file descriptor or socket handle is blocking. I close this issue.

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 23:51:17 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Tue, 29 Jul 2014 21:51:17 +0000
Subject: [issue8548] Building on CygWin 1.7: PATH_MAX redefined
In-Reply-To: <1272386591.01.0.834578637911.issue8548@psf.upfronthosting.co.za>
Message-ID: <1406670677.08.0.892126633017.issue8548@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

main.c has this.

#if defined(MS_WINDOWS) || defined(__CYGWIN__)
#include 
#ifdef HAVE_FCNTL_H
#include 
#define PATH_MAX MAXPATHLEN
#endif
#endif

Wouldn't inserting #else before #define fix this issue?

----------
components: +Build -Installation, Windows
nosy: +BreamoreBoy, jlt63, stutzbach
versions: +Python 3.4, Python 3.5 -Python 3.1

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 23:53:22 2014
From: report at bugs.python.org (Roumen Petrov)
Date: Tue, 29 Jul 2014 21:53:22 +0000
Subject: [issue8548] Building on CygWin 1.7: PATH_MAX redefined
In-Reply-To: <1272386591.01.0.834578637911.issue8548@psf.upfronthosting.co.za>
Message-ID: <1406670802.62.0.838999185545.issue8548@psf.upfronthosting.co.za>


Changes by Roumen Petrov :


----------
nosy: +rpetrov

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 23:56:16 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Tue, 29 Jul 2014 21:56:16 +0000
Subject: [issue8548] Building on CygWin 1.7: PATH_MAX redefined
In-Reply-To: <1272386591.01.0.834578637911.issue8548@psf.upfronthosting.co.za>
Message-ID: <1406670976.71.0.0608995151443.issue8548@psf.upfronthosting.co.za>


Changes by Mark Lawrence :


----------
components: +Windows

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Jul 29 23:57:13 2014
From: report at bugs.python.org (Lita Cho)
Date: Tue, 29 Jul 2014 21:57:13 +0000
Subject: [issue21933] Allow the user to change font sizes with the text pane
 of turtledemo
In-Reply-To: <1404746295.5.0.877343308699.issue21933@psf.upfronthosting.co.za>
Message-ID: <1406671033.9.0.700829519515.issue21933@psf.upfronthosting.co.za>


Lita Cho added the comment:

Hi Terry,

I've added to the patch, so that the user is able to change the font size through the GUI. I tried to match Google Doc's behaviour. I also added a max font size. I choose 400 since that is what Google Docs limits their font size.

If you prefer to split out the GUI functionaly out of this patch and submit a new patch after this has been committed, that's totally cool!

----------
Added file: http://bugs.python.org/file36155/tfont_with_gui.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 00:04:19 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Tue, 29 Jul 2014 22:04:19 +0000
Subject: [issue15082] [httplib] httplib.BadStatusLine on any HTTPS connection
 in certain unknown cases.
In-Reply-To: <1339811528.79.0.0690651710917.issue15082@psf.upfronthosting.co.za>
Message-ID: <1406671459.75.0.158822745398.issue15082@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Can you please retest with Python 2.7.8 as this has an updated version of openssl.

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 00:08:15 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 29 Jul 2014 22:08:15 +0000
Subject: [issue22042] signal.set_wakeup_fd(fd): raise an exception if the fd
 is in blocking mode
In-Reply-To: <1406076570.98.0.190305939229.issue22042@psf.upfronthosting.co.za>
Message-ID: <1406671695.53.0.913502992464.issue22042@psf.upfronthosting.co.za>


STINNER Victor added the comment:

On Windows, it looks like it's not possible to test if a socket handle (int, not a socket object) is blocking or not. The WSAIsBlocking() function was removed, it's only possible to set the flag using ioctlsocket().

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 00:22:45 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 29 Jul 2014 22:22:45 +0000
Subject: [issue22042] signal.set_wakeup_fd(fd): raise an exception if the fd
 is in blocking mode
In-Reply-To: <1406076570.98.0.190305939229.issue22042@psf.upfronthosting.co.za>
Message-ID: <1406672565.3.0.104063734548.issue22042@psf.upfronthosting.co.za>


STINNER Victor added the comment:

I commited my patch to support sockets in signal.set_wakeup_fd() on Windows.

I updated my patch. It doesn't change signal.set_wakeup_fd() on Windows anymore. It only raises an exception on POSIX if the file descriptor is blocking.

On Windows, it's not possible to make a file non-blocking and so the signal handler may block on writing in the file. Antoine Pitrou doesn't want to change the behaviour, he prefers to still support files even if there is the possible hang.

On Windows, it's not possible to check if a socket handle is blocking or not. So set_wakeup_fd() doesn't check if the socket is blocking or not on Windows.

At least, the check can be implemented on POSIX.

--

An alternative is to make the file descriptor non-blocking in set_wakeup_fd(). In this case, I suggest to drop support of files on Windows because files cannot be set in non-blocking mode.

----------
Added file: http://bugs.python.org/file36156/signal_check_nonblocking-2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 00:28:51 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 29 Jul 2014 22:28:51 +0000
Subject: [issue20766] reference leaks in pdb
In-Reply-To: <1393326154.87.0.194575074306.issue20766@psf.upfronthosting.co.za>
Message-ID: <1406672931.18.0.676232245037.issue20766@psf.upfronthosting.co.za>


STINNER Victor added the comment:

It's not easy to test the patch because running test_pdb fails with the following error (I also get the error if the patch is not applied):

$ ./python -m test test_pdb test_pdb
[1/2] test_pdb
[2/2] test_pdb
test test_pdb failed -- Traceback (most recent call last):
  File "/home/haypo/prog/python/default/Lib/doctest.py", line 2189, in runTest
    test, out=new.write, clear_globs=False)
AssertionError: Failed doctest test for test.test_pdb.test_next_until_return_at_return_event
  File "/home/haypo/prog/python/default/Lib/test/test_pdb.py", line 603, in test_next_until_return_at_return_event

----------------------------------------------------------------------
File "/home/haypo/prog/python/default/Lib/test/test_pdb.py", line 617, in test.test_pdb.test_next_until_return_at_return_event
Failed example:
    with PdbTestInput(['break test_function_2',
                       'continue',
                       'return',
                       'next',
                       'continue',
                       'return',
                       'until',
                       'continue',
                       'return',
                       'return',
                       'continue']):
        test_function()
Expected:
    > (3)test_function()
    -> test_function_2()
    (Pdb) break test_function_2
    Breakpoint 1 at :1
    (Pdb) continue
    > (2)test_function_2()
    -> x = 1
    (Pdb) return
    --Return--
    > (3)test_function_2()->None
    -> x = 2
    (Pdb) next
    > (4)test_function()
    -> test_function_2()
    (Pdb) continue
    > (2)test_function_2()
    -> x = 1
    (Pdb) return
    --Return--
    > (3)test_function_2()->None
    -> x = 2
    (Pdb) until
    > (5)test_function()
    -> test_function_2()
    (Pdb) continue
    > (2)test_function_2()
    -> x = 1
    (Pdb) return
    --Return--
    > (3)test_function_2()->None
    -> x = 2
    (Pdb) return
    > (6)test_function()
    -> end = 1
    (Pdb) continue
Got:
    > (3)test_function()
    -> test_function_2()
    (Pdb) break test_function_2
    Breakpoint 7 at :1
    (Pdb) continue
    > (2)test_function_2()
    -> x = 1
    (Pdb) return
    --Return--
    > (3)test_function_2()->None
    -> x = 2
    (Pdb) next
    > (4)test_function()
    -> test_function_2()
    (Pdb) continue
    > (2)test_function_2()
    -> x = 1
    (Pdb) return
    --Return--
    > (3)test_function_2()->None
    -> x = 2
    (Pdb) until
    > (5)test_function()
    -> test_function_2()
    (Pdb) continue
    > (2)test_function_2()
    -> x = 1
    (Pdb) return
    --Return--
    > (3)test_function_2()->None
    -> x = 2
    (Pdb) return
    > (6)test_function()
    -> end = 1
    (Pdb) continue

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 00:29:27 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 29 Jul 2014 22:29:27 +0000
Subject: [issue22068] test_idle leaks uncollectable objects
In-Reply-To: <1406302499.67.0.809982435329.issue22068@psf.upfronthosting.co.za>
Message-ID: <1406672967.42.0.411959091472.issue22068@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
title: test_gc fails after test_idle -> test_idle leaks uncollectable objects

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 00:30:45 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 29 Jul 2014 22:30:45 +0000
Subject: [issue21860] Correct FileIO docstrings
In-Reply-To: <1403610592.56.0.388497950887.issue21860@psf.upfronthosting.co.za>
Message-ID: <1406673045.09.0.454388364717.issue21860@psf.upfronthosting.co.za>


STINNER Victor added the comment:

The patch looks good to me.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 00:39:22 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 29 Jul 2014 22:39:22 +0000
Subject: [issue22023] PyUnicode_FromFormat is broken on python 2
In-Reply-To: <1405964309.44.0.884917870385.issue22023@psf.upfronthosting.co.za>
Message-ID: <3hNCVd2rCNz7LjV@mail.python.org>


Roundup Robot added the comment:

New changeset 263701e0b77e by Victor Stinner in branch '2.7':
Issue #22023: Fix %S, %R and %V formats of PyUnicode_FromFormat().
http://hg.python.org/cpython/rev/263701e0b77e

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 00:40:31 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Tue, 29 Jul 2014 22:40:31 +0000
Subject: [issue4722] _winreg.QueryValue fault while reading mangled registry
 values
In-Reply-To: <1229958391.62.0.85659959701.issue4722@psf.upfronthosting.co.za>
Message-ID: <1406673631.48.0.214920948848.issue4722@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

I can't reproduce this with 64 bit Windows 8.1 using 3.4.1 or 3.5.0a0, I don't have 2.7 to test on.

----------
nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware
versions: +Python 2.7 -Python 2.6

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 00:43:25 2014
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 29 Jul 2014 22:43:25 +0000
Subject: [issue22023] PyUnicode_FromFormat is broken on python 2
In-Reply-To: <1405964309.44.0.884917870385.issue22023@psf.upfronthosting.co.za>
Message-ID: <1406673805.06.0.437642325098.issue22023@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Oh, supporting %li and %zi is a new feature, it's too late to add this in Python 2.7. I removed this part of my patch. I commited the other part.

PyUnicode_FromFormat() decodes byte strings from ISO 8859-1 for %S, %R and %V formats. I don't like this choice, we should use the default encoding or UTF-8. But it's also probably too late to change that. At least, b'\xff' is decoded to '\xe4' instead of '\xffe4' (signed/unsigned integer issue, also fixed by my patch). It's a little bit better than before.

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 00:55:03 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Tue, 29 Jul 2014 22:55:03 +0000
Subject: [issue1054] scriptsinstall target fails in alternate build dir
In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za>
Message-ID: <1406674503.5.0.147701120059.issue1054@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

I have no intention of finding out what is in the 48 attached html files :(

----------
nosy: +BreamoreBoy
versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 00:55:55 2014
From: report at bugs.python.org (Brian Curtin)
Date: Tue, 29 Jul 2014 22:55:55 +0000
Subject: [issue4722] _winreg.QueryValue fault while reading mangled registry
 values
In-Reply-To: <1229958391.62.0.85659959701.issue4722@psf.upfronthosting.co.za>
Message-ID: <1406674555.28.0.82097287024.issue4722@psf.upfronthosting.co.za>


Changes by Brian Curtin :


----------
nosy:  -brian.curtin

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 01:09:54 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Tue, 29 Jul 2014 23:09:54 +0000
Subject: [issue16066] Truncated POST data in CGI script on Windows 7
In-Reply-To: <1348782648.4.0.8522398728.issue16066@psf.upfronthosting.co.za>
Message-ID: <1406675394.48.0.826519163606.issue16066@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

@Alexander apologies for the delay in getting back to you.  Who is best placed to look at this issue, I'll admit to knowing squat about cgi?

----------
components: +Library (Lib)
nosy: +BreamoreBoy
versions: +Python 2.7, Python 3.4, Python 3.5 -Python 3.2

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 01:11:00 2014
From: report at bugs.python.org (Milan Oberkirch)
Date: Tue, 29 Jul 2014 23:11:00 +0000
Subject: [issue21725] RFC 6531 (SMTPUTF8) support in smtpd
In-Reply-To: <1402504950.99.0.486766973248.issue21725@psf.upfronthosting.co.za>
Message-ID: <1406675460.08.0.902120110669.issue21725@psf.upfronthosting.co.za>


Changes by Milan Oberkirch :


Added file: http://bugs.python.org/file36157/issue21725v5.1.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 01:12:29 2014
From: report at bugs.python.org (Brian Curtin)
Date: Tue, 29 Jul 2014 23:12:29 +0000
Subject: [issue16066] Truncated POST data in CGI script on Windows 7
In-Reply-To: <1348782648.4.0.8522398728.issue16066@psf.upfronthosting.co.za>
Message-ID: <1406675549.34.0.123942278326.issue16066@psf.upfronthosting.co.za>


Changes by Brian Curtin :


----------
nosy:  -brian.curtin

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 01:25:17 2014
From: report at bugs.python.org (Milan Oberkirch)
Date: Tue, 29 Jul 2014 23:25:17 +0000
Subject: [issue22071] Remove long-time deprecated attributes from smtpd
In-Reply-To: <1406307098.0.0.954478358175.issue22071@psf.upfronthosting.co.za>
Message-ID: <1406676317.13.0.83052404526.issue22071@psf.upfronthosting.co.za>


Changes by Milan Oberkirch :


Added file: http://bugs.python.org/file36158/smtpd_remove_deprecated_attrs_v2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 01:33:26 2014
From: report at bugs.python.org (Milan Oberkirch)
Date: Tue, 29 Jul 2014 23:33:26 +0000
Subject: [issue22027] RFC 6531 (SMTPUTF8) support in smtplib
In-Reply-To: <1405978140.81.0.388141454985.issue22027@psf.upfronthosting.co.za>
Message-ID: <1406676806.04.0.611163928996.issue22027@psf.upfronthosting.co.za>


Changes by Milan Oberkirch :


Added file: http://bugs.python.org/file36159/smtpd_remove_deprecated_attrs_v2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 01:41:33 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Tue, 29 Jul 2014 23:41:33 +0000
Subject: [issue16100] Compiling vim with Python 3.3 support fails
In-Reply-To: <1349102758.43.0.280298808198.issue16100@psf.upfronthosting.co.za>
Message-ID: <1406677293.85.0.231518275725.issue16100@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

I don't see how we can do anything with this as mingw is unsupported.  If any docs need changing wouldn't that best be done as a completely separate issue?

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 01:45:46 2014
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 29 Jul 2014 23:45:46 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <3hNDzG1mvSz7Ljk@mail.python.org>


Roundup Robot added the comment:

New changeset 79a5fbe2c78f by Antoine Pitrou in branch 'default':
Issue #22003: When initialized from a bytes object, io.BytesIO() now
http://hg.python.org/cpython/rev/79a5fbe2c78f

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 01:46:30 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Tue, 29 Jul 2014 23:46:30 +0000
Subject: [issue22003] BytesIO copy-on-write
In-Reply-To: <1405635937.15.0.406925083031.issue22003@psf.upfronthosting.co.za>
Message-ID: <1406677590.05.0.428300576502.issue22003@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

The latest patch is good indeed. Thank you very much!

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 02:02:30 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 00:02:30 +0000
Subject: [issue10551] mimetypes read from the registry should not overwrite
 standard mime mappings
In-Reply-To: <1290885326.33.0.141249546234.issue10551@psf.upfronthosting.co.za>
Message-ID: <1406678550.71.0.772089510216.issue10551@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

msg185039 from #4969 also complains about this issue.  I agree with the solution put forward in the last sentence of msg172531. If we think this is the best idea I'll work on a patch unless anybody else wants to pick this up.

----------
nosy: +BreamoreBoy, fhamand -brian.curtin

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 02:16:47 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Wed, 30 Jul 2014 00:16:47 +0000
Subject: [issue22089] collections.MutableSet does not provide update method
In-Reply-To: <1406441194.56.0.0212102514052.issue22089@psf.upfronthosting.co.za>
Message-ID: <1406679407.52.0.284277263969.issue22089@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

The starting point for this feature request should be recognizing that Guido intentionally chose to not implement the named methods.

Excerpt from PEP 3119:

"This also supports the in-place mutating operations |=, &=, ^=, -=. These are concrete methods whose right operand can be an arbitrary Iterable, except for &=, whose right operand must be a Container. This ABC does not provide the named methods present on the built-in concrete set type that perform (almost) the same operations."

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 02:18:22 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 30 Jul 2014 00:18:22 +0000
Subject: [issue11969] Can't launch multiproccessing.Process on methods
In-Reply-To: <1304256356.26.0.816198245723.issue11969@psf.upfronthosting.co.za>
Message-ID: <1406679502.55.0.649028573037.issue11969@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

Pickling of builtin functions and methods was indeed improved thanks to __qualname__ support. Closing.

----------
nosy: +pitrou
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 02:21:31 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 30 Jul 2014 00:21:31 +0000
Subject: [issue22089] collections.MutableSet does not provide update method
In-Reply-To: <1406441194.56.0.0212102514052.issue22089@psf.upfronthosting.co.za>
Message-ID: <1406679691.27.0.396186079477.issue22089@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

This is a bit of a pity, since the named methods are generally more explicit for non-experts than the operators. The ABC could simply define default implementations for those methods to fallback on the operators.

By not providing such default implementations, the ABC makes it harder to write a user class whose API behaves like set's.

----------
nosy: +gvanrossum, pitrou

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 02:22:08 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 30 Jul 2014 00:22:08 +0000
Subject: [issue22101] collections.abc.Set doesn't provide copy() method
In-Reply-To: <1406669299.88.0.807816572925.issue22101@psf.upfronthosting.co.za>
Message-ID: <1406679728.73.0.0292802722069.issue22101@psf.upfronthosting.co.za>


Changes by Antoine Pitrou :


----------
nosy: +gvanrossum, rhettinger

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 02:23:05 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 30 Jul 2014 00:23:05 +0000
Subject: [issue22101] collections.abc.Set doesn't provide copy() method
In-Reply-To: <1406669299.88.0.807816572925.issue22101@psf.upfronthosting.co.za>
Message-ID: <1406679785.26.0.133339838249.issue22101@psf.upfronthosting.co.za>


Changes by Antoine Pitrou :


----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 02:24:34 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 30 Jul 2014 00:24:34 +0000
Subject: [issue8548] Building on CygWin 1.7: PATH_MAX redefined
In-Reply-To: <1272386591.01.0.834578637911.issue8548@psf.upfronthosting.co.za>
Message-ID: <1406679874.14.0.333868398588.issue8548@psf.upfronthosting.co.za>


Changes by Terry J. Reedy :


----------
nosy:  -terry.reedy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 02:24:39 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 30 Jul 2014 00:24:39 +0000
Subject: [issue20766] reference leaks in pdb
In-Reply-To: <1393326154.87.0.194575074306.issue20766@psf.upfronthosting.co.za>
Message-ID: <1406679879.06.0.848790354238.issue20766@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

See issue20746 for the test_pdb failure when run multiple times.

----------
nosy: +pitrou

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 02:31:21 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 30 Jul 2014 00:31:21 +0000
Subject: [issue22104] test_asyncio unstable in refleak mode
Message-ID: <1406680281.17.0.949528846195.issue22104@psf.upfronthosting.co.za>


New submission from Antoine Pitrou:

test_asyncio doesn't give usable results when looking for refleaks:

$ ./python -m test -R 2:4 test_asyncio
[1/1] test_asyncio
beginning 6 repetitions
123456
......
test_asyncio leaked [212, -106, 265, -6360] references, sum=-5989
test_asyncio leaked [59, -29, 76, -1799] memory blocks, sum=-1693
1 test failed:
    test_asyncio

----------
components: Tests
messages: 224280
nosy: giampaolo.rodola, gvanrossum, haypo, pitrou, yselivanov
priority: normal
severity: normal
stage: needs patch
status: open
title: test_asyncio unstable in refleak mode
type: behavior
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 02:54:05 2014
From: report at bugs.python.org (Ben Hoyt)
Date: Wed, 30 Jul 2014 00:54:05 +0000
Subject: [issue10551] mimetypes read from the registry should not overwrite
 standard mime mappings
In-Reply-To: <1290885326.33.0.141249546234.issue10551@psf.upfronthosting.co.za>
Message-ID: <1406681645.84.0.0486627377702.issue10551@psf.upfronthosting.co.za>


Ben Hoyt added the comment:

Mark, are you referring to part 3 of this issue, the image/pjpeg type of problem? This was fixed in Python 2.7.6 -- see changeset http://hg.python.org/cpython/rev/e8cead08c556 and http://bugs.python.org/issue15207

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 03:15:20 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Wed, 30 Jul 2014 01:15:20 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <1406583029.35.0.857255601544.issue22097@psf.upfronthosting.co.za>
Message-ID: <1406682920.69.0.680732066949.issue22097@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

Just for the record, when I originally looked at insert_before() and insert_after(), here's some of things that bugged me a little:

* insert_before(currkey, newkey, newvalue) ncan raise TypeErrors for hashability from either key.   It can raise a KeyError when currkey doesn't exist and a KeyError when newkey already exists.  It can raise a ValueError with currkey is equal to newkey.   That is a mess of exceptions that a user might need to untangle with exception chaining or custom exceptions.

* One use case for the insert methods is trying to maintain a sort order (such as an alphabetical order) but we don't have any efficient search methods such as a binary search to find an insertion point.  For example, if I read an alphabetically sorted config file of key / value pairs, how would I insert a new key/value pair in the proper position?

I also looked at adding an OrderedSet at one point and held-off because:

* there were no feature requests from users
* at the time, I wasn't finding third-party implementations on pypi,
  in the wild, or in the rich toolsets like Enthought's distro.
* it was so easy to build one by inheriting from a MutableSet
  and using an underlying OrderedDict.
* I also put a direct impplementation in a recipe on ASPN
  http://code.activestate.com/recipes/576694/
  to see if there was any uptake
* it was unclear what the ordering semantics should be on the
  various set-to-set operations (it would entail turning off
  some of the current optimizations such as intersection()
  looping over the smaller input set rather than the first
  listed set).
* In Python 3 and 2.7, fromkeys() readily constructs a set
  and the views on keys() and items() already support set
  operations.  AFAICT, nobody uses these even though all the
  desired set functionality is already there.

Since that time, there has been very little interest shown in an ordered set.  There have been a few upvotes on the ASPN recipe and a little activity on PyPi with a C version using Cython (see https://pypi.python.org/pypi?%3Aaction=search&term=ordered+set&submit=search ).

Another thing that caused me to hold-off was the possibility that regular sets could be made to be ordered with very little overhead (completely eliminating the need for a separate type).  I have two different approaches ready if we wanted to go down that path.

Now that PyPI has an ordered set offering, there is even less of a need for us to put one in the standard library unless it becomes more of an everyday need.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 03:38:14 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Wed, 30 Jul 2014 01:38:14 +0000
Subject: [issue22089] collections.MutableSet does not provide update method
In-Reply-To: <1406441194.56.0.0212102514052.issue22089@psf.upfronthosting.co.za>
Message-ID: <1406684294.93.0.0503447404896.issue22089@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

Oh the joy of duck typing. :-(

If anything, set should be made to behave more like MutableSet by allowing arbitrary iterable arguments to the __i**__ methods.

I do not think it is a good idea to add all of the named versions of the methods to the ABC (even if it could be done by making then concrete methods implemented in terms of the operations).  If you want to work with arbitrary MutableSet objects you should restrict yourself to the operations defined by MutableSet.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 03:41:49 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Wed, 30 Jul 2014 01:41:49 +0000
Subject: [issue22104] test_asyncio unstable in refleak mode
In-Reply-To: <1406680281.17.0.949528846195.issue22104@psf.upfronthosting.co.za>
Message-ID: <1406684509.79.0.134123549645.issue22104@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

Was this always so or did it recently start?  Victor has made a ton of changes.

Anyway, I imagine there may be some objects stuck in cycles and the collection may not happen until a random later time, and the tests do timing-specific stuff so the number of objects created and deleted varies per run.

Perhaps adding some well-aimed gc.collect() calls to some tearDown() methods would make this go away?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 03:42:29 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 30 Jul 2014 01:42:29 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <1406682920.69.0.680732066949.issue22097@psf.upfronthosting.co.za>
Message-ID: <53D84D7F.8010109@free.fr>


Antoine Pitrou added the comment:

Le 29/07/2014 21:15, Raymond Hettinger a ?crit :
>
> * One use case for the insert methods is trying to maintain a sort
order (such as an alphabetical order) but we don't have any efficient
search methods such as a binary search to find an insertion point. For
example, if I read an alphabetically sorted config file of key / value
pairs, how would I insert a new key/value pair in the proper position?

You'd certainly prefer a tree for that use case (O(log n) search and 
insertion rather than O(n) search and O(1) insertion).

I hadn't thought about the set operations. The use case here is really 
linked-list-alike, not set-alike.

I'm mildly relieved that, even though O(n), middle-of-list insertions 
are still plenty fast for reasonable sizes, which means Numba shouldn't 
suffer here (even though we do seem to have users generating Python code 
and then JIT-compiling it...).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 05:04:05 2014
From: report at bugs.python.org (Joe Gaspard)
Date: Wed, 30 Jul 2014 03:04:05 +0000
Subject: [issue22105] Hang during File "Save As"
Message-ID: <1406689445.5.0.172130301576.issue22105@psf.upfronthosting.co.za>


New submission from Joe Gaspard:

Python 3.4.1 hang while trying to save a file on  29 July 2014 5Pm.  The computer was a "DIY" i7/WIN7-64 bit/INTEL DZ87KLT-75 Motherboard (w/ Intel i7-4770-K 3.5 GHz processor).   IDLE was operating on "G:\python.exe 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014 10:45:13) [MSC v.1600 64 bit (AMD64] on win 32"
The hang occurred when  a "file save as" operation was attempted.  The file was a display of a "print" of a 400,000 line result from a 3-loop nested "while" count ".py" program.  NOTE: The "make test" set was run a few days earlier and did not result in any messages (all ok).  Thanks - "py" is a great proram and excellent docs.   

Description:
  A problem caused this program to stop interacting with Windows.

Problem signature:
  Problem Event Name:	AppHangB1
  Application Name:	pythonw.exe
  Application Version:	0.0.0.0
  Application Timestamp:	5378731e
  Hang Signature:	7efa
  Hang Type:	2048
  OS Version:	6.1.7601.2.1.0.768.3
  Locale ID:	1033
  Additional Hang Signature 1:	7efa98bee311c458b7449fe89d922f8b
  Additional Hang Signature 2:	271f
  Additional Hang Signature 3:	271ff7b6e5aa15e9ab2854edd8b040b6
  Additional Hang Signature 4:	7efa
  Additional Hang Signature 5:	7efa98bee311c458b7449fe89d922f8b
  Additional Hang Signature 6:	271f
  Additional Hang Signature 7:	271ff7b6e5aa15e9ab2854edd8b040b6

----------
components: IDLE
messages: 224286
nosy: Joe
priority: normal
severity: normal
status: open
title: Hang during File "Save As"
versions: Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 06:04:47 2014
From: report at bugs.python.org (Zachary Ware)
Date: Wed, 30 Jul 2014 04:04:47 +0000
Subject: [issue22104] test_asyncio unstable in refleak mode
In-Reply-To: <1406680281.17.0.949528846195.issue22104@psf.upfronthosting.co.za>
Message-ID: <1406693087.33.0.86574394574.issue22104@psf.upfronthosting.co.za>


Zachary Ware added the comment:

I think I'm to blame for exposing this in 4f9f7e0fe1fd.  I have a theory on why that exposed it; I think regrtest is holding an extra reference to the TestSuite in runtest_inner since it is using a different branch now that test_asyncio doesn't have a test_main function.

----------
nosy: +zach.ware

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 08:04:19 2014
From: report at bugs.python.org (paul j3)
Date: Wed, 30 Jul 2014 06:04:19 +0000
Subject: [issue22029] argparse - CSS white-space: like control for individual
 text blocks
In-Reply-To: <1406004413.12.0.04362068929.issue22029@psf.upfronthosting.co.za>
Message-ID: <1406700259.4.0.142846018154.issue22029@psf.upfronthosting.co.za>


Changes by paul j3 :


Added file: http://bugs.python.org/file36160/issue22029_2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 09:34:35 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 30 Jul 2014 07:34:35 +0000
Subject: [issue22104] test_asyncio unstable in refleak mode
In-Reply-To: <1406680281.17.0.949528846195.issue22104@psf.upfronthosting.co.za>
Message-ID: <1406705675.84.0.152138396359.issue22104@psf.upfronthosting.co.za>


STINNER Victor added the comment:

It may be related to the issue #17911.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 09:37:45 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 30 Jul 2014 07:37:45 +0000
Subject: [issue22085] Drop support of Tk 8.3
In-Reply-To: <1406396007.9.0.890469508876.issue22085@psf.upfronthosting.co.za>
Message-ID: <1406705865.84.0.526854312702.issue22085@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

I'm even not sure that current code works with Tk 8.3. We have no buildbots with Tk 8.3 and compatibility with it was not tested for years.

Here is a patch which drops support of Tk 8.3.

----------
stage:  -> patch review
title: Update deprecated Tcl commands in Tkinter -> Drop support of Tk 8.3
Added file: http://bugs.python.org/file36161/tkinter_drop_83.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 09:42:59 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 30 Jul 2014 07:42:59 +0000
Subject: [issue21580] PhotoImage(data=...) apparently has to be UTF-8 or
 Base-64 encoded
In-Reply-To: <1401083544.46.0.470654104454.issue21580@psf.upfronthosting.co.za>
Message-ID: <1406706179.91.0.946282991158.issue21580@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
nosy: +loewis

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 09:45:13 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 30 Jul 2014 07:45:13 +0000
Subject: [issue11077] Tkinter is not thread safe
In-Reply-To: <1296488432.58.0.0945320697853.issue11077@psf.upfronthosting.co.za>
Message-ID: <1406706313.43.0.594588225747.issue11077@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
stage: test needed -> resolved
status: pending -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 10:02:14 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 30 Jul 2014 08:02:14 +0000
Subject: [issue21951] tcl test change crashes AIX
In-Reply-To: <1405013926.74.0.877232363604.issue21951@psf.upfronthosting.co.za>
Message-ID: <3hNS0568xLz7Ljd@mail.python.org>


Roundup Robot added the comment:

New changeset 7de64def6565 by Serhiy Storchaka in branch '2.7':
Issue #21951: Temporary skip crashing test_user_command on AIX.
http://hg.python.org/cpython/rev/7de64def6565

New changeset 31f4cb1fede9 by Serhiy Storchaka in branch '3.4':
Issue #21951: Temporary skip crashing test_user_command on AIX.
http://hg.python.org/cpython/rev/31f4cb1fede9

New changeset de32cd419174 by Serhiy Storchaka in branch 'default':
Issue #21951: Temporary skip crashing test_user_command on AIX.
http://hg.python.org/cpython/rev/de32cd419174

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 10:07:23 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 30 Jul 2014 08:07:23 +0000
Subject: [issue21951] tcl test change crashes AIX
In-Reply-To: <1405013926.74.0.877232363604.issue21951@psf.upfronthosting.co.za>
Message-ID: <1406707643.04.0.552150480298.issue21951@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Link to log with a crash:

http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/2442/steps/test/logs/stdio

----------
stage: patch review -> needs patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 10:07:24 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 30 Jul 2014 08:07:24 +0000
Subject: [issue22018] signal.set_wakeup_fd() should accept sockets on Windows
In-Reply-To: <1405885633.45.0.930815175926.issue22018@psf.upfronthosting.co.za>
Message-ID: <3hNS632snDz7LjZ@mail.python.org>


Roundup Robot added the comment:

New changeset 963214896b22 by Victor Stinner in branch 'default':
Issue #22018: Fix test_signal: use assertEqual() not assertIs()
http://hg.python.org/cpython/rev/963214896b22

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 12:03:40 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 30 Jul 2014 10:03:40 +0000
Subject: [issue22104] test_asyncio unstable in refleak mode
In-Reply-To: <1406680281.17.0.949528846195.issue22104@psf.upfronthosting.co.za>
Message-ID: <1406714620.47.0.468104695213.issue22104@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
components: +asyncio

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 12:08:04 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 30 Jul 2014 10:08:04 +0000
Subject: [issue22104] test_asyncio unstable in refleak mode
In-Reply-To: <1406680281.17.0.949528846195.issue22104@psf.upfronthosting.co.za>
Message-ID: <1406714884.75.0.392365750563.issue22104@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> It may be related to the issue #17911.

I checked: it is. The strange reference count can be seen with a single test. Example:

$ ./python -m test -R 3:3: -m test_default_exc_handler_coro test_asyncio 
[1/1] test_asyncio
beginning 6 repetitions
123456
......
test_asyncio leaked [53, 53, -106] references, sum=0
test_asyncio leaked [15, 15, -30] memory blocks, sum=0
1 test failed:
    test_asyncio

This test uses a coroutine which raises an exception. The exception is stored in a Task object. But the exception contains also a traceback which indirectly creates a reference cycle. For example, the zero_error_coro() coroutine of the test uses the free variable "self".

It's very difficult to find all objects of a reference cycle. We can try to break some cycles, it's already done Task._step() which sets self to None, but it's a waste of time. IMO the correct fix is to not store frame objects in an exception: see the issue #17911.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 12:11:48 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Wed, 30 Jul 2014 10:11:48 +0000
Subject: [issue22085] Drop support of Tk 8.3
In-Reply-To: <1406396007.9.0.890469508876.issue22085@psf.upfronthosting.co.za>
Message-ID: <1406715108.58.0.651257727564.issue22085@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

The patch looks fine, please apply.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 12:24:14 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Wed, 30 Jul 2014 10:24:14 +0000
Subject: [issue21580] PhotoImage(data=...) apparently has to be UTF-8 or
 Base-64 encoded
In-Reply-To: <1401083544.46.0.470654104454.issue21580@psf.upfronthosting.co.za>
Message-ID: <1406715854.14.0.569949737441.issue21580@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

The 3.4 patch looks fine, please apply.

I'm -1 on the 2.7 patch. I think it would be better to add a _tkinter helper function to create Tcl byte array objects. Alternatively, the "binary format" command might help. OTOH, I don't care about 2.7, so feel free to do whatever you consider appropriate.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 12:41:30 2014
From: report at bugs.python.org (Masato HASHIMOTO)
Date: Wed, 30 Jul 2014 10:41:30 +0000
Subject: [issue2052] Allow changing difflib._file_template character encoding.
In-Reply-To: <1202505714.47.0.79762903943.issue2052@psf.upfronthosting.co.za>
Message-ID: <1406716890.44.0.0342758984452.issue2052@psf.upfronthosting.co.za>


Changes by Masato HASHIMOTO :


----------
nosy: +hashimo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 12:47:09 2014
From: report at bugs.python.org (Charles Newey)
Date: Wed, 30 Jul 2014 10:47:09 +0000
Subject: [issue22106] Python 2 docs 'control flow/pass' section contains bad
 example
Message-ID: <1406717229.88.0.0475217386951.issue22106@psf.upfronthosting.co.za>


New submission from Charles Newey:

URL: https://docs.python.org/2/tutorial/controlflow.html#pass-statements

Quoted verbatim:
"""
The pass statement does nothing. It can be used when a statement is required syntactically but the program requires no action. For example:
>>>

>>> while True:
...     pass  # Busy-wait for keyboard interrupt (Ctrl+C)
...

"""

While the example illustrates the point, it *may* give bad ideas to novice programmers reading it - "while True: pass" is an antipattern as it's very inefficient.

----------
assignee: docs at python
components: Documentation
messages: 224296
nosy: Charles.Newey, docs at python
priority: normal
severity: normal
status: open
title: Python 2 docs 'control flow/pass' section contains bad example
type: enhancement
versions: Python 2.7

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 12:59:33 2014
From: report at bugs.python.org (Ezio Melotti)
Date: Wed, 30 Jul 2014 10:59:33 +0000
Subject: [issue22106] Python 2 docs 'control flow/pass' section contains bad
 example
In-Reply-To: <1406717229.88.0.0475217386951.issue22106@psf.upfronthosting.co.za>
Message-ID: <1406717973.67.0.408025989551.issue22106@psf.upfronthosting.co.za>


Ezio Melotti added the comment:

Do you have any suggestion?
The section already includes examples about empty classes and as placeholder inside functions, and the only other "realistic" situations I can think of is inside an except to ignore errors -- but that might be considered an anti-pattern too.
It could be used with "for" loops if you want to e.g. consume an iterator, or with the "with" statement if you want to create an empty file, but these cases are not very common.

----------
nosy: +ezio.melotti

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 13:16:42 2014
From: report at bugs.python.org (Charles Newey)
Date: Wed, 30 Jul 2014 11:16:42 +0000
Subject: [issue22106] Python 2 docs 'control flow/pass' section contains bad
 example
In-Reply-To: <1406717229.88.0.0475217386951.issue22106@psf.upfronthosting.co.za>
Message-ID: <1406719002.36.0.277664269973.issue22106@psf.upfronthosting.co.za>


Charles Newey added the comment:

Your point about using "pass" with the "with" statement sounds like a better example than using "pass" in a loop.

Perhaps even something like adding a note to the example to clarify it:
"""
# Don't use this in Python code - it is for illustrative purposes only
while True:
    pass  # Busy-wait for keyboard interrupt (Ctrl+C)
"""

On the other hand -- one could argue that the documentation should not show "incorrect" uses of Python syntax at all.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 13:37:23 2014
From: report at bugs.python.org (Berker Peksag)
Date: Wed, 30 Jul 2014 11:37:23 +0000
Subject: [issue10572] Move test sub-packages to Lib/test
In-Reply-To: <1290991979.58.0.262973706564.issue10572@psf.upfronthosting.co.za>
Message-ID: <1406720243.41.0.220636405762.issue10572@psf.upfronthosting.co.za>


Changes by Berker Peksag :


----------
nosy: +berker.peksag
stage: needs patch -> patch review

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 13:44:50 2014
From: report at bugs.python.org (Michael Foord)
Date: Wed, 30 Jul 2014 11:44:50 +0000
Subject: [issue10572] Move test sub-packages to Lib/test
In-Reply-To: <1290991979.58.0.262973706564.issue10572@psf.upfronthosting.co.za>
Message-ID: <1406720690.94.0.138781028888.issue10572@psf.upfronthosting.co.za>


Michael Foord added the comment:

I still dislike moving tests around.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 14:23:18 2014
From: report at bugs.python.org (R. David Murray)
Date: Wed, 30 Jul 2014 12:23:18 +0000
Subject: [issue22106] Python 2 docs 'control flow/pass' section contains bad
 example
In-Reply-To: <1406717229.88.0.0475217386951.issue22106@psf.upfronthosting.co.za>
Message-ID: <1406722998.85.0.683021583106.issue22106@psf.upfronthosting.co.za>


R. David Murray added the comment:

How about something like:

   for x in my_generator():
       pass   # Exhaust co-routine generator to make sure all data is processed.

I have no idea if you'd ever actually do that in a well-structured co-routine context, though, not having written very much of that kind of code.

----------
nosy: +r.david.murray

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 14:31:45 2014
From: report at bugs.python.org (Xavier de Gaye)
Date: Wed, 30 Jul 2014 12:31:45 +0000
Subject: [issue20746] test_pdb fails in refleak mode
In-Reply-To: <1393175989.77.0.544484586748.issue20746@psf.upfronthosting.co.za>
Message-ID: <1406723505.4.0.768994926578.issue20746@psf.upfronthosting.co.za>


Xavier de Gaye added the comment:

This is because breakpoints number are class attributes. With the following change, the "./python -m test test_pdb test_pdb" is ok:

$ hg diff
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
--- a/Lib/test/test_pdb.py
+++ b/Lib/test/test_pdb.py
@@ -614,6 +614,8 @@
     ...     test_function_2()
     ...     end = 1
 
+    >>> from bdb import Breakpoint; Breakpoint.next = 1
+
     >>> with PdbTestInput(['break test_function_2',
     ...                    'continue',
     ...                    'return',

Attached refleak_3.patch fixes this problem for test_next_until_return_at_return_event().

----------
Added file: http://bugs.python.org/file36162/refleak_3.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 14:34:16 2014
From: report at bugs.python.org (Xavier de Gaye)
Date: Wed, 30 Jul 2014 12:34:16 +0000
Subject: [issue20746] test_pdb fails in refleak mode
In-Reply-To: <1393175989.77.0.544484586748.issue20746@psf.upfronthosting.co.za>
Message-ID: <1406723656.1.0.38969015711.issue20746@psf.upfronthosting.co.za>


Xavier de Gaye added the comment:

Sorry, I posted to the wrong issue, please ignore my previous message.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 14:34:34 2014
From: report at bugs.python.org (Xavier de Gaye)
Date: Wed, 30 Jul 2014 12:34:34 +0000
Subject: [issue20766] reference leaks in pdb
In-Reply-To: <1393326154.87.0.194575074306.issue20766@psf.upfronthosting.co.za>
Message-ID: <1406723674.67.0.482043673392.issue20766@psf.upfronthosting.co.za>


Xavier de Gaye added the comment:

This is because breakpoints number are class attributes. With the following change, the "./python -m test test_pdb test_pdb" is ok:

$ hg diff
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
--- a/Lib/test/test_pdb.py
+++ b/Lib/test/test_pdb.py
@@ -614,6 +614,8 @@
     ...     test_function_2()
     ...     end = 1
 
+    >>> from bdb import Breakpoint; Breakpoint.next = 1
+
     >>> with PdbTestInput(['break test_function_2',
     ...                    'continue',
     ...                    'return',

Attached refleak_3.patch fixes this.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 14:34:43 2014
From: report at bugs.python.org (Xavier de Gaye)
Date: Wed, 30 Jul 2014 12:34:43 +0000
Subject: [issue20766] reference leaks in pdb
In-Reply-To: <1393326154.87.0.194575074306.issue20766@psf.upfronthosting.co.za>
Message-ID: <1406723683.91.0.578018934152.issue20766@psf.upfronthosting.co.za>


Changes by Xavier de Gaye :


Added file: http://bugs.python.org/file36163/refleak_3.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 14:40:41 2014
From: report at bugs.python.org (Roger Upole)
Date: Wed, 30 Jul 2014 12:40:41 +0000
Subject: [issue22107] tempfile module misinterprets access denied error on
 Windows
Message-ID: <1406724041.52.0.0365391579019.issue22107@psf.upfronthosting.co.za>


New submission from Roger Upole:

_mkstemp_inner assumes that an access denied error means that it
has generated a filename that matches an existing foldername.
However, in the case of a folder for which you don't have permissions to
create a file, this means it will loop thru the maximum possible number of files.
This causes it to hang for several seconds and eventually return a bogus
FileExistsError.

Similar behaviour exists in 2.7.7, but it throws an IOError instead.

http://bugs.python.org/issue18849 seems to be where this was introduced.

----------
components: Windows
messages: 224304
nosy: rupole
priority: normal
severity: normal
status: open
title: tempfile module misinterprets access denied error on Windows
versions: Python 2.7, Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 15:17:09 2014
From: report at bugs.python.org (Berker Peksag)
Date: Wed, 30 Jul 2014 13:17:09 +0000
Subject: [issue21591] "exec(a, b, c)" not the same as "exec a in b,
 c" in nested functions
In-Reply-To: <1401266879.61.0.867969486588.issue21591@psf.upfronthosting.co.za>
Message-ID: <1406726229.38.0.44402822115.issue21591@psf.upfronthosting.co.za>


Changes by Berker Peksag :


----------
stage: patch review -> resolved

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 15:27:46 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 30 Jul 2014 13:27:46 +0000
Subject: [issue22104] test_asyncio unstable in refleak mode
In-Reply-To: <1406714884.75.0.392365750563.issue22104@psf.upfronthosting.co.za>
Message-ID: <53D8F2CE.5010209@free.fr>


Antoine Pitrou added the comment:

Le 30/07/2014 06:08, STINNER Victor a ?crit :
>
> This test uses a coroutine which raises an exception. The exception
> is
stored in a Task object. But the exception contains also a traceback
which indirectly creates a reference cycle.

regrtest calls gc.collect().

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 15:49:26 2014
From: report at bugs.python.org (Charles Newey)
Date: Wed, 30 Jul 2014 13:49:26 +0000
Subject: [issue22106] Python 2 docs 'control flow/pass' section contains bad
 example
In-Reply-To: <1406717229.88.0.0475217386951.issue22106@psf.upfronthosting.co.za>
Message-ID: <1406728166.0.0.848812795527.issue22106@psf.upfronthosting.co.za>


Charles Newey added the comment:

@David I have no idea either (no having written much of that sort of code myself either), but that looks more sensible.

I'm just nitpicking really, anyway.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 15:57:53 2014
From: report at bugs.python.org (Ezio Melotti)
Date: Wed, 30 Jul 2014 13:57:53 +0000
Subject: [issue22106] Python 2 docs 'control flow/pass' section contains bad
 example
In-Reply-To: <1406717229.88.0.0475217386951.issue22106@psf.upfronthosting.co.za>
Message-ID: <1406728673.09.0.425339319416.issue22106@psf.upfronthosting.co.za>


Ezio Melotti added the comment:

Keep in mind that this is in one of the first sections of the tutorial, where try/except, with, and generators have not been introduced yet.
Maybe the comment could be changed to a simpler "loop forever (use ctrl+c to stop)" so that it doesn't suggest that this is the way to wait for keyboard interrupts and/or a note like "note that this will use 100% of the CPU" could be added as well.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 16:05:19 2014
From: report at bugs.python.org (Larry Hastings)
Date: Wed, 30 Jul 2014 14:05:19 +0000
Subject: [issue20170] Derby #1: Convert 137 sites to Argument Clinic in
 Modules/posixmodule.c
In-Reply-To: <1389138185.8.0.104398826507.issue20170@psf.upfronthosting.co.za>
Message-ID: <1406729119.31.0.411356795403.issue20170@psf.upfronthosting.co.za>


Larry Hastings added the comment:

Here's a fresh diff.  I did some cleanup this time (Clinic now generates the #ifndef versions of the METHODDEF structures) and I believe solved everything MSVC complains about.

Zachary, can you try this one?

----------
Added file: http://bugs.python.org/file36164/larry.clinicize.posixmodule.5.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 16:07:33 2014
From: report at bugs.python.org (Larry Hastings)
Date: Wed, 30 Jul 2014 14:07:33 +0000
Subject: [issue20341] Argument Clinic: add "nullable ints"
In-Reply-To: <1390360681.97.0.808723930218.issue20341@psf.upfronthosting.co.za>
Message-ID: <1406729253.93.0.0625474374522.issue20341@psf.upfronthosting.co.za>


Larry Hastings added the comment:

Here's a fresh patch.  After discussing with Martin at EuroPython, I moved the implementation into Python/getargs.c, and the prototypes into modsupport.h.  I'm still using the example of "repeat.new" to show what it looks like and how it works.  However I don't plan on checking the changes to repeat.new in when I check in the patch--I'd want to discuss it with Raymond first.

----------
nosy: +loewis

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 16:08:33 2014
From: report at bugs.python.org (Larry Hastings)
Date: Wed, 30 Jul 2014 14:08:33 +0000
Subject: [issue20341] Argument Clinic: add "nullable ints"
In-Reply-To: <1390360681.97.0.808723930218.issue20341@psf.upfronthosting.co.za>
Message-ID: <1406729313.25.0.914753975701.issue20341@psf.upfronthosting.co.za>


Larry Hastings added the comment:

Whoops, here's the patch.

----------
Added file: http://bugs.python.org/file36165/larry.nullable.ints.4.txt

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 16:39:47 2014
From: report at bugs.python.org (Zachary Ware)
Date: Wed, 30 Jul 2014 14:39:47 +0000
Subject: [issue22104] test_asyncio unstable in refleak mode
In-Reply-To: <1406680281.17.0.949528846195.issue22104@psf.upfronthosting.co.za>
Message-ID: <1406731187.54.0.647248788714.issue22104@psf.upfronthosting.co.za>


Zachary Ware added the comment:

I checked on my theory, and removing the extra reference to 'tests' from the runtest_inner scope fixes it for me:

$ python -m test -R 3:3: test_asyncio
Running Debug|Win32 interpreter...
[1/1] test_asyncio
beginning 6 repetitions
123456
......
1 test OK.

Here's the patch.

----------
keywords: +patch
Added file: http://bugs.python.org/file36166/issue22104.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 17:16:12 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Wed, 30 Jul 2014 15:16:12 +0000
Subject: [issue17620] Python interactive console doesn't use sys.stdin for
 input
In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za>
Message-ID: <1406733372.12.0.18684992812.issue17620@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

Is this at all related to the use of GNU readline?

----------
nosy: +gvanrossum

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 17:29:16 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 30 Jul 2014 15:29:16 +0000
Subject: [issue17620] Python interactive console doesn't use sys.stdin for
 input
In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za>
Message-ID: <1406734156.26.0.317500053452.issue17620@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

Yes, it is. GNU readline will use a FILE*. Apparently, one can customize this behaviour, see http://cnswww.cns.cwru.edu/php/chet/readline/readline.html#SEC25

"""Variable: rl_getc_func_t * rl_getc_function
    If non-zero, Readline will call indirectly through this pointer to get a character from the input stream. By default, it is set to rl_getc, the default Readline character input function (see section 2.4.8 Character Input). In general, an application that sets rl_getc_function should consider setting rl_input_available_hook as well. """

It is not obvious how that interacts with special keys, e.g. arrows.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 17:33:15 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 15:33:15 +0000
Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, 
 creates wrong mappings
In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za>
Message-ID: <1406734395.35.0.454081740856.issue15207@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

@Christoph please raise a new issue regarding the problem you describe in msg219788.

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 17:34:18 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 30 Jul 2014 15:34:18 +0000
Subject: [issue21580] PhotoImage(data=...) apparently has to be UTF-8 or
 Base-64 encoded
In-Reply-To: <1401083544.46.0.470654104454.issue21580@psf.upfronthosting.co.za>
Message-ID: <3hNf1j4ggzz7Ljd@mail.python.org>


Roundup Robot added the comment:

New changeset 9474f2971855 by Serhiy Storchaka in branch '3.4':
Issue #21580: Now Tkinter correctly handles bytes arguments passed to Tk.
http://hg.python.org/cpython/rev/9474f2971855

New changeset b9d249316f29 by Serhiy Storchaka in branch 'default':
Issue #21580: Now Tkinter correctly handles bytes arguments passed to Tk.
http://hg.python.org/cpython/rev/b9d249316f29

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 17:41:11 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 15:41:11 +0000
Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, 
 creates wrong mappings
In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za>
Message-ID: <1406734871.42.0.174995972631.issue15207@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

@Christoph sorry #21652 has already been raised to address the problem of mixed str and unicode objects.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 17:41:54 2014
From: report at bugs.python.org (Brian Curtin)
Date: Wed, 30 Jul 2014 15:41:54 +0000
Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, 
 creates wrong mappings
In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za>
Message-ID: <1406734914.75.0.807323038963.issue15207@psf.upfronthosting.co.za>


Changes by Brian Curtin :


----------
nosy:  -brian.curtin

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 17:43:15 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 15:43:15 +0000
Subject: [issue10551] mimetypes read from the registry should not overwrite
 standard mime mappings
In-Reply-To: <1290885326.33.0.141249546234.issue10551@psf.upfronthosting.co.za>
Message-ID: <1406734995.96.0.716650378874.issue10551@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Ben you're correct.  The other issues have been addressed in #10162 and #9291 so I believe this can be closed.  One 2.7 regression regarding mixed str and unicode objects is addressed in #21652.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 17:46:16 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 15:46:16 +0000
Subject: [issue16328] win_add2path.py sets wrong user path
In-Reply-To: <1351255282.63.0.930970476961.issue16328@psf.upfronthosting.co.za>
Message-ID: <1406735176.06.0.108377857379.issue16328@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Should we create the scripts dir during install?  Is it that big a deal?

----------
nosy: +BreamoreBoy, steve.dower, zach.ware

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 17:48:09 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 30 Jul 2014 15:48:09 +0000
Subject: [issue21580] PhotoImage(data=...) apparently has to be UTF-8 or
 Base-64 encoded
In-Reply-To: <1401083544.46.0.470654104454.issue21580@psf.upfronthosting.co.za>
Message-ID: <1406735289.28.0.335152084213.issue21580@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Thank you Martin for your reviews. Here is updated 2.7 patch which implements your suggestion.

The disadvantage of this patch in comparison with first version is that it will not work with statically compiled embedded Python, when only stdlib is updated. I once broke re in bugfix release in such manner (by moving one constant from Python sources to C sources). On other hand, it is very unlikely that anyone uses Tkinter in such circumstances, and in any case this part of code is broken for now, so patch should not introduce new regression.

----------
Added file: http://bugs.python.org/file36167/tkinter_bytes-2.7_2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 17:52:52 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Wed, 30 Jul 2014 15:52:52 +0000
Subject: [issue2771] Test issue
In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za>
Message-ID: <1406735572.22.0.00167164622751.issue2771@psf.upfronthosting.co.za>


Changes by Martin v. L?wis :


----------
priority: normal -> 

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 17:54:14 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Wed, 30 Jul 2014 15:54:14 +0000
Subject: [issue2771] Test issue
In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za>
Message-ID: <1406735654.12.0.548636260095.issue2771@psf.upfronthosting.co.za>


Changes by Martin v. L?wis :


----------
status: closed -> 

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 17:56:48 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Wed, 30 Jul 2014 15:56:48 +0000
Subject: [issue2771] Test issue
In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za>
Message-ID: <1406735808.77.0.304719479069.issue2771@psf.upfronthosting.co.za>


Changes by Martin v. L?wis :


----------
status:  -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 18:08:55 2014
From: report at bugs.python.org (Zachary Ware)
Date: Wed, 30 Jul 2014 16:08:55 +0000
Subject: [issue20170] Derby #1: Convert 137 sites to Argument Clinic in
 Modules/posixmodule.c
In-Reply-To: <1389138185.8.0.104398826507.issue20170@psf.upfronthosting.co.za>
Message-ID: <1406736535.26.0.731217126683.issue20170@psf.upfronthosting.co.za>


Zachary Ware added the comment:

Close, but no cigar :).  Posted Rietveld comments to address the last two compile issues (one of which also appears to be a major bug, but only a warning at compile time).

Also, Victor has added os.get_blocking() and os.set_blocking(), which prevent your patch from applying cleanly (I tested against the parent of Victor's changeset).

After fixing the two issues I pointed out on Rietveld, I still get major failure on test:

======================================================================
ERROR: test_1565150 (__main__.StatAttributeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "P:\ath\to\cpython\lib\test\test_os.py", line 214, in tearDown
    os.rmdir(support.TESTFN)
OSError: [WinError 145] The directory is not empty: '@test_13492_tmp'

======================================================================
ERROR: test_1686475, test_file_attributes, test_large_time, test_stat_attributes, test_stat_attributes_bytes, test_stat_result_pickle, test_utime, test_utime_dir, test_utime_invalid_arguments, test_utime_ns, test_utime_subsecond, test_exist_ok_existing_directory, test_exist_ok_existing_regular_file, test_exist_ok_s_isgid_directory, test_makedir (All the same error)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "P:\ath\to\cpython\lib\test\test_os.py", line ###, in setUp
    os.mkdir(support.TESTFN)
FileExistsError: [WinError 183] Cannot create a file when that file already exists: '@test_13492_tmp'

======================================================================
ERROR: test_urandom_fd_reopened (__main__.URandomTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "P:\ath\to\cpython\lib\test\test_os.py", line 1138, in test_urandom_fd_reopened
    with open(support.TESTFN, 'wb') as f:
PermissionError: [Errno 13] Permission denied: '@test_13492_tmp'

======================================================================
FAIL: test_chdir (__main__.Win32ErrorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "P:\ath\to\cpython\lib\test\test_os.py", line 1274, in test_chdir
    self.assertRaises(OSError, os.chdir, support.TESTFN)
AssertionError: OSError not raised by chdir

----------------------------------------------------------------------
Ran 164 tests in 5.122s

The problem appears to be in unlink or rmdir, but I can't see anything amiss in either one.  I'll keep looking, but you may have a better idea what's going wrong.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 18:09:38 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Wed, 30 Jul 2014 16:09:38 +0000
Subject: [issue21580] PhotoImage(data=...) apparently has to be UTF-8 or
 Base-64 encoded
In-Reply-To: <1401083544.46.0.470654104454.issue21580@psf.upfronthosting.co.za>
Message-ID: <1406736578.27.0.372105411407.issue21580@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

The 2.7_2 patch looks good to me. I won't rule on the backwards compatibility implications, although I agree that this is unlikely to cause a regression (it would only if somebody updated the standard library only, *and* would use data= for PhotoImage). I'm unsure whether it was possible at all so far to use data= (with whatever argument); if you could have passed a non-buffer object successfully, this would break now.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 18:19:29 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 30 Jul 2014 16:19:29 +0000
Subject: [issue22085] Drop support of Tk 8.3
In-Reply-To: <1406396007.9.0.890469508876.issue22085@psf.upfronthosting.co.za>
Message-ID: <3hNg1s0qVHz7Ljd@mail.python.org>


Roundup Robot added the comment:

New changeset 1aa6ac23340d by Serhiy Storchaka in branch 'default':
Issue #22085: Dropped support of Tk 8.3 in Tkinter.
http://hg.python.org/cpython/rev/1aa6ac23340d

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 18:29:04 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 30 Jul 2014 16:29:04 +0000
Subject: [issue22085] Drop support of Tk 8.3
In-Reply-To: <1406396007.9.0.890469508876.issue22085@psf.upfronthosting.co.za>
Message-ID: <1406737744.16.0.917499979791.issue22085@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 18:34:17 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 16:34:17 +0000
Subject: [issue16383] Python 3.3 Permission Error with User Library on Windows
In-Reply-To: <1351790923.15.0.230780432409.issue16383@psf.upfronthosting.co.za>
Message-ID: <1406738057.79.0.325066792398.issue16383@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Works fine for me on Windows 8.1 64 bit using 3.4.1 and 3.5.0a0.  Can one on our Windows gurus confirm this please.

----------
nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 18:42:08 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 16:42:08 +0000
Subject: [issue1776160] Buffer overflow when listing deeply nested directory
Message-ID: <1406738528.33.0.469179660554.issue1776160@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

I suggest we close this as "won't fix" since I don't see how we can justify spending time working around a known limitation of Windows.

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 18:46:56 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 16:46:56 +0000
Subject: [issue7833] bdist_wininst installers fail to load extensions built
 with Issue4120 patch
In-Reply-To: <1265062373.01.0.461114831555.issue7833@psf.upfronthosting.co.za>
Message-ID: <1406738816.4.0.709290613688.issue7833@psf.upfronthosting.co.za>


Changes by Mark Lawrence :


----------
components:  -Distutils2
nosy: +dstufft
versions: +Python 3.4, Python 3.5 -3rd party, Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 18:50:45 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 16:50:45 +0000
Subject: [issue16322] time.tzname on Python 3.3.0 for Windows is decoded by
 wrong encoding
In-Reply-To: <1351166210.69.0.0993824857313.issue16322@psf.upfronthosting.co.za>
Message-ID: <1406739045.75.0.665802140164.issue16322@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Could somebody respond to the originator please.

----------
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 18:51:34 2014
From: report at bugs.python.org (Piotr Dobrogost)
Date: Wed, 30 Jul 2014 16:51:34 +0000
Subject: [issue18885] handle EINTR in the stdlib
In-Reply-To: <1377874955.28.0.258891288899.issue18885@psf.upfronthosting.co.za>
Message-ID: <1406739094.56.0.193049037827.issue18885@psf.upfronthosting.co.za>


Changes by Piotr Dobrogost :


----------
nosy: +piotr.dobrogost

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 18:55:20 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Wed, 30 Jul 2014 16:55:20 +0000
Subject: [issue1776160] Buffer overflow when listing deeply nested directory
Message-ID: <1406739320.11.0.383560982381.issue1776160@psf.upfronthosting.co.za>


Changes by Martin v. L?wis :


----------
nosy:  -loewis

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 19:07:37 2014
From: report at bugs.python.org (Piotr Dobrogost)
Date: Wed, 30 Jul 2014 17:07:37 +0000
Subject: [issue22007] sys.stdout.write on Python 2.7 is not EINTR safe
In-Reply-To: <1405717800.93.0.311765291104.issue22007@psf.upfronthosting.co.za>
Message-ID: <1406740057.52.0.810639269033.issue22007@psf.upfronthosting.co.za>


Piotr Dobrogost added the comment:

@hypo
Is there any reason you keep this PEP "secret" :) by not mentioning it on bug 18885?

----------
nosy: +piotr.dobrogost

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 19:10:42 2014
From: report at bugs.python.org (Jonas Jelten)
Date: Wed, 30 Jul 2014 17:10:42 +0000
Subject: [issue22108] python c api wchar_t*/char* passing contradiction
Message-ID: <1406740242.49.0.577134590981.issue22108@psf.upfronthosting.co.za>


New submission from Jonas Jelten:

The documentation and the code example at
https://docs.python.org/3.5/extending/embedding.html#very-high-level-embedding

#include 

int
main(int argc, char *argv[])
{
  Py_SetProgramName(argv[0]);  /* optional but recommended */
  Py_Initialize();
  PyRun_SimpleString("from time import time,ctime\n"
                     "print('Today is', ctime(time()))\n");
  Py_Finalize();
  return 0;
}

contradicts the actual implementation of the code:
http://hg.python.org/cpython/file/tip/Include/pythonrun.h#l25

which leads to compiler errors. To fix them, ugly wchar_t to char conversions are needed.

Also, I was hoping, Python 3.3 finally switched from wchar_t to char and UTF-8.
at least that's how I understood PEP 393 http://python.org/dev/peps/pep-0393/

see also:

http://stackoverflow.com/questions/21591908/python-3-3-c-string-handling-wchar-t-vs-char


=> Are the docs wrong (which i hope are not, the example is straightforward and simple-stupid with a char*),
or is cpython wrong?

----------
components: Unicode
messages: 224327
nosy: ezio.melotti, haypo, thejj
priority: normal
severity: normal
status: open
title: python c api wchar_t*/char* passing contradiction
type: compile error
versions: Python 3.3, Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 19:36:06 2014
From: report at bugs.python.org (Lita Cho)
Date: Wed, 30 Jul 2014 17:36:06 +0000
Subject: [issue6639] turtle: _tkinter.TclError: invalid command name
 ".10170160"
In-Reply-To: <1249344565.24.0.634557720335.issue6639@psf.upfronthosting.co.za>
Message-ID: <1406741766.8.0.514488669657.issue6639@psf.upfronthosting.co.za>


Lita Cho added the comment:

I can make it worth such that it doesn't raise a Terminator error. This works great when working with Turtle on the command line. I basically check if the root exists for all Tk canvas calls. 

If it got destroyed, then it just returns. However, if you run the following recursive code, it will just keep popping up a window forever unless you Ctrl+C out of the program. So that is not going to work. I still believe raising an error is the proper approach.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 19:47:53 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Wed, 30 Jul 2014 17:47:53 +0000
Subject: [issue22108] python c api wchar_t*/char* passing contradiction
In-Reply-To: <1406740242.49.0.577134590981.issue22108@psf.upfronthosting.co.za>
Message-ID: <1406742473.29.0.95851138422.issue22108@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

You were misinterpreting PEP 393 - it is only about the representation of string objects, and doesn't affect any pre-existing API. Changing Py_SetProgramName is not possible without breaking existing code, so it could only happen in Python 4. 

A proper solution might be adding Py_SetProgramNameUTF8, but it could trick people into believing that argv[0] actually is UTF-8 on their system, which it might not be. Providing Py_SetProgramNameASCII might be better, but it could fail if argv[0] contains non-ASCII characters. Yet another solution could be to expose _Py_char2wchar to the developer.

In any case: yes, the example is outdated, and only valid for Python 2.

----------
nosy: +loewis

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 19:49:57 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Wed, 30 Jul 2014 17:49:57 +0000
Subject: [issue17620] Python interactive console doesn't use sys.stdin for
 input
In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za>
Message-ID: <1406742597.12.0.225967197033.issue17620@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

I propose not to mess with GNU readline.  But that doesn't mean we can't try to fix this issue by detecting that sys.stdin has changed and use it if it isn't referring to the original process stdin.  It will be tricky however to make sure nothing breaks.

(The passage quoted from the GNU readline docs seems to imply that it's in non-blocking mode, and that the FD is a raw tty device, probably with echo off.  It will give escape sequences for e.g. arrow keys.)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 20:00:26 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 18:00:26 +0000
Subject: [issue4508] distutils compiler not handling spaces in path to
 output/src files
In-Reply-To: <1228341537.43.0.522254260997.issue4508@psf.upfronthosting.co.za>
Message-ID: <1406743226.25.0.5983536754.issue4508@psf.upfronthosting.co.za>


Changes by Mark Lawrence :


----------
components:  -Distutils2
nosy: +dstufft
versions: +Python 3.4, Python 3.5 -3rd party, Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 20:00:28 2014
From: report at bugs.python.org (Cory Klein)
Date: Wed, 30 Jul 2014 18:00:28 +0000
Subject: [issue22109] Python failing in markupsafe module when running ansible
Message-ID: <1406743228.93.0.711963705177.issue22109@psf.upfronthosting.co.za>


New submission from Cory Klein:

After installing ansible and python using homebrew, if I run ansible it crashes after calling into python's markupsafe:

$ ansible
Traceback (most recent call last):
  File "/usr/local/Cellar/ansible/1.6.10/libexec/bin/ansible", line 5, in 
    pkg_resources.run_script('ansible==1.6.10', 'ansible')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 492, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1350, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/Cellar/ansible/1.6.10/lib/python2.7/site-packages/ansible-1.6.10-py2.7.egg/EGG-INFO/scripts/ansible", line 25, in 
    from ansible.runner import Runner
  File "/usr/local/Cellar/ansible/1.6.10/lib/python2.7/site-packages/ansible-1.6.10-py2.7.egg/ansible/runner/__init__.py", line 32, in 
    import jinja2
  File "/usr/local/Cellar/ansible/1.6.10/libexec/lib/python2.7/site-packages/Jinja2-2.7.1-py2.7.egg/jinja2/__init__.py", line 33, in 
    from jinja2.environment import Environment, Template
  File "/usr/local/Cellar/ansible/1.6.10/libexec/lib/python2.7/site-packages/Jinja2-2.7.1-py2.7.egg/jinja2/environment.py", line 13, in 
    from jinja2 import nodes
  File "/usr/local/Cellar/ansible/1.6.10/libexec/lib/python2.7/site-packages/Jinja2-2.7.1-py2.7.egg/jinja2/nodes.py", line 18, in 
    from jinja2.utils import Markup
  File "/usr/local/Cellar/ansible/1.6.10/libexec/lib/python2.7/site-packages/Jinja2-2.7.1-py2.7.egg/jinja2/utils.py", line 520, in 
    from markupsafe import Markup, escape, soft_unicode
  File "/Library/Python/2.7/site-packages/markupsafe/__init__.py", line 14, in 
    from markupsafe._compat import text_type, string_types, int_types, \
ImportError: No module named _compat

----------
assignee: ronaldoussoren
components: Macintosh
messages: 224331
nosy: coryfklein, ronaldoussoren
priority: normal
severity: normal
status: open
title: Python failing in markupsafe module when running ansible
type: crash
versions: Python 2.7

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 20:00:54 2014
From: report at bugs.python.org (Cory Klein)
Date: Wed, 30 Jul 2014 18:00:54 +0000
Subject: [issue22109] Python failing in markupsafe module when running ansible
In-Reply-To: <1406743228.93.0.711963705177.issue22109@psf.upfronthosting.co.za>
Message-ID: <1406743254.2.0.0271060703549.issue22109@psf.upfronthosting.co.za>


Cory Klein added the comment:

Also to note: this is on OS X 10.10 Yosemite

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 20:03:59 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 18:03:59 +0000
Subject: [issue16907] Distutils fails to build extension in path with spaces
In-Reply-To: <1357734162.78.0.136546351961.issue16907@psf.upfronthosting.co.za>
Message-ID: <1406743439.96.0.83499529976.issue16907@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Of the two issues mentioned in msg179485 #4508 is still open but #13765 has been closed "not a bug".

----------
nosy: +BreamoreBoy
versions: +Python 3.4, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 20:04:22 2014
From: report at bugs.python.org (Drekin)
Date: Wed, 30 Jul 2014 18:04:22 +0000
Subject: [issue17620] Python interactive console doesn't use sys.stdin for
 input
In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za>
Message-ID: <1406743462.38.0.943437303029.issue17620@psf.upfronthosting.co.za>


Drekin added the comment:

My naive picture of ideal situation looks like this: When the interactive loop wants input, it just calls sys.stdin.readline, which delegates to sys.stdin.buffer.raw.readinto or .read, these can use GNU readline if available to get the data. May I ask, what's wrong with my picture?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 20:05:36 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Wed, 30 Jul 2014 18:05:36 +0000
Subject: [issue22106] Python 2 docs 'control flow/pass' section contains bad
 example
In-Reply-To: <1406717229.88.0.0475217386951.issue22106@psf.upfronthosting.co.za>
Message-ID: <1406743536.59.0.443736990451.issue22106@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

Sorry Charles, this is a non-issue.  The section does a great job communicating what "pass" does.  It has been in the docs since 2007 and no harm has come of it.

----------
nosy: +rhettinger
resolution:  -> not a bug
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 20:06:08 2014
From: report at bugs.python.org (Ezio Melotti)
Date: Wed, 30 Jul 2014 18:06:08 +0000
Subject: [issue22106] Python 2 docs 'control flow/pass' section contains bad
 example
In-Reply-To: <1406717229.88.0.0475217386951.issue22106@psf.upfronthosting.co.za>
Message-ID: <1406743568.77.0.98993027689.issue22106@psf.upfronthosting.co.za>


Changes by Ezio Melotti :


----------
stage:  -> resolved

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 20:11:10 2014
From: report at bugs.python.org (R. David Murray)
Date: Wed, 30 Jul 2014 18:11:10 +0000
Subject: [issue22109] Python failing in markupsafe module when running ansible
In-Reply-To: <1406743228.93.0.711963705177.issue22109@psf.upfronthosting.co.za>
Message-ID: <1406743870.16.0.834309216793.issue22109@psf.upfronthosting.co.za>


R. David Murray added the comment:

As is indicated by the fact that markupsafe is in the 'site-packages' directory, markupsafe is a 3rd party library and is not part of the python standard library.  Most likely the version of markupsafe you have does not match the one ansible is expecting, but if that isn't enough info to solve your problem you should reach out for support from the anisble community.

----------
nosy: +r.david.murray
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 20:17:54 2014
From: report at bugs.python.org (Cory Klein)
Date: Wed, 30 Jul 2014 18:17:54 +0000
Subject: [issue22109] Python failing in markupsafe module when running ansible
In-Reply-To: <1406743228.93.0.711963705177.issue22109@psf.upfronthosting.co.za>
Message-ID: <1406744274.52.0.473816435941.issue22109@psf.upfronthosting.co.za>


Cory Klein added the comment:

I'll track things down in that direction. Thanks, David.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 20:31:53 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Wed, 30 Jul 2014 18:31:53 +0000
Subject: [issue17620] Python interactive console doesn't use sys.stdin for
 input
In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za>
Message-ID: <1406745113.63.0.904086028995.issue17620@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

sys.stdin.readline() never delegates to GNU readline.  The REPL calls GNU readline directly.  There's clearly some condition that determines whether to call GNU readline or sys.stdin.readline, but it may not correspond to what you want (e.g. it may just test whether FD 0 is a tty).  Can you find in the CPython source code where this determination is made?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 20:45:55 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 30 Jul 2014 18:45:55 +0000
Subject: [issue2771] Test issue
In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za>
Message-ID: <1406745955.57.0.770145781491.issue2771@psf.upfronthosting.co.za>


Changes by Terry J. Reedy :


----------
status: closed -> 

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 20:46:31 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 30 Jul 2014 18:46:31 +0000
Subject: [issue2771] Test issue
In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za>
Message-ID: <1406745991.06.0.739004870196.issue2771@psf.upfronthosting.co.za>


Changes by Terry J. Reedy :


----------
priority:  -> low
resolution: not a bug -> 
status:  -> open

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 20:46:54 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 30 Jul 2014 18:46:54 +0000
Subject: [issue2771] Test issue
In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za>
Message-ID: <1406746014.26.0.428944458062.issue2771@psf.upfronthosting.co.za>


Changes by Terry J. Reedy :


----------
priority: low -> 

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 20:49:34 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 30 Jul 2014 18:49:34 +0000
Subject: [issue18885] handle EINTR in the stdlib
In-Reply-To: <1377874955.28.0.258891288899.issue18885@psf.upfronthosting.co.za>
Message-ID: <1406746174.49.0.362967886922.issue18885@psf.upfronthosting.co.za>


STINNER Victor added the comment:

FYI Charles-Fran?ois and me are working on a PEP to address this issue: the PEP 475. The PEP is not ready yet for a review.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 20:53:37 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 30 Jul 2014 18:53:37 +0000
Subject: [issue22108] python c api wchar_t*/char* passing contradiction
In-Reply-To: <1406740242.49.0.577134590981.issue22108@psf.upfronthosting.co.za>
Message-ID: <1406746417.54.0.63516615128.issue22108@psf.upfronthosting.co.za>


STINNER Victor added the comment:

This issue is why I created the issue #18395.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 21:37:16 2014
From: report at bugs.python.org (Zachary Ware)
Date: Wed, 30 Jul 2014 19:37:16 +0000
Subject: [issue16383] Python 3.3 Permission Error with User Library on Windows
In-Reply-To: <1351790923.15.0.230780432409.issue16383@psf.upfronthosting.co.za>
Message-ID: <1406749036.73.0.582670090458.issue16383@psf.upfronthosting.co.za>


Zachary Ware added the comment:

Jim, is there any way you could cut down your example to something small and self-contained?  It may be that the process of doing that leads to a problem in your code.  As it is, I cannot reproduce your error, or pick out what might be causing it.  From a brief glance, I have a few suggestions, though:

- Don't use sys.path[0] to determine where the file lives, it's not a reliable indicator.  Try using 'os.path.dirname(__file__)' instead (or 'os.path.dirname(os.path.abspath(__file__))' if __file__ is relative, which should only be the case when passing the filename directly to Python as a relative path).
- Use 'os.path.join()' instead of adding strings to make paths.  Shouldn't matter, but makes things cleaner.
- (Unrelated, but) it's really not very nice to change the display color without changing it back.  On Windows, 'color' affects the entire window, not just your output, and it lasts past the death of your process.

Until you can provide a short (200 lines or less across 5 files or less) reproducer, there's not much we can do, so I'm closing the issue.  If you can provide one, please do so and I'll happily take a look!

----------
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 21:44:45 2014
From: report at bugs.python.org (Demian Brecht)
Date: Wed, 30 Jul 2014 19:44:45 +0000
Subject: [issue15082] [httplib] httplib.BadStatusLine on any HTTPS connection
 in certain unknown cases.
In-Reply-To: <1339811528.79.0.0690651710917.issue15082@psf.upfronthosting.co.za>
Message-ID: <1406749485.41.0.826067573271.issue15082@psf.upfronthosting.co.za>


Changes by Demian Brecht :


----------
nosy: +demian.brecht

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 22:05:59 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 20:05:59 +0000
Subject: [issue13719] bdist_msi upload fails
In-Reply-To: <1325855918.9.0.207720990162.issue13719@psf.upfronthosting.co.za>
Message-ID: <1406750759.42.0.378826177743.issue13719@psf.upfronthosting.co.za>


Changes by Mark Lawrence :


----------
components:  -Distutils2
nosy: +dstufft
versions: +Python 3.5 -3rd party, Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 22:07:19 2014
From: report at bugs.python.org (Brian Curtin)
Date: Wed, 30 Jul 2014 20:07:19 +0000
Subject: [issue13719] bdist_msi upload fails
In-Reply-To: <1325855918.9.0.207720990162.issue13719@psf.upfronthosting.co.za>
Message-ID: <1406750839.8.0.547624568721.issue13719@psf.upfronthosting.co.za>


Changes by Brian Curtin :


----------
nosy:  -brian.curtin

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 22:29:02 2014
From: report at bugs.python.org (Zachary Ware)
Date: Wed, 30 Jul 2014 20:29:02 +0000
Subject: [issue10572] Move test sub-packages to Lib/test
In-Reply-To: <1290991979.58.0.262973706564.issue10572@psf.upfronthosting.co.za>
Message-ID: <1406752142.57.0.47093217925.issue10572@psf.upfronthosting.co.za>


Zachary Ware added the comment:

I'm in favor of a move, especially for ctypes, sqlite3, unittest, and tkinter, and don't really see a reason not to move distutils and lib2to3.  The IDLE tests make a certain amount of sense to stay in the idlelib folder, just because IDLE is a special case.  I'm pretty sure that covers all of the packages that still have tests outside of the test package.

I think the movements should only happen on 3.5; merging forward isn't nearly as much of an issue here in the days of hg, and backports to 2.7 should be becoming fewer and farther between.

I'd be happy to take care of making the moves, if we can decide that it's worth doing (or if it's left up to me :).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 23:31:21 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 21:31:21 +0000
Subject: [issue17371] Mismatch between Python 3.3 build environment and
 distutils compiler support
In-Reply-To: <1362625606.93.0.881246780096.issue17371@psf.upfronthosting.co.za>
Message-ID: <1406755881.3.0.37677432615.issue17371@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

According to http://matthew-brett.github.io/pydagogue/python_msvc.html Python 3.3 has always been compiled with 2010 on Windows so I think this can be closed as "user sorted it out for him/herself" :)

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 23:35:21 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 21:35:21 +0000
Subject: [issue17634] Win32: shutil.copy leaks file handles to child processes
In-Reply-To: <1365092598.25.0.167628873092.issue17634@psf.upfronthosting.co.za>
Message-ID: <1406756121.39.0.409977235149.issue17634@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

PEP 446 supersedes PEP 433.

----------
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 23:35:30 2014
From: report at bugs.python.org (paul j3)
Date: Wed, 30 Jul 2014 21:35:30 +0000
Subject: [issue12806] argparse: Hybrid help text formatter
In-Reply-To: <1313973978.37.0.422477813424.issue12806@psf.upfronthosting.co.za>
Message-ID: <1406756130.59.0.776467476206.issue12806@psf.upfronthosting.co.za>


paul j3 added the comment:

In http://bugs.python.org/issue22029 argparse
CSS white-space: like control for individual text blocks

I propose a set of `str` subclasses that can be used to define the wrapping style of individual text blocks. The idea is adapted from the HTML '
' tag, and the CSS white-space: option.

`argparse.WhitespaceStyle` is a cover class that defines various utility methods, including `_str_format` which handles all of the `%` formatting.  The individual subclasses implement their own version of `_split_lines` and `_fill_text`.  I chose a standard set of classes based on the CSS white-space options:

Normal() - full white space compression and wrapping.  This is the default default of text in `argparse`.

Pre() - preformatting, the same as the `Raw` formatters

NoWrap() - Pre plus whitespace compression

PreLine()

PreWrap()

In `HelpFormatter`, `_split_lines`, `_fill_lines`, `_str_format` delegate the action to text's own methods.  Plain text is handled as `Normal()`.

I also defined a `WSList` class.  This is a list of Style class objects. It has the same API as the Style classes, iterating over the items.

Where possible these methods try to return an object of the same type as self.
------------------

Here I demonstrate two ways that these classes could be used to implement a hybrid formatter.

The first is a simple adaptation of the `PareML` formatter from `paraformatter.py`.  It shows how a custom style class could be defined.

The second is defines a `preformat` function, which converts the text block into a `WSList`, a list of style text objects.  The wrappable paragraphs are `Normal()`, the preformatted indented lines are `Pre()`. Blank lines are `Pre(' ')`.

I've explored writing a `Hanging` class, which performs a hanging indent on list item sentences.

----------
Added file: http://bugs.python.org/file36168/try_12806_4.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 23:39:54 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 30 Jul 2014 21:39:54 +0000
Subject: [issue17634] Win32: shutil.copy leaks file handles to child processes
In-Reply-To: <1365092598.25.0.167628873092.issue17634@psf.upfronthosting.co.za>
Message-ID: <1406756394.85.0.94778763519.issue17634@psf.upfronthosting.co.za>


STINNER Victor added the comment:

The issue has been fixed in Python 3.4 with the PEP 446. I close this issue.

If you would like to enhance shutil.copyfile() by using CopyFile() on Windows, please open a new issue.

----------
resolution:  -> fixed
status: open -> closed
versions:  -Python 2.7, Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 23:41:43 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 21:41:43 +0000
Subject: [issue18069] Subprocess picks the wrong executable on Windows
In-Reply-To: <1369595742.19.0.584828873115.issue18069@psf.upfronthosting.co.za>
Message-ID: <1406756503.97.0.859879756723.issue18069@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Who is best placed to look at this, there's nobody active on the experts list for subprocess?

----------
components: +Library (Lib) -Interpreter Core
nosy: +BreamoreBoy
versions: +Python 3.4, Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 23:46:32 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 21:46:32 +0000
Subject: [issue13123] bdist_wininst uninstaller does not remove pycache
 directories
In-Reply-To: <1318000960.21.0.140069466315.issue13123@psf.upfronthosting.co.za>
Message-ID: <1406756792.02.0.00900677355179.issue13123@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Just a gentle reminder.

----------
nosy: +BreamoreBoy
versions: +Python 3.4, Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 23:49:46 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 21:49:46 +0000
Subject: [issue14105] Breakpoints in debug lost if line is inserted; IDLE
In-Reply-To: <1330047327.02.0.291761854329.issue14105@psf.upfronthosting.co.za>
Message-ID: <1406756986.33.0.296063934205.issue14105@psf.upfronthosting.co.za>


Changes by Mark Lawrence :


----------
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 23:51:19 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 21:51:19 +0000
Subject: [issue14111] IDLE Debugger should handle interrupts
In-Reply-To: <1330112839.68.0.0096879566667.issue14111@psf.upfronthosting.co.za>
Message-ID: <1406757079.89.0.214835356468.issue14111@psf.upfronthosting.co.za>


Changes by Mark Lawrence :


----------
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 23:51:41 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Wed, 30 Jul 2014 21:51:41 +0000
Subject: [issue22110] enable extra compilation warnings
Message-ID: <1406757101.06.0.990367547704.issue22110@psf.upfronthosting.co.za>


New submission from Charles-Fran?ois Natali:

The patch attached enables -Wsign-compare and -Wunreachable-code if supported by the compiler.
AFAICT, mixed sign comparison warning is automatically enabled by Microsoft's compiler, and is usually a good thing.
It does add some warnings though.

As for unreachable code, it's also usually a good thing, since it can be a source of bugs. Note that it's not enabled in debug mode, since in debug mode the code paths aren't the same.

----------
components: Build
files: extra_warnings.diff
keywords: patch
messages: 224349
nosy: haypo, neologix, pitrou
priority: normal
severity: normal
status: open
title: enable extra compilation warnings
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file36169/extra_warnings.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 23:56:08 2014
From: report at bugs.python.org (Paul Moore)
Date: Wed, 30 Jul 2014 21:56:08 +0000
Subject: [issue13123] bdist_wininst uninstaller does not remove pycache
 directories
In-Reply-To: <1318000960.21.0.140069466315.issue13123@psf.upfronthosting.co.za>
Message-ID: <1406757368.12.0.0835759335926.issue13123@psf.upfronthosting.co.za>


Paul Moore added the comment:

I'm not sure how relevant this is any more, as pip is the preferred installer these days and it cleanly uninstalls projects. At least for my usage, I no longer use wininst installers at all. I won't close this myself, though, as the issue still exists. But I won't object if it is closed as "wontfix".

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Wed Jul 30 23:58:50 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 21:58:50 +0000
Subject: [issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows
In-Reply-To: <1393854882.06.0.561987523346.issue20844@psf.upfronthosting.co.za>
Message-ID: <1406757530.39.0.632265176561.issue20844@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

I've tried to make the title more meaningful, feel free to change it if you can think of something better.

----------
components: +Interpreter Core
nosy: +tim.golden, zach.ware
title: coding bug remains in 3.3.5rc2 -> SyntaxError: encoding problem: iso-8859-1 on Windows
type:  -> behavior
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 00:02:54 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 22:02:54 +0000
Subject: [issue12197] non-blocking SSL write fails if a partial write was
 issued
In-Reply-To: <1306519609.32.0.152577977388.issue12197@psf.upfronthosting.co.za>
Message-ID: <1406757774.97.0.305429819822.issue12197@psf.upfronthosting.co.za>


Changes by Mark Lawrence :


----------
versions: +Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 00:05:54 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 22:05:54 +0000
Subject: [issue19007] precise time.time() under Windows 8
In-Reply-To: <1379015074.37.0.397731646491.issue19007@psf.upfronthosting.co.za>
Message-ID: <1406757954.14.0.424375420973.issue19007@psf.upfronthosting.co.za>


Changes by Mark Lawrence :


----------
nosy: +steve.dower, tim.golden, zach.ware
versions: +Python 3.5 -Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 00:07:19 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 22:07:19 +0000
Subject: [issue18402] Finding perl64
In-Reply-To: <1373261873.64.0.61453379281.issue18402@psf.upfronthosting.co.za>
Message-ID: <1406758039.78.0.0388318757603.issue18402@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Can ths be closed as "not a bug"?

----------
nosy: +BreamoreBoy -brian.curtin

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 00:17:17 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 22:17:17 +0000
Subject: [issue9122] Problems with multiprocessing,
 Python embedding and Windows
In-Reply-To: <1277847282.9.0.57284514454.issue9122@psf.upfronthosting.co.za>
Message-ID: <1406758637.56.0.168895876801.issue9122@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Can this be closed as "out of date"?

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 00:18:28 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 30 Jul 2014 22:18:28 +0000
Subject: [issue22110] enable extra compilation warnings
In-Reply-To: <1406757101.06.0.990367547704.issue22110@psf.upfronthosting.co.za>
Message-ID: <1406758708.93.0.641221903741.issue22110@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

+1 from me.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 00:21:00 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 22:21:00 +0000
Subject: [issue18295] Possible integer overflow in PyCode_New()
In-Reply-To: <1372108745.44.0.114375127897.issue18295@psf.upfronthosting.co.za>
Message-ID: <1406758860.86.0.0855442939714.issue18295@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Note this is referenced from #18407.

----------
nosy: +BreamoreBoy
versions: +Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 00:24:20 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 22:24:20 +0000
Subject: [issue18407] Fix compiler warnings in pythoncore for Win64
In-Reply-To: <1373310575.24.0.067873985204.issue18407@psf.upfronthosting.co.za>
Message-ID: <1406759060.65.0.859104290267.issue18407@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Can we have the stage set to patch review please.

----------
nosy: +BreamoreBoy -brian.curtin
versions: +Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 00:27:11 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Wed, 30 Jul 2014 22:27:11 +0000
Subject: [issue18477] fix_import (2to3 fixer) is not case-sensitive
In-Reply-To: <1374009050.19.0.500947498255.issue18477@psf.upfronthosting.co.za>
Message-ID: <1406759231.87.0.0254675396715.issue18477@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Can we set the stage to patch review please.

----------
nosy: +BreamoreBoy
versions: +Python 3.4, Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 00:32:54 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 30 Jul 2014 22:32:54 +0000
Subject: [issue19007] precise time.time() under Windows 8
In-Reply-To: <1379015074.37.0.397731646491.issue19007@psf.upfronthosting.co.za>
Message-ID: <1406759574.04.0.371560661078.issue19007@psf.upfronthosting.co.za>


STINNER Victor added the comment:

My patch for the issue #22043 replaces the _PyTime_timeval structure (10^-6 second resolution, 1 us) with a _PyTime_timespec structure (10^-9 second resolution, 1 ns). It may help for this issue.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 00:33:11 2014
From: report at bugs.python.org (Ezio Melotti)
Date: Wed, 30 Jul 2014 22:33:11 +0000
Subject: [issue18477] fix_import (2to3 fixer) is not case-sensitive
In-Reply-To: <1374009050.19.0.500947498255.issue18477@psf.upfronthosting.co.za>
Message-ID: <1406759591.68.0.775928565976.issue18477@psf.upfronthosting.co.za>


Changes by Ezio Melotti :


----------
stage:  -> test needed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 00:36:54 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 30 Jul 2014 22:36:54 +0000
Subject: [issue22110] enable extra compilation warnings
In-Reply-To: <1406757101.06.0.990367547704.issue22110@psf.upfronthosting.co.za>
Message-ID: <1406759814.96.0.833647487529.issue22110@psf.upfronthosting.co.za>


STINNER Victor added the comment:

The patch adds a a lot of new warnings. Would it be possible to fix them before applying the patch?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 00:51:08 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 30 Jul 2014 22:51:08 +0000
Subject: [issue15443] datetime module has no support for nanoseconds
In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za>
Message-ID: <1406760668.63.0.159533057356.issue15443@psf.upfronthosting.co.za>


STINNER Victor added the comment:

My patch for the issue #22043 adds nanosecond precision to get the system clock.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 01:25:11 2014
From: report at bugs.python.org (Roundup Robot)
Date: Wed, 30 Jul 2014 23:25:11 +0000
Subject: [issue22068] test_idle leaks uncollectable objects
In-Reply-To: <1406302499.67.0.809982435329.issue22068@psf.upfronthosting.co.za>
Message-ID: <3hNrT30Fvyz7Ljd@mail.python.org>


Roundup Robot added the comment:

New changeset 6b7f189daa62 by Terry Jan Reedy in branch '2.7':
Issue #22068: Don't create self reference cycles in idlelib.ConfigDialog.
http://hg.python.org/cpython/rev/6b7f189daa62

New changeset 1927f47a1838 by Terry Jan Reedy in branch '3.4':
Issue #22068: Don't create self reference cycles in idlelib.ConfigDialog.
http://hg.python.org/cpython/rev/1927f47a1838

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 01:25:54 2014
From: report at bugs.python.org (Ned Deily)
Date: Wed, 30 Jul 2014 23:25:54 +0000
Subject: [issue22085] Drop support of Tk 8.3
In-Reply-To: <1406396007.9.0.890469508876.issue22085@psf.upfronthosting.co.za>
Message-ID: <1406762754.52.0.355579092972.issue22085@psf.upfronthosting.co.za>


Ned Deily added the comment:

The checkin seems to have broken test_idle and test_ttk_guionly.  Typical failure:

======================================================================
ERROR: test_horizontal_range (tkinter.test.test_ttk.test_extensions.LabeledScaleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/py/dev/3x/root/fwn/Library/Frameworks/pytest_10.9.framework/Versions/3.5/lib/python3.5/tkinter/test/test_ttk/test_extensions.py", line 112, in test_horizontal_range
    lscale = ttk.LabeledScale(from_=0, to=10)
  File "/py/dev/3x/root/fwn/Library/Frameworks/pytest_10.9.framework/Versions/3.5/lib/python3.5/tkinter/ttk.py", line 1508, in __init__
    self.__tracecb = self._variable.trace_variable('w', self._adjust)
  File "/py/dev/3x/root/fwn/Library/Frameworks/pytest_10.9.framework/Versions/3.5/lib/python3.5/tkinter/__init__.py", line 248, in trace_variable
    self._tk.call("trace", "add", "variable", self._name, mode, cbname)
_tkinter.TclError: bad operation "w": must be array, read, unset, or write

----------
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 01:32:43 2014
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 30 Jul 2014 23:32:43 +0000
Subject: [issue22068] tkinter: avoid reference loops with Variables and Fonts
In-Reply-To: <1406302499.67.0.809982435329.issue22068@psf.upfronthosting.co.za>
Message-ID: <1406763163.45.0.239307726167.issue22068@psf.upfronthosting.co.za>


Terry J. Reedy added the comment:

-R no longer finds leaks with current Idle tests. There might still be some in modules not tested.

----------
components:  -IDLE, Tests
title: test_idle leaks uncollectable objects -> tkinter: avoid reference loops with Variables and Fonts

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 01:44:55 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 30 Jul 2014 23:44:55 +0000
Subject: [issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C
 properly
In-Reply-To: <1375175592.24.0.539816782076.issue18597@psf.upfronthosting.co.za>
Message-ID: <1406763895.38.0.221917786671.issue18597@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 01:45:51 2014
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 30 Jul 2014 23:45:51 +0000
Subject: [issue19007] precise time.time() under Windows 8: use
 GetSystemTimePreciseAsFileTime
In-Reply-To: <1379015074.37.0.397731646491.issue19007@psf.upfronthosting.co.za>
Message-ID: <1406763951.8.0.602883834983.issue19007@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
title: precise time.time() under Windows 8 -> precise time.time() under Windows 8: use GetSystemTimePreciseAsFileTime

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 01:57:16 2014
From: report at bugs.python.org (Jonas Jelten)
Date: Wed, 30 Jul 2014 23:57:16 +0000
Subject: [issue22108] python c api wchar_t*/char* passing contradiction
In-Reply-To: <1406740242.49.0.577134590981.issue22108@psf.upfronthosting.co.za>
Message-ID: <1406764636.69.0.615704136522.issue22108@psf.upfronthosting.co.za>


Jonas Jelten added the comment:

I'd say Python should definitely change its internal string type to char*. Exposing "handy" wchar_t->char conversion functions don't resolve the data represenation enhancement.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 02:06:48 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 31 Jul 2014 00:06:48 +0000
Subject: [issue22043] Use a monotonic clock to compute timeouts
In-Reply-To: <1406081401.66.0.461602325424.issue22043@psf.upfronthosting.co.za>
Message-ID: <1406765208.22.0.107284398459.issue22043@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Status of CLOCK_MONOTONIC in Hurd:
https://github.com/ArneBab/hurd-web/blob/master/open_issues/clock_gettime.mdwn

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 02:11:39 2014
From: report at bugs.python.org (Alexander Belopolsky)
Date: Thu, 31 Jul 2014 00:11:39 +0000
Subject: [issue22043] Use a monotonic clock to compute timeouts
In-Reply-To: <1406081401.66.0.461602325424.issue22043@psf.upfronthosting.co.za>
Message-ID: <1406765499.43.0.967910784375.issue22043@psf.upfronthosting.co.za>


Changes by Alexander Belopolsky :


----------
nosy: +belopolsky

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 02:13:32 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Thu, 31 Jul 2014 00:13:32 +0000
Subject: [issue22043] Use a monotonic clock to compute timeouts
In-Reply-To: <1406081401.66.0.461602325424.issue22043@psf.upfronthosting.co.za>
Message-ID: <1406765612.72.0.938145958278.issue22043@psf.upfronthosting.co.za>


Changes by Antoine Pitrou :


----------
nosy: +neologix

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 02:14:06 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Thu, 31 Jul 2014 00:14:06 +0000
Subject: [issue22110] enable extra compilation warnings
In-Reply-To: <1406757101.06.0.990367547704.issue22110@psf.upfronthosting.co.za>
Message-ID: <1406765646.98.0.90985246905.issue22110@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

Enabling the warnings may be a good incitation for other people to fix them ;)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 02:28:41 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Thu, 31 Jul 2014 00:28:41 +0000
Subject: [issue17371] Mismatch between Python 3.3 build environment and
 distutils compiler support
In-Reply-To: <1362625606.93.0.881246780096.issue17371@psf.upfronthosting.co.za>
Message-ID: <1406766521.92.0.966461396823.issue17371@psf.upfronthosting.co.za>


Changes by Antoine Pitrou :


----------
nosy: +loewis, steve.dower

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 02:33:48 2014
From: report at bugs.python.org (Ezio Melotti)
Date: Thu, 31 Jul 2014 00:33:48 +0000
Subject: [issue22110] enable extra compilation warnings
In-Reply-To: <1406757101.06.0.990367547704.issue22110@psf.upfronthosting.co.za>
Message-ID: <1406766828.78.0.575651614476.issue22110@psf.upfronthosting.co.za>


Changes by Ezio Melotti :


----------
nosy: +ezio.melotti

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 02:42:39 2014
From: report at bugs.python.org (Milan Oberkirch)
Date: Thu, 31 Jul 2014 00:42:39 +0000
Subject: [issue22111] Improve imaplib testsuite.
Message-ID: <1406767358.21.0.322738125164.issue22111@psf.upfronthosting.co.za>


New submission from Milan Oberkirch:

The status quo of test_imaplib is a bit frustrating: 4 test functions out of 31 get executed by default while only few seem to need any resources.

I tried to solve this in the attached patch. Did I get something wrong or was that checking for network resources just a mistake?

----------
components: Tests
files: imaplib_test.patch
keywords: patch
messages: 224367
nosy: jesstess, pitrou, r.david.murray, zvyn
priority: normal
severity: normal
status: open
title: Improve imaplib testsuite.
versions: Python 3.5
Added file: http://bugs.python.org/file36170/imaplib_test.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 02:44:06 2014
From: report at bugs.python.org (Milan Oberkirch)
Date: Thu, 31 Jul 2014 00:44:06 +0000
Subject: [issue22111] Improve imaplib testsuite.
In-Reply-To: <1406767358.21.0.322738125164.issue22111@psf.upfronthosting.co.za>
Message-ID: <1406767446.87.0.78523417423.issue22111@psf.upfronthosting.co.za>


Changes by Milan Oberkirch :


Removed file: http://bugs.python.org/file36170/imaplib_test.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 02:45:42 2014
From: report at bugs.python.org (Milan Oberkirch)
Date: Thu, 31 Jul 2014 00:45:42 +0000
Subject: [issue22111] Improve imaplib testsuite.
In-Reply-To: <1406767358.21.0.322738125164.issue22111@psf.upfronthosting.co.za>
Message-ID: <1406767542.55.0.688362705879.issue22111@psf.upfronthosting.co.za>


Changes by Milan Oberkirch :


Added file: http://bugs.python.org/file36171/imaplib_test.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 02:58:31 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 31 Jul 2014 00:58:31 +0000
Subject: [issue22063] asyncio: sock_xxx() methods of event loops should check
 ath sockets are non-blocking
In-Reply-To: <1406244257.84.0.711370901169.issue22063@psf.upfronthosting.co.za>
Message-ID: <1406768311.32.0.355307040123.issue22063@psf.upfronthosting.co.za>


STINNER Victor added the comment:

I reopen the issue because the documentation is not correct. Using the proactor event loop, the socket doesn't need to be non-blocking. Should we mention it?

Another issue: BaseEventLoop.connect_read_pipe() doc says that the pipe is set to non-blocking mode, whereas BaseEventLoop.connect_read_pipe() doc requires that the pipe is already in non-blocking mode. On UNIX, both methods set the pipe to non-blocking mode.

It may also help to mention directly in BaseEventLoop.connect_read_pipe() doc that it is not available on Windows when using the SelectorEventLoop.

----------
resolution: fixed -> 
status: closed -> open

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 03:32:18 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Thu, 31 Jul 2014 01:32:18 +0000
Subject: [issue18402] Finding perl64
In-Reply-To: <1373261873.64.0.61453379281.issue18402@psf.upfronthosting.co.za>
Message-ID: <1406770338.57.0.544508139345.issue18402@psf.upfronthosting.co.za>


Changes by Antoine Pitrou :


----------
nosy: +steve.dower

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 03:41:18 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Thu, 31 Jul 2014 01:41:18 +0000
Subject: [issue22089] collections.MutableSet does not provide update method
In-Reply-To: <1406441194.56.0.0212102514052.issue22089@psf.upfronthosting.co.za>
Message-ID: <1406770878.36.0.393840144727.issue22089@psf.upfronthosting.co.za>


Changes by Raymond Hettinger :


----------
resolution:  -> not a bug
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 03:42:56 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Thu, 31 Jul 2014 01:42:56 +0000
Subject: [issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't
 batch function arguments by chunks
In-Reply-To: <1298300689.71.0.822605356721.issue11271@psf.upfronthosting.co.za>
Message-ID: <1406770976.48.0.386585004514.issue11271@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

Thank you for the patch. I've posted some review comments. Two further remarks:

- this makes the ProcessPool API slightly different from the ThreadPool one. I wonder if this is acceptable or not. Thoughts?

- the patch would need unit tests for the additional functionality

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 03:47:44 2014
From: report at bugs.python.org (Larry Hastings)
Date: Thu, 31 Jul 2014 01:47:44 +0000
Subject: [issue20170] Derby #1: Convert 137 sites to Argument Clinic in
 Modules/posixmodule.c
In-Reply-To: <1389138185.8.0.104398826507.issue20170@psf.upfronthosting.co.za>
Message-ID: <1406771264.4.0.359571463874.issue20170@psf.upfronthosting.co.za>


Larry Hastings added the comment:

Two small fixes from Zach (thanks again Zach!) and I updated against current trunk so it should apply cleanly.  How's it look now?

----------
Added file: http://bugs.python.org/file36172/larry.clinicize.posixmodule.6.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 03:57:34 2014
From: report at bugs.python.org (Raymond Hettinger)
Date: Thu, 31 Jul 2014 01:57:34 +0000
Subject: [issue22101] collections.abc.Set doesn't provide copy() method
In-Reply-To: <1406669299.88.0.807816572925.issue22101@psf.upfronthosting.co.za>
Message-ID: <1406771854.3.0.564696522307.issue22101@psf.upfronthosting.co.za>


Raymond Hettinger added the comment:

I don't think this is needed nor do I think that it is a good idea to have a copy() method in the ABCs because they know so little about their concrete underlying class (perhaps the backing store in the filesystem or a database).   Besides, a user already has workable alternatives such as creating a new instance and applying |= to populate it.

In general, we don't do API expansions without motivating use cases to guide the design.  

Also, note that MutableMapping does not have a copy method.

----------
assignee:  -> rhettinger
resolution:  -> rejected
status: open -> closed
versions:  -Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 04:00:37 2014
From: report at bugs.python.org (Dan O'Reilly)
Date: Thu, 31 Jul 2014 02:00:37 +0000
Subject: [issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't
 batch function arguments by chunks
In-Reply-To: <1298300689.71.0.822605356721.issue11271@psf.upfronthosting.co.za>
Message-ID: <1406772037.24.0.67836931677.issue11271@psf.upfronthosting.co.za>


Dan O'Reilly added the comment:

re: Diverging ThreadPoolExecutor and ProcessPoolExecutor APIs. I thought about this as well. It would of course be possible to make ThreadPoolExecutor's API match, but it would serve no useful purpose that I can think of. I guess we could make the ThreadPoolExecutor API accept the chunksize argument just so the APIs match, but then not actually use it (and document that it's not used, of course). That would make it easier to switch between the two APIs, at least.

On the other hand, the two APIs are slightly different already: ThreadPoolExecutor requires max_workers be supplied, while ProcessPoolExecutor will default to multiprocessing.cpu_count(). So this wouldn't completely be without precedent.

Anyway, I will review your comments on the patch, add unit tests, and re-submit. Thanks!

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 04:23:28 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Thu, 31 Jul 2014 02:23:28 +0000
Subject: [issue22101] collections.abc.Set doesn't provide copy() method
In-Reply-To: <1406669299.88.0.807816572925.issue22101@psf.upfronthosting.co.za>
Message-ID: <1406773408.72.0.61847575903.issue22101@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

Agreed with Raymond.  The return type of copy() for ABCs feels problematic.  MutableMapping doesn't have it either.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 04:40:18 2014
From: report at bugs.python.org (Daniel Greenfeld)
Date: Thu, 31 Jul 2014 02:40:18 +0000
Subject: [issue22112] '_UnixSelectorEventLoop' object has no attribute
 'create_task'
Message-ID: <1406774418.2.0.505776361437.issue22112@psf.upfronthosting.co.za>


New submission from Daniel Greenfeld:

Problem
========

The documentation on asyncio provides an example of a parallel execution of tasks. The code is at: https://docs.python.org/3/library/asyncio-task.html#example-parallel-execution-of-tasks

``` python
import asyncio
 
@asyncio.coroutine
def factorial(name, number):
    f = 1
    for i in range(2, number+1):
        print("Task %s: Compute factorial(%s)..." % (name, i))
        yield from asyncio.sleep(1)
        f *= i
    print("Task %s: factorial(%s) = %s" % (name, number, f))
 
loop = asyncio.get_event_loop()
tasks = [
    loop.create_task(factorial("A", 2)),
    loop.create_task(factorial("B", 3)),
    loop.create_task(factorial("C", 4))]
loop.run_until_complete(asyncio.wait(tasks))
loop.close()
```

Unfortunately, when I try to run this sample code on Python 3.4.1, I run into an error. Specifically, the `loop.create_task()` method does not exist:

``` python
Traceback (most recent call last):
  File "what_me_asynicio.py", line 14, in 
    loop.create_task(factorial("A", 2)),
AttributeError: '_UnixSelectorEventLoop' object has no attribute 'create_task'
```

When I perform a dir() on the `loop` object, no `create_task` item is in the result.

System Information
====================

Python Version: 3.4.1
Operating System: OSX 10.9.3
(Also confirmed on Python 3.4.0 in Ubuntu 14.04)

----------
assignee: docs at python
components: Documentation, Macintosh, asyncio
messages: 224374
nosy: docs at python, gvanrossum, haypo, pydanny, yselivanov
priority: normal
severity: normal
status: open
title: '_UnixSelectorEventLoop' object has no attribute 'create_task'
versions: Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 04:44:46 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Thu, 31 Jul 2014 02:44:46 +0000
Subject: [issue22063] asyncio: sock_xxx() methods of event loops should check
 ath sockets are non-blocking
In-Reply-To: <1406244257.84.0.711370901169.issue22063@psf.upfronthosting.co.za>
Message-ID: <1406774686.08.0.8464853197.issue22063@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

Hm.  I think there are two different situations.

One is where the app creates a socket (or other I/O thingie), passes it off to asyncio, and then asyncio owns it.  This is the case for pipes and also for the optional sock parameter for create_connection().  In these cases I think it is more robust of asyncio configures the FD for its own needs.

The other case is where the app and asyncio share the socket.  This is the case for e.g. sock_recv().  In this case I think it should be the app's responsibility to configure it properly.  Asyncio can check in debug mode, but otherwise it may be too expensive to check.  (Checking a socket object is actually fine, just check that gettimeout() returns 0; but checking a FD would require a syscall so don't do that in debug mode.)

So the docs for connect_write_pipe() have a bug. :-)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 04:47:33 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Thu, 31 Jul 2014 02:47:33 +0000
Subject: [issue22112] '_UnixSelectorEventLoop' object has no attribute
 'create_task'
In-Reply-To: <1406774418.2.0.505776361437.issue22112@psf.upfronthosting.co.za>
Message-ID: <1406774853.23.0.686358581071.issue22112@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

Thanks for reporting a doc bug!

The code should use asyncio.async() instead of loop.create_task().

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 05:10:56 2014
From: report at bugs.python.org (Daniel Greenfeld)
Date: Thu, 31 Jul 2014 03:10:56 +0000
Subject: [issue22112] '_UnixSelectorEventLoop' object has no attribute
 'create_task'
In-Reply-To: <1406774418.2.0.505776361437.issue22112@psf.upfronthosting.co.za>
Message-ID: <1406776256.48.0.857680489024.issue22112@psf.upfronthosting.co.za>


Daniel Greenfeld added the comment:

This has been fixed in 3.4.2, but shows up in the 3.4.1 documentation.

How do I fix the 3.4.1 documentation so this doesn't show up?

----------
Added file: http://bugs.python.org/file36173/Screen Shot 2014-07-30 at 8.13.12 PM.png

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 05:48:18 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Thu, 31 Jul 2014 03:48:18 +0000
Subject: [issue22112] '_UnixSelectorEventLoop' object has no attribute
 'create_task'
In-Reply-To: <1406774418.2.0.505776361437.issue22112@psf.upfronthosting.co.za>
Message-ID: <1406778498.29.0.914878278399.issue22112@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

I honestly don't know; ask Benjamin. :-)

Personally, I'd say that ship has sailed.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 06:57:13 2014
From: report at bugs.python.org (Roundup Robot)
Date: Thu, 31 Jul 2014 04:57:13 +0000
Subject: [issue22085] Drop support of Tk 8.3
In-Reply-To: <1406396007.9.0.890469508876.issue22085@psf.upfronthosting.co.za>
Message-ID: <3hNzr827Ntz7Ljg@mail.python.org>


Roundup Robot added the comment:

New changeset 9f333c06915f by Serhiy Storchaka in branch 'default':
Back out of changes to Tkinter variables trace commands (issue #22085).
http://hg.python.org/cpython/rev/9f333c06915f

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 06:57:13 2014
From: report at bugs.python.org (Roundup Robot)
Date: Thu, 31 Jul 2014 04:57:13 +0000
Subject: [issue21580] PhotoImage(data=...) apparently has to be UTF-8 or
 Base-64 encoded
In-Reply-To: <1401083544.46.0.470654104454.issue21580@psf.upfronthosting.co.za>
Message-ID: <3hNzr90QFyz7Ljg@mail.python.org>


Roundup Robot added the comment:

New changeset 818989a48e96 by Serhiy Storchaka in branch '2.7':
Issue #21580: Now Tkinter correctly handles binary "data" and "maskdata"
http://hg.python.org/cpython/rev/818989a48e96

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 08:12:12 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 31 Jul 2014 06:12:12 +0000
Subject: [issue22085] Drop support of Tk 8.3
In-Reply-To: <1406396007.9.0.890469508876.issue22085@psf.upfronthosting.co.za>
Message-ID: <1406787132.93.0.557860162286.issue22085@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Oh, I forgot about this difference. Of course we can convert input arguments to match new syntax, but "trace vinfo" and "trace info variable" return different results:

% trace add variable foo {read write} {tracer foo}
% trace info variable foo
{{read write} {tracer foo}}
% trace vinfo foo
{rw {tracer foo}}

We should add new methods for new trace commands.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 08:32:23 2014
From: report at bugs.python.org (Martin Panter)
Date: Thu, 31 Jul 2014 06:32:23 +0000
Subject: [issue11429] ctypes is highly eclectic in its raw-memory support
In-Reply-To: <1299484141.33.0.394671210882.issue11429@psf.upfronthosting.co.za>
Message-ID: <1406788343.93.0.400504226473.issue11429@psf.upfronthosting.co.za>


Changes by Martin Panter :


----------
nosy: +vadmium

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 09:33:13 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 31 Jul 2014 07:33:13 +0000
Subject: [issue21580] PhotoImage(data=...) apparently has to be UTF-8 or
 Base-64 encoded
In-Reply-To: <1401083544.46.0.470654104454.issue21580@psf.upfronthosting.co.za>
Message-ID: <1406791993.9.0.0293560007627.issue21580@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 09:36:15 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 31 Jul 2014 07:36:15 +0000
Subject: [issue22085] Drop support of Tk 8.3
In-Reply-To: <1406396007.9.0.890469508876.issue22085@psf.upfronthosting.co.za>
Message-ID: <1406792175.2.0.478243312143.issue22085@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Yet one incompatibility is that callbacks set but old command are called with last argument one of 'r', 'w' or 'u', but callbacks set but old command are called with last argument one of 'read', 'write' or 'unset' (or 'array').

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 09:54:08 2014
From: report at bugs.python.org (Arnaud Fontaine)
Date: Thu, 31 Jul 2014 07:54:08 +0000
Subject: [issue21308] PEP 466: backport ssl changes
In-Reply-To: <9f606957-c0fc-42fe-b0e1-52ea1cb44333@email.android.com>
Message-ID: <1406793248.57.0.588924342705.issue21308@psf.upfronthosting.co.za>


Arnaud Fontaine added the comment:

Would it be possible to also backport the changes to httplib.py to support TLS SNI as many libraries (including setuptools) relies on this module to download files and some servers reject clients not supporting TLS SNI (such as cloud.github.com)? I have added a patch for Python 2.7.8. Thanks for working on the backports of SSL changes!

----------
nosy: +arnau
Added file: http://bugs.python.org/file36174/tls_sni_httplib.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 10:20:41 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Thu, 31 Jul 2014 08:20:41 +0000
Subject: [issue11955] 3.3 : test_argparse.py fails 'make test'
In-Reply-To: <1304093741.94.0.09129303291.issue11955@psf.upfronthosting.co.za>
Message-ID: <1406794841.64.0.801680152716.issue11955@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

@Ezio will you be following this up, specifically msg193970 ?

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 10:22:14 2014
From: report at bugs.python.org (Nick Coghlan)
Date: Thu, 31 Jul 2014 08:22:14 +0000
Subject: [issue21308] PEP 466: backport ssl changes
In-Reply-To: <9f606957-c0fc-42fe-b0e1-52ea1cb44333@email.android.com>
Message-ID: <1406794934.08.0.356429760536.issue21308@psf.upfronthosting.co.za>


Nick Coghlan added the comment:

Hi Arnaud, such a change is out of scope for PEP 466. To minimise the scale of the changes in a maintenance release, it was deliberately limited to provide the core infrastructure, so at least third party libraries like requests can support SNI in Python 2, without touching every networking module in the Python 2 standard library.

However, you're welcome to write a follow up PEP suggesting expanding the scope of the changes out to at least offering SNI support in other standard library modules. While I can't promise such a proposal would be approved, I do agree the question is worth asking. The risk of that change can then be independently assessed vs advising users that need SNI support in Python 2 to install a third party module like requests. (The bootstrapping problem is likely to be addressed by backporting the relevant parts of PEP 453, although that project too is in need of a volunteer to write the enhancement proposal).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 10:31:12 2014
From: report at bugs.python.org (Clayton Stangeland)
Date: Thu, 31 Jul 2014 08:31:12 +0000
Subject: [issue22113] memoryview and struct.pack_into
Message-ID: <1406795471.99.0.191583556895.issue22113@psf.upfronthosting.co.za>


New submission from Clayton Stangeland:

I expect struct.pack_into to work for a memoryview. Currently struct.pack_into throws an exception.

>>> import struct
>>> buf = bytearray(10)
>>> struct.pack_into(">> buf[0]
99
>>> view = memoryview(buf)
>>> view.readonly
False
>>> struct.pack_into("", line 1, in 
TypeError: expected a writeable buffer object
>>> view[0:1] = 'a'
>>> view[0]
'a'
>>> buf[0]
97
>>> chr(buf[0])
'a'

The memoryview is writeable and from what I can tell from the documentation it implements the buffer interface, but struct.pack_into will not use it.

----------
files: struct_pack_into.py
messages: 224386
nosy: stangelandcl
priority: normal
severity: normal
status: open
title: memoryview and struct.pack_into
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file36175/struct_pack_into.py

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 10:58:54 2014
From: report at bugs.python.org (Stefan Krah)
Date: Thu, 31 Jul 2014 08:58:54 +0000
Subject: [issue22113] memoryview and struct.pack_into
In-Reply-To: <1406795471.99.0.191583556895.issue22113@psf.upfronthosting.co.za>
Message-ID: <1406797134.33.0.930212356769.issue22113@psf.upfronthosting.co.za>


Stefan Krah added the comment:

This works in Python 3.3+. It is a bug in 2.7, so we have to wait for
someone motivated enough to work on an outdated Python version.

----------
components: +Interpreter Core
nosy: +skrah
stage:  -> needs patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 11:01:04 2014
From: report at bugs.python.org (Martin Panter)
Date: Thu, 31 Jul 2014 09:01:04 +0000
Subject: [issue15986] memoryview: expose 'buf' attribute
Message-ID: <1406797264.3.0.649972031411.issue15986@psf.upfronthosting.co.za>


Changes by Martin Panter :


----------
nosy: +vadmium

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 11:04:33 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 31 Jul 2014 09:04:33 +0000
Subject: [issue22112] '_UnixSelectorEventLoop' object has no attribute
 'create_task'
In-Reply-To: <1406774418.2.0.505776361437.issue22112@psf.upfronthosting.co.za>
Message-ID: <1406797473.6.0.804797806084.issue22112@psf.upfronthosting.co.za>


STINNER Victor added the comment:

> This has been fixed in 3.4.2, but shows up in the 3.4.1 documentation.

Well, I didn't want to change Python 3.4.1 documentation, but it looks like https://docs.python.org/3.4/ is updated after each commit into the 3.4 branch. For example, new asyncio functions added in 3.4.2 are already documented:

https://docs.python.org/3.4/library/asyncio-eventloop.html#asyncio.BaseEventLoop.create_task

I changeed all examples to use create_task() instaed of async() or the Task contructor:

changeset:   91609:66f06fbf8a2f
branch:      3.4
user:        Victor Stinner 
date:        Tue Jul 08 12:39:10 2014 +0200
files:       Doc/library/asyncio-dev.rst Doc/library/asyncio-eventloop.rst Doc/library/asyncio-stream.r
description:
Update asyncio documentation

- Document the new create_task() method
- "Hide" the Task class: point to the create_task() method for interoperability
- Rewrite the documentation of the Task class
- Document the "Pending task destroyed"
- Update output in debug mode of examples in the dev section
- Replace Task() with create_task() in examples


Maybe I should revert this change in the 3.4 branch, but mention that Python 3.4.2 and 3.5 have a new create_task() which is now the recommanded way to schedule a coroutine (to create a task object).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 12:54:48 2014
From: report at bugs.python.org (Josh Rosenberg)
Date: Thu, 31 Jul 2014 10:54:48 +0000
Subject: [issue15986] memoryview: expose 'buf' attribute
Message-ID: <1406804088.12.0.41195183921.issue15986@psf.upfronthosting.co.za>


New submission from Josh Rosenberg:

To do what?

----------
nosy: +josh.rosenberg

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 13:13:17 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 31 Jul 2014 11:13:17 +0000
Subject: [issue22043] Use a monotonic clock to compute timeouts
In-Reply-To: <1406081401.66.0.461602325424.issue22043@psf.upfronthosting.co.za>
Message-ID: <1406805197.41.0.570635320999.issue22043@psf.upfronthosting.co.za>


STINNER Victor added the comment:

pymonotonic.patch is large and difficult to review. I prefer to split it into two parts:

- pytimespec.patch: Change pytime.h to use _PyTimeSpec structure (nanosecond resolution) instead of _PyTime_timeval structure (microsecond resolution)

- pymonotonic-2.patch: Add _PyTimeSpec_monotonic() and _PyTimeSpec_monotonic_info()

----------
Added file: http://bugs.python.org/file36176/pytimespec.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 13:13:33 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 31 Jul 2014 11:13:33 +0000
Subject: [issue22043] Use a monotonic clock to compute timeouts
In-Reply-To: <1406081401.66.0.461602325424.issue22043@psf.upfronthosting.co.za>
Message-ID: <1406805213.24.0.291526773521.issue22043@psf.upfronthosting.co.za>


Changes by STINNER Victor :


Added file: http://bugs.python.org/file36177/pymonotonic-2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 13:14:49 2014
From: report at bugs.python.org (Missy Gomrz)
Date: Thu, 31 Jul 2014 11:14:49 +0000
Subject: [issue12312] is ok
In-Reply-To: 
Message-ID: 


Missy Gomrz added the comment:

Re: is ol

missy orr

----------
nosy: +Missy.Gomrz

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 13:24:28 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 31 Jul 2014 11:24:28 +0000
Subject: [issue22043] Use a monotonic clock to compute timeouts
In-Reply-To: <1406081401.66.0.461602325424.issue22043@psf.upfronthosting.co.za>
Message-ID: <1406805868.83.0.208631234672.issue22043@psf.upfronthosting.co.za>


STINNER Victor added the comment:

pytimespec.patch removes *private* functions which were exposed in the stable ABI:

- _PyTime_gettimeofday()
- _PyTime_gettimeofday_info()

It also removes private macros:

- _PyTime_ADD_SECONDS()
- _PyTime_INTERVAL()

In pymonotonic.patch, I reused the same name but I didn't notice that they were part of the stable ABI. In pymonotonic-2.patch, I changed names so the dynamic loader will not load a module and the compiler will complain that symbols are missing.

Replaced/renamed functions:

- _PyTime_gettimeofday() => _PyTimeSpec_get_time()
- _PyTime_gettimeofday_info() => _PyTimeSpec_get_time_info()
- _PyTime_ADD_SECONDS() => _PyTimeSpec_add_sec()
- _PyTime_INTERVAL() => _PyTimeSpec_interval_sec()

I aslo added new functions:

- _PyTimeSpec_add_us()
- _PyTimeSpec_interval_us()

On overflow, _PyTimeSpec_add_sec() and _PyTimeSpec_add_us() sets the timestamp to the maximum value instead of returning an undefined value. I prefer functions over macros because I want to return an error on overflow (even if it's not used).

_PyTimeSpec_interval_us() also returns the maximum value in case of overflow.

_PyTimeSpec_interval_sec() should maybe take a mandatory round parameter instead of always rounding up.

I added _PyTime_unit_t for _threadmodule.c because acquire_timed() has a PY_TIMEOUT_T type which can be a long long. Maybe acquire_timed() can return an error if the timeout is too large, or loop? I would prefer to avoid this custom _PyTime_unit_t type.

I should maybe add unit tests for _PyTimeSpec_add_*() and _PyTimeSpec_interval_*() functions, as I did for _PyLong_FromTime_t(), _PyTime_ObjectToTimeval(), etc.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 13:25:04 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 31 Jul 2014 11:25:04 +0000
Subject: [issue22043] Use a monotonic clock to compute timeouts
In-Reply-To: <1406081401.66.0.461602325424.issue22043@psf.upfronthosting.co.za>
Message-ID: <1406805904.48.0.680324468844.issue22043@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Oh, pymonotonic-2.patch didn't get its "review" link because it depends on pytimespec.patch which is not merged yet.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 13:29:50 2014
From: report at bugs.python.org (Martin Panter)
Date: Thu, 31 Jul 2014 11:29:50 +0000
Subject: [issue15986] memoryview: expose 'buf' attribute
In-Reply-To: <1406804088.12.0.41195183921.issue15986@psf.upfronthosting.co.za>
Message-ID: <1406806190.85.0.235686961068.issue15986@psf.upfronthosting.co.za>


Martin Panter added the comment:

This issue was linked from . I was looking for ways to pass read-only memory views into ?ctypes? without copying memory, and came across that thread. Assuming this ?buf? attribute points to the memory of the memory view, it could then be passed to ?ctypes.c_void_p? or ?_CData.from_address?.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 13:30:47 2014
From: report at bugs.python.org (Martin Panter)
Date: Thu, 31 Jul 2014 11:30:47 +0000
Subject: [issue11427] ctypes from_buffer no longer accepts bytes
In-Reply-To: <1299481885.21.0.0627562040827.issue11427@psf.upfronthosting.co.za>
Message-ID: <1406806247.79.0.0915292007301.issue11427@psf.upfronthosting.co.za>


Martin Panter added the comment:

For the record, I have been (ab?)using the ?c_char_p? type to get the address of immutable byte strings without copying memory:

>>> from ctypes import *
>>> data = b"123\x00abc"
>>> pubyte = cast(c_char_p(data), POINTER(c_ubyte))
>>> address = addressof(pubyte.contents)
>>> string_at(address, 7)
b'123\x00abc'
>>> # 2nd instance has same address, rather than memory copy:
... cast(c_char_p(data), c_void_p).value == address
True

In to the documentation, ?c_char_p? is only defined for zero-terminated strings, but it seems to also work for strings with embedded zero bytes. However it does not work for ?bytearray? objects (?from_buffer? should work instead), nor memory views.

----------
nosy: +vadmium

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 13:38:42 2014
From: report at bugs.python.org (Drekin)
Date: Thu, 31 Jul 2014 11:38:42 +0000
Subject: [issue17620] Python interactive console doesn't use sys.stdin for
 input
In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za>
Message-ID: <1406806722.36.0.595220864792.issue17620@psf.upfronthosting.co.za>


Drekin added the comment:

I looked to the sourcecode and found the following.

First, the codepath of how interactive loop gets its input follows:
Python/pythonrun.c:PyRun_InteractiveLoopFlags
Python/pythonrun.c:PyRun_InteractiveOneObject
Python/pythonrun.c:PyParser_ASTFromFileObject
Parse/parsetok.c:PyParser_ParseFileObject
Parse/parsetok.c:parsetok
Parse/tokenizer.c:PyTokenizer_Get
Parse/tokenizer.c:tok_get
Parse/tokenizer.c:tok_nextc
Parser/myreadline.c:PyOS_Readline OR Parse/tokenizer.c:decoding_fgets

PyRun_InteractiveOneObject tries to get the input encoding via sys.stdin.encoding. The encoding 

is then passed along and finally stored in a tokenizer object. It is tok_nextc function that gets 

the input. If the prompt is not NULL it gets the data via PyOS_Readline and uses the encoding to 

recode it to UTF-8. This is unfortunate since the encoding, which originates in 

sys.stdin.encoding, can have nothing to do with the data returned by PyOS_Readline. ?lso note 

that there is hardcoded stdin argument to PyOS_Readline, but it probably holds tok->fp == stdin 

so it doesn't matter.

If the prompt in tok_nextc is NULL then the data are gotten by decoding_fgets function, which 

either use fp_readl > tok->decoding_readline or Objects/fileobject.c:Py_UniversalNewlineFgets 

depending on tokenizer state. tok->decoding_readline handler may be set to io.open("isisOOO", 

fileno(tok->fp), ?) (I have no idea what "isisOOO" might be).

PyOS_Readline function either calls PyOS_StdioReadline or the function pointed to by 

PyOS_ReadlineFunctionPointer which is by default again PyOS_StdioReadline, but usually is set to 

support GNU readline by the code in Modules/readline.c. PyOS_StdioReadline function uses my_fgets 

which calls fgets.

Now what input() function does. input is implemented as Python/bltinmodule.c:builtin_input. It 

tests if we are on tty by comparing sys.stdin.fileno() to fileno(stdin) and testing isatty. Note 

that this may not be enough ? if I inslall a custom sys.stdin but let it have standard fileno 

then the test may succeed. If we are tty then PyOS_Readline is used (and again together with 

sys.std*.encoding), if we aren't then Objects/fileobject.c:PyFile_WriteObject > sys.stdout.write 

(for prompt) and :PyFile_GetLine > sys.stdin.readline are used.

As we can see, the API is rather FILE* based. The only places where sys.std* objects are used are 

in one branch of builtin_input, and when getting the encoding used in tokenizer. Could it be 

possible to configure the tokenizer so it uses sys.stdin.readline for input, and also rewrite 

builtin_input to allways use sys.std*? Then it would be sys.stdin.buffer.raw.read* methods' 

responsibility to decide whether to use GNU readline or whatever PyOS_Readline uses or something 

else (e.g. ReadConsoleW on Windows tty), and also check for Ctrl-C afterwards.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 13:40:34 2014
From: report at bugs.python.org (Drekin)
Date: Thu, 31 Jul 2014 11:40:34 +0000
Subject: [issue17620] Python interactive console doesn't use sys.stdin for
 input
In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za>
Message-ID: <1406806834.8.0.156855610334.issue17620@psf.upfronthosting.co.za>


Drekin added the comment:

Sorry for formating in the previous message. Repeating?

I looked to the sourcecode and found the following.

First, the codepath of how interactive loop gets its input follows:
Python/pythonrun.c:PyRun_InteractiveLoopFlags
Python/pythonrun.c:PyRun_InteractiveOneObject
Python/pythonrun.c:PyParser_ASTFromFileObject
Parse/parsetok.c:PyParser_ParseFileObject
Parse/parsetok.c:parsetok
Parse/tokenizer.c:PyTokenizer_Get
Parse/tokenizer.c:tok_get
Parse/tokenizer.c:tok_nextc
Parser/myreadline.c:PyOS_Readline OR Parse/tokenizer.c:decoding_fgets

PyRun_InteractiveOneObject tries to get the input encoding via sys.stdin.encoding. The encoding is then passed along and finally stored in a tokenizer object. It is tok_nextc function that gets the input. If the prompt is not NULL it gets the data via PyOS_Readline and uses the encoding to recode it to UTF-8. This is unfortunate since the encoding, which originates in sys.stdin.encoding, can have nothing to do with the data returned by PyOS_Readline. ?lso note that there is hardcoded stdin argument to PyOS_Readline, but it probably holds tok->fp == stdin so it doesn't matter.

If the prompt in tok_nextc is NULL then the data are gotten by decoding_fgets function, which either use fp_readl > tok->decoding_readline or Objects/fileobject.c:Py_UniversalNewlineFgets depending on tokenizer state. tok->decoding_readline handler may be set to io.open("isisOOO", fileno(tok->fp), ?) (I have no idea what "isisOOO" might be).

PyOS_Readline function either calls PyOS_StdioReadline or the function pointed to by PyOS_ReadlineFunctionPointer which is by default again PyOS_StdioReadline, but usually is set to support GNU readline by the code in Modules/readline.c. PyOS_StdioReadline function uses my_fgets which calls fgets.

Now what input() function does. input is implemented as Python/bltinmodule.c:builtin_input. It tests if we are on tty by comparing sys.stdin.fileno() to fileno(stdin) and testing isatty. Note that this may not be enough ? if I inslall a custom sys.stdin but let it have standard fileno then the test may succeed. If we are tty then PyOS_Readline is used (and again together with sys.std*.encoding), if we aren't then Objects/fileobject.c:PyFile_WriteObject > sys.stdout.write (for prompt) and :PyFile_GetLine > sys.stdin.readline are used.

As we can see, the API is rather FILE* based. The only places where sys.std* objects are used are in one branch of builtin_input, and when getting the encoding used in tokenizer. Could it be possible to configure the tokenizer so it uses sys.stdin.readline for input, and also rewrite builtin_input to allways use sys.std*? Then it would be sys.stdin.buffer.raw.read* methods' responsibility to decide whether to use GNU readline or whatever PyOS_Readline uses or something else (e.g. ReadConsoleW on Windows tty), and also check for Ctrl-C afterwards.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 13:58:59 2014
From: report at bugs.python.org (Amrith Kumar)
Date: Thu, 31 Jul 2014 11:58:59 +0000
Subject: [issue22114] You cannot call communicate() safely after receiving
 EAGAIN
Message-ID: <1406807939.82.0.812223355091.issue22114@psf.upfronthosting.co.za>


New submission from Amrith Kumar:

Environment:
- Linux (Ubuntu 14.04 LTS, x64) running Python 2.7.
- Code uses eventlet.green.subprocess

Code establishes subprocess as:

   subprocess.Popen(command,
                    stdin=subprocess.PIPE,
                    stdout=subprocess.PIPE,
                    stderr=subprocess.PIPE, ...)

It then calls communicate()

communicate() throws EAGAIN

The code calls communicate() again

This fails with "ValueError: I/O operation on closed file"

This exception comes from eventlet/greenio.py because an operation (flush) has been attempted on a closed file.

The complete explanation of this failure is this.

When communicate() is called in this way (WITH NO INPUT but with all three handles stdin, stdout, stderr), code in communicate() bypasses the "1 handle optimization" and goes directly to _communicate()

_communicate() will first send any input on stdin along, and flush and close stdin(). 

>From that point forward, if anything to do with stderr and stdout returns EAGAIN, an attempt to call communicate() again will fail because stdin has now been closed().

This is because the code in _communicate() preemptively closes stdin if there is no input but does not reset stdin.

       def _communicate(self, input):
            if self.stdin:
                # Flush stdio buffer.  This might block, if the user has
                # been writing to .stdin in an uncontrolled fashion.
                self.stdin.flush()
                if not input:
                    self.stdin.close()

The fix for this is relatively straightforward (conceptually).

       def _communicate(self, input):
            if self.stdin:
                # Flush stdio buffer.  This might block, if the user has
                # been writing to .stdin in an uncontrolled fashion.
                self.stdin.flush()
                if not input:
                    self.stdin.close()
                    self.stdin = None # This should take care of it.

However, a partial workaround from the client perspective is this.

1. If you have no input, set stdin to None
2. If you do have input and you get EAGAIN, you cannot safely retry because your input may have already been completely or partially sent to the subprocess; you have to assume failure.

--------------------
Backtrace:

Traceback (most recent call last):
	File "/opt/stack/trove/trove/tests/unittests/guestagent/test_mongodb_manager.py", line 58, in test_prepare_from_backup
		self._prepare_dynamic(backup_id='backup_id_123abc')
	File "/opt/stack/trove/trove/tests/unittests/guestagent/test_mongodb_manager.py", line 91, in _prepare_dynamic
		backup_info=backup_info)
	File "trove/guestagent/datastore/mongodb/manager.py", line 66, in prepare
		operating_system.update_owner('mongodb', 'mongodb', mount_point)
	File "trove/guestagent/common/operating_system.py", line 109, in update_owner
		run_as_root=True, root_helper="sudo")
	File "trove/common/utils.py", line 278, in execute_with_timeout
		return execute(*args, **kwargs)
	File "trove/openstack/common/processutils.py", line 186, in execute
		result = obj.communicate()
	File "/usr/lib/python2.7/subprocess.py", line 799, in communicate
		return self._communicate(input)
	File "/usr/lib/python2.7/subprocess.py", line 1396, in _communicate
		self.stdin.flush()
	File "/opt/stack/trove/.tox/py27/local/lib/python2.7/site-packages/eventlet/greenio.py", line 419, in _operationOnClosedFile
		raise ValueError("I/O operation on closed file")

ValueError: I/O operation on closed file

----------
components: IO
messages: 224398
nosy: amrith
priority: normal
severity: normal
status: open
title: You cannot call communicate() safely after receiving EAGAIN
versions: Python 2.7

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 14:22:26 2014
From: report at bugs.python.org (Amrith Kumar)
Date: Thu, 31 Jul 2014 12:22:26 +0000
Subject: [issue22114] You cannot call communicate() safely after receiving
 EAGAIN
In-Reply-To: <1406807939.82.0.812223355091.issue22114@psf.upfronthosting.co.za>
Message-ID: <1406809346.13.0.427388521332.issue22114@psf.upfronthosting.co.za>


Amrith Kumar added the comment:

I'll supply a patch for this proposed change.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 14:24:53 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 31 Jul 2014 12:24:53 +0000
Subject: [issue22114] You cannot call communicate() safely after receiving
 EAGAIN
In-Reply-To: <1406807939.82.0.812223355091.issue22114@psf.upfronthosting.co.za>
Message-ID: <1406809493.9.0.0979698066825.issue22114@psf.upfronthosting.co.za>


Changes by STINNER Victor :


----------
nosy: +haypo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 14:43:51 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Thu, 31 Jul 2014 12:43:51 +0000
Subject: [issue22108] python c api wchar_t*/char* passing contradiction
In-Reply-To: <1406740242.49.0.577134590981.issue22108@psf.upfronthosting.co.za>
Message-ID: <1406810631.66.0.266600345249.issue22108@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

Jonas, why do you say that?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 14:46:37 2014
From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=)
Date: Thu, 31 Jul 2014 12:46:37 +0000
Subject: [issue17371] Mismatch between Python 3.3 build environment and
 distutils compiler support
In-Reply-To: <1362625606.93.0.881246780096.issue17371@psf.upfronthosting.co.za>
Message-ID: <1406810797.85.0.322993543357.issue17371@psf.upfronthosting.co.za>


Martin v. L?wis added the comment:

Installing VS 2010 express was indeed the right solution.

----------
resolution:  -> not a bug
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 14:49:19 2014
From: report at bugs.python.org (Drekin)
Date: Thu, 31 Jul 2014 12:49:19 +0000
Subject: [issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C
 properly
In-Reply-To: <1375175592.24.0.539816782076.issue18597@psf.upfronthosting.co.za>
Message-ID: <1406810959.54.0.971069209222.issue18597@psf.upfronthosting.co.za>


Drekin added the comment:

Shouldn't there be a Ctrl-C check in Modules/_io/fileio.c:fileio_read* functions? I think some of these are called by standard sys.stdin.readline().

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 15:15:30 2014
From: report at bugs.python.org (Akira Li)
Date: Thu, 31 Jul 2014 13:15:30 +0000
Subject: [issue22101] collections.abc.Set doesn't provide copy() method
In-Reply-To: <1406771854.3.0.564696522307.issue22101@psf.upfronthosting.co.za>
 (Raymond Hettinger's message of "Thu, 31 Jul 2014 01:57:34 +0000")
Message-ID: <87silhy8ia.fsf@gmail.com>


Akira Li added the comment:

> I don't think this is needed nor do I think that it is a good idea to
> have a copy() method in the ABCs because they know so little about
> their concrete underlying class (perhaps the backing store in the
> filesystem or a database).  Besides, a user already has workable
> alternatives such as creating a new instance and applying |= to
> populate it.

"because they know so little about their concrete underlying class"

FYI, the patch demonstrates how to implement copy() for *any*
MutableSet:

  def copy(self):
      return self._from_iterable(self)

_from_iterable() default implementation is cls(self) i.e., the copy()
method may be also efficient by default e.g., it may return the object
itself for immutable types.

---
The issue is closed so the rest can be ignored.

> In general, we don't do API expansions without motivating use cases to
> guide the design.

The reason to add Set.copy() is the same one as for set.copy() i.e., add
the equivalent of L[:] to mutable containers that don't support slicing
as the documentation excerpt in msg224255 explicitly says (copy()
doesn't modify its object so it can be added to immutable type).

General purpose language should provide an ability to copy a container.

In practice, people spell this operation as CustomSet(s) thus hardcoding
the type and ruining the flexibility provided by s.copy() duck-typing
(or copy.copy()).

The same could be said about MutableMapping (separate issue) e.g., merge
a, b dictionaries assuming no .copy() method:

  d = dict(a)
  d.update(b)

vs. the same with .copy():

  d = a.copy()
  d.update(b)

The latter may also work for a custom dict. The former is hardcoded to
produce a dict e.g., you have to reimplement it (and all the surrounding
code) for OrderedDict, SortedDict, Splay tree -based dict, etc. Luckily
projects such as blist, banyan that implement custom container types do
provide copy() method.

I don't see why we should make it harder to correctly implement/use
custom set/dict types.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 16:19:57 2014
From: report at bugs.python.org (Milan Oberkirch)
Date: Thu, 31 Jul 2014 14:19:57 +0000
Subject: [issue22111] Improve imaplib testsuite.
In-Reply-To: <1406767358.21.0.322738125164.issue22111@psf.upfronthosting.co.za>
Message-ID: <1406816397.0.0.244153202788.issue22111@psf.upfronthosting.co.za>


Milan Oberkirch added the comment:

AntoinePitrou: Thanks for the review!
I made the suggested changes and could not resist refactoring the hole thing (since I plan to spend some time on that file I wanted it to be readable and pep conform).

----------
Added file: http://bugs.python.org/file36178/imaplib_testV2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 16:27:22 2014
From: report at bugs.python.org (R. David Murray)
Date: Thu, 31 Jul 2014 14:27:22 +0000
Subject: [issue22114] You cannot call communicate() safely after receiving
 EAGAIN
In-Reply-To: <1406807939.82.0.812223355091.issue22114@psf.upfronthosting.co.za>
Message-ID: <1406816842.99.0.53392947799.issue22114@psf.upfronthosting.co.za>


R. David Murray added the comment:

I believe our recent thinking in recent times has been to handle EAGAIN in the higher level interfaces such as subprocess, not expose them to the caller.  Does python3 have the same problem?

I isn't clear that you have provided enough information to reproduce this.  Any chance you could reproduce it without using eventlet?

----------
components: +Library (Lib) -IO
nosy: +gps, r.david.murray
stage:  -> needs patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 16:39:43 2014
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 31 Jul 2014 14:39:43 +0000
Subject: [issue22108] python c api wchar_t*/char* passing contradiction
In-Reply-To: <1406740242.49.0.577134590981.issue22108@psf.upfronthosting.co.za>
Message-ID: <1406817583.88.0.630199455484.issue22108@psf.upfronthosting.co.za>


Zachary Ware added the comment:

See also issue20466 (which has a patch for this, but I cannot speak for its effectiveness).

I'd be in favor of closing that issue and this one as duplicates of #18395, and noting in #18395 that the embedding example must be updated before that issue is closed.

----------
nosy: +zach.ware

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 16:47:51 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 31 Jul 2014 14:47:51 +0000
Subject: [issue22115] Add new methods to trace Tkinter variables
Message-ID: <1406818071.8.0.276271200629.issue22115@psf.upfronthosting.co.za>


New submission from Serhiy Storchaka:

Command used to monitor Tcl variable access ("trace variable", "trace vdelete", "trace vinfo") are deprecated and will likely be removed in a future version of Tcl. Replacements ("trace add variable", "trace remove variable", "trace info variable") use slightly different syntax (operations are specified as a list of words "array", "read", "write" and "unset" instead of a string containing characters "a", "r", "w" and "u"). Therefore we need new set of methods.

Proposed preliminary patch adds trace_add, trace_remove and trace_info methods to the Variable class. It will be changed after applying issue22068 patch. Tests for old methods will be backported to older Python versions.

----------
components: Tkinter
files: tkinter_trace_variable_2.patch
keywords: patch
messages: 224407
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Add new methods to trace Tkinter variables
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file36179/tkinter_trace_variable_2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 16:50:18 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 31 Jul 2014 14:50:18 +0000
Subject: [issue22085] Drop support of Tk 8.3
In-Reply-To: <1406396007.9.0.890469508876.issue22085@psf.upfronthosting.co.za>
Message-ID: <1406818218.32.0.92216290639.issue22085@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

I close this issue because don't want to change topic yet once (and one feature per issue). Separate issue22115 was opened for adding new trace methods.

----------
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:00:18 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 31 Jul 2014 15:00:18 +0000
Subject: [issue15381] Optimize BytesIO to do  less reallocations when written, 
 similarly to StringIO
In-Reply-To: <1342527166.53.0.694574948468.issue15381@psf.upfronthosting.co.za>
Message-ID: <1406818818.51.0.0285084452424.issue15381@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Synchronized with tip. Unfortunately there are no common points with recent issue22003 changes so they should be reverted (except tests).

----------
versions: +Python 3.5 -Python 3.4
Added file: http://bugs.python.org/file36180/bytesio_resized_bytes-4.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:04:50 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 31 Jul 2014 15:04:50 +0000
Subject: [issue15381] Optimize BytesIO to do  less reallocations when written, 
 similarly to StringIO
In-Reply-To: <1342527166.53.0.694574948468.issue15381@psf.upfronthosting.co.za>
Message-ID: <1406819090.69.0.964799424404.issue15381@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
nosy: +benjamin.peterson, dw, hynek, kmike, python-dev, scoder, skrah, stutzbach

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:05:12 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Thu, 31 Jul 2014 15:05:12 +0000
Subject: [issue15986] memoryview: expose 'buf' attribute
In-Reply-To: <1406804088.12.0.41195183921.issue15986@psf.upfronthosting.co.za>
Message-ID: <1406819112.12.0.2536553398.issue15986@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

ctypes could grow a way to access the Py_buffer API instead.

----------
nosy: +amaury.forgeotdarc, belopolsky, meador.inge, pitrou

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:10:09 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Thu, 31 Jul 2014 15:10:09 +0000
Subject: [issue22114] You cannot call communicate() safely after receiving
 EAGAIN
In-Reply-To: <1406807939.82.0.812223355091.issue22114@psf.upfronthosting.co.za>
Message-ID: <1406819409.21.0.570260878282.issue22114@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

This sounds like an issue specific to eventlet. There's no reason for the standard communicate() call to raise EAGAIN, since the created pipes are blocking.

That said, if the fix is that trivial, I wouldn't be opposed to see it enter the stdlib (assuming it doesn't break anything).

----------
nosy: +pitrou

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:19:10 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 31 Jul 2014 15:19:10 +0000
Subject: [issue22114] You cannot call communicate() safely after receiving
 EAGAIN
In-Reply-To: <1406807939.82.0.812223355091.issue22114@psf.upfronthosting.co.za>
Message-ID: <1406819950.62.0.271046783507.issue22114@psf.upfronthosting.co.za>


STINNER Victor added the comment:

Instead of just catching EAGAIN, you can catch BlockingIOError. In Python 2.7, it means catching: (EAGAIN, EALREADY, EINPROGRESS, EWOULDBLOCK) errors.

I made a similar change in asyncore recently:
---
changeset:   91833:d422062d7d36
branch:      2.7
parent:      91830:841cdb6145e9
user:        Victor Stinner 
date:        Thu Jul 24 19:15:00 2014 +0200
files:       Doc/library/asyncore.rst Lib/asynchat.py Lib/test/test_asynchat.py Misc/NEWS
description:
Issue #16133: The asynchat.async_chat.handle_read() method now ignores
socket.error() exceptions with blocking I/O errors: EAGAIN, EALREADY,
EINPROGRESS, or EWOULDBLOCK. Initial patch written by Xavier de Gaye.
---

This issue is another reason to not use eventlet with monkey-patching :-) It's time to switch to asyncio (trollius for Python 2)!

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:19:20 2014
From: report at bugs.python.org (David Beazley)
Date: Thu, 31 Jul 2014 15:19:20 +0000
Subject: [issue15986] memoryview: expose 'buf' attribute
In-Reply-To: <1406804088.12.0.41195183921.issue15986@psf.upfronthosting.co.za>
Message-ID: <1406819960.68.0.0368000759785.issue15986@psf.upfronthosting.co.za>


David Beazley added the comment:

There are other kinds of libraries that might want to access the .buf attribute. For example, the llvmpy extension.  Exposing it would be useful.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:19:27 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Thu, 31 Jul 2014 15:19:27 +0000
Subject: [issue22111] Improve imaplib testsuite.
In-Reply-To: <1406767358.21.0.322738125164.issue22111@psf.upfronthosting.co.za>
Message-ID: <1406819967.6.0.953989611303.issue22111@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

Thank you, Milan. The latest patch looks good to me.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:20:50 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Thu, 31 Jul 2014 15:20:50 +0000
Subject: [issue15986] memoryview: expose 'buf' attribute
In-Reply-To: <1406804088.12.0.41195183921.issue15986@psf.upfronthosting.co.za>
Message-ID: <1406820050.44.0.44321528895.issue15986@psf.upfronthosting.co.za>


Antoine Pitrou added the comment:

Ha, llvmpy... Yes, it could be useful. It's dangerous too, especially since the buffer isn't necessarily contiguous.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:24:43 2014
From: report at bugs.python.org (David Beazley)
Date: Thu, 31 Jul 2014 15:24:43 +0000
Subject: [issue15986] memoryview: expose 'buf' attribute
In-Reply-To: <1406804088.12.0.41195183921.issue15986@psf.upfronthosting.co.za>
Message-ID: <1406820283.18.0.74441211973.issue15986@psf.upfronthosting.co.za>


David Beazley added the comment:

Well, a lot of things in this big bad world are dangerous.  Don't see how this is any more dangerous than all of the peril that tools like ctypes and llvmpy already provide.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:26:30 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Thu, 31 Jul 2014 15:26:30 +0000
Subject: [issue15986] memoryview: expose 'buf' attribute
In-Reply-To: <1406820283.18.0.74441211973.issue15986@psf.upfronthosting.co.za>
Message-ID: <53DA6022.8090803@free.fr>


Antoine Pitrou added the comment:

Le 31/07/2014 11:24, David Beazley a ?crit :
>
> Well, a lot of things in this big bad world are dangerous. Don't see
how this is any more dangerous than all of the peril that tools like
ctypes and llvmpy already provide.

The point of the buffer API is to make memory access *less* dangerous 
than with the perilous tools, though.

Otherwise we might as well decide that Python crashes because C crashes :-)

(as for llvmpy, I think its implementation deserves to die)

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:34:06 2014
From: report at bugs.python.org (David Beazley)
Date: Thu, 31 Jul 2014 15:34:06 +0000
Subject: [issue15986] memoryview: expose 'buf' attribute
In-Reply-To: <1406804088.12.0.41195183921.issue15986@psf.upfronthosting.co.za>
Message-ID: <1406820846.88.0.922312370398.issue15986@psf.upfronthosting.co.za>


David Beazley added the comment:

One of the other goals of memoryviews is to make memory access less hacky.  To that end, it would be nice to have the .buf attribute available given that all of the other attributes are already there.  I don't see why people should need to do some even more hacky hack thing on top of hacks just to expose the pointer (which they'll figure out how to do anyway if they actually need to use it for something).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:36:07 2014
From: report at bugs.python.org (Amrith Kumar)
Date: Thu, 31 Jul 2014 15:36:07 +0000
Subject: [issue22114] You cannot call communicate() safely after receiving
 EAGAIN
In-Reply-To: <1406807939.82.0.812223355091.issue22114@psf.upfronthosting.co.za>
Message-ID: <1406820967.14.0.537716756737.issue22114@psf.upfronthosting.co.za>


Amrith Kumar added the comment:

I see three comments, one from r.david.murray, one from haypo and one from pitrou. I'll try and address all three.

r.david.murray:

The code in question is in https://github.com/openstack/oslo-incubator/blob/master/openstack/common/processutils.py#L177-L189

note that we're catching EAGAIN and EINTR.

I have not been able to isolate this down to a simple repro without the rest of this paraphernalia but I'm trying.

So, we are 'catching' EAGAIN or EINTR here and we're trying to handle it to the best of our ability. However, if the underlying layer is not setup to handle a retry, our best efforts will be fruitless.

That is what is happening here. 

The reason for this code (ignoring the retry of 20) was put in place exactly because a call to communicate() received an EAGAIN.

The issue therefore is that in order for the higher level to properly handle this, communicate() should be setup to handle a second call, which it currently is not. 

haypo and pitrou: that may be true; I'm not competent to comment on that.

But, as pointed out in earlier comment (and modulo this may be eventlet specific), just catching more exceptions isn't the answer.

if the descriptor is closed, the thing that communicate/_communicate() call should be able to handle that situation. And this bug illustrates that at least eventlet doesn't handle that.

However, I submit to you that this is NOT an eventlet issue. Here's why.

The failure here is that a flush call is being attempted on a closed descriptor. I believe that the implementation of flush (in eventlet) is legitimately throwing an exception indicating that the state machine was violated (cannot flush on closed descriptor). 

The close() was invoked by subprocess.py after it finished doing what it thought it had to do with stdin on the first invocation. therefore I believe it must be the responsibility of subprocess.py to make sure that when invoked again, it doesn't step on itself.

Either that, or subprocess.py's communicate() implementation should indicate that it can only be called once, capture all exceptions that would point a user to retry (such as EAGAIN and EINTR) and mask them and return some EFATAL.

----------
components: +IO -Library (Lib)

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:41:14 2014
From: report at bugs.python.org (eryksun)
Date: Thu, 31 Jul 2014 15:41:14 +0000
Subject: [issue11427] ctypes from_buffer no longer accepts bytes
In-Reply-To: <1299481885.21.0.0627562040827.issue11427@psf.upfronthosting.co.za>
Message-ID: <1406821274.71.0.275113747451.issue11427@psf.upfronthosting.co.za>


eryksun added the comment:

cast calls ctypes._cast(obj, obj, typ). _cast is a ctypes function pointer defined as follows:

    _cast = PYFUNCTYPE(py_object, 
                       c_void_p, py_object, py_object)(_cast_addr)

Since cast makes an FFI call that converts the first arg to c_void_p, you can directly cast bytes to a pointer type:

    >>> from ctypes import *
    >>> data = b'123\x00abc'

    >>> ptr = cast(data, c_void_p)

string_at is defined similarly using c_void_p for the first arg:

    _string_at = PYFUNCTYPE(py_object, c_void_p, c_int)(_string_at_addr)
 
    >>> string_at(ptr, 8)
    b'123\x00abc\x00'

Get around the from_buffer mutability requirement by casting to an array (i.e. to an array pointer followed by a dereference):

    >>> arr = cast(data, POINTER(c_char * len(data)))[0]
    >>> arr[:]
    b'123\x00abc'

Then use byref to pass an offset into the array:

    >>> from ctypes.util import find_library
    >>> printf = CDLL(find_library('c')).printf

    >>> printf(b'%s\n', byref(arr, 4))
    abc
    4

Since this doesn't copy the buffer, take care to ensure the function call won't modify the contents.

----------
nosy: +eryksun

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:46:34 2014
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 31 Jul 2014 15:46:34 +0000
Subject: [issue22114] You cannot call communicate() safely after receiving
 EAGAIN
In-Reply-To: <1406820967.14.0.537716756737.issue22114@psf.upfronthosting.co.za>
Message-ID: 


STINNER Victor added the comment:

> However, I submit to you that this is NOT an eventlet issue. (...) capture all exceptions that would point a user to retry (such as EAGAIN and EINTR) and mask them and return some EFATAL.

You cannot get EAGAIN on a blocking file descriptor and subprocess
uses blocking file descriptors. It looks like eventlet monkey patching
makes file descriptors non-blocking.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:53:56 2014
From: report at bugs.python.org (Shiz)
Date: Thu, 31 Jul 2014 15:53:56 +0000
Subject: [issue22100] Use $HOSTPYTHON when determining candidate interpreter
 for $PYTHON_FOR_BUILD.
In-Reply-To: <1406648042.0.0.0162670058613.issue22100@psf.upfronthosting.co.za>
Message-ID: <1406822036.57.0.8106931163.issue22100@psf.upfronthosting.co.za>


Shiz added the comment:

After some further investigation it seems the which-clause fails when given a relative path. Since we should expect $HOSTPYTHON to be present in the first place, I modified the patch a bit to special-case the $HOSTPYTHON check, and fall back on the other interpreters as checked before.

----------
Added file: http://bugs.python.org/file36181/Python-hg-723e0a7c4914-fix-PYTHON_FOR_BUILD-detection-v2.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:56:32 2014
From: report at bugs.python.org (Amrith Kumar)
Date: Thu, 31 Jul 2014 15:56:32 +0000
Subject: [issue22114] You cannot call communicate() safely after receiving an
 exception (EINTR or EAGAIN)
In-Reply-To: <1406807939.82.0.812223355091.issue22114@psf.upfronthosting.co.za>
Message-ID: <1406822192.83.0.30310487481.issue22114@psf.upfronthosting.co.za>


Changes by Amrith Kumar :


----------
title: You cannot call communicate() safely after receiving EAGAIN -> You cannot call communicate() safely after receiving an exception (EINTR or EAGAIN)

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:58:47 2014
From: report at bugs.python.org (Amrith Kumar)
Date: Thu, 31 Jul 2014 15:58:47 +0000
Subject: [issue22114] You cannot call communicate() safely after receiving an
 exception (EINTR or EAGAIN)
In-Reply-To: <1406807939.82.0.812223355091.issue22114@psf.upfronthosting.co.za>
Message-ID: <1406822327.63.0.477524324609.issue22114@psf.upfronthosting.co.za>


Amrith Kumar added the comment:

haypo; no argument from me. I just updated the description to make it more exact.

I may have received EINTR or EAGAIN.

In either event, I need to debug some more and try and do a clean repro and then figure out a proper fix.

In the meanwhile, I proposed a fix for the openstack code; if you are so inclined, please take a look.

https://review.openstack.org/#/c/110933/

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 17:59:27 2014
From: report at bugs.python.org (Steve Dower)
Date: Thu, 31 Jul 2014 15:59:27 +0000
Subject: [issue18402] Finding perl64
In-Reply-To: <1373261873.64.0.61453379281.issue18402@psf.upfronthosting.co.za>
Message-ID: <1406822367.01.0.544832508573.issue18402@psf.upfronthosting.co.za>


Steve Dower added the comment:

At one point the version of OpenSSL on svn.python.org did not have the correct makefiles for a 64-bit Windows build, but this was resolved. You also don't need 64-bit Perl to generate these files, and the file has been renamed to "prepare_ssl.py" and appears to only be used for creating the makefiles for checking into SVN (perhaps it should move to Tools?).

It's a trivial patch, but considering I don't even know who runs the file, I'm not going to go and mess with it. Zach and/or Tim presumably know.

----------
nosy: +tim.golden, zach.ware

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 18:11:18 2014
From: report at bugs.python.org (R. David Murray)
Date: Thu, 31 Jul 2014 16:11:18 +0000
Subject: [issue22114] You cannot call communicate() safely after receiving an
 exception (EINTR or EAGAIN)
In-Reply-To: <1406807939.82.0.812223355091.issue22114@psf.upfronthosting.co.za>
Message-ID: <1406823078.05.0.439916052015.issue22114@psf.upfronthosting.co.za>


R. David Murray added the comment:

By the definition of the (blocking) communicate API, communicate can only be called once (it feeds in all the input, and reads all the output).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 18:16:22 2014
From: report at bugs.python.org (Amrith Kumar)
Date: Thu, 31 Jul 2014 16:16:22 +0000
Subject: [issue22114] You cannot call communicate() safely after receiving an
 exception (EINTR or EAGAIN)
In-Reply-To: <1406807939.82.0.812223355091.issue22114@psf.upfronthosting.co.za>
Message-ID: <1406823382.46.0.808209512737.issue22114@psf.upfronthosting.co.za>


Amrith Kumar added the comment:

r.david.murray, I guess the issue we have is that something (hypothesis: eventlet) is causing the blocking API to communicate() to throw an EAGAIN.

This (https://bugs.launchpad.net/nova/+bug/1271331) is the bug that was fixed a while ago in OpenStack that introduced the notion of calling communicate() multiple times.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 18:51:32 2014
From: report at bugs.python.org (Daniel Greenfeld)
Date: Thu, 31 Jul 2014 16:51:32 +0000
Subject: [issue22112] '_UnixSelectorEventLoop' object has no attribute
 'create_task'
In-Reply-To: <1406774418.2.0.505776361437.issue22112@psf.upfronthosting.co.za>
Message-ID: <1406825492.88.0.379500360702.issue22112@psf.upfronthosting.co.za>


Daniel Greenfeld added the comment:

First, if there is documentation that says, "3.4.1", doesn't it make sense that the documentation should only be for 3.4.1? Which means that this create_task documentation should be reverted in the 3.4.1 documentation to match the 3.4.1 specification.

Second and most respectfully, why is a feature being added in 3.4.2? I thought this kind of release (3.4.1 to 3.4.2) was for bug fixes and security issues, not new features. Unless create_task was in the original 3.4 specification, I argue that create_task belongs in 3.5. In it's place, a recipe of running tasks in parallel fashion per gvanrossum's suggestion of asyncio.async() could be added.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 18:58:49 2014
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 31 Jul 2014 16:58:49 +0000
Subject: [issue20170] Derby #1: Convert 137 sites to Argument Clinic in
 Modules/posixmodule.c
In-Reply-To: <1389138185.8.0.104398826507.issue20170@psf.upfronthosting.co.za>
Message-ID: <1406825929.37.0.362836719239.issue20170@psf.upfronthosting.co.za>


Zachary Ware added the comment:

The patch applies and compiles cleanly, and I finally tracked down what was causing the errors I reported yesterday: os_utime_impl was changed to use Py_RETURN_NONE instead of just setting return_value = Py_None, so Windows skipped the exit routine and left an open handle on any call to os.utime.  Commented on the bad line on Rietveld.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 19:11:15 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Thu, 31 Jul 2014 17:11:15 +0000
Subject: [issue22112] '_UnixSelectorEventLoop' object has no attribute
 'create_task'
In-Reply-To: <1406825492.88.0.379500360702.issue22112@psf.upfronthosting.co.za>
Message-ID: 


Guido van Rossum added the comment:

asyncio has an explicit exemption from the general rule that bugfixes
should not add new features. This is because of the "provisional" status of
the PEP. We'll stop doing this once 3.5 is out.

I don't know what's up with the online docs.

On Thu, Jul 31, 2014 at 9:51 AM, Daniel Greenfeld 
wrote:

>
> Daniel Greenfeld added the comment:
>
> First, if there is documentation that says, "3.4.1", doesn't it make sense
> that the documentation should only be for 3.4.1? Which means that this
> create_task documentation should be reverted in the 3.4.1 documentation to
> match the 3.4.1 specification.
>
> Second and most respectfully, why is a feature being added in 3.4.2? I
> thought this kind of release (3.4.1 to 3.4.2) was for bug fixes and
> security issues, not new features. Unless create_task was in the original
> 3.4 specification, I argue that create_task belongs in 3.5. In it's place,
> a recipe of running tasks in parallel fashion per gvanrossum's suggestion
> of asyncio.async() could be added.
>
> ----------
>
> _______________________________________
> Python tracker 
> 
> _______________________________________
>

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 19:16:13 2014
From: report at bugs.python.org (Guido van Rossum)
Date: Thu, 31 Jul 2014 17:16:13 +0000
Subject: [issue22101] collections.abc.Set doesn't provide copy() method
In-Reply-To: <1406669299.88.0.807816572925.issue22101@psf.upfronthosting.co.za>
Message-ID: <1406826973.5.0.8882373754.issue22101@psf.upfronthosting.co.za>


Guido van Rossum added the comment:

You need to learn when to give up. :-)

I wasn't the one who added a copy() method to other containers.  I personally despise almost all uses of "copying" (including the entire copy module, both deep and shallow copy functionality).  I much prefer to write e.g. list(x) over x.copy() -- when I say list(x) I know the type of the result.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 19:51:24 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Thu, 31 Jul 2014 17:51:24 +0000
Subject: [issue22110] enable extra compilation warnings
In-Reply-To: <1406765646.98.0.90985246905.issue22110@psf.upfronthosting.co.za>
Message-ID: 


Charles-Fran?ois Natali added the comment:

> Antoine Pitrou added the comment:
>
> Enabling the warnings may be a good incitation for other people to fix them ;)

That was my intention...

Can I push it, and let warnings be fixed on a case-by-case basis?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 19:51:31 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Thu, 31 Jul 2014 17:51:31 +0000
Subject: [issue22116] Weak reference support for C function objects
Message-ID: <1406829091.92.0.589773315049.issue22116@psf.upfronthosting.co.za>


New submission from Antoine Pitrou:

Currently, it is not possible to take a weakref to a PyCFunction object. However, those objects already have full GC support, so it wouldn't be silly to add weakref support to them.

(this came in the context of numba, which generates such C functions on-the-fly)

----------
components: Interpreter Core
messages: 224432
nosy: pitrou
priority: normal
severity: normal
status: open
title: Weak reference support for C function objects
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 20:03:02 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 31 Jul 2014 18:03:02 +0000
Subject: [issue15862] IDLE not working when due to wrong Hard Drive point of
 os.path.expanduser
In-Reply-To: <1346795014.76.0.789021764596.issue15862@psf.upfronthosting.co.za>
Message-ID: <1406829782.84.0.329406878483.issue15862@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
status: open -> pending

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 20:06:34 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Thu, 31 Jul 2014 18:06:34 +0000
Subject: [issue15152] test_subprocess failures on awfully slow builtbots
In-Reply-To: <1340442442.66.0.972780604979.issue15152@psf.upfronthosting.co.za>
Message-ID: <1406829994.52.0.0830079037201.issue15152@psf.upfronthosting.co.za>


Charles-Fran?ois Natali added the comment:

Closing, I haven't seen this in a while.

----------
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 20:09:01 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Thu, 31 Jul 2014 18:09:01 +0000
Subject: [issue19923] OSError: [Errno 512] Unknown error 512 in
 test_multiprocessing
In-Reply-To: <1386451400.97.0.885839707191.issue19923@psf.upfronthosting.co.za>
Message-ID: <1406830141.15.0.00145879457779.issue19923@psf.upfronthosting.co.za>


Charles-Fran?ois Natali added the comment:

Closing, since it's likely a kernel bug.

----------
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 20:09:17 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 31 Jul 2014 18:09:17 +0000
Subject: [issue19062] problems with pyshell to get userdir
In-Reply-To: <1379777943.19.0.474410652516.issue19062@psf.upfronthosting.co.za>
Message-ID: <1406830157.49.0.422213929363.issue19062@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
components: +Windows
stage:  -> test needed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 20:17:43 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Thu, 31 Jul 2014 18:17:43 +0000
Subject: [issue18142] Tests fail on Mageia Linux Cauldron x86-64 with some
 configure flags
In-Reply-To: <1370445621.52.0.671437694015.issue18142@psf.upfronthosting.co.za>
Message-ID: <1406830663.01.0.867380384112.issue18142@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Is there anything we can do here, do we close it as "out of date" or what?

----------
nosy: +BreamoreBoy
type:  -> behavior
versions: +Python 3.4, Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 20:25:46 2014
From: report at bugs.python.org (Lita Cho)
Date: Thu, 31 Jul 2014 18:25:46 +0000
Subject: [issue1702036] Make Turtle thread-safe so it does not crash
Message-ID: <1406831146.95.0.0900790734423.issue1702036@psf.upfronthosting.co.za>


Lita Cho added the comment:

Hey! So I have been investigating this bug, but I wanted to know is the issue the fact that korka wants to create multiple turtles or do you really want to use multiple threads with Turtle? I feel like this crash is due to Tkinter not being thread safe and I am not sure how turtle can go about working around this other than creating a scheduler within turtle.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 20:32:04 2014
From: report at bugs.python.org (Lita Cho)
Date: Thu, 31 Jul 2014 18:32:04 +0000
Subject: [issue1702036] Make Turtle thread-safe so it does not crash
Message-ID: <1406831524.98.0.984757901412.issue1702036@psf.upfronthosting.co.za>


Lita Cho added the comment:

I also want to note that you can create duplicate turtles by using clone, and I am not sure why you would use multiple inheritance to draw more than 1 turtle running around. I didn't think turtle was meant to be used this way. In order to draw multiple turtles, I would use the clone method.

Is this to draw turtles running at the same time?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 20:35:25 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Thu, 31 Jul 2014 18:35:25 +0000
Subject: [issue17085] test_socket crashes the whole test suite
In-Reply-To: <1359580628.83.0.173179383331.issue17085@psf.upfronthosting.co.za>
Message-ID: <1406831725.37.0.394738777922.issue17085@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Is this still an issue with Python 2.7.8? (I don't have 2.7 or linux to test on)

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 20:40:57 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 31 Jul 2014 18:40: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: <1406832057.76.0.182437778891.issue20540@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

What would you say about multi_nagle_simplify.patch, Antoine?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 20:54:20 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 31 Jul 2014 18:54:20 +0000
Subject: [issue21860] Correct FileIO docstrings
In-Reply-To: <1403610592.56.0.388497950887.issue21860@psf.upfronthosting.co.za>
Message-ID: <1406832860.29.0.850265988167.issue21860@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


----------
assignee: docs at python -> haypo
stage: needs patch -> commit review

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 21:10:15 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Thu, 31 Jul 2014 19:10:15 +0000
Subject: [issue17923] test glob with trailing slash fail
In-Reply-To: <1367915410.77.0.862505044661.issue17923@psf.upfronthosting.co.za>
Message-ID: <1406833815.94.0.497830610567.issue17923@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Couldn't part of the patch be simplified to:-

if basename or os.path.isdir(dirname):
    yield pathname

or have I misread it?

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 21:29:57 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Thu, 31 Jul 2014 19:29:57 +0000
Subject: [issue18004] test_list.test_overflow crashes Win64
In-Reply-To: <1368834409.49.0.790067586607.issue18004@psf.upfronthosting.co.za>
Message-ID: <1406834997.25.0.882892598031.issue18004@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

What if anything needs to be done here?

----------
nosy: +BreamoreBoy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 21:43:11 2014
From: report at bugs.python.org (Mark Lawrence)
Date: Thu, 31 Jul 2014 19:43:11 +0000
Subject: [issue18188] ERROR: test_no_optimize_flag on Mageia Linux Cauldron
 x86-64 with certain configure flags
In-Reply-To: <1370946728.63.0.485742635949.issue18188@psf.upfronthosting.co.za>
Message-ID: <1406835791.91.0.336767620357.issue18188@psf.upfronthosting.co.za>


Mark Lawrence added the comment:

Is this still a problem with later versions of Python on this platform?

----------
nosy: +BreamoreBoy
versions: +Python 3.4, Python 3.5 -Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 21:45:10 2014
From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=)
Date: Thu, 31 Jul 2014 19:45:10 +0000
Subject: [issue17085] test_socket crashes the whole test suite
In-Reply-To: <1359580628.83.0.173179383331.issue17085@psf.upfronthosting.co.za>
Message-ID: <1406835910.5.0.434767754789.issue17085@psf.upfronthosting.co.za>


Charles-Fran?ois Natali added the comment:

Thanks for the reminder Mark.
Yes, it is probably still an issue with the latest 2.7 release.

There were actually two issues:
- send send()/sendall() call didn't block because the test doesn't write enough data: we have since added a SOCK_MAX_SIZE constant to test_support just for that purpose, and the test has been updated, so it should now block (and succeed).
- the crash occurs because the test doesn't reset the alarm (with alarm(0)) upon exit, so if the alarm didn't go off during the test, it comes later when the original signal handler has been reset, and the default handler just exits.

To sum up, the first point is already fixed, and for the second point, here's a patch.

Note that 3.4 and default aren't affected, because the alarm is properly reset.

----------
keywords: +patch
nosy: +neologix
Added file: http://bugs.python.org/file36182/reset_sigalrm_handler.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 22:03:00 2014
From: report at bugs.python.org (Jonas Jelten)
Date: Thu, 31 Jul 2014 20:03:00 +0000
Subject: [issue22108] python c api wchar_t*/char* passing contradiction
In-Reply-To: <1406740242.49.0.577134590981.issue22108@psf.upfronthosting.co.za>
Message-ID: <1406836980.31.0.548665855711.issue22108@psf.upfronthosting.co.za>


Jonas Jelten added the comment:

Martin, i think the most intuitive and easiest way for working with strings in C are just char arrays.

Starting with the main() argv being char*, probably most programmers just go with char* and all the encoding just works.
This is because contact with encoding is only needed for the user input software (xorg, keyboard input) and user output (-> your terminal emulator, the gui, ...).
No matter what stuff your program receives, the encoding only matters for the actual output display software to select the correct visual representation.
Requiring a conversion to wide chars just increases the interface complexity and adds really unneeded data transformations that are completely obsolete with UTF-8.

What I'd really like to see in CPython is that the internal storage (and the way it's exposed in the C-API) is just raw bytes (=> char*).

This allows super-easy integration in C projects that probably all just use char as their string type (see the doc example mentioned earlier).

PEP 393 states: "(..) the specification chooses UTF-8 as the recommended way of exposing strings to C code."

And for that, I think using char instead of wchar_t is a better solution for interface developers.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 22:11:30 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Thu, 31 Jul 2014 20:11:30 +0000
Subject: [issue22110] enable extra compilation warnings
In-Reply-To: 
Message-ID: <53DAA2EF.5070507@free.fr>


Antoine Pitrou added the comment:

Le 31/07/2014 13:51, Charles-Fran?ois Natali a ?crit :
>
>>
>> Enabling the warnings may be a good incitation for other people to fix them ;)
>
> That was my intention...
>
> Can I push it, and let warnings be fixed on a case-by-case basis?

+1 from me.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 22:14:34 2014
From: report at bugs.python.org (Antoine Pitrou)
Date: Thu, 31 Jul 2014 20:14:34 +0000
Subject: [issue22116] Weak reference support for C function objects
In-Reply-To: <1406829091.92.0.589773315049.issue22116@psf.upfronthosting.co.za>
Message-ID: <1406837674.83.0.913649362957.issue22116@psf.upfronthosting.co.za>


Changes by Antoine Pitrou :


----------
keywords: +easy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 22:53:48 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 31 Jul 2014 20:53:48 +0000
Subject: [issue21859] Add Python implementation of FileIO
In-Reply-To: <1403608013.94.0.257739188668.issue21859@psf.upfronthosting.co.za>
Message-ID: <1406840028.41.0.769011321196.issue21859@psf.upfronthosting.co.za>


Serhiy Storchaka added the comment:

Next iteration of the patch addressed Victor's and Akira's comments.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 22:54:33 2014
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 31 Jul 2014 20:54:33 +0000
Subject: [issue21859] Add Python implementation of FileIO
In-Reply-To: <1403608013.94.0.257739188668.issue21859@psf.upfronthosting.co.za>
Message-ID: <1406840073.61.0.346218322269.issue21859@psf.upfronthosting.co.za>


Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file36183/pyio_fileio_5.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Jul 31 23:46:41 2014
From: report at bugs.python.org (eryksun)
Date: Thu, 31 Jul 2014 21:46:41 +0000
Subject: [issue11429] ctypes is highly eclectic in its raw-memory support
In-Reply-To: <1299484141.33.0.394671210882.issue11429@psf.upfronthosting.co.za>
Message-ID: <1406843201.86.0.187177948868.issue11429@psf.upfronthosting.co.za>


eryksun added the comment:

Extending byref to support bytes and str objects sounds reasonable. 

Here's another workaround to pass a bytes object with an offset:

    from ctypes import *
    from ctypes.util import find_library

    class offset:
        def __init__(self, arg, offset):
            self.arg = arg
            self.offset = offset

    class my_char_p(c_char_p):
        @classmethod
        def from_param(cls, arg):
            if isinstance(arg, offset):
                t = cast(arg.arg, POINTER(c_char * 0))[0]
                carg = byref(t, arg.offset)
            else:
                carg = super().from_param(arg)
            return carg

    atoi = CDLL(find_library('c')).atoi
    atoi.argtypes = [my_char_p]

    >>> atoi(b'12345')
    12345
    >>> atoi(offset(b'12345', 1))
    2345
    >>> atoi(offset(b'12345', 3))
    45

You can also convert bytearray, memoryview, and array.array objects from_param. If the object's buffer is writable you can use a ctypes type's from_buffer method to create the C arg. This takes an optional offset argument. Otherwise use from_buffer_copy or cast.

----------
nosy: +eryksun

_______________________________________
Python tracker 

_______________________________________