From report at bugs.python.org Sat Jul 1 00:37:07 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 01 Jul 2017 04:37:07 +0000 Subject: [issue30730] [security] Injecting environment variable in subprocess on Windows In-Reply-To: <1498118820.13.0.596038385019.issue30730@psf.upfronthosting.co.za> Message-ID: <1498883827.43.0.157852676739.issue30730@psf.upfronthosting.co.za> Steve Dower added the comment: It's certainly exploitable for remote code execution if user data allows embedded nulls (can you URL encode %00?). The fixes look fine and shouldn't cause any new issues, though I thought that fsencode() already rejected embedded nulls - maybe I'm thinking of the argument converter though, which is not invoked here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 00:40:45 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 01 Jul 2017 04:40:45 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1498884045.03.0.186919692568.issue27425@psf.upfronthosting.co.za> Steve Dower added the comment: There's nothing that needs to block the release as far as I'm concerned. The main fix was that I needed a fresh clone on my build machine to pick up the gitattribute changes. The other bug is still open to enhance some tests and skip one in the release tree, but nothing release blocking. I don't see why this one is now either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 00:45:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jul 2017 04:45:07 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1498884307.14.0.0813928897608.issue30822@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please provide a separate PR for this. After merging it with the master branch it should be backported to 3.6 and 3.5 (3.4 and 3.3 are for security only fixes). Add your name in Misc/ACKS. Changes in Misc/NEWS.d/ are not required. ---------- stage: -> needs patch type: enhancement -> behavior versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 01:04:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jul 2017 05:04:46 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1498885486.7.0.19175755096.issue30302@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Isn?t there a ?Unicode writer? API that could be used? It could be used if accumulate only Python strings, C strings and separate characters. But in any case we need to convert C integers to strings, and add up to 3 items per every attribute (separator, name, value), the result of every addition should be checked. PyUnicode_FromFormat() is an easy way to concatenate several items. It needs only one check. > The annoying part is to handle the ", " separator. I also had bad experiences with handling char* strings. It's so easy to make mistakes :-( It could be simpler if use the trick with the sep variable. As for mistakes, actually that version of Utkarsh's patch was less buggy than the few following versions using the Python C API. But the final C code is correct and LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 01:13:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jul 2017 05:13:43 +0000 Subject: [issue30730] [security] Injecting environment variable in subprocess on Windows In-Reply-To: <1498118820.13.0.596038385019.issue30730@psf.upfronthosting.co.za> Message-ID: <1498886023.12.0.60194731277.issue30730@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, fsencode() already rejected embedded nulls, that is why the Posix branch doesn't need additional check for null characters. The Posix branch was changed only for adding the check for the '=' character in names. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 01:29:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jul 2017 05:29:36 +0000 Subject: [issue30791] tkinter.Tk() adds suffix to window class name when launching multiple instances In-Reply-To: <1498663098.01.0.2360806195.issue30791@psf.upfronthosting.co.za> Message-ID: <1498886976.72.0.725842654389.issue30791@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I concur with Terry. This is not a Tkinter issue, this is a Tk issue. Ask help on Tcl/Tk resources. If this is considered a bug open a ticket on the Tk tracker: https://core.tcl.tk/tk/tktnew . ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 01:53:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jul 2017 05:53:03 +0000 Subject: [issue27945] Various segfaults with dict In-Reply-To: <1472852008.61.0.354257945943.issue27945@psf.upfronthosting.co.za> Message-ID: <1498888383.01.0.876181096445.issue27945@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: For the context see issue30484. If the segfault is caused by garbage collection this perhaps is not an expluatable vulnerability, but a severe bug that can affect any multithread application and doesn't have a workaround. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 02:07:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jul 2017 06:07:55 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1498889275.1.0.693727927713.issue30814@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue23203. This was fixed in master in issue30024. Maybe it is worth to backport that change to maintained versions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 02:08:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jul 2017 06:08:50 +0000 Subject: [issue23203] Aliasing import of sub-{module, package} from the package raises AttributeError on import. In-Reply-To: <1420785882.78.0.914141516682.issue23203@psf.upfronthosting.co.za> Message-ID: <1498889330.5.0.337625526671.issue23203@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Nick's suggestion was implemented in issue30024. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 02:20:36 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 01 Jul 2017 06:20:36 +0000 Subject: [issue29926] IDLE: in shell, time.sleep ignores _thread.interrupt_main() In-Reply-To: <1490655071.78.0.435370193059.issue29926@psf.upfronthosting.co.za> Message-ID: <1498890036.0.0.00783324778199.issue29926@psf.upfronthosting.co.za> Martin Panter added the comment: I doubt the Gnu Readline library nor Python?s readline module are relevant. The input function only uses Readline if sys.stdin is the original stdin terminal; I suspect Idle monkey-patches sys.stdin. The readline method reads directly from the file object; it never uses the Readline library (despite the unfortunate clash in names :). Louie seems to have added two workarounds: the finish flag, and using interrupt_main with a timeout. Both seem racy. What if the flag is altered in another thread between when the flag is checked and when it is acted upon? What has to happen in the 0.2 s between calling interrupt_main and raising SIGINT? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 03:15:06 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 01 Jul 2017 07:15:06 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1498893306.99.0.47107518785.issue27425@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There is still the problem with test_winreg freezing CommandPrompt, #30715. For me, this is the worst test bug ever. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 03:31:04 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 01 Jul 2017 07:31:04 +0000 Subject: [issue30715] Test_winreg, test_dynamic_key hangs on my Win 10 In-Reply-To: <1497978867.14.0.417332837919.issue30715@psf.upfronthosting.co.za> Message-ID: <1498894264.8.0.30346537941.issue30715@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I just found -x test_winreg so I can run the test suite while waiting for this to be fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 06:03:27 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 01 Jul 2017 10:03:27 +0000 Subject: [issue30744] Local variable assignment is broken when combined with threads + tracing + closures In-Reply-To: <1498277129.07.0.940069687434.issue30744@psf.upfronthosting.co.za> Message-ID: <1498903407.42.0.36586105717.issue30744@psf.upfronthosting.co.za> Xavier de Gaye added the comment: In msg296758 Nathaniel wrote: > It turns out if you simply delete the LocalsToFast and FastToLocals calls in call_trampoline, then the test suite still passes. I'm pretty sure that pdb relies on this as a way to set local variables, though, so I think this is probably more of a bug in the test suite than anything else. Maybe a point to be taken in this issue is that pdb does a poor usage of this feature as shown in issue 9633: changing the value of a local only works in limited cases. ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 06:17:19 2017 From: report at bugs.python.org (Manvi B) Date: Sat, 01 Jul 2017 10:17:19 +0000 Subject: [issue26506] [EASY] hex() documentation: mention "%x" % int In-Reply-To: <1457372823.56.0.270827849914.issue26506@psf.upfronthosting.co.za> Message-ID: <1498904239.58.0.871374044772.issue26506@psf.upfronthosting.co.za> Changes by Manvi B : ---------- pull_requests: +2590 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 08:14:47 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 01 Jul 2017 12:14:47 +0000 Subject: [issue30695] add a nomemory_allocator to the _testcapi module In-Reply-To: <1497781271.4.0.00244472655339.issue30695@psf.upfronthosting.co.za> Message-ID: <1498911287.83.0.34687049538.issue30695@psf.upfronthosting.co.za> Xavier de Gaye added the comment: New changeset 85f643023fed3d4e2fb8e399f9ad57f3a65ef237 by xdegaye in branch 'master': bpo-30695: Add set_nomemory(start, stop) to _testcapi (GH-2406) https://github.com/python/cpython/commit/85f643023fed3d4e2fb8e399f9ad57f3a65ef237 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 09:43:57 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 01 Jul 2017 13:43:57 +0000 Subject: [issue30817] Abort in PyErr_PrintEx() when no memory In-Reply-To: <1498832371.19.0.0580869338001.issue30817@psf.upfronthosting.co.za> Message-ID: <1498916637.08.0.675770910932.issue30817@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- pull_requests: +2591 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 11:26:01 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 01 Jul 2017 15:26:01 +0000 Subject: [issue30703] Non-reentrant signal handler (test_multiprocessing_forkserver hangs) In-Reply-To: <1497885657.03.0.477288552654.issue30703@psf.upfronthosting.co.za> Message-ID: <1498922761.51.0.123392075137.issue30703@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +2592 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 12:38:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jul 2017 16:38:52 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1498927132.82.0.469595611174.issue30814@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: On other side, issue23203 fixed just a symptom. The issue is reproduced in master when replace "import foobar.submodule as foo" with "import foobar.submodule; foo = foobar.submodule". The regression may be related to issue22557. Either the optimization introduced a bug, or it exposed an existing bug by changing timings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 12:39:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jul 2017 16:39:42 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1498927182.59.0.516135159177.issue30814@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka keywords: +3.6regression versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 13:05:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jul 2017 17:05:47 +0000 Subject: [issue30817] Abort in PyErr_PrintEx() when no memory In-Reply-To: <1498832371.19.0.0580869338001.issue30817@psf.upfronthosting.co.za> Message-ID: <1498928747.48.0.59395298775.issue30817@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is it good to ignore errors of setting sys attributes? Can we prevent these errors? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 13:12:08 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 01 Jul 2017 17:12:08 +0000 Subject: [issue30703] Non-reentrant signal handler (test_multiprocessing_forkserver hangs) In-Reply-To: <1497885657.03.0.477288552654.issue30703@psf.upfronthosting.co.za> Message-ID: <1498929128.14.0.286123479204.issue30703@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 3024c0529077f5cff0b32dc84b5923c8fba99a87 by Antoine Pitrou in branch '3.6': [3.6] bpo-30703: Improve signal delivery (GH-2415) (#2527) https://github.com/python/cpython/commit/3024c0529077f5cff0b32dc84b5923c8fba99a87 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 13:12:08 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 01 Jul 2017 17:12:08 +0000 Subject: [issue30796] Failures/crashes in test_signal on some buildbots In-Reply-To: <1498688634.58.0.502091331703.issue30796@psf.upfronthosting.co.za> Message-ID: <1498929128.33.0.751149657008.issue30796@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 3024c0529077f5cff0b32dc84b5923c8fba99a87 by Antoine Pitrou in branch '3.6': [3.6] bpo-30703: Improve signal delivery (GH-2415) (#2527) https://github.com/python/cpython/commit/3024c0529077f5cff0b32dc84b5923c8fba99a87 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 13:14:23 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 01 Jul 2017 17:14:23 +0000 Subject: [issue30703] Non-reentrant signal handler (test_multiprocessing_forkserver hangs) In-Reply-To: <1497885657.03.0.477288552654.issue30703@psf.upfronthosting.co.za> Message-ID: <1498929263.12.0.125232371741.issue30703@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 13:34:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jul 2017 17:34:47 +0000 Subject: [issue30441] os.environ raises RuntimeError: dictionary changed size during iteration In-Reply-To: <1495550150.73.0.497197540263.issue30441@psf.upfronthosting.co.za> Message-ID: <1498930487.54.0.319599199244.issue30441@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8a8d28501fc8ce25926d168f1c657656c809fd4c by Serhiy Storchaka (Osvaldo Santana Neto) in branch 'master': bpo-30441: Fix bug when modifying os.environ while iterating over it (#2409) https://github.com/python/cpython/commit/8a8d28501fc8ce25926d168f1c657656c809fd4c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 13:35:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jul 2017 17:35:39 +0000 Subject: [issue30441] os.environ raises RuntimeError: dictionary changed size during iteration In-Reply-To: <1495550150.73.0.497197540263.issue30441@psf.upfronthosting.co.za> Message-ID: <1498930539.83.0.850961888463.issue30441@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 13:42:59 2017 From: report at bugs.python.org (morris wang) Date: Sat, 01 Jul 2017 17:42:59 +0000 Subject: [issue30823] os.startfile("") craches Python 2.7, 3.4, 3.5 Message-ID: <1498930979.02.0.689634433232.issue30823@psf.upfronthosting.co.za> New submission from morris wang: try... except... won't catch it. import os try: os.startfile("") except: pass crashes python, resulting in error message "python has stopped working" ---------- messages: 297487 nosy: morris wang priority: normal severity: normal status: open title: os.startfile("") craches Python 2.7, 3.4, 3.5 type: crash versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 13:47:49 2017 From: report at bugs.python.org (morris wang) Date: Sat, 01 Jul 2017 17:47:49 +0000 Subject: [issue30823] os.startfile("") craches Python 2.7, 3.4, 3.5 in Windows 7 In-Reply-To: <1498930979.02.0.689634433232.issue30823@psf.upfronthosting.co.za> Message-ID: <1498931269.07.0.783902551236.issue30823@psf.upfronthosting.co.za> Changes by morris wang : ---------- title: os.startfile("") craches Python 2.7, 3.4, 3.5 -> os.startfile("") craches Python 2.7, 3.4, 3.5 in Windows 7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 13:48:23 2017 From: report at bugs.python.org (R. David Murray) Date: Sat, 01 Jul 2017 17:48:23 +0000 Subject: [issue30717] str.center() is not unicode aware In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1498931303.41.0.0271136664852.issue30717@psf.upfronthosting.co.za> R. David Murray added the comment: See also issue 12568. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 13:49:24 2017 From: report at bugs.python.org (R. David Murray) Date: Sat, 01 Jul 2017 17:49:24 +0000 Subject: [issue12568] Add functions to get the width in columns of a character In-Reply-To: <1310683436.9.0.375403702242.issue12568@psf.upfronthosting.co.za> Message-ID: <1498931364.13.0.370662119524.issue12568@psf.upfronthosting.co.za> R. David Murray added the comment: Interestingly, this just came up again in issue 30717. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 13:49:59 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 01 Jul 2017 17:49:59 +0000 Subject: [issue30823] os.startfile("") craches Python 2.7, 3.4, 3.5 in Windows 7 In-Reply-To: <1498930979.02.0.689634433232.issue30823@psf.upfronthosting.co.za> Message-ID: <1498931399.34.0.468572121172.issue30823@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 14:02:10 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 01 Jul 2017 18:02:10 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1498932130.86.0.660171432815.issue27425@psf.upfronthosting.co.za> Ned Deily added the comment: OK, based on Steve's response, I am closing this again as it sounds like it should not be an issue going forward with releases and also not for dev builds as long as people do a fresh clone if necessary. Further discussion on hardening the tests can take place over on bpo-30716. ---------- priority: release blocker -> resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 14:07:28 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 01 Jul 2017 18:07:28 +0000 Subject: [issue30715] Test_winreg, test_dynamic_key hangs on my Win 10 In-Reply-To: <1497978867.14.0.417332837919.issue30715@psf.upfronthosting.co.za> Message-ID: <1498932448.67.0.419179239417.issue30715@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 14:24:11 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 01 Jul 2017 18:24:11 +0000 Subject: [issue30495] IDLE: modernize textview module In-Reply-To: <1495941740.56.0.621655501188.issue30495@psf.upfronthosting.co.za> Message-ID: <1498933451.32.0.0281970461303.issue30495@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I have some questions about the final version: 1. `ViewWindow` still has `self.button_ok` defined, but it's not used as far as I can tell. Can that be removed? 2. `def ok` in ViewFrame calls `self.parent.destroy`. I was wondering if it should be `self.parent.ok`? Trying to think of the pros and cons of both ways. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 14:28:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jul 2017 18:28:07 +0000 Subject: [issue12568] Add functions to get the width in columns of a character In-Reply-To: <1310683436.9.0.375403702242.issue12568@psf.upfronthosting.co.za> Message-ID: <1498933687.65.0.748255291304.issue12568@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: At least two other issues depend on this: issue17048 and issue24665. If Victor lost interest in this issue I take it. I'm going to push at least imperfect solution which may be improved in time. ---------- resolution: rejected -> stage: resolved -> status: closed -> open versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 14:41:21 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 01 Jul 2017 18:41:21 +0000 Subject: [issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers In-Reply-To: <1485909545.04.0.650924943503.issue29406@psf.upfronthosting.co.za> Message-ID: <1498934481.47.0.420484122384.issue29406@psf.upfronthosting.co.za> Ned Deily added the comment: Yury, based on the most recent comments, can this issue be closed now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 15:31:36 2017 From: report at bugs.python.org (Pierre Quentel) Date: Sat, 01 Jul 2017 19:31:36 +0000 Subject: [issue30824] Add mimetype for extension .json Message-ID: <1498937496.5.0.283718177471.issue30824@psf.upfronthosting.co.za> New submission from Pierre Quentel: I propose to add a mapping of file extension .json to mime type "application/json". This is registered in https://www.iana.org/assignments/media-types ---------- components: Library (Lib) messages: 297494 nosy: quentel, r.david.murray priority: normal severity: normal status: open title: Add mimetype for extension .json type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 15:58:34 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 01 Jul 2017 19:58:34 +0000 Subject: [issue30817] Abort in PyErr_PrintEx() when no memory In-Reply-To: <1498832371.19.0.0580869338001.issue30817@psf.upfronthosting.co.za> Message-ID: <1498939114.66.0.740977354624.issue30817@psf.upfronthosting.co.za> Xavier de Gaye added the comment: There are just 6 cases left where the return code of _PySys_SetObjectId() is ignored: Python/pylifecycle.c|689 col 5| _PySys_SetObjectId(&PyId_stderr, pstderr); Python/pylifecycle.c|1211 col 9| _PySys_SetObjectId(&PyId_stderr, pstderr); Python/pylifecycle.c|1657 col 5| _PySys_SetObjectId(&PyId_stdin, std); Python/pylifecycle.c|1666 col 5| _PySys_SetObjectId(&PyId_stdout, std); ./Python/pythonrun.c|104 col 9| _PySys_SetObjectId(&PyId_ps1, v = PyUnicode_FromString(">>> ")); ./Python/pythonrun.c|109 col 9| _PySys_SetObjectId(&PyId_ps2, v = PyUnicode_FromString("... ")); Error should be handled there in the same way errors are handled within the functions where they are invoked (returning -1, NULL or aborting). This should be the purpose of another issue as it is acceptable I think that there is no test case for those changes. I am leaving the day after tomorrow for few weeks, without internet access (sailing to the mid-atlantic), and will create then a new issue if no one else does that first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 16:43:43 2017 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Jul 2017 20:43:43 +0000 Subject: [issue30794] Add multiprocessing.Process.kill() In-Reply-To: <1498680221.55.0.739149893408.issue30794@psf.upfronthosting.co.za> Message-ID: <1498941823.94.0.550869481461.issue30794@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +2593 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 16:46:08 2017 From: report at bugs.python.org (Eric Lafontaine) Date: Sat, 01 Jul 2017 20:46:08 +0000 Subject: [issue28879] smtplib send_message should add Date header if it is missing, per RFC5322 In-Reply-To: <1480952895.22.0.418354723664.issue28879@psf.upfronthosting.co.za> Message-ID: <1498941968.61.0.131568601867.issue28879@psf.upfronthosting.co.za> Eric Lafontaine added the comment: Hi All, Should I try to make this a github PR instead to accelerate the review? Regards, Eric Lafontaine ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 17:15:21 2017 From: report at bugs.python.org (Vitor Pereira) Date: Sat, 01 Jul 2017 21:15:21 +0000 Subject: [issue30794] Add multiprocessing.Process.kill() In-Reply-To: <1498680221.55.0.739149893408.issue30794@psf.upfronthosting.co.za> Message-ID: <1498943721.81.0.954224631408.issue30794@psf.upfronthosting.co.za> Changes by Vitor Pereira : ---------- nosy: +vmsp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 17:23:44 2017 From: report at bugs.python.org (Max Vorobev) Date: Sat, 01 Jul 2017 21:23:44 +0000 Subject: [issue30825] csv.Sniffer does not detect lineterminator Message-ID: <1498944224.71.0.636990812421.issue30825@psf.upfronthosting.co.za> New submission from Max Vorobev: Line terminator defaults to '\r\n' while detecting dialect in csv.Sniffer ---------- components: Library (Lib) messages: 297497 nosy: Max Vorobev priority: normal severity: normal status: open title: csv.Sniffer does not detect lineterminator type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 18:01:12 2017 From: report at bugs.python.org (Max Vorobev) Date: Sat, 01 Jul 2017 22:01:12 +0000 Subject: [issue30825] csv.Sniffer does not detect lineterminator In-Reply-To: <1498944224.71.0.636990812421.issue30825@psf.upfronthosting.co.za> Message-ID: <1498946472.93.0.474280788208.issue30825@psf.upfronthosting.co.za> Changes by Max Vorobev : ---------- pull_requests: +2595 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 18:25:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 01 Jul 2017 22:25:16 +0000 Subject: [issue30473] defaultdict raises SystemError, __missing__ returned NULL in thread In-Reply-To: <1497990917.56.0.623864262852.issue30473@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > It was usual to validate that the bug is now fixed. Crap, I wanted to write: useful, not usual!? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 19:44:27 2017 From: report at bugs.python.org (R. David Murray) Date: Sat, 01 Jul 2017 23:44:27 +0000 Subject: [issue30798] Document that subprocess.Popen does not set PWD In-Reply-To: <1498703554.38.0.302571639781.issue30798@psf.upfronthosting.co.za> Message-ID: <1498952667.77.0.193311813661.issue30798@psf.upfronthosting.co.za> R. David Murray added the comment: If you pass shell=True, PWD gests set, because it is a shell variable and the shell sets it. If you don't, it doesn't, just like all the other shell-maintained variables. I'm not sure it is worth calling out specifically in the Popen docs, myself; it is one consequence among *many* of calling a program directly rather than through a shell. (Note that if a shell is involved at any point, PWD gets set, so it is only binary programs that require that they be called from a shell that are at issue.) Furthermore, it is not obvious that even all shells set PWD, although I believe that most do. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 19:44:36 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Sat, 01 Jul 2017 23:44:36 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1498952676.76.0.414289290459.issue30822@psf.upfronthosting.co.za> Changes by Utkarsh Upadhyay : ---------- pull_requests: +2597 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 20:38:27 2017 From: report at bugs.python.org (James Lin) Date: Sun, 02 Jul 2017 00:38:27 +0000 Subject: [issue30798] Document that subprocess.Popen does not set PWD In-Reply-To: <1498703554.38.0.302571639781.issue30798@psf.upfronthosting.co.za> Message-ID: <1498955907.78.0.0872902512041.issue30798@psf.upfronthosting.co.za> James Lin added the comment: Yes, but the Python docs have scary-looking warnings about using shell=True, so people (rightly) should avoid using shell=True if they don't think that they need it. And in this case, people might not even know that they're invoking some binary that expects PWD from the shell. In my experience, it's not that uncommon for people to rewrite sh/bash shell scripts in Python. Something starts off as a sh/bash script, evolves to a point where it's cumbersome to maintain, and it gets rewritten in Python. But after it's rewritten, some invoked binaries might not behave as before, and it's unclear why. When I encountered this problem myself, the first thing I tried was to explicitly set the `cwd` argument. Some mention of the PWD environment variable would have saved me a lot of time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 22:01:38 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Jul 2017 02:01:38 +0000 Subject: [issue30597] Show expected input in custom "print" error message In-Reply-To: <1496918206.6.0.484368054025.issue30597@psf.upfronthosting.co.za> Message-ID: <1498960898.85.0.735278327229.issue30597@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 22:17:54 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Jul 2017 02:17:54 +0000 Subject: [issue30597] Show expected input in custom "print" error message In-Reply-To: <1496918206.6.0.484368054025.issue30597@psf.upfronthosting.co.za> Message-ID: <1498961874.12.0.968552625511.issue30597@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +2598 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 22:41:13 2017 From: report at bugs.python.org (Kojo Idrissa) Date: Sun, 02 Jul 2017 02:41:13 +0000 Subject: [issue29933] asyncio: set_write_buffer_limits() doc doesn't specify unit of the parameters In-Reply-To: <1490707139.27.0.838851028066.issue29933@psf.upfronthosting.co.za> Message-ID: <1498963273.15.0.535618783745.issue29933@psf.upfronthosting.co.za> Changes by Kojo Idrissa : ---------- pull_requests: +2599 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 22:41:20 2017 From: report at bugs.python.org (Kojo Idrissa) Date: Sun, 02 Jul 2017 02:41:20 +0000 Subject: [issue29933] asyncio: set_write_buffer_limits() doc doesn't specify unit of the parameters In-Reply-To: <1490707139.27.0.838851028066.issue29933@psf.upfronthosting.co.za> Message-ID: <1498963280.05.0.014572841534.issue29933@psf.upfronthosting.co.za> Changes by Kojo Idrissa : ---------- pull_requests: +2600 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 22:47:58 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 02 Jul 2017 02:47:58 +0000 Subject: [issue29933] asyncio: set_write_buffer_limits() doc doesn't specify unit of the parameters In-Reply-To: <1490707139.27.0.838851028066.issue29933@psf.upfronthosting.co.za> Message-ID: <1498963678.88.0.513639975524.issue29933@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 4685e56596f9f332e402c79c913a73b19f4411e1 by Mariatta (Kojo Idrissa) in branch '3.5': [3.5] bpo-29933: Improve set_write_buffer_limits description (GH-2262) (GH-2533) https://github.com/python/cpython/commit/4685e56596f9f332e402c79c913a73b19f4411e1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 22:48:10 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 02 Jul 2017 02:48:10 +0000 Subject: [issue29933] asyncio: set_write_buffer_limits() doc doesn't specify unit of the parameters In-Reply-To: <1490707139.27.0.838851028066.issue29933@psf.upfronthosting.co.za> Message-ID: <1498963690.1.0.0219314243914.issue29933@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 03af4282423b1c287a194664f90496cfc9cf20c7 by Mariatta (Kojo Idrissa) in branch '3.6': [3.6] bpo-29933: Improve set_write_buffer_limits description (GH-2262) (GH-2532) https://github.com/python/cpython/commit/03af4282423b1c287a194664f90496cfc9cf20c7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 22:53:01 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Jul 2017 02:53:01 +0000 Subject: [issue30744] Local variable assignment is broken when combined with threads + tracing + closures In-Reply-To: <1498277129.07.0.940069687434.issue30744@psf.upfronthosting.co.za> Message-ID: <1498963981.07.0.0534225847653.issue30744@psf.upfronthosting.co.za> Nick Coghlan added the comment: As per the discussion in issue #17960, I'm going to put together a short PEP about this topic for Python 3.7 that will better specify the expected behaviour of locals() and frame.f_locals. That will be a combination of making the status quo official, proposing some changes, and asking Guido for a design decision. Documenting the status quo: make the current behaviour at module scope, class scope, and the corresponding behaviours of exec and eval officially part of the status quo Proposing a change: replacing the current LocalsToFast approach with a custom write-through proxy type that updates the locals array and nonlocal cell variables immediately whenever frame.f_locals is modified (this is the part that should fix the bug reported in this issue) Requesting a design decision: whether locals() at function(/generator/coroutine) scope should return: - a direct reference to the write-through proxy - a live read-only dict-proxy (ala class __dict__ attributes) - a point-in-time snapshot (i.e. copying the namespace) ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 22:54:02 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Jul 2017 02:54:02 +0000 Subject: [issue30744] Local variable assignment is broken when combined with threads + tracing + closures In-Reply-To: <1498277129.07.0.940069687434.issue30744@psf.upfronthosting.co.za> Message-ID: <1498964042.1.0.0185531485985.issue30744@psf.upfronthosting.co.za> Nick Coghlan added the comment: Err, s/officially part of the status quo/officially part of the language specification/ :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 22:57:31 2017 From: report at bugs.python.org (mikeee) Date: Sun, 02 Jul 2017 02:57:31 +0000 Subject: [issue30823] os.startfile("") craches Python 2.7, 3.4 in Windows 7 32 bit in ConEmu 161002 [32] In-Reply-To: <1498930979.02.0.689634433232.issue30823@psf.upfronthosting.co.za> Message-ID: <1498964251.87.0.930606649854.issue30823@psf.upfronthosting.co.za> mikeee added the comment: Apparently it's a ConEmu bug! ---------- resolution: -> not a bug title: os.startfile("") craches Python 2.7, 3.4, 3.5 in Windows 7 -> os.startfile("") craches Python 2.7, 3.4 in Windows 7 32 bit in ConEmu 161002 [32] _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 23:05:13 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Jul 2017 03:05:13 +0000 Subject: [issue30495] IDLE: modernize textview module In-Reply-To: <1495941740.56.0.621655501188.issue30495@psf.upfronthosting.co.za> Message-ID: <1498964713.65.0.915041519331.issue30495@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I was trying to think of 2 possible future uses of ViewFrame in addition to current embedding in in ViewWindows: embedded in a tab, and tiled in a panel. With no window close [X] buttom, the button in a frame will be needed, so I left it. Since the button is now [Close] rather than [OK], the function should be close rather than ok. I copied, rather than cut, before pasting and editing. The Windows button is not needed. The window ok is for the protocol call, but I don't really know if that is needed. Tk apps seem to work without it. I may investigate more someday. Leave it for now. By calling window destroy directly, the frame close will survive window close being deleted, but not window close being edited to add other actions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 00:19:59 2017 From: report at bugs.python.org (Anmol Gupta) Date: Sun, 02 Jul 2017 04:19:59 +0000 Subject: [issue30826] More details in reference 'Looping through a list in Python and modifying it' Message-ID: <1498969199.07.0.0494223329583.issue30826@psf.upfronthosting.co.za> Changes by Anmol Gupta : ---------- assignee: docs at python components: Documentation nosy: Anmol Gupta, docs at python priority: normal severity: normal status: open title: More details in reference 'Looping through a list in Python and modifying it' type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 00:22:08 2017 From: report at bugs.python.org (Anmol Gupta) Date: Sun, 02 Jul 2017 04:22:08 +0000 Subject: [issue30826] More details in reference 'Looping through a list in Python and modifying it' Message-ID: <1498969328.51.0.74139016573.issue30826@psf.upfronthosting.co.za> New submission from Anmol Gupta: Documentation section: https://docs.python.org/3/reference/compound_stmts.html#for The documentation does not explain at all why is there an infinite loop when not using a copy of the list. It leaves the reader in a confused state. Even there are questions concerning the same on stackoverlflow: https://stackoverflow.com/questions/44633798/loop-through-a-list-in-python-and-modify-it ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 01:21:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jul 2017 05:21:22 +0000 Subject: [issue30817] Abort in PyErr_PrintEx() when no memory In-Reply-To: <1498832371.19.0.0580869338001.issue30817@psf.upfronthosting.co.za> Message-ID: <1498972882.7.0.0487266346907.issue30817@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I tried to set last_type, last_value and last_traceback to None at startup, and this also fixes a crash. But this changes behavior (these attributes became set), and deleting them doesn't guaranties that following setting will be successful, especially with new compact dict implementation. ---------- Added file: http://bugs.python.org/file46986/set-last-exception.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 02:29:34 2017 From: report at bugs.python.org (Anmol Gupta) Date: Sun, 02 Jul 2017 06:29:34 +0000 Subject: [issue30826] More details in reference 'Looping through a list in Python and modifying it' In-Reply-To: <1498969328.51.0.74139016573.issue30826@psf.upfronthosting.co.za> Message-ID: <1498976974.79.0.347830468334.issue30826@psf.upfronthosting.co.za> Anmol Gupta added the comment: Wrong documentaion section linked. Correct seciton: Section 4.2 on https://docs.python.org/3/tutorial/controlflow.html The last line needs more explanation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 05:50:54 2017 From: report at bugs.python.org (Sarge Borsch) Date: Sun, 02 Jul 2017 09:50:54 +0000 Subject: [issue30827] Tweak order of links in https://www.python.org/downloads/source/ Message-ID: <1498989054.7.0.635942220914.issue30827@psf.upfronthosting.co.za> New submission from Sarge Borsch: Right now, there are these links in https://www.python.org/downloads/source/: Latest Python 2 Release - Python 2.7.13 Latest Python 3 Release - Python 3.6.1 Python 3 should be the first, because it's the real Python now, and Python 2 is deprecated and legacy. ---------- assignee: docs at python components: Documentation, Installation messages: 297510 nosy: Sarge Borsch, docs at python priority: normal severity: normal status: open title: Tweak order of links in https://www.python.org/downloads/source/ type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 05:54:34 2017 From: report at bugs.python.org (Berker Peksag) Date: Sun, 02 Jul 2017 09:54:34 +0000 Subject: [issue30827] Tweak order of links in https://www.python.org/downloads/source/ In-Reply-To: <1498989054.7.0.635942220914.issue30827@psf.upfronthosting.co.za> Message-ID: <1498989274.98.0.194199049064.issue30827@psf.upfronthosting.co.za> Berker Peksag added the comment: Thank you for the report, Sarge. This is already reported to python.org issue tracker at https://github.com/python/pythondotorg/issues/1079 Closing this as 'third party'. ---------- nosy: +berker.peksag resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 07:44:04 2017 From: report at bugs.python.org (Martin Panter) Date: Sun, 02 Jul 2017 11:44:04 +0000 Subject: [issue30713] Reject newline character (U+000A) in URLs in urllib.parse In-Reply-To: <1497972033.13.0.439611221466.issue30713@psf.upfronthosting.co.za> Message-ID: <1498995844.64.0.369462620102.issue30713@psf.upfronthosting.co.za> Martin Panter added the comment: It might help if you explained why you want to make these changes. Otherwise I have to guess. Is a compromise between strictly rejecting all non-URL characters (not just control characters), versus leaving it up to user applications to validate their URLs? I guess it could partially prevent some newline injection problems like Issue 29606 (FTP) and Issue 30458 (HTTP). But how do we know it closes more security holes than it opens? I don?t understand the focus on these three functions. They are undocumented and more-or-less deprecated (Issue 27485). Why not focus on the ?urlsplit? and ?urlparse? functions first? Some of the changes seem to go too far, e.g. in the splithost("//hostname/u\nrl") test case, the hostname is fine, but it is not recognized. This would partially conflict the patch in Issue 13359, with proposes to percent-encode newlines after passing through ?splithost?. And it would make the URL look like a relative URL, which is a potential security hole and reminds me of the open redirect bug report (Issue 23505). ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 08:24:37 2017 From: report at bugs.python.org (Ned Williamson) Date: Sun, 02 Jul 2017 12:24:37 +0000 Subject: [issue30828] Out of bounds write in _asyncio_Future_remove_done_callback Message-ID: <1498998277.02.0.104703912354.issue30828@psf.upfronthosting.co.za> New submission from Ned Williamson: This is very similar to the issue reported in https://bugs.python.org/issue28963 - this function is still buggy when items are pushed onto the done callbacks, as the new list is assumed to be large enough. The issue was pointed out on the code review page here: http://www.psf.upfronthosting.co.za/review/28963/ but it seems it was missed. ``` import asyncio fut = asyncio.Future() fut.add_done_callback(str) for _ in range(63): fut.add_done_callback(id) class evil: def __eq__(self, other): fut.add_done_callback(id) return False fut.remove_done_callback(evil()) ``` This testcase leads to a crash due to the out of bounds access: ``` ASAN:DEADLYSIGNAL ================================================================= ==21457==ERROR: AddressSanitizer: SEGV on unknown address 0x00010f99fc90 (pc 0x00010f99fc90 bp 0x7fff53c18f70 sp 0x7fff53c18eb8 T0) #0 0x10f99fc8f () #1 0x10c2675cb in _PyEval_EvalFrameDefault ceval.c:2330 #2 0x10c03f19f in function_code_fastcall call.c:282 #3 0x10c03cf2f in _PyFunction_FastCallDict call.c:328 #4 0x10c040acf in _PyObject_FastCall_Prepend call.c:844 #5 0x10c12de9c in slot_tp_richcompare typeobject.c:1473 #6 0x10c0edc46 in PyObject_RichCompare object.c:671 #7 0x10c0ee101 in PyObject_RichCompareBool object.c:741 #8 0x1100dc593 in _asyncio_Future_remove_done_callback _asynciomodule.c:531 #9 0x10c0403e3 in _PyMethodDef_RawFastCallKeywords call.c:630 #10 0x10c04f659 in _PyMethodDescr_FastCallKeywords descrobject.c:287 #11 0x10c27f77f in call_function ceval.c:4854 #12 0x10c26b0e8 in _PyEval_EvalFrameDefault ceval.c:3336 #13 0x10c281b6b in _PyEval_EvalCodeWithName ceval.c:678 #14 0x10c264603 in PyEval_EvalCode ceval.c:4221 #15 0x10c3175f7 in PyRun_FileExFlags pythonrun.c:982 #16 0x10c315cc0 in PyRun_SimpleFileExFlags pythonrun.c:398 #17 0x10c3622b5 in Py_Main main.c:341 #18 0x10bfe6a60 in main python.c:102 #19 0x7fff96740234 in start (libdyld.dylib+0x5234) ``` In order to fix this, I recommend just banning returning an error when the user attempts to append to the done callbacks while removing one. See the attached patch (may need fixing for style/consistency with error messages). ---------- components: asyncio files: fix.patch keywords: patch messages: 297513 nosy: Ned Williamson, yselivanov priority: normal severity: normal status: open title: Out of bounds write in _asyncio_Future_remove_done_callback type: crash versions: Python 3.7 Added file: http://bugs.python.org/file46987/fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 08:37:06 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 02 Jul 2017 12:37:06 +0000 Subject: [issue30826] More details in reference 'Looping through a list in Python and modifying it' In-Reply-To: <1498969328.51.0.74139016573.issue30826@psf.upfronthosting.co.za> Message-ID: <1498999026.49.0.428501505011.issue30826@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The example would be more clear if we replaced the opaque idiom "words[:]" with the more explicit alternative "words.copy()". ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 08:46:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jul 2017 12:46:06 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1498999566.81.0.476785758256.issue30822@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 98b6bc3bf72532b784a1c1fa76eaa6026a663e44 by Serhiy Storchaka (Utkarsh Upadhyay) in branch 'master': bpo-30822: Fix testing of datetime module. (#2530) https://github.com/python/cpython/commit/98b6bc3bf72532b784a1c1fa76eaa6026a663e44 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 08:47:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jul 2017 12:47:03 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1498999623.89.0.375578993493.issue30822@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 09:04:08 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Jul 2017 13:04:08 +0000 Subject: [issue27584] New addition of vSockets to the python socket module In-Reply-To: <1469115390.74.0.838831983223.issue27584@psf.upfronthosting.co.za> Message-ID: <1499000648.11.0.0406796265949.issue27584@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm attempting to figure out whether or not we have a buildbot in the Buildbot fleet that will cover this test case. Based on the pre-merge CI run, it seems Ubuntu 14.04 is too old to include the required kernel headers. However, it looks like RHEL/CentOS are also currently still missing the userspace changes to fully enable AF_VSOCK support (as the Red Hat backport flow appears to have gone through the dedicated hypervisor variant first): https://bugzilla.redhat.com/show_bug.cgi?id=1315822 So it's looking to me like we're going to need either a recent Fedora, a non-LTS Ubuntu, or a Debian 9 system to be confident we have the right headers available. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 09:52:47 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Sun, 02 Jul 2017 13:52:47 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499003567.73.0.296931103394.issue30822@psf.upfronthosting.co.za> Utkarsh Upadhyay added the comment: Are there any guides re: backporting commits? Just to confirm verify that I'm going about it right; I?m planning on cherry-picking relevant commits back to branch 3.5, 3.6, resolving the merge conflicts, and then opening two separate PRs for them with `bpo-30822` in their titles. Sounds about right? ~ ut ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 12:12:54 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 02 Jul 2017 16:12:54 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499011974.79.0.511177871013.issue30822@psf.upfronthosting.co.za> Ned Deily added the comment: Serhiy, it appears that the added tests are taking a long time to run and thus causing many buildbot failures, for example: http://buildbot.python.org/all/builders/ARMv7%20Ubuntu%203.x/builds/1013 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 12:17:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jul 2017 16:17:16 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499012236.59.0.347026444088.issue30822@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, test.datetimetester.ZoneInfoTest[Europe/Andorra]_Pure_Pure_Pure -- something looks wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 13:11:24 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Sun, 02 Jul 2017 17:11:24 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499015484.95.0.0261188833962.issue30822@psf.upfronthosting.co.za> Utkarsh Upadhyay added the comment: I can reproduce the names with `_Pure_Pure_Pure` if I run the tests with `-utzdata`. Investigating. ~ ut ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 13:14:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jul 2017 17:14:56 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499015696.95.0.122199561002.issue30822@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 13:40:31 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 02 Jul 2017 17:40:31 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1499017231.76.0.110059138926.issue30302@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Sorry for being late to the discussion, but please allow me to add a -1 vote. The time.struct_time precedent is indeed comically verbose. Whenever I need to inspect a struct_time, I cast it to a plain tuple Compare >>> time.gmtime(1121871596) time.struct_time(tm_year=2005, tm_mon=7, tm_mday=20, tm_hour=14, tm_min=59, tm_sec=56, tm_wday=2, tm_yday=201, tm_isdst=0) and >>> time.gmtime(1121871596)[:] (2005, 7, 20, 14, 59, 56, 2, 201, 0) Unless you need to know what the last three fields are, the long form gives no advantage. datetime.timedelta(days=3114, seconds=28747, microseconds=100000) is not as verbose and the extra information may be helpful the first time you see it, but if you deal with timedeltas a lot, it would quickly become annoying. Moreover, unlike in the struct_time case, there will be no easy way to suppress metadata. Furthermore, "seconds=28747" is not that user-friendly. A friendlier representation would be "hours=7, minutes=59, seconds=7" and similar information is displayed when you print a timedelta: >>> datetime.timedelta(days=3114, seconds=28747, microseconds=100000) datetime.timedelta(3114, 28747, 100000) >>> print(_) 3114 days, 7:59:07.100000 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 13:40:58 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 02 Jul 2017 17:40:58 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1499017258.1.0.558712092072.issue30302@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 13:55:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jul 2017 17:55:20 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499018120.5.0.743576531023.issue30822@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2601 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 14:02:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jul 2017 18:02:36 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499018556.84.0.7532767273.issue30822@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The quick solution -- just deduplicate test classes. But the code needs rewriting. Current code is tricky and fragile. It doesn't work with --list-cases (and I suppose it doesn't work well with other advanced unittest features). This would be not easy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 14:07:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jul 2017 18:07:16 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499018836.46.0.590593958116.issue30822@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Are there any guides re: backporting commits? > > Just to confirm verify that I'm going about it right; I?m planning on cherry-picking relevant commits back to branch 3.5, 3.6, resolving the merge conflicts, and then opening two separate PRs for them with `bpo-30822` in their titles. All right. See https://docs.python.org/devguide/committing.html#backporting-changes-to-an-older-version . You can cherry-pick manually or using cherry_picker.py which adds correct prefix to commit message and helps to create a pull request. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 15:36:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jul 2017 19:36:14 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499024174.13.0.543918643591.issue30822@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 34b54873b51a1ebee2a3c57b7205537b4f33128d by Serhiy Storchaka in branch 'master': bpo-30822: Deduplicate ZoneInfoTest classes in test_datetime. (#2534) https://github.com/python/cpython/commit/34b54873b51a1ebee2a3c57b7205537b4f33128d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 15:37:07 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Sun, 02 Jul 2017 19:37:07 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499024227.65.0.448751462579.issue30822@psf.upfronthosting.co.za> Utkarsh Upadhyay added the comment: So the problem is occurring because a single `Test` class is being instantiated with three different tests here in datetimetester.py: for name in ZoneInfo.zonenames(): Test = type('ZoneInfoTest[%s]' % name, (ZoneInfoTest,), {}) Test.zonename = name for method in dir(Test): if method.startswith('test_'): tests.append(Test(method)) here: https://github.com/python/cpython/blob/master/Lib/test/datetimetester.py#L4853 The `Test` class which is being dynamically created is being instantiated with the test methods: test_folds, test_gaps, test_system_transitions and is being appended to tests. This makes that class to appear thrice in `test_classes` in `test_datetime.py`: elif issubclass(cls, unittest.TestSuite): suit = cls() test_classes.extend(type(test) for test in suit) here: https://github.com/python/cpython/blob/master/Lib/test/test_datetime.py#L34 Hence, the class gets `_Pure` and `_Fast` appended to its name thrice and gets executed thrice, making the tests take 3 times as long to run. This is confirmed by changing the code to the following: for name in ZoneInfo.zonenames(): Test = type('ZoneInfoTest[%s]' % name, (ZoneInfoTest,), {}) Test.zonename = name tests.append(Test()) # for method in dir(Test): # if method.startswith('test_'): # tests.append(Test(method)) However, I'm not sure what implications this has w.r.t. unittests and the advanced cases. The other way to fix it is to create a set out of the classes, as suggested in PR #2534. ~ ut ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 19:23:29 2017 From: report at bugs.python.org (Anderson) Date: Sun, 02 Jul 2017 23:23:29 +0000 Subject: [issue30829] 'Cannot serialize socket object' after ssl_wrap Message-ID: <1499037809.64.0.235569319557.issue30829@psf.upfronthosting.co.za> New submission from Anderson: --------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python3.6/socketserver.py", line 317, in _handle_request_noblock self.process_request(request, client_address) File "/opt/storage_server/server_tcp.py", line 121, in process_request self.pipes[self.proc_turn][1].send((request, client_address)) File "/usr/local/lib/python3.6/multiprocessing/connection.py", line 206, in send self._send_bytes(_ForkingPickler.dumps(obj)) File "/usr/local/lib/python3.6/multiprocessing/reduction.py", line 51, in dumps cls(buf, protocol).dump(obj) File "/usr/local/lib/python3.6/socket.py", line 185, in __getstate__ raise TypeError("Cannot serialize socket object") TypeError: Cannot serialize socket object --------------------------------------- I am trying to send a ssl wrapped socket object (server side) into a pipe to another process using multiprocessing. Btw, without ssl_wrap it works. Basically this: newsocket, fromaddr = self.socket.accept() connstream = ssl.wrap_socket(newsocket, server_side=True, certfile=self.certfile, keyfile=self.keyfile) pipe = multiprocessing.Pipe() proc = multiprocessing.Process(target=proc_run, args=(pipe[0],), daemon=False) proc.start() #Error here pipe[1].send((connstream, fromaddr)) I am sorry if this is intentional. ---------- assignee: christian.heimes components: SSL messages: 297526 nosy: Anderseta, christian.heimes priority: normal severity: normal status: open title: 'Cannot serialize socket object' after ssl_wrap versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 19:27:07 2017 From: report at bugs.python.org (Anderson) Date: Sun, 02 Jul 2017 23:27:07 +0000 Subject: [issue30829] 'Cannot serialize socket object' after ssl.wrap_socket In-Reply-To: <1499037809.64.0.235569319557.issue30829@psf.upfronthosting.co.za> Message-ID: <1499038027.44.0.854388490684.issue30829@psf.upfronthosting.co.za> Changes by Anderson : ---------- title: 'Cannot serialize socket object' after ssl_wrap -> 'Cannot serialize socket object' after ssl.wrap_socket _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 20:06:35 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 03 Jul 2017 00:06:35 +0000 Subject: [issue30824] Add mimetype for extension .json In-Reply-To: <1498937496.5.0.283718177471.issue30824@psf.upfronthosting.co.za> Message-ID: <1499040395.57.0.19390766334.issue30824@psf.upfronthosting.co.za> R. David Murray added the comment: Per our current policy with respect to mime types, this should be added to all currently maintained versions. ---------- stage: -> needs patch versions: +Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 20:11:50 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 03 Jul 2017 00:11:50 +0000 Subject: [issue28879] smtplib send_message should add Date header if it is missing, per RFC5322 In-Reply-To: <1480952895.22.0.418354723664.issue28879@psf.upfronthosting.co.za> Message-ID: <1499040710.97.0.601664627144.issue28879@psf.upfronthosting.co.za> R. David Murray added the comment: Yes. There's a chance someone else will review it if you do that. I'm still not likely to have time for a while, myself, but ping me again in a month if I haven't gotten to it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 20:34:59 2017 From: report at bugs.python.org (Martin Panter) Date: Mon, 03 Jul 2017 00:34:59 +0000 Subject: [issue19613] test_nntplib: sporadic failures, test_article_head_body() In-Reply-To: <1384536645.9.0.862907413915.issue19613@psf.upfronthosting.co.za> Message-ID: <1499042099.25.0.833065452967.issue19613@psf.upfronthosting.co.za> Martin Panter added the comment: It looks like I was fairly confident about my patch, but it was all theoretical and I was never able to analyze the failure myself. Sorry but I am unlikely to spend much time on this or open a pull request any time soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 22:25:25 2017 From: report at bugs.python.org (Wu Zongyong) Date: Mon, 03 Jul 2017 02:25:25 +0000 Subject: [issue30790] Can't use proxy to connect internet on windows Message-ID: <1499048725.31.0.449592024382.issue30790@psf.upfronthosting.co.za> Changes by Wu Zongyong : ---------- pull_requests: +2602 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 23:38:28 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 03 Jul 2017 03:38:28 +0000 Subject: [issue29812] test for token.py, and consistency tests for tokenize.py In-Reply-To: <1489532621.9.0.449448187774.issue29812@psf.upfronthosting.co.za> Message-ID: <1499053108.12.0.307257914739.issue29812@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 00:09:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Jul 2017 04:09:14 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499054954.07.0.409851230036.issue30822@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > This is confirmed by changing the code to the following: Yes, this is other way to fix test_datetime. But this breaks running tests via datetimetester: ./python -m test -vuall datetimetester ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 00:16:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Jul 2017 04:16:43 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1499055403.62.0.818024214185.issue30302@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't have very strong preferences, but I concur with Alexander. His arguments match my initial opinion about this issue (msg293213). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 00:20:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Jul 2017 04:20:14 +0000 Subject: [issue29812] test for token.py, and consistency tests for tokenize.py In-Reply-To: <1489532621.9.0.449448187774.issue29812@psf.upfronthosting.co.za> Message-ID: <1499055614.12.0.348297045036.issue29812@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue30455. Don't these issues conflict one other? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 00:47:04 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 03 Jul 2017 04:47:04 +0000 Subject: [issue29812] test for token.py, and consistency tests for tokenize.py In-Reply-To: <1489532621.9.0.449448187774.issue29812@psf.upfronthosting.co.za> Message-ID: <1499057224.35.0.750292563841.issue29812@psf.upfronthosting.co.za> Berker Peksag added the comment: Yes, they are. I like the idea of generating C files from Lib/token.py. Let's see what David thinks about issue 30455. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 03:49:52 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 03 Jul 2017 07:49:52 +0000 Subject: [issue30597] Show expected input in custom "print" error message In-Reply-To: <1496918206.6.0.484368054025.issue30597@psf.upfronthosting.co.za> Message-ID: <1499068192.8.0.124380442886.issue30597@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset bfdc6fdc0e76204caf2261f9cfa9d232fc23906a by Nick Coghlan in branch '3.6': [3.6] bpo-30597: Show expected input in custom 'print' error message. (GH-2531) https://github.com/python/cpython/commit/bfdc6fdc0e76204caf2261f9cfa9d232fc23906a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 03:50:53 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 03 Jul 2017 07:50:53 +0000 Subject: [issue30597] Show expected input in custom "print" error message In-Reply-To: <1496918206.6.0.484368054025.issue30597@psf.upfronthosting.co.za> Message-ID: <1499068253.66.0.727908684517.issue30597@psf.upfronthosting.co.za> Nick Coghlan added the comment: And merged. Thanks all! ---------- stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 03:53:47 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 03 Jul 2017 07:53:47 +0000 Subject: [issue30829] 'Cannot serialize socket object' after ssl.wrap_socket In-Reply-To: <1499037809.64.0.235569319557.issue30829@psf.upfronthosting.co.za> Message-ID: <1499068427.94.0.189895782193.issue30829@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It is simply not possible to serialize the state of a SSL socket. (theoretically it should be possible, but AFAIK OpenSSL offers no API for it). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 03:53:59 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 03 Jul 2017 07:53:59 +0000 Subject: [issue30829] 'Cannot serialize socket object' after ssl.wrap_socket In-Reply-To: <1499037809.64.0.235569319557.issue30829@psf.upfronthosting.co.za> Message-ID: <1499068439.39.0.0596629852698.issue30829@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 03:56:07 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 03 Jul 2017 07:56:07 +0000 Subject: [issue30319] ConnectionResetError: [Errno 54] Connection reset by peer in socket.close on FreeBSD, Py 3.6 In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499068567.95.0.692971228841.issue30319@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > 2. Ignore ECONNRESET in ?socket.close? (backwards compatible, could use ?os.close? if you really want to check for ECONNRESET) +1 from me. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 03:56:37 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 03 Jul 2017 07:56:37 +0000 Subject: [issue30319] ConnectionResetError: [Errno 54] Connection reset by peer in socket.close on FreeBSD, Py 3.6 In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499068597.14.0.937589235576.issue30319@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Please, let's not use the "dependencies" field for issues which are not actual dependencies. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 03:57:06 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 03 Jul 2017 07:57:06 +0000 Subject: [issue30319] ConnectionResetError: [Errno 54] Connection reset by peer in socket.close on FreeBSD, Py 3.6 In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499068626.3.0.051938390688.issue30319@psf.upfronthosting.co.za> Antoine Pitrou added the comment: None of "27784,30106,30315,30328,30391,30652,30543" are dependencies of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 04:09:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 08:09:05 +0000 Subject: [issue30830] HTTPHandlerTest of test_logging leaks a "dangling" thread Message-ID: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> New submission from STINNER Victor: test_output (test.test_logging.HTTPHandlerTest) ... ok Warning -- threading_cleanup() failed to cleanup -1 threads after 3 sec (count: 0, dangling: 1) See also the previous test_logging threads issue, bpo-30131. ---------- components: Tests keywords: buildbot messages: 297540 nosy: haypo, koobs priority: normal severity: normal status: open title: HTTPHandlerTest of test_logging leaks a "dangling" thread type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 04:10:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 08:10:40 +0000 Subject: [issue30830] HTTPHandlerTest of test_logging leaks a "dangling" thread In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1499069440.69.0.179635079032.issue30830@psf.upfronthosting.co.za> STINNER Victor added the comment: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.x/builds/541 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 04:10:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 08:10:46 +0000 Subject: [issue30830] HTTPHandlerTest of test_logging leaks a "dangling" thread on FreeBSD CURRENT In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1499069446.13.0.81794766593.issue30830@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: HTTPHandlerTest of test_logging leaks a "dangling" thread -> HTTPHandlerTest of test_logging leaks a "dangling" thread on FreeBSD CURRENT _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 04:10:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 08:10:55 +0000 Subject: [issue30830] HTTPHandlerTest of test_logging leaks a "dangling" thread on AMD64 FreeBSD CURRENT Non-Debug 3.x In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1499069455.86.0.594031199705.issue30830@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: HTTPHandlerTest of test_logging leaks a "dangling" thread on FreeBSD CURRENT -> HTTPHandlerTest of test_logging leaks a "dangling" thread on AMD64 FreeBSD CURRENT Non-Debug 3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 04:13:39 2017 From: report at bugs.python.org (Daisuke Miyakawa) Date: Mon, 03 Jul 2017 08:13:39 +0000 Subject: [issue30831] Inconsistent or wrong documentation around Asynchronous Context Manager Message-ID: <1499069619.82.0.462830851571.issue30831@psf.upfronthosting.co.za> New submission from Daisuke Miyakawa: I was reading the following doc and got confused. https://docs.python.org/3.7/reference/datamodel.html#object.__aenter__ According to the API doc itself (and original PEP 492), __aenter__() "is semantically similar to the __enter__(), with only difference that it must return an awaitable." __aexit__() has similar sentence that confuses me too. PEP 492 also implies the (awaitable) object returned from obj.__aenter__() will be awaited immediately. In same manner, the (awaitable) object returned from obj.__aexit__() will be awaited too. (From PEP 492) > async with EXPR as VAR: > BLOCK > > which is semantically equivalent to: > > mgr = (EXPR) > aexit = type(mgr).__aexit__ > aenter = type(mgr).__aenter__(mgr) > exc = True > > VAR = await aenter > try: > BLOCK > except: > if not await aexit(mgr, *sys.exc_info()): > raise > else: > await aexit(mgr, None, None, None) On the other hand, actual CPython implementation won't do that; it won't await the returned objects. Moreover, the example shown in the API doc (AsyncContextManager) does NOT return awaitable as the doc itself suggests, but just await inside __aenter__() (and __aexit__()). > class AsyncContextManager: > async def __aenter__(self): > await log('entering context') > > async def __aexit__(self, exc_type, exc, tb): > await log('exiting context') I'm not sure which is true; the doc saying "__aenter__() must return awaitable" is just incorrect, or CPython implementation has a bug. Actual source implies former. _ContextManagerMixin in asyncio.locks does not return awaitable at all, for example. Anyway, I believe there are inconsistencies around here. ---------- assignee: docs at python components: Documentation messages: 297542 nosy: dmiyakawa, docs at python priority: normal severity: normal status: open title: Inconsistent or wrong documentation around Asynchronous Context Manager versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 04:23:53 2017 From: report at bugs.python.org (Masayuki Yamamoto) Date: Mon, 03 Jul 2017 08:23:53 +0000 Subject: [issue30832] Remove own implementation for thread-local storage Message-ID: <1499070233.45.0.628514473579.issue30832@psf.upfronthosting.co.za> New submission from Masayuki Yamamoto: CPython has provided the own implementation for thread-local storage (TLS) on Python/thread.c, it's used in the case which a platform has not supplied native TLS. However, currently all supported platforms (NT and pthreads) have provided native TLS and defined the Py_HAVE_NATIVE_TLS macro with unconditional in any case. Therefore, I'd propose removing outdated code. python-dev: https://mail.python.org/pipermail/python-dev/2017-July/148534.html ---------- components: Interpreter Core messages: 297543 nosy: haypo, masamoto priority: normal severity: normal status: open title: Remove own implementation for thread-local storage type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 04:28:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 08:28:10 +0000 Subject: [issue30319] ConnectionResetError: [Errno 54] Connection reset by peer in socket.close on FreeBSD, Py 3.6 In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499070490.33.0.0125454606894.issue30319@psf.upfronthosting.co.za> STINNER Victor added the comment: tl; dr I agree to ignore ECONNRESET-like errors on socket.shutdown() and sock.close(). I'm not sure that I understand *exactly* the problem here. In which case closing a socket fails with ECONNRESET? Can it mean that the last write() was buffered and failed? If socket.send() is blocking, I expect that send() gets the ECONNRESET error. If socket.send() is non-blocking, the application has to be very carefully written to handle many kinds of errors. >From a high lever point of view, I don't think that ECONNRESET is interested. I expect that a protocol at the application level doesn't rely on ECONNRESET, but a command like "QUIT". No? For a file on disk, it's different, since write() is always buffered and close() has to flush pending write on disk. For a network protocol, loosing the connection, loosing data, etc. is something "normal", not something execptional. That's why there are application-level commands to close cleanly a connection. Ok, now for SSL sockets... Is it also ok to ignore ECONNRESET on sock.close() for an SSL socket? -- ECONNRESET can occur on sock.close(), but not only: see bpo-30329, shutdown() fails can ENOTCONN on UNIX or WSAEINVAL on Windows. I modified poplib and imaplib recently to handle WSAEINVAL: commit 83a2c2879839da2e10037f5e4af1bd1dafbf1a52 Author: Victor Stinner Date: Mon May 15 17:33:45 2017 +0200 bpo-30329: Catch Windows error 10022 on shutdown() (#1538) Catch the Windows socket WSAEINVAL error (code 10022) in imaplib and poplib on shutdown(SHUT_RDWR): An invalid operation was attempted This error occurs sometimes on SSL connections. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 04:28:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 08:28:53 +0000 Subject: [issue30319] ConnectionResetError: [Errno 54] Connection reset by peer in socket.close on FreeBSD, Py 3.6 In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499070533.3.0.113653672358.issue30319@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 04:31:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 08:31:29 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499070689.58.0.745114593428.issue30319@psf.upfronthosting.co.za> STINNER Victor added the comment: About versions, socket.close() was modified in Python 3.6 (bpo-26685) to raise an OSError on error. So only Python 3.6 and 3.7 are impacted here. ---------- title: ConnectionResetError: [Errno 54] Connection reset by peer in socket.close on FreeBSD, Py 3.6 -> Change socket.close() to ignore ECONNRESET _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 04:33:40 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Mon, 03 Jul 2017 08:33:40 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499070820.88.0.842224799483.issue30822@psf.upfronthosting.co.za> Utkarsh Upadhyay added the comment: Hmm, I see; I did not know that. I had just assumed that `./python -m test test_*` was the standard command for running tests. However, if one does run tests using standalone `datetimetester` (which only imports the _Fast C extension module), then I'll have to rewrite some of the self.skipTest conditions such that they are more defensive, i.e.: if '_Pure' not in self.__class__.__name__: self.skipTest('...') instead of: if '_Fast' in self.__class__.__name__: self.skipTest('...') because some (one?) of the tests fail otherwise. Shall I make that change? Also, here is an alternate fix which is a tiny bit less murky than straight up de-duplication of test-classes: https://github.com/musically-ut/cpython/pull/1/files I'm not sure whether this is any clearer or less fragile, though. ~ ut ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 04:47:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 08:47:17 +0000 Subject: [issue30764] regrtest: Add --fail-env-changed option In-Reply-To: <1498479429.85.0.905289080128.issue30764@psf.upfronthosting.co.za> Message-ID: <1499071637.05.0.729272857913.issue30764@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2603 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 04:49:11 2017 From: report at bugs.python.org (Masayuki Yamamoto) Date: Mon, 03 Jul 2017 08:49:11 +0000 Subject: [issue30832] Remove own implementation for thread-local storage In-Reply-To: <1499070233.45.0.628514473579.issue30832@psf.upfronthosting.co.za> Message-ID: <1499071751.04.0.658958013755.issue30832@psf.upfronthosting.co.za> Changes by Masayuki Yamamoto : ---------- pull_requests: +2604 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 04:54:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 08:54:59 +0000 Subject: [issue30832] Remove own implementation for thread-local storage In-Reply-To: <1499070233.45.0.628514473579.issue30832@psf.upfronthosting.co.za> Message-ID: <1499072099.08.0.425597868153.issue30832@psf.upfronthosting.co.za> STINNER Victor added the comment: This change is related to the PEP 539: the new Thread-Local Storage (TLS) API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 05:01:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Jul 2017 09:01:38 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499072498.01.0.734260314477.issue30822@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good point! But datetimetester uses the implementation depending on the availability of the _datetime extension module. If it is not available, the pure Python implementation is used, and other tests are failed. I think it would be better to fix first the issues with test_datetime, since this is the common way of running tests, and try to restore running tests with datetimetester in separate issue. Just backport your PR 2530 to 3.5 and 3.6. You can include the change from PR 2534 or it can be backported separately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 05:16:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 09:16:03 +0000 Subject: [issue30764] regrtest: Add --fail-env-changed option In-Reply-To: <1498479429.85.0.905289080128.issue30764@psf.upfronthosting.co.za> Message-ID: <1499073363.22.0.112429771866.issue30764@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 5e87592fd12e0b7c41edc11d4885ed7298d5063b by Victor Stinner in branch 'master': bpo-30764: Fix regrtest --fail-env-changed --forever (#2536) https://github.com/python/cpython/commit/5e87592fd12e0b7c41edc11d4885ed7298d5063b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:08:57 2017 From: report at bugs.python.org (d doe) Date: Mon, 03 Jul 2017 10:08:57 +0000 Subject: [issue30833] UnloadUserprofile displays the error "The handle is invalid" Message-ID: <1499076537.12.0.759755100608.issue30833@psf.upfronthosting.co.za> New submission from d doe: UnloadUserprofile displays the error "The handle is invalid" the second time it is called. The script in attachment gives reproduction steps. The issue have been found on Windows 2008r2, windows 2012r2. It exists with python 2.7 and python 3.7. (script done for 2.7) ---------- components: Windows files: issue.py messages: 297550 nosy: d doe, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: UnloadUserprofile displays the error "The handle is invalid" versions: Python 2.7, Python 3.7 Added file: http://bugs.python.org/file46988/issue.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:09:47 2017 From: report at bugs.python.org (d doe) Date: Mon, 03 Jul 2017 10:09:47 +0000 Subject: [issue30833] UnloadUserprofile displays the error "The handle is invalid" In-Reply-To: <1499076537.12.0.759755100608.issue30833@psf.upfronthosting.co.za> Message-ID: <1499076587.63.0.804176381864.issue30833@psf.upfronthosting.co.za> Changes by d doe : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:20:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 10:20:08 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499077208.98.0.285983599874.issue30319@psf.upfronthosting.co.za> STINNER Victor added the comment: Another buildbot failure which may be related: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.6/builds/154/steps/test/logs/stdio test_write (test.test_socketserver.SocketWriterTest) ... Exception in thread serving: Traceback (most recent call last): File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/socketserver.py", line 238, in serve_forever self._handle_request_noblock() File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/socketserver.py", line 319, in _handle_request_noblock self.handle_error(request, client_address) File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/socketserver.py", line 317, in _handle_request_noblock self.process_request(request, client_address) File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/socketserver.py", line 349, in process_request self.shutdown_request(request) File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/socketserver.py", line 510, in shutdown_request self.close_request(request) File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/socketserver.py", line 514, in close_request request.close() File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/socket.py", line 417, in close self._real_close() File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/socket.py", line 411, in _real_close _ss.close(self) ConnectionResetError: [Errno 54] Connection reset by peer /usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/unittest/case.py:633: ResourceWarning: unclosed outcome.errors.clear() /usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/unittest/case.py:633: ResourceWarning: unclosed outcome.errors.clear() test test_socketserver failed ok ====================================================================== ERROR: test_TCPServer (test.test_socketserver.SocketServerTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/test/test_socketserver.py", line 175, in test_TCPServer self.stream_examine) File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/test/support/__init__.py", line 2045, in decorator return func(*args) File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/test/test_socketserver.py", line 141, in run_server testfunc(svrcls.address_family, addr) File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/test/test_socketserver.py", line 153, in stream_examine buf = data = receive(s, 100) File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/test/test_socketserver.py", line 46, in receive raise RuntimeError("timed out on %r" % (sock,)) RuntimeError: timed out on ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:36:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 10:36:07 +0000 Subject: [issue30834] Warning -- files was modified by test_import, After: ['@test_4852_tmp.pyc'] Message-ID: <1499078167.36.0.142114160693.issue30834@psf.upfronthosting.co.za> New submission from STINNER Victor: Python 3.5 on Windows emits the following warning when running test_import, but I'm unable to reproduce it :-/ Warning -- files was modified by test_import Before: [] After: ['@test_4852_tmp.pyc'] ---------- components: Tests, Windows messages: 297552 nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Warning -- files was modified by test_import, After: ['@test_4852_tmp.pyc'] versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:36:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 10:36:17 +0000 Subject: [issue30834] Warning -- files was modified by test_import, After: ['@test_4852_tmp.pyc'] In-Reply-To: <1499078167.36.0.142114160693.issue30834@psf.upfronthosting.co.za> Message-ID: <1499078177.31.0.242248684868.issue30834@psf.upfronthosting.co.za> STINNER Victor added the comment: Example of warning: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.5/builds/39/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:40:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 10:40:24 +0000 Subject: [issue30764] regrtest: Add --fail-env-changed option In-Reply-To: <1498479429.85.0.905289080128.issue30764@psf.upfronthosting.co.za> Message-ID: <1499078424.4.0.708862124803.issue30764@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2605 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:41:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 10:41:39 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499078499.51.0.682939412854.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: Regression: http://buildbot.python.org/all/builders/PPC64%20Fedora%203.x/builds/1000/steps/test/logs/stdio test_system_transitions (test.datetimetester.ZoneInfoTest[America/Juneau]_Pure_Pure_Pure) ... Timeout (0:15:00)! Thread 0x00003fffa9aa5a20 (most recent call first): File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/datetime.py", line 454 in __new__ File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/datetime.py", line 1870 in __sub__ File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/datetime.py", line 1519 in local File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/datetime.py", line 1532 in _mktime File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/datetime.py", line 1550 in timestamp File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/datetimetester.py", line 4836 in test_system_transitions File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/unittest/case.py", line 615 in run File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/unittest/case.py", line 663 in __call__ File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/unittest/suite.py", line 122 in run File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/unittest/suite.py", line 84 in __call__ File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/unittest/suite.py", line 122 in run File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/unittest/suite.py", line 84 in __call__ File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/unittest/runner.py", line 176 in run File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/support/__init__.py", line 1896 in _run_suite File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/support/__init__.py", line 1940 in run_unittest File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/test_datetime.py", line 53 in test_main File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/libregrtest/runtest.py", line 172 in runtest_inner File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/libregrtest/runtest.py", line 140 in runtest File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/libregrtest/main.py", line 290 in rerun_failed_tests File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/libregrtest/main.py", line 540 in _main File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/libregrtest/main.py", line 510 in main File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/libregrtest/main.py", line 585 in main File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/__main__.py", line 2 in File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/runpy.py", line 85 in _run_code File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/runpy.py", line 193 in _run_module_as_main make: *** [buildbottest] Error 1 program finished with exit code 2 elapsedTime=2290.631264 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:42:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 10:42:18 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499078538.13.0.878153618925.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: http://buildbot.python.org/all/builders/ARMv7%20Ubuntu%203.x/builds/1013/steps/test/logs/stdio test_gaps (test.datetimetester.ZoneInfoTest[Europe/Riga]_Pure_Pure_Pure) ... ok test_system_transitions (test.datetimetester.ZoneInfoTest[Europe/Riga]_Pure_Pure_Pure) ... ok test_folds (test.datetimetester.ZoneInfoTest[Europe/Riga]_Pure_Pure_Pure) ... ok test_gaps (test.datetimetester.ZoneInfoTest[Europe/Riga]_Pure_Pure_Pure) ... ok test_system_transitions (test.datetimetester.ZoneInfoTest[Europe/Riga]_Pure_Pure_Pure) ... ok test_folds (test.datetimetester.ZoneInfoTest[Europe/Riga]_Pure_Pure_Pure) ... Timeout (0:15:00)! Thread 0x400c9110 (most recent call first): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/datetime.py", line 263 in _check_int_field File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/datetime.py", line 281 in _check_date_fields File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/datetime.py", line 1376 in __new__ File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/datetime.py", line 1600 in replace File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/datetimetester.py", line 4776 in test_folds File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/case.py", line 615 in run File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/case.py", line 663 in __call__ File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/suite.py", line 122 in run File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/suite.py", line 84 in __call__ File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/suite.py", line 122 in run File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/suite.py", line 84 in __call__ File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/runner.py", line 176 in run File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/support/__init__.py", line 1896 in _run_suite File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/support/__init__.py", line 1940 in run_unittest File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_datetime.py", line 53 in test_main File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/runtest.py", line 172 in runtest_inner File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/runtest.py", line 140 in runtest File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/main.py", line 290 in rerun_failed_tests File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/main.py", line 540 in _main File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/main.py", line 510 in main File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/main.py", line 585 in main File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/__main__.py", line 2 in File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/runpy.py", line 85 in _run_code File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/runpy.py", line 193 in _run_module_as_main make: *** [buildbottest] Error 1 program finished with exit code 2 elapsedTime=2225.001566 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:44:14 2017 From: report at bugs.python.org (Anmol Gupta) Date: Mon, 03 Jul 2017 10:44:14 +0000 Subject: [issue30826] More details in reference 'Looping through a list in Python and modifying it' In-Reply-To: <1498969328.51.0.74139016573.issue30826@psf.upfronthosting.co.za> Message-ID: <1499078654.86.0.69464299894.issue30826@psf.upfronthosting.co.za> Anmol Gupta added the comment: And also a small explanation for why there would be an infinite loop without creating a copy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:50:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 10:50:28 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499079028.82.0.904577999301.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I didn't read the issue. In fact, it seems like the commit 34b54873b51a1ebee2a3c57b7205537b4f33128d already repaired buildbots (x86 Tiger 3.x at least). But... test_datetime became the *slowest* test of x86 Tiger 3.x: 10 slowest tests: - test_datetime: 19 min 6 sec - test_tools: 7 min 20 sec - test_multiprocessing_spawn: 6 min 54 sec - ... Wait, 19 minutes to test datetime??? What's wrong with test_datetime? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:50:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 10:50:38 +0000 Subject: [issue30764] regrtest: Add --fail-env-changed option In-Reply-To: <1498479429.85.0.905289080128.issue30764@psf.upfronthosting.co.za> Message-ID: <1499079038.72.0.730374331986.issue30764@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4132adb4b8f90893d8f19ff46edff56f189faca0 by Victor Stinner in branch '3.6': bpo-30764: Fix regrtest --fail-env-changed --forever (#2536) (#2539) https://github.com/python/cpython/commit/4132adb4b8f90893d8f19ff46edff56f189faca0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:57:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 10:57:21 +0000 Subject: [issue29512] regrtest refleak: implement bisection feature In-Reply-To: <1486640763.77.0.630012847727.issue29512@psf.upfronthosting.co.za> Message-ID: <1499079441.84.0.390708313513.issue29512@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2606 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:57:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 10:57:21 +0000 Subject: [issue30764] regrtest: Add --fail-env-changed option In-Reply-To: <1498479429.85.0.905289080128.issue30764@psf.upfronthosting.co.za> Message-ID: <1499079441.92.0.0698890737576.issue30764@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2607 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:57:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 10:57:21 +0000 Subject: [issue30776] regrtest: change -R/--huntrleaks rule to decide if a test leaks references In-Reply-To: <1498513763.26.0.144257056209.issue30776@psf.upfronthosting.co.za> Message-ID: <1499079441.97.0.333050145402.issue30776@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2608 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:59:38 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Mon, 03 Jul 2017 10:59:38 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499079578.41.0.0487990808993.issue30822@psf.upfronthosting.co.za> Utkarsh Upadhyay added the comment: Previously, test_datetime was running only `_Fast` tests (i.e. testing the C module). Then (because of an erring commit from me), testing for `_Pure` implementation started but all tests per time-zone started running thrice instead of once. Hence, the timeouts while testing were triggered, breaking the buildbots. (Err ... sorry about that.) However, the latest fix by Serihy now runs each test only once. The `_Pure` tests, nevertheless, are significantly slower than `_Fast` tests and, hence, the slowdown. Running the tests take ~ 10 minutes on my system with -utzdata enabled; 19 minutes does sound like a bit much but I'm not aware of the specs of the buildbot machines. ~ ut ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:08:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 11:08:02 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1499080082.86.0.092109802948.issue30302@psf.upfronthosting.co.za> STINNER Victor added the comment: > Furthermore, "seconds=28747" is not that user-friendly. A friendlier representation would be "hours=7, minutes=59, seconds=7" and similar information is displayed when you print a timedelta: (...) I agree that seconds=28747 is not that user-friendly, *but* maybe it shows a flaw in timedelta design? Maybe timedelta should only expose properties which would *compute* hours, minutes, etc. from an internal storage? But if we change timedelta.seconds value, it is likely to break the backward compatibility. I wrote my own total_seconds() function which uses days, seconds and microseconds fields. Or maybe we need a new method to convert a timedelta into a more human friendly (named)tuple? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:10:01 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 11:10:01 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1499080201.36.0.256637445166.issue30302@psf.upfronthosting.co.za> STINNER Victor added the comment: Alexander: "Sorry for being late to the discussion, but please allow me to add a -1 vote." While I agree that seconds=28747 is not perfect, IMHO "datetime.timedelta(seconds=28747)" is an enhancement over "datetime.timedelta(0, 28747)". Can't we make small enhanements step by step, rather than each time try to redesign datetime? ;-) (Yeah, datetime is now perfect, but well, it's now widely used and part of the stdlib!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:12:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 11:12:27 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499080347.67.0.369595796322.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: > Running the tests take ~ 10 minutes on my system with -utzdata enabled; 19 minutes does sound like a bit much but I'm not aware of the specs of the buildbot machines. I don't consider that 10 minutes to test the small datetime module is a reasonable duration. What does take such more time? Do we really need to test all timezones around the world? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:16:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 11:16:09 +0000 Subject: [issue24665] CJK support for textwrap In-Reply-To: <1437276510.99.0.116072917153.issue24665@psf.upfronthosting.co.za> Message-ID: <1499080569.95.0.788537151328.issue24665@psf.upfronthosting.co.za> STINNER Victor added the comment: I remove the dependency to bpo-12568 since the current PR uses unicodedata.east_asian_width(), not the C function wcswidth(). ---------- dependencies: -Add functions to get the width in columns of a character _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:16:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 11:16:44 +0000 Subject: [issue12568] Add functions to get the width in columns of a character In-Reply-To: <1310683436.9.0.375403702242.issue12568@psf.upfronthosting.co.za> Message-ID: <1499080604.69.0.0991565953167.issue12568@psf.upfronthosting.co.za> STINNER Victor added the comment: > At least two other issues depend on this: issue17048 and issue24665. I removed the dependency from bpo-24665 (CJK support for textwrap) to this issue, since its current PR uses unicodedata.east_asian_width(), not the C function wcswidth(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:17:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 11:17:00 +0000 Subject: [issue30776] regrtest: change -R/--huntrleaks rule to decide if a test leaks references In-Reply-To: <1498513763.26.0.144257056209.issue30776@psf.upfronthosting.co.za> Message-ID: <1499080620.49.0.588189821507.issue30776@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0b1210739d12c26e4a161ffd494bd572d49b2483 by Victor Stinner in branch '3.5': [3.5] bpo-29512, bpo-30764, bpo-30776: Backport regrtest enhancements from 3.6 to 3.5 (#2540) https://github.com/python/cpython/commit/0b1210739d12c26e4a161ffd494bd572d49b2483 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:17:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 11:17:00 +0000 Subject: [issue29512] regrtest refleak: implement bisection feature In-Reply-To: <1486640763.77.0.630012847727.issue29512@psf.upfronthosting.co.za> Message-ID: <1499080620.62.0.641579806022.issue29512@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0b1210739d12c26e4a161ffd494bd572d49b2483 by Victor Stinner in branch '3.5': [3.5] bpo-29512, bpo-30764, bpo-30776: Backport regrtest enhancements from 3.6 to 3.5 (#2540) https://github.com/python/cpython/commit/0b1210739d12c26e4a161ffd494bd572d49b2483 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:17:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 11:17:00 +0000 Subject: [issue30764] regrtest: Add --fail-env-changed option In-Reply-To: <1498479429.85.0.905289080128.issue30764@psf.upfronthosting.co.za> Message-ID: <1499080620.7.0.798914930028.issue30764@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0b1210739d12c26e4a161ffd494bd572d49b2483 by Victor Stinner in branch '3.5': [3.5] bpo-29512, bpo-30764, bpo-30776: Backport regrtest enhancements from 3.6 to 3.5 (#2540) https://github.com/python/cpython/commit/0b1210739d12c26e4a161ffd494bd572d49b2483 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:17:11 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 03 Jul 2017 11:17:11 +0000 Subject: [issue24665] CJK support for textwrap In-Reply-To: <1437276510.99.0.116072917153.issue24665@psf.upfronthosting.co.za> Message-ID: <1499080631.0.0.979518025796.issue24665@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: -pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:18:10 2017 From: report at bugs.python.org (Cathy Avery) Date: Mon, 03 Jul 2017 11:18:10 +0000 Subject: [issue27584] New addition of vSockets to the python socket module In-Reply-To: <1469115390.74.0.838831983223.issue27584@psf.upfronthosting.co.za> Message-ID: <1499080690.88.0.438147388074.issue27584@psf.upfronthosting.co.za> Cathy Avery added the comment: Fedora 25 has the proper headers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:19:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 11:19:17 +0000 Subject: [issue12568] Add functions to get the width in columns of a character In-Reply-To: <1310683436.9.0.375403702242.issue12568@psf.upfronthosting.co.za> Message-ID: <1499080757.75.0.768303825403.issue12568@psf.upfronthosting.co.za> STINNER Victor added the comment: You need users who use CJK and understand locale issues especially the width of characters. Ask maybe Xiang Zhang and Naoki INADA? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:25:19 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Mon, 03 Jul 2017 11:25:19 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1499081119.43.0.697027012241.issue30302@psf.upfronthosting.co.za> Utkarsh Upadhyay added the comment: > [...] the extra information may be helpful the first time you see it, but if you deal with timedeltas a lot, it would quickly become annoying. It seems from the discussion on the issue that there are two kinds of developers: - One group which uses timedeltas so often that they will find it annoying if the repr was longer, which takes up more screen space. - The other group which occasionally uses timedelta but may forget what the arguments stood for. I suspect that the distribution of programmers who use timedeltas binned by their frequency of usage will follow the Pareto principle: only 20% of the developers will account for 80% of uses of timedelta, and the remaining 80% of the developers will use it the remaining 20% of the time. Out of those 80% developers who use it sparingly, some fraction will find the repr with the keywords more informative than the current version and be a tiny bit happier. I personally belong to the second group of developers. IMHO, Guido too may belong the second group https://marc.info/?l=python-dev&m=145066335824146&w=2 : > Well it would have saved me an embarrassing moment -- I typed `datetime.timedelta(seconds=1e6)` at the command prompt and when the response came as `datetime.timedelta(11, 49600)` I mistook that as 11 years (I was in a hurry and trying hard not to have to think :-). @haypo: in the same mail, Guido also talks (jokes?) about improving timedeltas from grounds up: > I might still go for it [i.e. changing the attributes], if it wasn't too late by over a decade (as Tim says). :) Though I think the discussion there stopped before anyone could raise the objection about verbosity and clarity, Guido, IMO, was optimistic about this change: > I still think the repr change to use keywords has a good chance for 3.6. https://marc.info/?l=python-dev&m=145073617109654&w=2 ~ ut ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:30:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 11:30:57 +0000 Subject: [issue29512] regrtest refleak: implement bisection feature In-Reply-To: <1486640763.77.0.630012847727.issue29512@psf.upfronthosting.co.za> Message-ID: <1499081457.35.0.663881126223.issue29512@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2609 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:30:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 11:30:57 +0000 Subject: [issue30764] regrtest: Add --fail-env-changed option In-Reply-To: <1498479429.85.0.905289080128.issue30764@psf.upfronthosting.co.za> Message-ID: <1499081457.46.0.985287985955.issue30764@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2610 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:32:40 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Mon, 03 Jul 2017 11:32:40 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499081560.09.0.446389046961.issue30822@psf.upfronthosting.co.za> Utkarsh Upadhyay added the comment: Hmm, I don't know if testing every zone is necessary. However, I would not be comfortable picking out the zones one ought to test, considering: if ('Riyadh8' in self.zonename or # From tzdata NEWS file: # The files solar87, solar88, and solar89 are no longer distributed. # They were a negative experiment - that is, a demonstration that # tz data can represent solar time only with some difficulty and error. # Their presence in the distribution caused confusion, as Riyadh # civil time was generally not solar time in those years. self.zonename.startswith('right/')): and: > # Iran had a sub-minute UTC offset before 1946. in https://github.com/python/cpython/blob/master/Lib/test/datetimetester.py#L4865 Perhaps @belopolsky can suggest something? (Already in Nosy List). ~ ut ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:34:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 11:34:40 +0000 Subject: [issue30832] Remove own implementation for thread-local storage In-Reply-To: <1499070233.45.0.628514473579.issue30832@psf.upfronthosting.co.za> Message-ID: <1499081680.98.0.171252337708.issue30832@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset aa0aa0492c5fffe750a26d2ab13737a1a6d7d63c by Victor Stinner (Masayuki Yamamoto) in branch 'master': bpo-30832: Remove own implementation for thread-local storage (#2537) https://github.com/python/cpython/commit/aa0aa0492c5fffe750a26d2ab13737a1a6d7d63c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 07:37:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Jul 2017 11:37:07 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499081827.86.0.0165850484953.issue30822@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Let discuss too long time of testing datetime time zones in separate issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:05:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:05:12 +0000 Subject: [issue30830] HTTPHandlerTest of test_logging leaks a "dangling" thread on AMD64 FreeBSD CURRENT Non-Debug 3.x In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1499087112.5.0.572960670312.issue30830@psf.upfronthosting.co.za> STINNER Victor added the comment: I failed to reproduce the issue by running test_logging in a loop on Koobs's FreeBSD CURRENT. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:07:22 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 03 Jul 2017 13:07:22 +0000 Subject: [issue29812] test for token.py, and consistency tests for tokenize.py In-Reply-To: <1489532621.9.0.449448187774.issue29812@psf.upfronthosting.co.za> Message-ID: <1499087242.21.0.435881912641.issue29812@psf.upfronthosting.co.za> R. David Murray added the comment: I have no opinion on that issue. I opened this issue to fix a hole in our validation, but if that hole no longer exists after that (subsequently opened :) issue is resolved, then this isn't needed (sorry, Ammar, and thank you for your work!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:07:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:07:56 +0000 Subject: [issue29512] regrtest refleak: implement bisection feature In-Reply-To: <1486640763.77.0.630012847727.issue29512@psf.upfronthosting.co.za> Message-ID: <1499087276.8.0.915747275383.issue29512@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d7955b8196578306e9d86f6c61c9cb3ee72edab0 by Victor Stinner in branch '2.7': [2.7] bpo-29512, bpo-30764: Backport regrtest enhancements from 3.5 to 2.7 (#2541) https://github.com/python/cpython/commit/d7955b8196578306e9d86f6c61c9cb3ee72edab0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:07:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:07:56 +0000 Subject: [issue30764] regrtest: Add --fail-env-changed option In-Reply-To: <1498479429.85.0.905289080128.issue30764@psf.upfronthosting.co.za> Message-ID: <1499087276.9.0.961951072313.issue30764@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d7955b8196578306e9d86f6c61c9cb3ee72edab0 by Victor Stinner in branch '2.7': [2.7] bpo-29512, bpo-30764: Backport regrtest enhancements from 3.5 to 2.7 (#2541) https://github.com/python/cpython/commit/d7955b8196578306e9d86f6c61c9cb3ee72edab0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:20:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:20:10 +0000 Subject: [issue30834] Warning -- files was modified by test_import, After: ['@test_4852_tmp.pyc'] In-Reply-To: <1499078167.36.0.142114160693.issue30834@psf.upfronthosting.co.za> Message-ID: <1499088010.33.0.683810572803.issue30834@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm unable to reproduce this bug on my Python 3.5 compiled in debug mode on Windows. I tried "./python -m test -v test_import", "./python -m test -R 3:3 test_import", and with more flags from the buildbot. I also tried to remove __pycache__ directories, it doesn't help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:20:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:20:40 +0000 Subject: [issue30804] bolen-dmg-3.x build-installer.py failed In-Reply-To: <1498750253.94.0.363268872371.issue30804@psf.upfronthosting.co.za> Message-ID: <1499088040.89.0.968334991459.issue30804@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:22:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:22:16 +0000 Subject: [issue30651] test_poplib.test_stls_context() access violation on x86 Windows7 3.6 buildbot In-Reply-To: <1497350386.85.0.94132048112.issue30651@psf.upfronthosting.co.za> Message-ID: <1499088136.92.0.286921081334.issue30651@psf.upfronthosting.co.za> STINNER Victor added the comment: Sadly, I only saw this crash once. I don't know how to reproduce it. I close the bug since I don't expect to see it next weeks... ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:22:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:22:59 +0000 Subject: [issue30649] test_utime_current_old() of test_os fails randomy on x86 Windows7 3.6 In-Reply-To: <1497346199.32.0.269414659155.issue30649@psf.upfronthosting.co.za> Message-ID: <1499088179.44.0.345866948591.issue30649@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:25:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:25:22 +0000 Subject: [issue30371] test_long_lines() fails randomly on AMD64 Windows7 SP1 3.x In-Reply-To: <1494865032.78.0.389289612669.issue30371@psf.upfronthosting.co.za> Message-ID: <1499088322.01.0.879929539078.issue30371@psf.upfronthosting.co.za> STINNER Victor added the comment: Jeremy Kloth changed a memory stick on his physical server. I didn't see this bug recently, so I consider that the bug is fixed. Thank you Jeremy! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:27:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:27:35 +0000 Subject: [issue30351] [2.7] regrtest hangs on Python 2.7 (test_threading?) In-Reply-To: <1494588560.82.0.408106199182.issue30351@psf.upfronthosting.co.za> Message-ID: <1499088455.26.0.512263885177.issue30351@psf.upfronthosting.co.za> STINNER Victor added the comment: The main bug was fixed by the commit 7709b4d57b433ef027a2e7e63b4cab3fc9ad910d, so I now close this issue. I will open a new issue if I see new failures after the fix, like msg297037 (which only occurred once). ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:28:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:28:43 +0000 Subject: [issue30330] test_socket.test_idna(): socket.gaierror: [Errno 11001] getaddrinfo failed on AMD64 Windows10 3.6 In-Reply-To: <1494419282.71.0.653200577669.issue30330@psf.upfronthosting.co.za> Message-ID: <1499088523.72.0.0116554148115.issue30330@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this failure recently, so I consider that it was a DNS failure which only occurred once :-/ ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:33:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:33:27 +0000 Subject: [issue30259] Test somehow that generated files are up to date: run make regen-all In-Reply-To: <1493828808.63.0.88408078015.issue30259@psf.upfronthosting.co.za> Message-ID: <1499088807.44.0.62363189012.issue30259@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2611 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:33:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:33:32 +0000 Subject: [issue30259] Test somehow that generated files are up to date: run make regen-all In-Reply-To: <1493828808.63.0.88408078015.issue30259@psf.upfronthosting.co.za> Message-ID: <1499088812.11.0.201013322248.issue30259@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2612 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:36:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:36:15 +0000 Subject: [issue30259] Test somehow that generated files are up to date: run make regen-all In-Reply-To: <1493828808.63.0.88408078015.issue30259@psf.upfronthosting.co.za> Message-ID: <1499088975.21.0.774333013435.issue30259@psf.upfronthosting.co.za> STINNER Victor added the comment: https://github.com/python/cpython/pull/2543 confirms that the "make regen-all" test works, the CI fails with: Generated files not up to date M Include/Python-ast.h ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:37:03 2017 From: report at bugs.python.org (Andrew Donnellan) Date: Mon, 03 Jul 2017 13:37:03 +0000 Subject: [issue30835] AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding Message-ID: <1499089023.06.0.76757916564.issue30835@psf.upfronthosting.co.za> New submission from Andrew Donnellan: Parsing an email containing a multipart Content-Type, along with a Content-Transfer-Encoding containing an invalid (non-ASCII-decodable) byte will fail. email.feedparser.FeedParser._parsegen() calls "self._cur.get('content-transfer-encoding', '8bit')" to get the header. It then tries to check whether the C-T-E is in the allowable set of ('7bit', '8bit', 'binary'), and to do so case-insensitively, it tries to convert the header to lowercase. However, because there's an invalid character in there, it's dealing with a Header object rather than a str. Hence it throws an AttributeError. Correct behaviour would be to convert the Header to a str, see that it's not valid, and continue on to handle the defect as usual. Thanks to Daniel Axtens for finding this bug as he was running the AFL fuzzer on the email parsing code in Patchwork (https://github.com/getpatchwork/patchwork). Pull request incoming. ---------- components: Library (Lib), email files: testprog.py messages: 297584 nosy: Andrew Donnellan, barry, r.david.murray priority: normal severity: normal status: open title: AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding type: behavior versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file46989/testprog.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:38:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:38:20 +0000 Subject: [issue30259] Test somehow that generated files are up to date: run make regen-all In-Reply-To: <1493828808.63.0.88408078015.issue30259@psf.upfronthosting.co.za> Message-ID: <1499089100.55.0.836936884365.issue30259@psf.upfronthosting.co.za> STINNER Victor added the comment: https://github.com/python/cpython/pull/2542 confirms that the "make clinic" test works, the CI fails with: Generated files not up to date M Modules/clinic/posixmodule.c.h M Modules/posixmodule.c -- I close the issue, thanks Zach for the automated tests! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:50:12 2017 From: report at bugs.python.org (Andrew Donnellan) Date: Mon, 03 Jul 2017 13:50:12 +0000 Subject: [issue30835] AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding In-Reply-To: <1499089023.06.0.76757916564.issue30835@psf.upfronthosting.co.za> Message-ID: <1499089812.29.0.891272293579.issue30835@psf.upfronthosting.co.za> Changes by Andrew Donnellan : ---------- pull_requests: +2613 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:53:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:53:28 +0000 Subject: [issue29512] regrtest refleak: implement bisection feature In-Reply-To: <1486640763.77.0.630012847727.issue29512@psf.upfronthosting.co.za> Message-ID: <1499090008.59.0.742561684411.issue29512@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok! "python -m test.bisect" is now available in 2.7, 3.5, 3.6 and master branches ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:57:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:57:36 +0000 Subject: [issue30836] test_c_locale_coercion fails on AIX Message-ID: <1499090256.88.0.435528352442.issue30836@psf.upfronthosting.co.za> New submission from STINNER Victor: One example: http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/957/steps/test/logs/stdio 0:08:55 [ 91/406/2] test_c_locale_coercion failed -- running: test_importlib (41 sec) skipped 'No C-with-UTF-8 locale available' test_LC_ALL_set_to_C (test.test_c_locale_coercion.LocaleCoercionTests) ... test_PYTHONCOERCECLOCALE_not_zero (test.test_c_locale_coercion.LocaleCoercionTests) ... test_PYTHONCOERCECLOCALE_set_to_warn (test.test_c_locale_coercion.LocaleCoercionTests) ... test_PYTHONCOERCECLOCALE_set_to_zero (test.test_c_locale_coercion.LocaleCoercionTests) ... test_test_PYTHONCOERCECLOCALE_not_set (test.test_c_locale_coercion.LocaleCoercionTests) ... ====================================================================== FAIL: test_LC_ALL_set_to_C (test.test_c_locale_coercion.LocaleCoercionTests) (env_var='LANG', nominal_locale='', PYTHONCOERCECLOCALE=None) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_c_locale_coercion.py", line 309, in _check_c_locale_coercion coercion_expected) File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_c_locale_coercion.py", line 202, in _check_child_encoding_details self.assertEqual(encoding_details, expected_details) AssertionError: {'fsencoding': 'iso8859-1', 'stdin_info': 'iso8859-1:surr[140 chars] 'c'} != {'fsencoding': 'ascii', 'stdin_info': 'ascii:surrogateesc[124 chars] 'c'} - {'fsencoding': 'iso8859-1', ? ^^^^^^^^ + {'fsencoding': 'ascii', ? +++ ^ 'lang': '', 'lc_all': 'c', 'lc_ctype': '', - 'stderr_info': 'iso8859-1:backslashreplace', ? ^^^^^^^^ + 'stderr_info': 'ascii:backslashreplace', ? +++ ^ - 'stdin_info': 'iso8859-1:surrogateescape', ? ^^^^^^^^ + 'stdin_info': 'ascii:surrogateescape', ? +++ ^ - 'stdout_info': 'iso8859-1:surrogateescape'} ? ^^^^^^^^ + 'stdout_info': 'ascii:surrogateescape'} ? +++ ^ ---------- components: Tests messages: 297587 nosy: haypo, ncoghlan priority: normal severity: normal status: open title: test_c_locale_coercion fails on AIX versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 10:00:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 14:00:29 +0000 Subject: [issue30832] Remove own implementation for thread-local storage In-Reply-To: <1499070233.45.0.628514473579.issue30832@psf.upfronthosting.co.za> Message-ID: <1499090429.27.0.579312953581.issue30832@psf.upfronthosting.co.za> STINNER Victor added the comment: Well done, I didn't see any major outdage (compilation error) on 3.x buildbots ;-) ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 10:06:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 14:06:41 +0000 Subject: [issue30183] [HPUX] compilation error in pytime.c with cc compiler In-Reply-To: <1493267090.1.0.00115311377195.issue30183@psf.upfronthosting.co.za> Message-ID: <1499090801.47.0.264515699886.issue30183@psf.upfronthosting.co.za> STINNER Victor added the comment: @David Haney: Can you please give the list of tests which fail on HP-UX? I would like to have an idea of the status of the HP-UX support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 10:07:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 14:07:10 +0000 Subject: [issue30818] Warning -- asyncore.socket_map was modified by test_ftplib on AMD64 FreeBSD 10.x Shared 3.x In-Reply-To: <1498835074.68.0.82947303088.issue30818@psf.upfronthosting.co.za> Message-ID: <1499090830.73.0.280992881731.issue30818@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, let's say that it's now fixed ;-) ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 10:20:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 14:20:44 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499091644.41.0.49484122478.issue30726@psf.upfronthosting.co.za> STINNER Victor added the comment: Segev Finer: Would you mind to backport PR 2375 to 3.6 and 3.5 branches? Maybe also to 2.7, at least in PCbuild, maybe also PC/VS9.0/. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 10:21:02 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 03 Jul 2017 14:21:02 +0000 Subject: [issue30836] test_c_locale_coercion fails on AIX In-Reply-To: <1499090256.88.0.435528352442.issue30836@psf.upfronthosting.co.za> Message-ID: <1499091662.62.0.96884824383.issue30836@psf.upfronthosting.co.za> Nick Coghlan added the comment: This should be a fairly straightforward test-only fix: updating the start of https://github.com/python/cpython/blob/master/Lib/test/test_c_locale_coercion.py to set C_LOCALE_STREAM_ENCODING to 'iso8859-1' when "sys.platform.startswith('aix')". ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 10:23:37 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 03 Jul 2017 14:23:37 +0000 Subject: [issue30836] test_c_locale_coercion fails on AIX In-Reply-To: <1499090256.88.0.435528352442.issue30836@psf.upfronthosting.co.za> Message-ID: <1499091817.78.0.246615277483.issue30836@psf.upfronthosting.co.za> Nick Coghlan added the comment: I also belatedly checked your list at https://unicodebook.readthedocs.io/operating_systems.html#locale-encoding, and confirmed that AIX is the only anomalous case you'd previously identified (aside from the odd nominally-ASCII-but-not-really behaviour on FreeBSD, Mac OS X, and Solaris). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 10:24:01 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 14:24:01 +0000 Subject: [issue26251] Use "Low-fragmentation Heap" memory allocator on Windows In-Reply-To: <1454262940.96.0.668805369213.issue26251@psf.upfronthosting.co.za> Message-ID: <1499091841.13.0.546409807911.issue26251@psf.upfronthosting.co.za> STINNER Victor added the comment: Steve: "We tried it at one point, but it made very little difference (...)" Ok. Can I close the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 10:25:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 14:25:21 +0000 Subject: [issue19325] _osx_support imports many modules In-Reply-To: <1382346544.59.0.0118958375765.issue19325@psf.upfronthosting.co.za> Message-ID: <1499091921.4.0.47981645657.issue19325@psf.upfronthosting.co.za> STINNER Victor added the comment: > FYI, issue29585 removes _osx_support dependency from site.py Done: Lib/site.py doesn't import _osx_support anymore. So I close this issue. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 10:25:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 14:25:27 +0000 Subject: [issue19325] _osx_support imports many modules In-Reply-To: <1382346544.59.0.0118958375765.issue19325@psf.upfronthosting.co.za> Message-ID: <1499091927.75.0.887014199272.issue19325@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: fixed -> out of date _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 10:26:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Jul 2017 14:26:45 +0000 Subject: [issue29469] AST-level Constant folding In-Reply-To: <1486440158.46.0.424511474325.issue29469@psf.upfronthosting.co.za> Message-ID: <1499092005.15.0.217690455837.issue29469@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In general the patch LGTM. I haven't found bugs. I think that at this stage we can asdl_ct.py and ast_opt.ct and use just their result, ast_opt.c (maybe rename to optimize.c?) The grammar is not often changed, and in that case it would be not hard to modify the code manually. In any case compile.c should be modified manually. After removing no-op functions like astfold_operator() and inlining simple functions like astfold_arg() the code should be clearer. Instead of converting all kinds of constants to Constant_kind, you could use is_const() and get_const_value() from compile.c. I suggest to remove the parts of the peepholer that are superseeded by the AST optimizer. As for preventing expensive calculations, there is a patch for the peepholer that does this. I wait on implementing the AST-level constant folding for adapting that patch for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 10:29:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 14:29:10 +0000 Subject: [issue20669] OpenBSD: socket.recvmsg tests fail with OSError: [Errno 40] Message too long In-Reply-To: <1392712891.31.0.830541329801.issue20669@psf.upfronthosting.co.za> Message-ID: <1499092150.41.0.584310446978.issue20669@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm sorry but I don't have OpenBSD, and there is no more OpenBSD buildbot, so I close this issue as out of date :-( We failed to find anyone to review the patch since 2 years. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 10:39:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 14:39:54 +0000 Subject: [issue29469] AST-level Constant folding In-Reply-To: <1486440158.46.0.424511474325.issue29469@psf.upfronthosting.co.za> Message-ID: <1499092794.95.0.954143140853.issue29469@psf.upfronthosting.co.za> STINNER Victor added the comment: Naoki: Can you please create a PR for your patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 10:39:02 2017 From: report at bugs.python.org (Joshua) Date: Mon, 03 Jul 2017 14:39:02 +0000 Subject: [issue30837] Mac OS High Sierra Beta - Python Crash Message-ID: <1499092741.8.0.363302866556.issue30837@psf.upfronthosting.co.za> New submission from Joshua: Process: Python [13106] Path: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: 2.7.10 (2.7.10) Code Type: X86-64 (Native) Parent Process: Python [13070] Responsible: Python [13106] User ID: 501 Date/Time: 2017-07-03 10:28:23.591 -0400 OS Version: Mac OS X 10.13 (17A291m) Report Version: 12 Anonymous UUID: C76645A8-C44A-EAB5-D937-2BD69A20A0A9 Time Awake Since Boot: 18000 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: Namespace OBJC, Code 0x1 Application Specific Information: crashed on child side of fork pre-exec objc[13106]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fffbded33d6 __abort_with_payload + 10 1 libsystem_kernel.dylib 0x00007fffbdecdf71 abort_with_payload_wrapper_internal + 89 2 libsystem_kernel.dylib 0x00007fffbdecdf18 abort_with_reason + 22 3 libobjc.A.dylib 0x00007fffbd1a99f2 _objc_fatalv(unsigned long long, unsigned long long, char const*, __va_list_tag*) + 108 4 libobjc.A.dylib 0x00007fffbd1a98a4 _objc_fatal(char const*, ...) + 135 5 libobjc.A.dylib 0x00007fffbd1aa4cb performForkChildInitialize(objc_class*, objc_class*) + 341 6 libobjc.A.dylib 0x00007fffbd19ae8f lookUpImpOrForward + 228 7 libobjc.A.dylib 0x00007fffbd19a914 _objc_msgSend_uncached + 68 8 com.apple.CoreFoundation 0x00007fff96aa2a92 CFDateCreate + 34 9 com.apple.CoreFoundation 0x00007fff96aa0168 __CFBinaryPlistCreateObjectFiltered + 1608 10 com.apple.CoreFoundation 0x00007fff96aa1947 __CFBinaryPlistCreateObjectFiltered + 7719 11 com.apple.CoreFoundation 0x00007fff96a86b1b __CFTryParseBinaryPlist + 187 12 com.apple.CoreFoundation 0x00007fff96a864b1 _CFPropertyListCreateWithData + 97 13 com.apple.CoreFoundation 0x00007fff96a863a0 CFPropertyListCreateWithData + 80 14 com.apple.CoreFoundation 0x00007fff96a9f08b -[CFPrefsPlistSource handleReply:toRequestNewDataMessage:onConnection:retryCount:error:] + 683 15 com.apple.CoreFoundation 0x00007fff96a9edb3 __93-[CFPrefsSearchListSource handleReply:toRequestNewDataMessage:onConnection:retryCount:error:]_block_invoke + 147 16 libxpc.dylib 0x00007fffbe040d71 xpc_array_apply + 57 17 com.apple.CoreFoundation 0x00007fff96a9ecec -[CFPrefsSearchListSource handleReply:toRequestNewDataMessage:onConnection:retryCount:error:] + 300 18 com.apple.CoreFoundation 0x00007fff96c2644c __80-[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:]_block_invoke_3.139 + 76 19 com.apple.CoreFoundation 0x00007fff96c4d3e4 -[_CFXPreferences withConnectionForRole:performBlock:] + 36 20 com.apple.CoreFoundation 0x00007fff96c263f5 __80-[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:]_block_invoke_2.138 + 117 21 libsystem_trace.dylib 0x00007fffbe01f1ab _os_activity_initiate_impl + 53 22 com.apple.CoreFoundation 0x00007fff96c26352 __80-[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:]_block_invoke.136 + 114 23 com.apple.CoreFoundation 0x00007fff96c25c97 CFPREFERENCES_IS_WAITING_FOR_USER_CFPREFSD + 39 24 com.apple.CoreFoundation 0x00007fff96c25eec -[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:] + 348 25 com.apple.CoreFoundation 0x00007fff96a9d476 -[CFPrefsSearchListSource alreadylocked_copyDictionary] + 326 26 com.apple.CoreFoundation 0x00007fff96a9cff3 -[CFPrefsSearchListSource alreadylocked_copyValueForKey:] + 67 27 com.apple.CoreFoundation 0x00007fff96be1465 -[CFPrefsSource copyValueForKey:] + 53 28 com.apple.CoreFoundation 0x00007fff96c4c040 __76-[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:]_block_invoke + 32 29 com.apple.CoreFoundation 0x00007fff96c2730f __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 287 30 com.apple.CoreFoundation 0x00007fff96c27185 -[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 341 31 com.apple.CoreFoundation 0x00007fff96c4bfe3 -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 131 32 com.apple.SystemConfiguration 0x00007fffa3022745 SCDynamicStoreCopyProxiesWithOptions + 155 33 _scproxy.so 0x000000010503092a 0x105030000 + 2346 34 org.python.python 0x00007fffa1339280 PyEval_EvalFrameEx + 3676 35 org.python.python 0x00007fffa133e256 0x7fffa12b8000 + 549462 36 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 37 org.python.python 0x00007fffa133e256 0x7fffa12b8000 + 549462 38 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 39 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 40 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 41 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 42 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 43 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 44 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 45 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 46 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 47 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 48 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 49 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 50 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 51 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 52 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 53 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 54 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 55 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 56 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 57 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 58 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 59 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 60 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 61 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 62 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 63 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 64 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 65 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 66 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 67 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 68 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 69 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 70 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 71 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 72 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 73 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 74 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 75 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 76 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 77 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 78 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 79 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 80 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 81 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 82 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 83 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 84 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 85 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 86 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 87 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 88 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 89 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 90 org.python.python 0x00007fffa133e256 0x7fffa12b8000 + 549462 91 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 92 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 93 org.python.python 0x00007fffa12df935 0x7fffa12b8000 + 162101 94 org.python.python 0x00007fffa12c2581 PyObject_Call + 97 95 org.python.python 0x00007fffa12ccc9e 0x7fffa12b8000 + 85150 96 org.python.python 0x00007fffa12c2581 PyObject_Call + 97 97 org.python.python 0x00007fffa1307c78 0x7fffa12b8000 + 326776 98 org.python.python 0x00007fffa1303434 0x7fffa12b8000 + 308276 99 org.python.python 0x00007fffa12c2581 PyObject_Call + 97 100 org.python.python 0x00007fffa1338f76 PyEval_EvalFrameEx + 2898 101 org.python.python 0x00007fffa133e256 0x7fffa12b8000 + 549462 102 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 103 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 104 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 105 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 106 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 107 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 108 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 109 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 110 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 111 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 112 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 113 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 114 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 115 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 116 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 117 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 118 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 119 org.python.python 0x00007fffa1337c1d PyEval_EvalCode + 32 120 org.python.python 0x00007fffa1356ad1 0x7fffa12b8000 + 649937 121 org.python.python 0x00007fffa1356b78 PyRun_FileExFlags + 130 122 org.python.python 0x00007fffa13566fa PyRun_SimpleFileExFlags + 706 123 org.python.python 0x00007fffa136796c Py_Main + 3064 124 libdyld.dylib 0x00007fffbdd85ff9 start + 1 Thread 1: 0 libsystem_kernel.dylib 0x00007fffbded477a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fffbe00523e _pthread_wqthread + 995 2 libsystem_pthread.dylib 0x00007fffbe004e49 start_wqthread + 13 Thread 2: 0 libsystem_kernel.dylib 0x00007fffbded477a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fffbe005440 _pthread_wqthread + 1509 2 libsystem_pthread.dylib 0x00007fffbe004e49 start_wqthread + 13 Thread 3: 0 libsystem_kernel.dylib 0x00007fffbded477a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fffbe00523e _pthread_wqthread + 995 2 libsystem_pthread.dylib 0x00007fffbe004e49 start_wqthread + 13 Thread 4: 0 libsystem_pthread.dylib 0x00007fffbe004e3c start_wqthread + 0 1 ??? 0x00007fffc6497930 OBJC_METACLASS_$_OS_xpc_date + 40 Thread 5: 0 libsystem_pthread.dylib 0x00007fffbe004e3c start_wqthread + 0 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000002000209 rbx: 0x0000000000000001 rcx: 0x00007fff5b0d6d88 rdx: 0x0000000000000000 rdi: 0x0000000000000008 rsi: 0x0000000000000001 rbp: 0x00007fff5b0d6de0 rsp: 0x00007fff5b0d6d88 r8: 0x00007f8ac94a1580 r9: 0x0000000000000080 r10: 0x0000000000000000 r11: 0x0000000000000246 r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000008 r15: 0x0000000000000080 rip: 0x00007fffbded33d6 rfl: 0x0000000000000246 cr2: 0x0000000105307000 Logical CPU: 0 Error Code: 0x02000209 Trap Number: 133 Binary Images: 0x104b24000 - 0x104b25fff org.python.python (2.7.10 - 2.7.10) /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python 0x104c75000 - 0x104c76fff _locale.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so 0x104d1b000 - 0x104d29ff3 _io.so (109) <526F3EF7-B2F2-3C2F-B5CD-A4E036EDB467> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so 0x104d7b000 - 0x104d7cff3 time.so (109) <49823D6E-8D71-3422-AC22-733FFD1C1222> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/time.so 0x104d83000 - 0x104d86fff _struct.so (109) <85CB389D-9633-3E2F-A156-8C5724E30130> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_struct.so 0x104d8d000 - 0x104d8fffb _collections.so (109) <7FC827A0-DADC-3E27-BC28-18320D233C9B> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_collections.so 0x104d96000 - 0x104d99fff operator.so (109) <31D86F5C-F6ED-3DD3-8599-946A9AD9DE52> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so 0x104da0000 - 0x104da4fff itertools.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so 0x104dae000 - 0x104daffff _heapq.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_heapq.so 0x104df5000 - 0x104df5fff grp.so (109) <91EACFC1-80D7-3875-A162-3BF87386E212> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/grp.so 0x104dfa000 - 0x104dfcfff binascii.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/binascii.so 0x104e01000 - 0x104e02fff cStringIO.so (109) <0B2343A8-D8FA-3B19-BB66-772DD7867510> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cStringIO.so 0x104e08000 - 0x104e0bffb strop.so (109) <2D4AACCA-6009-3952-B094-7E662227693A> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/strop.so 0x104e11000 - 0x104e13fff zlib.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/zlib.so 0x104e19000 - 0x104e1afff _functools.so (109) <9D1729E8-F073-3594-8A6B-6ABFB3C90328> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_functools.so 0x104e5f000 - 0x104e68ff3 datetime.so (109) <3C599449-8111-397F-AE22-61E845E7C119> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/datetime.so 0x104f72000 - 0x104f75ffb math.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/math.so 0x104f7c000 - 0x104f7dfff _hashlib.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_hashlib.so 0x104f83000 - 0x104f84ffb _random.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_random.so 0x104f89000 - 0x104f90ff3 _socket.so (109) <9FF3C3DB-2910-3D91-B8FF-6C5CDFB7E362> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so 0x104f9b000 - 0x104fa4ffb _ssl.so (109) <8BEB8BFA-B11A-352C-BB0A-DEB69464E22C> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so 0x105030000 - 0x105030fff _scproxy.so (109) <16BC3D97-2B73-3133-B802-855A5995C7B8> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_scproxy.so 0x105087000 - 0x105088fff fcntl.so (109) <2DB86420-5982-32CF-8D6C-61BC28F9DC87> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/fcntl.so 0x10508d000 - 0x105094fff parser.so (109) <63168D6B-E4A2-37A4-8162-396B0F4E56A0> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/parser.so 0x1050da000 - 0x1050dfffb pyexpat.so (109) <80E1C5D4-6A3D-3EFB-A5ED-DB63ED09EF66> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/pyexpat.so 0x1051a7000 - 0x1051a9fff select.so (109) <1D095B7D-A935-326A-A485-E954F047EAD4> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/select.so 0x1051b0000 - 0x1051b2fff _multiprocessing.so (109) <37AC3F99-B7A7-315B-9C71-9BC4A34078D7> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_multiprocessing.so 0x1051b8000 - 0x1051c3ffb cPickle.so (109) <7C5E649B-4D48-3E4C-ABDB-7282076A9EEB> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cPickle.so 0x10524a000 - 0x10524bfff termios.so (109) <9067E25A-DC89-3123-BC27-11DA5C570518> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/termios.so 0x105251000 - 0x10525afff _curses.so (109) <18410BC2-054C-358F-AABF-196DC9456562> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_curses.so 0x1052a2000 - 0x1052a6fff array.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/array.so 0x1052ed000 - 0x1052f1ffb _json.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_json.so 0x1052f7000 - 0x1052f7fff syslog.so (109) <7DF711A4-4A2E-304B-8D4F-C6D33D41B89B> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/syslog.so 0x1052fc000 - 0x1052fcfff +strxor.so (0) <7C94EC76-54AF-3261-8A19-2DF755B766A9> /Library/Python/2.7/site-packages/Crypto/Util/strxor.so 0x1052ff000 - 0x105300fff +_counter.so (0) <47FF0AA5-CCD7-3B20-990A-18B66F1583B9> /Library/Python/2.7/site-packages/Crypto/Util/_counter.so 0x105303000 - 0x105303fff +_constant_time.so (0) <16DCFBC5-3563-3A31-8C51-64B3478F6D8A> /Library/Python/2.7/site-packages/cryptography/hazmat/bindings/_constant_time.so 0x1055e2000 - 0x1055e7fff +_AES.so (0) <703B60CE-55E2-3177-A92E-03BE7A013EDE> /Library/Python/2.7/site-packages/Crypto/Cipher/_AES.so 0x1056aa000 - 0x1056c4ff7 +_cffi_backend.so (???) <2CE78FC0-02E7-3D62-A4D0-D6DA09165D92> /Library/Python/2.7/site-packages/_cffi_backend.so 0x1056da000 - 0x1056e8fff _ctypes.so (109) <4BB0D26B-4F10-381A-95EE-87BCDAC110B0> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so 0x1058b4000 - 0x1058c5fff +_commoncrypto.so (0) /Library/Python/2.7/site-packages/cryptography/hazmat/bindings/_commoncrypto.so 0x1059e3000 - 0x105a87ff7 unicodedata.so (109) <63579D07-3CF7-30D1-9E07-DD8221ECF17D> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/unicodedata.so 0x105b0f000 - 0x105b0ffff _bisect.so (109) <3CF35421-B794-3462-9DF4-47940D7DBA06> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_bisect.so 0x105b54000 - 0x105d799f7 +_openssl.so (0) <2B4985A2-EBC1-3EC5-8720-5AC83CD083FC> /Library/Python/2.7/site-packages/cryptography/hazmat/bindings/_openssl.so 0x1062e3000 - 0x1062eafff crypto.so (46) <91F370CB-2821-3BE3-8D90-73D7D84D7204> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/OpenSSL/crypto.so 0x1062f9000 - 0x1062f9fff rand.so (46) <328AFE5A-23F9-317F-9906-111A56D31090> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/OpenSSL/rand.so 0x1062fe000 - 0x106303fff SSL.so (46) <488EB6DB-1131-389A-A1ED-EBB93B52D679> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/OpenSSL/SSL.so 0x10dc53000 - 0x10dc9b37f dyld (513.2) /usr/lib/dyld 0x7fff930df000 - 0x7fff930dffff com.apple.Accelerate (1.11 - Accelerate 1.11) <903090ED-25F4-3715-9707-0D7775831390> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff930f7000 - 0x7fff935effc7 com.apple.vImage (8.1 - ???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage 0x7fff935f0000 - 0x7fff9374afc3 libBLAS.dylib (1211) <5924ECE5-7788-308F-86A2-589181677DAB> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 0x7fff9374b000 - 0x7fff93778fef libBNNS.dylib (30) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib 0x7fff93779000 - 0x7fff93b39ff7 libLAPACK.dylib (1211) <4560987F-B203-366F-B2CA-3291BCFB511A> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib 0x7fff93b3a000 - 0x7fff93b4fff7 libLinearAlgebra.dylib (1211) <3ECB936A-1D5A-3BEE-A9A2-248EF132CE3F> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib 0x7fff93b50000 - 0x7fff93b55ff3 libQuadrature.dylib (3) <680BCCDA-0F73-331E-B5F3-1E50A4B4E762> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib 0x7fff93b56000 - 0x7fff93bb4fff libSparse.dylib (76) <43168B0F-42F2-3CEB-B90D-45C4BC977647> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib 0x7fff93bb5000 - 0x7fff93bc8fff libSparseBLAS.dylib (1211) <547C43FB-0243-340A-9B9B-AE8E5A5653BA> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib 0x7fff93bc9000 - 0x7fff93d5ffcb libvDSP.dylib (619) <2AFFCEAD-4CAA-3C1C-A000-61D84ECF6025> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib 0x7fff93d60000 - 0x7fff93e10feb libvMisc.dylib (619) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib 0x7fff93e11000 - 0x7fff93e11fff com.apple.Accelerate.vecLib (3.11 - vecLib 3.11) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff94f8c000 - 0x7fff94f8cfff com.apple.ApplicationServices (48 - 50) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 0x7fff94f8d000 - 0x7fff94ff3fff com.apple.ApplicationServices.ATS (377 - 440) <3924CF93-5AE7-392A-AE3F-DC6A14BA1943> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS 0x7fff9508c000 - 0x7fff951b1fff libFontParser.dylib (216) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib 0x7fff951b2000 - 0x7fff951fcfff libFontRegistry.dylib (215) <4642AF86-D1BB-33A4-B03E-9C04D95FCED1> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib 0x7fff9533e000 - 0x7fff95342ff3 com.apple.ColorSyncLegacy (1.0 - 1) <551CA2A5-39A2-3ADE-B1AD-B756150D2C35> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSyncLegacy.framework/Versions/A/ColorSyncLegacy 0x7fff953e2000 - 0x7fff95434ff3 com.apple.HIServices (1.22 - 618) <3E0CA915-F1CE-324B-9E5B-29475233066C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices 0x7fff95435000 - 0x7fff95443fff com.apple.LangAnalysis (1.7.0 - 1.7.0) <095FB990-EF6F-39F3-906D-C736A9092697> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis 0x7fff95444000 - 0x7fff95490fff com.apple.print.framework.PrintCore (13 - 500) <465C52E7-1FC0-30B6-8C8A-52FE53FC4EAE> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore 0x7fff95491000 - 0x7fff954cbfff com.apple.QD (3.12 - 403) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD 0x7fff954cc000 - 0x7fff954d8ff7 com.apple.speech.synthesis.framework (7.0.12 - 7.0.12) <3779590C-AE9E-3E73-86AA-7561EDDC9E59> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff954d9000 - 0x7fff95760fff com.apple.audio.toolbox.AudioToolbox (1.14 - 1.14) <72215CA9-AA2A-3DC7-90A8-83414B9ABDBF> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff95a77000 - 0x7fff95de4ff7 com.apple.CFNetwork (861.1 - 861.1) <2FAFBC01-0DE7-3E81-9625-355BA99633CB> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork 0x7fff96300000 - 0x7fff963b8fff com.apple.ColorSync (4.13.0 - 530) /System/Library/Frameworks/ColorSync.framework/Versions/A/ColorSync 0x7fff9653f000 - 0x7fff965d2ff7 com.apple.audio.CoreAudio (4.3.0 - 4.3.0) <52753110-84F3-3FDC-A086-A3F1FB68A84A> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff96662000 - 0x7fff969a2ff7 com.apple.CoreData (120 - 832) <218BCBC3-2598-3ADE-B3F1-62A8316031A7> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fff969a3000 - 0x7fff96a62ff7 com.apple.CoreDisplay (1.0 - 64) /System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay 0x7fff96a63000 - 0x7fff96f05fff com.apple.CoreFoundation (6.9 - 1433) <1CA2CF01-91A0-337B-BA7C-0F8AAE8A08B3> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x7fff96f07000 - 0x7fff97511fe7 com.apple.CoreGraphics (2.0 - 1107) <7269184D-67E0-33BD-ACD3-7AB7E35BC737> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff97513000 - 0x7fff977a9fff com.apple.CoreImage (13.0.0 - 547) <9D57B874-DBCD-3859-9844-675696DD413F> /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage 0x7fff97b82000 - 0x7fff97b82fff com.apple.CoreServices (815.2 - 815.2) <6173EB59-5DB2-380B-8AAB-1DAA7FCEC499> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff97b83000 - 0x7fff97bf7ff3 com.apple.AE (732 - 732) <3D0C6733-F36E-3F84-9576-1DF4A8439455> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE 0x7fff97bf8000 - 0x7fff97ecfff7 com.apple.CoreServices.CarbonCore (1176 - 1176) <6C43CB0E-5ADB-3273-BC0C-052FE01565E2> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x7fff97ed0000 - 0x7fff97f03ff7 com.apple.DictionaryServices (1.2 - 282) <126FFF25-96D3-37D3-AD6E-FBC8552BE334> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices 0x7fff97f04000 - 0x7fff97f0cff7 com.apple.CoreServices.FSEvents (1237 - 1237) <4551E5F7-1FC9-3753-8DC9-4CB37F0CDBD9> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents 0x7fff97f0d000 - 0x7fff980c2ff7 com.apple.LaunchServices (815.2 - 815.2) <7C80BB19-BF10-3BF3-9806-8CF300385BC3> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices 0x7fff980c3000 - 0x7fff98171ff3 com.apple.Metadata (10.7.0 - 1163.3) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata 0x7fff98172000 - 0x7fff981cfff7 com.apple.CoreServices.OSServices (815.2 - 815.2) <6981E9D6-C397-364A-A482-ECEB082F0860> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices 0x7fff981d0000 - 0x7fff9823efff com.apple.SearchKit (1.4.0 - 1.4.0) <5135CBBF-F0EF-3553-9672-4D474725CA8A> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit 0x7fff9823f000 - 0x7fff98262fff com.apple.coreservices.SharedFileList (64.1 - 64.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList 0x7fff98506000 - 0x7fff98651fff com.apple.CoreText (352.0 - 569.1) <20751940-98D8-3538-9129-D98C47C0AD4A> /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText 0x7fff98652000 - 0x7fff9868bffb com.apple.CoreVideo (1.8 - 272.0) <78805556-EE16-325A-9D83-74AA48EDF265> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff9898d000 - 0x7fff98992fff com.apple.DiskArbitration (2.7 - 2.7) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration 0x7fff98b51000 - 0x7fff98f0eff7 com.apple.Foundation (6.9 - 1433.14) <89F8CCE7-A405-34CF-9EDC-0803077AD3A8> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff98f7e000 - 0x7fff98faeffb com.apple.GSS (4.0 - 2.0) /System/Library/Frameworks/GSS.framework/Versions/A/GSS 0x7fff9921f000 - 0x7fff992b9fff com.apple.framework.IOKit (2.0.2 - 1428) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff992bb000 - 0x7fff992c1fff com.apple.IOSurface (196 - 196) <029E1524-F89F-39B0-A88C-2F8985E9A4A4> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface 0x7fff99315000 - 0x7fff99482fef com.apple.ImageIO.framework (3.3.0 - 1669) /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO 0x7fff99483000 - 0x7fff99487ffb libGIF.dylib (1669) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff99488000 - 0x7fff9956ffff libJP2.dylib (1669) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib 0x7fff99570000 - 0x7fff99593ff7 libJPEG.dylib (1669) <971C01B3-3E71-3D36-BF45-9D9815AB9860> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff9986e000 - 0x7fff99894feb libPng.dylib (1669) <7F9C9079-0203-3264-8289-A9ED37B29326> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff99895000 - 0x7fff99897ffb libRadiance.dylib (1669) <2997A82D-0EDA-3E07-8EB0-6B4C02CF210C> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff99898000 - 0x7fff998e5fff libTIFF.dylib (1669) <41D558A1-C9FA-3E44-945D-C1347C0BB7CD> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff9a609000 - 0x7fff9a622ff3 com.apple.Kerberos (3.0 - 1) <0D34094D-C667-327A-BF2F-062D8EE6C48C> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff9b311000 - 0x7fff9b38fff7 com.apple.Metal (120.1 - 120.1) /System/Library/Frameworks/Metal.framework/Versions/A/Metal 0x7fff9b3aa000 - 0x7fff9b3bffff com.apple.MetalPerformanceShaders.MPSCore (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSCore.framework/Versions/A/MPSCore 0x7fff9b3c0000 - 0x7fff9b42afef com.apple.MetalPerformanceShaders.MPSImage (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSImage.framework/Versions/A/MPSImage 0x7fff9b42b000 - 0x7fff9b44affb com.apple.MetalPerformanceShaders.MPSMatrix (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSMatrix.framework/Versions/A/MPSMatrix 0x7fff9b44b000 - 0x7fff9b4b3fff com.apple.MetalPerformanceShaders.MPSNeuralNetwork (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSNeuralNetwork.framework/Versions/A/MPSNeuralNetwork 0x7fff9b4b4000 - 0x7fff9b4b4ff7 com.apple.MetalPerformanceShaders.MetalPerformanceShaders (1.0 - 1) <8DBFE620-D4CB-3F20-B7D1-1C0C90104AE2> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/MetalPerformanceShaders 0x7fff9c44b000 - 0x7fff9c452fff com.apple.NetFS (6.0 - 4.0) /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS 0x7fff9f2af000 - 0x7fff9f2fcffb com.apple.opencl (2.8.8 - 2.8.8) <0B0EA163-0B17-3395-8493-EE998380580A> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL 0x7fff9f2fd000 - 0x7fff9f318ff3 com.apple.CFOpenDirectory (10.13 - 204) <2008AE0C-7B0D-3EFA-88D5-A26BF8163224> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory 0x7fff9f319000 - 0x7fff9f324fff com.apple.OpenDirectory (10.13 - 204) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory 0x7fffa04a3000 - 0x7fffa04a5fff libCVMSPluginSupport.dylib (15.0.38) <17634196-ABE3-3264-AFA9-458FAE88D5DD> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib 0x7fffa04a6000 - 0x7fffa04a9ff7 libCoreFSCache.dylib (160.7) <421E3EF9-0ACB-3605-8A7A-1D676A853527> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib 0x7fffa04aa000 - 0x7fffa04aefff libCoreVMClient.dylib (160.7) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib 0x7fffa04af000 - 0x7fffa04b8ff7 libGFXShared.dylib (15.0.38) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib 0x7fffa04b9000 - 0x7fffa04c4fff libGL.dylib (15.0.38) <13F21B8B-EADA-3B03-8E84-813A3FB42A73> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fffa04c5000 - 0x7fffa0500fe7 libGLImage.dylib (15.0.38) <90484321-5B93-391A-A938-66FA77DC2A7F> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib 0x7fffa066e000 - 0x7fffa06acffb libGLU.dylib (15.0.38) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib 0x7fffa1024000 - 0x7fffa1032ffb com.apple.opengl (15.0.38 - 15.0.38) <1A02DE70-8930-3DDB-B196-04D2D588228E> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fffa12b8000 - 0x7fffa13a7ff7 org.python.python (2.7.10 - 2.7.10) /System/Library/Frameworks/Python.framework/Versions/2.7/Python 0x7fffa1e71000 - 0x7fffa208dfff com.apple.QuartzCore (1.11 - 544) <5DAA37C8-5BE1-3652-A567-8AC1EB80A2D1> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fffa28b7000 - 0x7fffa2bbcfff com.apple.security (7.0 - 58241.0.0.1.1) /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fffa2bbd000 - 0x7fffa2c46ff7 com.apple.securityfoundation (6.0 - 55183) <9E497B33-EDEB-3A52-8BCD-8FAC98397E1C> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation 0x7fffa2c75000 - 0x7fffa2c78ff3 com.apple.xpc.ServiceManagement (1.0 - 1) /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement 0x7fffa301b000 - 0x7fffa308bffb com.apple.SystemConfiguration (1.17 - 1.17) <4F0BBE4D-F8EC-3FD1-9BF1-782A008153CA> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x7fffa5c65000 - 0x7fffa5c7dfe7 com.apple.APFS (1.0 - 1) /System/Library/PrivateFrameworks/APFS.framework/Versions/A/APFS 0x7fffa69bc000 - 0x7fffa6a04fff com.apple.AppleJPEG (1.0 - 1) /System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG 0x7fffa6a3f000 - 0x7fffa6a67fff com.apple.applesauce (1.0 - ???) <3545BBCF-8FF3-3B74-9A3F-92CFC1A01289> /System/Library/PrivateFrameworks/AppleSauce.framework/Versions/A/AppleSauce 0x7fffa7210000 - 0x7fffa7217fff com.apple.coreservices.BackgroundTaskManagement (1.0 - 57.1) <8FAB0EF3-7F2A-3C46-A30E-F3342A5940C6> /System/Library/PrivateFrameworks/BackgroundTaskManagement.framework/Versions/A/BackgroundTaskManagement 0x7fffa8be2000 - 0x7fffa8bebffb com.apple.CommonAuth (4.0 - 2.0) <1ACD12C4-783F-3B3F-9EB5-399940FDB3DD> /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth 0x7fffa95cb000 - 0x7fffa95dbff7 com.apple.CoreEmoji (1.0 - 65) /System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/CoreEmoji 0x7fffaa92e000 - 0x7fffaa932ff7 com.apple.DSExternalDisplay (3.1 - 380) <476A7E1A-AB8F-358A-8424-B34FBEFAB2F4> /System/Library/PrivateFrameworks/DSExternalDisplay.framework/Versions/A/DSExternalDisplay 0x7fffab89e000 - 0x7fffabcccfff com.apple.vision.FaceCore (3.3.2 - 3.3.2) <6E154CD6-4762-32A5-A48F-B999441A517B> /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore 0x7fffafc9d000 - 0x7fffafcacfff com.apple.GraphVisualizer (1.0 - 5) /System/Library/PrivateFrameworks/GraphVisualizer.framework/Versions/A/GraphVisualizer 0x7fffafcff000 - 0x7fffafd73ff3 com.apple.Heimdal (4.0 - 2.0) <9921343D-4CDB-359C-B6E2-FD8E75F46946> /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal 0x7fffb05d3000 - 0x7fffb05daff7 com.apple.IOAccelerator (358 - 358) <6F656737-5EE3-3817-AAF1-527C0575B9DB> /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator 0x7fffb05de000 - 0x7fffb05f4ff7 com.apple.IOPresentment (1.0 - 32.1) /System/Library/PrivateFrameworks/IOPresentment.framework/Versions/A/IOPresentment 0x7fffb0c5b000 - 0x7fffb0d4dff7 com.apple.LanguageModeling (1.0 - 152) <76D222F3-C960-320B-97F1-E063C2747742> /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling 0x7fffb0d4e000 - 0x7fffb0d93fff com.apple.Lexicon-framework (1.0 - 28) <54325E87-E536-3FEA-9CD4-882059B797F8> /System/Library/PrivateFrameworks/Lexicon.framework/Versions/A/Lexicon 0x7fffb1948000 - 0x7fffb19adfff com.apple.gpusw.MetalTools (1.0 - 1) <76937F06-7C1B-3620-9078-FD5073F0CC4A> /System/Library/PrivateFrameworks/MetalTools.framework/Versions/A/MetalTools 0x7fffb1bb6000 - 0x7fffb1bdeff3 com.apple.MultitouchSupport.framework (431 - 431) /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport 0x7fffb1e3e000 - 0x7fffb1e49fff com.apple.NetAuth (6.2 - 6.2) /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth 0x7fffb7c20000 - 0x7fffb7eb2ff3 com.apple.SkyLight (1.600.0 - 286) <9ED9DEED-8A5F-33EA-9EB1-C38FD3A57C92> /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight 0x7fffb9707000 - 0x7fffb970efff com.apple.TCC (1.0 - 1) <6CDAEC6B-05D1-3DF8-9BC5-683EFD0A1437> /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC 0x7fffb9a6c000 - 0x7fffb9a6dfff com.apple.TrustEvaluationAgent (2.0 - 31) <39F533B2-211E-3635-AF47-23F27749FF4A> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent 0x7fffbb44e000 - 0x7fffbb450ff7 com.apple.loginsupport (1.0 - 1) <2AE0AB82-6613-3B2E-A967-C880DEDAD628> /System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport 0x7fffbb756000 - 0x7fffbb78ffff libCRFSuite.dylib (41) <823C0426-8EB2-3437-BEA5-B8435EFB4B1C> /usr/lib/libCRFSuite.dylib 0x7fffbb790000 - 0x7fffbb79bfff libChineseTokenizer.dylib (28) <625D4CE0-9C6A-3857-AA15-AD30D50B650E> /usr/lib/libChineseTokenizer.dylib 0x7fffbb82d000 - 0x7fffbb82eff7 libDiagnosticMessagesClient.dylib (103) <495B43F1-F21B-3CA1-8F95-59B8F36A79A2> /usr/lib/libDiagnosticMessagesClient.dylib 0x7fffbb865000 - 0x7fffbba2fff3 libFosl_dynamic.dylib (17.6) <92B9E75B-4A2B-34F8-BAAF-AF5897B247D6> /usr/lib/libFosl_dynamic.dylib 0x7fffbba67000 - 0x7fffbba67fff libOpenScriptingUtil.dylib (172) /usr/lib/libOpenScriptingUtil.dylib 0x7fffbbb95000 - 0x7fffbbb96ff3 libSystem.B.dylib (1252) /usr/lib/libSystem.B.dylib 0x7fffbbc29000 - 0x7fffbbc29fff libapple_crypto.dylib (97.0.0.0.1) <0865224F-F38B-392B-8DBB-84E582C54D7F> /usr/lib/libapple_crypto.dylib 0x7fffbbc2a000 - 0x7fffbbc40ff3 libapple_nghttp2.dylib (1.20.3) /usr/lib/libapple_nghttp2.dylib 0x7fffbbc41000 - 0x7fffbbc6bff3 libarchive.2.dylib (54) <0B7FD7AD-0CFD-3F2C-88F0-ACBCBE8ECC2C> /usr/lib/libarchive.2.dylib 0x7fffbbcf1000 - 0x7fffbbcf1ff3 libauto.dylib (187) /usr/lib/libauto.dylib 0x7fffbbcf2000 - 0x7fffbbd9dff7 libboringssl.dylib (97.0.0.0.1) <90BBDFFB-9517-331B-AC61-C9B31547DE9D> /usr/lib/libboringssl.dylib 0x7fffbbd9e000 - 0x7fffbbdadff3 libbsm.0.dylib (39) <8423D62C-DA49-3581-8018-9CF1983A6EEE> /usr/lib/libbsm.0.dylib 0x7fffbbdae000 - 0x7fffbbdbbffb libbz2.1.0.dylib (38) <0A5086BB-4724-3C14-979D-5AD4F26B5B45> /usr/lib/libbz2.1.0.dylib 0x7fffbbdbc000 - 0x7fffbbe12fff libc++.1.dylib (400.9) /usr/lib/libc++.1.dylib 0x7fffbbe13000 - 0x7fffbbe37ff7 libc++abi.dylib (400.7) <217656D5-BC40-37FF-B322-91CB2AAD4F34> /usr/lib/libc++abi.dylib 0x7fffbbe39000 - 0x7fffbbe49fff libcmph.dylib (6) /usr/lib/libcmph.dylib 0x7fffbbe4a000 - 0x7fffbbe60fd3 libcompression.dylib (44) /usr/lib/libcompression.dylib 0x7fffbc11b000 - 0x7fffbc133ff7 libcoretls.dylib (154) /usr/lib/libcoretls.dylib 0x7fffbc134000 - 0x7fffbc135ffb libcoretls_cfhelpers.dylib (154) /usr/lib/libcoretls_cfhelpers.dylib 0x7fffbc2ce000 - 0x7fffbc45efff libcrypto.35.dylib (22) <067CFC21-249D-392D-ADE1-785100BF0F83> /usr/lib/libcrypto.35.dylib 0x7fffbc605000 - 0x7fffbc65affb libcups.2.dylib (457) <5FAD96AA-8F31-3B76-B2F1-3D7F3392DB79> /usr/lib/libcups.2.dylib 0x7fffbc798000 - 0x7fffbc798fff libenergytrace.dylib (16) /usr/lib/libenergytrace.dylib 0x7fffbc799000 - 0x7fffbc7b1ffb libexpat.1.dylib (15) /usr/lib/libexpat.1.dylib 0x7fffbc7bf000 - 0x7fffbc7c0fff libffi.dylib (18.1) <02011073-8CB7-362F-BC52-43B4E83687B0> /usr/lib/libffi.dylib 0x7fffbc7ce000 - 0x7fffbc7d3ffb libheimdal-asn1.dylib (518) /usr/lib/libheimdal-asn1.dylib 0x7fffbc7ff000 - 0x7fffbc8f0ff7 libiconv.2.dylib (51) <0772997F-4109-38A1-91ED-0F3F16AE99E5> /usr/lib/libiconv.2.dylib 0x7fffbc8f1000 - 0x7fffbcb17ffb libicucore.A.dylib (59108.0.1) <7F51EA4C-8285-3714-A5C0-B775725707FD> /usr/lib/libicucore.A.dylib 0x7fffbcb64000 - 0x7fffbcb65fff liblangid.dylib (128) <39C39393-0D05-301D-93B2-F224FC4949AA> /usr/lib/liblangid.dylib 0x7fffbcb66000 - 0x7fffbcb7fffb liblzma.5.dylib (10) <3D419A50-961F-37D2-8A01-3DC7AB7B8D18> /usr/lib/liblzma.5.dylib 0x7fffbcb80000 - 0x7fffbcb96ff7 libmarisa.dylib (9) /usr/lib/libmarisa.dylib 0x7fffbcc47000 - 0x7fffbce76ff7 libmecabra.dylib (770) /usr/lib/libmecabra.dylib 0x7fffbce7b000 - 0x7fffbceabffb libncurses.5.4.dylib (53) <030DF747-F71B-367A-83EE-2F30B7947929> /usr/lib/libncurses.5.4.dylib 0x7fffbd04e000 - 0x7fffbd11dff3 libnetwork.dylib (1196.0.0.1.1) /usr/lib/libnetwork.dylib 0x7fffbd193000 - 0x7fffbd5817f7 libobjc.A.dylib (720) /usr/lib/libobjc.A.dylib 0x7fffbd594000 - 0x7fffbd598fff libpam.2.dylib (22) <7B4D2CE2-1438-387A-9802-5CEEFBF26F86> /usr/lib/libpam.2.dylib 0x7fffbd59b000 - 0x7fffbd5cffff libpcap.A.dylib (77) /usr/lib/libpcap.A.dylib 0x7fffbd64f000 - 0x7fffbd66bffb libresolv.9.dylib (65) /usr/lib/libresolv.9.dylib 0x7fffbd6bb000 - 0x7fffbd849ffb libsqlite3.dylib (266) <0009E8DA-7879-3920-B2D1-A5552DE3735C> /usr/lib/libsqlite3.dylib 0x7fffbd8a5000 - 0x7fffbd8f8ffb libssl.35.dylib (22) <4D77B502-E065-3794-90E7-39E83F9683F6> /usr/lib/libssl.35.dylib 0x7fffbda18000 - 0x7fffbda4ffff libusrtcp.dylib (1196.0.0.1.1) <61712622-6D7B-3D04-B90B-03C06A51C5A8> /usr/lib/libusrtcp.dylib 0x7fffbda50000 - 0x7fffbda53ffb libutil.dylib (51) <58C59F00-031B-3798-B697-A8A4C58E70AA> /usr/lib/libutil.dylib 0x7fffbda54000 - 0x7fffbda61fff libxar.1.dylib (400) /usr/lib/libxar.1.dylib 0x7fffbda65000 - 0x7fffbdb4cfff libxml2.2.dylib (31.5) <7679E85C-C3F0-302A-AE40-5F7FEE879AAC> /usr/lib/libxml2.2.dylib 0x7fffbdb4d000 - 0x7fffbdb75ffb libxslt.1.dylib (15.9) /usr/lib/libxslt.1.dylib 0x7fffbdb76000 - 0x7fffbdb87ff7 libz.1.dylib (68) <3DDAEFB9-66FA-3E2D-8C0F-5A18AB8150A6> /usr/lib/libz.1.dylib 0x7fffbdc1e000 - 0x7fffbdc22ff7 libcache.dylib (79) <1457D615-F582-3A52-A546-28C1A26A8FE0> /usr/lib/system/libcache.dylib 0x7fffbdc23000 - 0x7fffbdc2dff3 libcommonCrypto.dylib (60117) /usr/lib/system/libcommonCrypto.dylib 0x7fffbdc2e000 - 0x7fffbdc35fff libcompiler_rt.dylib (62) <2C282262-54F9-3A67-B53E-CB5F7418DD21> /usr/lib/system/libcompiler_rt.dylib 0x7fffbdc36000 - 0x7fffbdc3efff libcopyfile.dylib (146) <6FC59A4F-7A15-3BD0-9C24-477B5B7A982D> /usr/lib/system/libcopyfile.dylib 0x7fffbdc3f000 - 0x7fffbdcc3ffb libcorecrypto.dylib (551) /usr/lib/system/libcorecrypto.dylib 0x7fffbdd4a000 - 0x7fffbdd84ff7 libdispatch.dylib (893) <50BBCB27-E361-3929-8513-70FEB437A61F> /usr/lib/system/libdispatch.dylib 0x7fffbdd85000 - 0x7fffbdda0ffb libdyld.dylib (513.2) /usr/lib/system/libdyld.dylib 0x7fffbdda1000 - 0x7fffbdda1ffb libkeymgr.dylib (28) /usr/lib/system/libkeymgr.dylib 0x7fffbdda2000 - 0x7fffbddaeff7 libkxld.dylib (4481.0.0.1.1) <024232DE-7D70-370F-BB4C-A07DFE1363C6> /usr/lib/system/libkxld.dylib 0x7fffbddaf000 - 0x7fffbddafff7 liblaunch.dylib (1173) <7FBD9B64-07C1-3EF6-974E-70C107B0E793> /usr/lib/system/liblaunch.dylib 0x7fffbddb0000 - 0x7fffbddb4ffb libmacho.dylib (900) <58A84A1F-7C96-3CD5-9637-C4AD35FC856A> /usr/lib/system/libmacho.dylib 0x7fffbddb5000 - 0x7fffbddb7ff3 libquarantine.dylib (86) <6FAC40D2-BA20-3BE8-AB51-7B552F4F6103> /usr/lib/system/libquarantine.dylib 0x7fffbddb8000 - 0x7fffbddb9ff3 libremovefile.dylib (45) <3193FFE3-1254-3C3D-B6D4-198644BCF995> /usr/lib/system/libremovefile.dylib 0x7fffbddba000 - 0x7fffbddd1ff3 libsystem_asl.dylib (356) /usr/lib/system/libsystem_asl.dylib 0x7fffbddd2000 - 0x7fffbddd2fff libsystem_blocks.dylib (67) /usr/lib/system/libsystem_blocks.dylib 0x7fffbddd3000 - 0x7fffbde5cfe7 libsystem_c.dylib (1230) /usr/lib/system/libsystem_c.dylib 0x7fffbde5d000 - 0x7fffbde60ffb libsystem_configuration.dylib (951) <31DA1200-2A3C-3D55-982E-4BA3050B6038> /usr/lib/system/libsystem_configuration.dylib 0x7fffbde61000 - 0x7fffbde64ffb libsystem_coreservices.dylib (50) <277C9353-70E0-3FB6-B137-EDD6D32FEDD5> /usr/lib/system/libsystem_coreservices.dylib 0x7fffbde65000 - 0x7fffbde66ff3 libsystem_darwin.dylib (1230) <843F09DC-D5E8-3EF3-90A9-B211578138D3> /usr/lib/system/libsystem_darwin.dylib 0x7fffbde67000 - 0x7fffbde6dff7 libsystem_dnssd.dylib (869) /usr/lib/system/libsystem_dnssd.dylib 0x7fffbde6e000 - 0x7fffbdeb7ff7 libsystem_info.dylib (513) <9F729295-12B6-34FC-84C2-C341BC47DCC6> /usr/lib/system/libsystem_info.dylib 0x7fffbdeb8000 - 0x7fffbdeddff7 libsystem_kernel.dylib (4481.0.0.1.1) <6D4CA4C4-82D1-3C58-B383-B6FD3C789DE7> /usr/lib/system/libsystem_kernel.dylib 0x7fffbdede000 - 0x7fffbdf29fcb libsystem_m.dylib (3145) /usr/lib/system/libsystem_m.dylib 0x7fffbdf2a000 - 0x7fffbdf49fff libsystem_malloc.dylib (135) /usr/lib/system/libsystem_malloc.dylib 0x7fffbdf4a000 - 0x7fffbdfe4ff7 libsystem_network.dylib (1196.0.0.1.1) <9C77C0C9-A18F-3BA0-868D-7469E6A39CF1> /usr/lib/system/libsystem_network.dylib 0x7fffbdfe5000 - 0x7fffbdfefffb libsystem_networkextension.dylib (739) /usr/lib/system/libsystem_networkextension.dylib 0x7fffbdff0000 - 0x7fffbdff9ff3 libsystem_notify.dylib (170) <4C874E44-8D5F-35FA-8BE6-26E5CB04FF59> /usr/lib/system/libsystem_notify.dylib 0x7fffbdffa000 - 0x7fffbe001ff7 libsystem_platform.dylib (158) /usr/lib/system/libsystem_platform.dylib 0x7fffbe002000 - 0x7fffbe00dfff libsystem_pthread.dylib (293) <5EDB59B9-556E-3AD3-871A-BB634DFB8020> /usr/lib/system/libsystem_pthread.dylib 0x7fffbe00e000 - 0x7fffbe011ffb libsystem_sandbox.dylib (745.0.0.0.1) /usr/lib/system/libsystem_sandbox.dylib 0x7fffbe012000 - 0x7fffbe013ff3 libsystem_secinit.dylib (29) /usr/lib/system/libsystem_secinit.dylib 0x7fffbe014000 - 0x7fffbe01bffb libsystem_symptoms.dylib (787) <437DF646-70A9-3CFE-AF3B-EEBDD569A104> /usr/lib/system/libsystem_symptoms.dylib 0x7fffbe01c000 - 0x7fffbe02ffff libsystem_trace.dylib (793) <28C3B223-F0EE-315D-82B7-1B6529AEA58A> /usr/lib/system/libsystem_trace.dylib 0x7fffbe031000 - 0x7fffbe036ff7 libunwind.dylib (35.3) <05D93F98-913F-315C-9817-B6CEE7741CE4> /usr/lib/system/libunwind.dylib 0x7fffbe037000 - 0x7fffbe062fff libxpc.dylib (1173) /usr/lib/system/libxpc.dylib External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 48961 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=290.6M resident=0K(0%) swapped_out_or_unallocated=290.6M(100%) Writable regions: Total=135.9M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=135.9M(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Activity Tracing 256K 2 Dispatch continuations 16.0M 2 Kernel Alloc Once 8K 2 MALLOC 83.6M 23 MALLOC guard page 32K 9 STACK GUARD 56.0M 7 Stack 18.6M 9 Stack Guard 8K 3 VM_ALLOCATE 17.3M 32 __DATA 15.0M 229 __FONT_DATA 4K 2 __LINKEDIT 186.6M 49 __TEXT 104.0M 229 __UNICODE 556K 2 shared memory 60K 7 =========== ======= ======= TOTAL 497.9M 592 Model: MacBookPro11,4, BootROM MBP114.0172.B16, 4 processors, Intel Core i7, 2.2 GHz, 16 GB, SMC 2.29f24 Graphics: Intel Iris Pro, Intel Iris Pro, Built-In Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343147533642465238412D50422020 Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343147533642465238412D50422020 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x152), Broadcom BCM43xx 1.0 (7.77.28.0.1a2) Bluetooth: Version 6.0.0d47, 3 services, 27 devices, 1 incoming serial ports Network Service: Thunderbolt Ethernet Slot 3, Ethernet, en7 Network Service: Wi-Fi, AirPort, en0 PCI Card: pci1b73,1100, USB eXtensible Host Controller, Thunderbolt at 194,0,0 PCI Card: ethernet, Ethernet Controller, Thunderbolt at 193,0,0 PCI Card: pci1b73,1100, USB eXtensible Host Controller, Thunderbolt at 192,0,0 PCI Card: pci11c1,5901, IEEE 1394 Open HCI, Thunderbolt at 191,0,0 Serial ATA Device: OWC Aura SSD, 960.04 GB Serial ATA Device: MARVELL VIRTUAL USB Device: USB 3.0 Bus USB Device: Internal Memory Card Reader USB Device: Apple Internal Keyboard / Trackpad USB Device: Bluetooth USB Host Controller USB Device: USB 3.0 Bus USB Device: USB audio CODEC USB Device: USB 3.0 Bus USB Device: USB Receiver Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1 Thunderbolt Device: Thunderbolt 2 Dock, Other World Computing, Inc., 1, 25.1 ---------- components: macOS messages: 297598 nosy: ayesjm, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Mac OS High Sierra Beta - Python Crash type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 11:02:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 15:02:18 +0000 Subject: [issue30758] regrtest hangs sometimes on the master branch (test_pydoc? test_subprocess?) In-Reply-To: <1498469994.85.0.367724213837.issue30758@psf.upfronthosting.co.za> Message-ID: <1499094138.87.0.0884765961944.issue30758@psf.upfronthosting.co.za> STINNER Victor added the comment: Maybe the commit cdee3f14f7f4c995e7eedb0bf6a67e260c739f7d fixed test_subprocess on the x86 Windows7 3.x buildbot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 11:03:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 15:03:20 +0000 Subject: [issue30758] regrtest hangs sometimes on the master branch (test_pydoc? test_subprocess?) In-Reply-To: <1498469994.85.0.367724213837.issue30758@psf.upfronthosting.co.za> Message-ID: <1499094200.28.0.820250254848.issue30758@psf.upfronthosting.co.za> STINNER Victor added the comment: I have no idea for the test_pydoc bug, but it was only seen once. I close the issue, but I may reopen it if I see again these bugs. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 11:16:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 15:16:44 +0000 Subject: [issue30759] [2.7] Fix python2 -m test --list-cases test_multibytecodec_support test_robotparser In-Reply-To: <1498470245.46.0.632048342488.issue30759@psf.upfronthosting.co.za> Message-ID: <1499095004.03.0.0514874504076.issue30759@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2614 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 11:30:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 15:30:36 +0000 Subject: [issue30759] [2.7] Fix python2 -m test --list-cases test_multibytecodec_support test_robotparser In-Reply-To: <1498470245.46.0.632048342488.issue30759@psf.upfronthosting.co.za> Message-ID: <1499095836.04.0.161872132968.issue30759@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2615 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 11:31:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 15:31:43 +0000 Subject: [issue30759] [2.7] Fix python2 -m test --list-cases test_multibytecodec_support test_robotparser In-Reply-To: <1498470245.46.0.632048342488.issue30759@psf.upfronthosting.co.za> Message-ID: <1499095903.34.0.606211632518.issue30759@psf.upfronthosting.co.za> STINNER Victor added the comment: For Lib/test/test_robotparser.py: with the current design of the test file, it's not easy to fix. I tried a different approach: copy the file from the match branch and adapt it for Python 2.7. See https://github.com/python/cpython/pull/2546 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 11:39:29 2017 From: report at bugs.python.org (David Lord) Date: Mon, 03 Jul 2017 15:39:29 +0000 Subject: [issue30838] re \w does not match some valid Unicode characters Message-ID: <1499096369.93.0.459837201925.issue30838@psf.upfronthosting.co.za> New submission from David Lord: This came up while writing a regex to match characters that are valid in Python identifiers for Jinja. https://github.com/pallets/jinja/pull/731 `\w` matches all valid identifier characters except for 4 special cases: import unicodedata import re import sys cre = re.compile(r'\w') for cp in range(sys.maxunicode + 1): s = chr(cp) if s.isidentifier() and not cre.match(s): print(hex(cp), unicodedata.name(s)) 0x1885 MONGOLIAN LETTER ALI GALI BALUDA 0x1886 MONGOLIAN LETTER ALI GALI THREE BALUDA 0x2118 SCRIPT CAPITAL P 0x212e ESTIMATED SYMBOL Python < 3.6 matches the two Mongolian characters, not sure why 3.6 stopped matching them. For our case, we just added them to a character set, `[\w\u1885\u1886\u2118\u212e]`. It can cause unexpected behavior when using `\b`, since that's defined as the transition from `\w` to `\W` and those 4 characters aren't in `\w`. `re.match(r'\b[\w\u212e', '?')` fails to match. ---------- components: Regular Expressions, Unicode messages: 297603 nosy: davidism, ezio.melotti, haypo, mrabarnett priority: normal severity: normal status: open title: re \w does not match some valid Unicode characters type: behavior versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 11:41:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 15:41:45 +0000 Subject: [issue30838] re \w does not match some valid Unicode characters In-Reply-To: <1499096369.93.0.459837201925.issue30838@psf.upfronthosting.co.za> Message-ID: <1499096505.85.0.45191791104.issue30838@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 11:43:54 2017 From: report at bugs.python.org (ThiefMaster) Date: Mon, 03 Jul 2017 15:43:54 +0000 Subject: [issue30838] re \w does not match some valid Unicode characters In-Reply-To: <1499096369.93.0.459837201925.issue30838@psf.upfronthosting.co.za> Message-ID: <1499096634.32.0.527628157342.issue30838@psf.upfronthosting.co.za> Changes by ThiefMaster : ---------- nosy: +ThiefMaster _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 12:21:56 2017 From: report at bugs.python.org (David Lord) Date: Mon, 03 Jul 2017 16:21:56 +0000 Subject: [issue30838] re \w does not match some valid Unicode characters In-Reply-To: <1499096369.93.0.459837201925.issue30838@psf.upfronthosting.co.za> Message-ID: <1499098916.55.0.418689289384.issue30838@psf.upfronthosting.co.za> David Lord added the comment: Adding `or ('a' + s).isidentifer()`, to catch valid id_continue characters, to the test in the previous script reveals many more characters that seem like valid word characters but aren't matched by `\w`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 13:19:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Jul 2017 17:19:54 +0000 Subject: [issue30759] [2.7] Fix python2 -m test --list-cases test_multibytecodec_support test_robotparser In-Reply-To: <1498470245.46.0.632048342488.issue30759@psf.upfronthosting.co.za> Message-ID: <1499102394.61.0.503781507635.issue30759@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2616 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 13:59:26 2017 From: report at bugs.python.org (Maarten ter Huurne) Date: Mon, 03 Jul 2017 17:59:26 +0000 Subject: [issue30839] Larger and/or configurable _MAX_LENGTH for unittest messages Message-ID: <1499104766.61.0.0657645860519.issue30839@psf.upfronthosting.co.za> New submission from Maarten ter Huurne: In a unit test for one of my projects I am comparing tree-structured objects using assertEqual(). Because there can be a few nested levels, the repr() string can exceed the _MAX_LENGTH which is just 80 characters. Not by much, but enough to get shortened and therefore requiring extra effort to figure out where the difference is. I think it is useful to shorten the messages at some point, to avoid accidentally spamming the log with pages of output that no-one is going to read. However, 80 characters is a length that someone debugging a failing test case can easily deal with. So I think the limit could be set an order of magnitude larger. Making the maximum length configurable would also solve the issue, but still it would be good to increase the default maximum then, in my opinion. The discussion of #27432 mentions _MAX_LENGTH customization, but that issue is not primarily about _MAX_LENGTH. ---------- components: Library (Lib) messages: 297605 nosy: maarten-treewalker priority: normal severity: normal status: open title: Larger and/or configurable _MAX_LENGTH for unittest messages type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 14:20:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Jul 2017 18:20:17 +0000 Subject: [issue29464] Specialize FASTCALL for functions with positional-only parameters In-Reply-To: <1486394565.83.0.903919283463.issue29464@psf.upfronthosting.co.za> Message-ID: <1499106017.66.0.345072472716.issue29464@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 6969eaf4682beb01bc95eeb14f5ce6c01312e297 by Serhiy Storchaka in branch 'master': bpo-29464: Rename METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS and make (#1955) https://github.com/python/cpython/commit/6969eaf4682beb01bc95eeb14f5ce6c01312e297 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 15:09:43 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 03 Jul 2017 19:09:43 +0000 Subject: [issue30837] Mac OS High Sierra Beta - Python Crash In-Reply-To: <1499092741.8.0.363302866556.issue30837@psf.upfronthosting.co.za> Message-ID: <1499108983.66.0.972200649784.issue30837@psf.upfronthosting.co.za> Ned Deily added the comment: Sorry, without more information, there is not much we can do about this. Can you supply a reproducible test case? In any case, the crash is from use of the Apple-supplied system Python 2.7.10 which is a few releases behind the most recent released upstream (2.7.13). And it is running on pre-release public beta. You should report the problem to Apple using their Feedback Assistant. All that said, the crash trace does show the Python helper extension module _scproxy in the chain and _scproxy has been problematic in the past: it is used to get network proxy information from the System Configuration framework. Previous crashes seemed to be due to lack of thread-safety in Apple's libdispatch, see for bpo-30385, but that doesn't seem to be the case here. Things may work differently under the covers in High Sierra. If you are able to reliably reproduce the problem, it would be interesting to see if the workaround in http://bugs.python.org/issue30385#msg293958 helps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 15:14:52 2017 From: report at bugs.python.org (Malcolm Smith) Date: Mon, 03 Jul 2017 19:14:52 +0000 Subject: [issue30840] Contrary to documentation, relative imports cannot pass through the top level Message-ID: <1499109292.04.0.970471813466.issue30840@psf.upfronthosting.co.za> New submission from Malcolm Smith: https://docs.python.org/3/reference/simple_stmts.html#the-import-statement defers the full specification of relative imports to PEP 328. PEP 328 gives the example "from ...sys import path" in a second-level package, and notes "while that last case is legal, it is certainly discouraged". However, in the current implementation it actually isn't legal. Using a stdlib second-level package to test: Python 3.5.3 (default, Apr 10 2017, 07:53:16) [GCC 6.3.0 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import xml.dom >>> __package__ = "xml.dom" >>> from . import minidom # Works fine >>> from ...sys import path Traceback (most recent call last): File "", line 1, in ValueError: attempted relative import beyond top-level package Either the documentation or the implementation should be fixed. ---------- components: Interpreter Core messages: 297608 nosy: Malcolm Smith priority: normal severity: normal status: open title: Contrary to documentation, relative imports cannot pass through the top level type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 15:21:00 2017 From: report at bugs.python.org (Yuan Chao Chou) Date: Mon, 03 Jul 2017 19:21:00 +0000 Subject: [issue30841] A shadowing variable naming emitted for Python-ast.c Message-ID: <1499109660.71.0.721864284128.issue30841@psf.upfronthosting.co.za> New submission from Yuan Chao Chou: When Parser/asdl_c.py is composing the content of Python/Python-ast.c, it uses "value" to name the variables in inner blocks, which can shadow the variables named the same in outer blocks. It would be a good practice to avoid the shadowing naming to prevent the variables from being misused. ---------- components: Interpreter Core messages: 297609 nosy: OswinC priority: normal severity: normal status: open title: A shadowing variable naming emitted for Python-ast.c type: compile error versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 15:21:37 2017 From: report at bugs.python.org (Yuan Chao Chou) Date: Mon, 03 Jul 2017 19:21:37 +0000 Subject: [issue30841] A shadowing variable naming emitted for Python-ast.c In-Reply-To: <1499109660.71.0.721864284128.issue30841@psf.upfronthosting.co.za> Message-ID: <1499109697.5.0.492589501502.issue30841@psf.upfronthosting.co.za> Changes by Yuan Chao Chou : ---------- pull_requests: +2617 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 15:22:42 2017 From: report at bugs.python.org (Yuan Chao Chou) Date: Mon, 03 Jul 2017 19:22:42 +0000 Subject: [issue30841] A shadowing variable naming emitted for Python-ast.c In-Reply-To: <1499109660.71.0.721864284128.issue30841@psf.upfronthosting.co.za> Message-ID: <1499109762.97.0.328764315437.issue30841@psf.upfronthosting.co.za> Changes by Yuan Chao Chou : ---------- pull_requests: +2618 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 15:22:56 2017 From: report at bugs.python.org (Yuan Chao Chou) Date: Mon, 03 Jul 2017 19:22:56 +0000 Subject: [issue30841] A shadowing variable naming emitted for Python-ast.c In-Reply-To: <1499109660.71.0.721864284128.issue30841@psf.upfronthosting.co.za> Message-ID: <1499109776.08.0.78751353217.issue30841@psf.upfronthosting.co.za> Changes by Yuan Chao Chou : ---------- pull_requests: +2619 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 15:27:50 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 03 Jul 2017 19:27:50 +0000 Subject: [issue26251] Use "Low-fragmentation Heap" memory allocator on Windows In-Reply-To: <1454262940.96.0.668805369213.issue26251@psf.upfronthosting.co.za> Message-ID: <1499110070.36.0.695350005945.issue26251@psf.upfronthosting.co.za> Steve Dower added the comment: I wouldn't be opposed to seeing it tried again, but I have no strong opinion. I don't think this is a major performance bottleneck right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 15:36:47 2017 From: report at bugs.python.org (Arnon Sela) Date: Mon, 03 Jul 2017 19:36:47 +0000 Subject: [issue30842] pyenv activate for bash and tcsh Message-ID: <1499110607.19.0.325548288138.issue30842@psf.upfronthosting.co.za> New submission from Arnon Sela: Remove hard coded path in activate family of virtualenv scripts. Currently, VIRTUAL_ENV is set hard coded. Event after --relocatable Instead, change to have is defined dynamically: E.g. bash: called=$_ [[ $called != $0 ]] && fullpath="${BASH_SOURCE[@]}" || fullpath=$0 fullpath=$(readlink -f $fullpath) VIRTUAL_ENV=$(dirname $(dirname $fullpath)) E.g. tcsh: set sourced=($_) if ("$sourced" != "") then set fullpath="$sourced[2]" endif if ("$0" != "tcsh") then set fullpath="$0" endif set fullpath=`readlink -f $fullpath` set binpath=`dirname $fullpath` setenv VIRTUAL_ENV `dirname $binpath` ---------- messages: 297611 nosy: PyAcrisel priority: normal severity: normal status: open title: pyenv activate for bash and tcsh type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 15:37:29 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Mon, 03 Jul 2017 19:37:29 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499110649.73.0.885148595689.issue30822@psf.upfronthosting.co.za> Changes by Utkarsh Upadhyay : ---------- pull_requests: +2620 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 15:55:33 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Mon, 03 Jul 2017 19:55:33 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499111733.91.0.717448564662.issue30822@psf.upfronthosting.co.za> Changes by Utkarsh Upadhyay : ---------- pull_requests: +2621 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 16:07:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 20:07:41 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1499111733.94.0.993887546817.issue30822@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: I would prefer to make test_datetime faster in master before backporting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 16:21:45 2017 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 03 Jul 2017 20:21:45 +0000 Subject: [issue30838] re \w does not match some valid Unicode characters In-Reply-To: <1499096369.93.0.459837201925.issue30838@psf.upfronthosting.co.za> Message-ID: <1499113305.95.0.193293638206.issue30838@psf.upfronthosting.co.za> Matthew Barnett added the comment: In Unicode 9.0.0, U+1885 and U+1886 changed from being General_Category=Other_Letter (Lo) to General_Category=Nonspacing_Mark (Mn). U+2118 is General_Category=Math_Symbol (Sm) and U+212E is General_Category=Other_Symbol (So). \w doesn't include Mn, Sm or So. The .identifier method uses the Unicode properties XID_Start and XID_Continue, which include these codepoints. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 17:22:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 21:22:37 +0000 Subject: [issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows In-Reply-To: <1489280495.74.0.987527414659.issue29796@psf.upfronthosting.co.za> Message-ID: <1499116957.59.0.993885889189.issue29796@psf.upfronthosting.co.za> STINNER Victor added the comment: Another example (I checked, all tests are run except of test_weakref): http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%202.7/builds/148/steps/test/logs/stdio ... 0:05:30 [400/403] test_file_eintr passed 0:05:30 [401/403] test_glob passed 0:05:54 [402/403] test_mmap passed (41 sec) command timed out: 1200 seconds without output, attempting to kill program finished with exit code 1 elapsedTime=1556.477000 ---------- components: +Tests nosy: +haypo, pitrou title: test_weakref hangs on AppVeyor (2.7) -> [2.7] test_weakref hangs on Python 2.7 on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 17:42:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 21:42:54 +0000 Subject: [issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows In-Reply-To: <1489280495.74.0.987527414659.issue29796@psf.upfronthosting.co.za> Message-ID: <1499118174.11.0.93830757925.issue29796@psf.upfronthosting.co.za> STINNER Victor added the comment: The problem are the 3 tests of test_weakref which uses collect_in_thread(): * test_threaded_weak_valued_setdefault(): 50k iterations * test_threaded_weak_valued_pop(): 50k iterations * test_threaded_weak_valued_consistency(): 200k iterations On my Linux with Python 2.7 compiled in debug mode, the two first tests take 1 second, but the last test takes 10 seconds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 18:03:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 22:03:47 +0000 Subject: [issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows In-Reply-To: <1489280495.74.0.987527414659.issue29796@psf.upfronthosting.co.za> Message-ID: <1499119427.24.0.788905684987.issue29796@psf.upfronthosting.co.za> STINNER Victor added the comment: On Python 3, time.sleep(seconds) rounds seconds towards +Infinity: see bpo-22117, commot cb29f0177c91ebb739b89d8cc4ba223785c94d61. time.sleep(0.0001) sleeps 15.6 ms on Windows. On Python 2.7, time.sleep(seconds) rounds towards zero. time.sleep(0.0001) sleeps 0 ms on Windows, and so the collect_in_thread() thread calls gc.collect() in a sleep. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 18:03:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 22:03:59 +0000 Subject: [issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows In-Reply-To: <1489280495.74.0.987527414659.issue29796@psf.upfronthosting.co.za> Message-ID: <1499119439.24.0.593238857373.issue29796@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2622 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 18:05:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 22:05:00 +0000 Subject: [issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows In-Reply-To: <1489280495.74.0.987527414659.issue29796@psf.upfronthosting.co.za> Message-ID: <1499119500.14.0.267336822418.issue29796@psf.upfronthosting.co.za> STINNER Victor added the comment: @Antoine: Another example of performance issue caused by rounding ;-) See also my article on pytime and timestamp rounding, https://haypo.github.io/pytime.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 18:07:36 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 03 Jul 2017 22:07:36 +0000 Subject: [issue30842] pyenv activate for bash and tcsh In-Reply-To: <1499110607.19.0.325548288138.issue30842@psf.upfronthosting.co.za> Message-ID: <1499119656.88.0.453587021358.issue30842@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 18:14:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 22:14:29 +0000 Subject: [issue30843] Lib/test/site.py conflicts with Lib/site.py when running tests Message-ID: <1499120069.02.0.752757937577.issue30843@psf.upfronthosting.co.za> New submission from STINNER Victor: I added Lib/test/bisect.py in the commit d7955b8196578306e9d86f6c61c9cb3ee72edab0, bpo-29512. When a test is loaded by Lib/test/regrtest.py when regrtest.py runs with "python -m test", test files like Lib/test/test_bisect.py are created with __package__ = ['test']. In this case, "import bisect" loads Lib/test/bisect.py rather than Lib/bisect.py. For test_bisect.py, I worked around the issue using "from __future__ import absolute_import". But then I saw this bug: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%202.7/builds/159/steps/test/logs/stdio Run tests in parallel using 2 child processes (...) 0:02:41 [144/403/1] test_multiprocessing failed test test_multiprocessing failed -- Traceback (most recent call last): File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/test/test_multiprocessing.py", line 1669, in test_connection self.assertEqual(poll(TIMEOUT1), True) AssertionError: False != True (...) Re-running test 'test_multiprocessing' in verbose mode (...) ====================================================================== ERROR: test_array (test.test_multiprocessing.WithProcessesTestArray) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/test/test_multiprocessing.py", line 1027, in test_array arr = self.Array('i', seq) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/__init__.py", line 260, in Array return Array(typecode_or_type, size_or_initializer, **kwds) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/sharedctypes.py", line 120, in Array obj = RawArray(typecode_or_type, size_or_initializer) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/sharedctypes.py", line 93, in RawArray result = _new_value(type_) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/sharedctypes.py", line 68, in _new_value wrapper = heap.BufferWrapper(size) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/heap.py", line 243, in __init__ block = BufferWrapper._heap.malloc(size) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/heap.py", line 223, in malloc (arena, start, stop) = self._malloc(size) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/heap.py", line 115, in _malloc i = bisect.bisect_left(self._lengths, size) AttributeError: 'module' object has no attribute 'bisect_left' The wrong bisect module was picked when test_multiprocessing was run for the second time. The first run was done in a slave process. The second run was done in the main regrtest process. ---------- components: Tests messages: 297618 nosy: haypo priority: normal severity: normal status: open title: Lib/test/site.py conflicts with Lib/site.py when running tests versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 18:14:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 22:14:38 +0000 Subject: [issue30843] [2.7] Lib/test/site.py conflicts with Lib/site.py when running tests In-Reply-To: <1499120069.02.0.752757937577.issue30843@psf.upfronthosting.co.za> Message-ID: <1499120078.61.0.621390820687.issue30843@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Lib/test/site.py conflicts with Lib/site.py when running tests -> [2.7] Lib/test/site.py conflicts with Lib/site.py when running tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 18:55:50 2017 From: report at bugs.python.org (Jakub Stasiak) Date: Mon, 03 Jul 2017 22:55:50 +0000 Subject: [issue20692] Tutorial and FAQ: how to call a method on an int In-Reply-To: <1392850224.09.0.571764135364.issue20692@psf.upfronthosting.co.za> Message-ID: <1499122550.04.0.0680089069507.issue20692@psf.upfronthosting.co.za> Changes by Jakub Stasiak : ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 19:14:27 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 03 Jul 2017 23:14:27 +0000 Subject: [issue20692] Tutorial and FAQ: how to call a method on an int In-Reply-To: <1392850224.09.0.571764135364.issue20692@psf.upfronthosting.co.za> Message-ID: <1499123667.36.0.132734506921.issue20692@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Sreepriya Chalakkal, Would you be able to prepare a pull request on GitHub for your patch? Thanks! ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 19:41:17 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 03 Jul 2017 23:41:17 +0000 Subject: [issue16328] win_add2path.py sets wrong user path In-Reply-To: <1351255282.63.0.930970476961.issue16328@psf.upfronthosting.co.za> Message-ID: <1499125277.2.0.465485492139.issue16328@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Any interest in making a PR for this patch? ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 20:01:51 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 04 Jul 2017 00:01:51 +0000 Subject: [issue12910] urrlib.quote quotes too many chars, e.g., '()' In-Reply-To: <1315304798.98.0.174203108938.issue12910@psf.upfronthosting.co.za> Message-ID: <1499126511.58.0.946163273476.issue12910@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Issue 16285 updated the urllib.parse.quote() reserved list to add '~'. >From the docstring: def quote(string, safe='/', encoding=None, errors=None): """quote('abc def') -> 'abc%20def' Each part of a URL, e.g. the path info, the query, etc., has a different set of reserved characters that must be quoted. RFC 3986 Uniform Resource Identifiers (URI): Generic Syntax lists the following reserved characters. reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | "," | "~" Each of these characters is reserved in some component of a URL, but not necessarily in all of them. Python 3.7 updates from using RFC 2396 to RFC 3986 to quote URL strings. Now, "~" is included in the set of reserved characters. -------------------------------------------- However, looking at RFC3986 (https://tools.ietf.org/html/rfc3986), appendix A has the following: unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" reserved = gen-delims / sub-delims gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" ---------------------------------------------------- Should the missing ones be added or should this issue be closed if they aren't going to be added? Thanks. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 20:33:46 2017 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 04 Jul 2017 00:33:46 +0000 Subject: [issue16328] win_add2path.py sets wrong user path In-Reply-To: <1351255282.63.0.930970476961.issue16328@psf.upfronthosting.co.za> Message-ID: <1499128426.57.0.330804231378.issue16328@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 21:31:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 04 Jul 2017 01:31:27 +0000 Subject: [issue6691] Support for nested classes and function for pyclbr In-Reply-To: <1250117262.14.0.353515413158.issue6691@psf.upfronthosting.co.za> Message-ID: <1499131887.97.0.85279339297.issue6691@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 246ff3bd00f97658e567a7087645a6b76e056491 by terryjreedy (csabella) in branch 'master': bpo-6691: Pyclbr now reports nested classes and functions. (#2503) https://github.com/python/cpython/commit/246ff3bd00f97658e567a7087645a6b76e056491 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 21:40:09 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 04 Jul 2017 01:40:09 +0000 Subject: [issue6691] Support for nested classes and function for pyclbr In-Reply-To: <1250117262.14.0.353515413158.issue6691@psf.upfronthosting.co.za> Message-ID: <1499132409.96.0.797373467276.issue6691@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Test_pyclbr could improve. There are notes on the PR for a new issue for that. If I find that further change is needed after applying to IDLE's module browser, #1612262, that will be another new issue. ---------- resolution: -> fixed stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 23:55:48 2017 From: report at bugs.python.org (Wu Zongyong) Date: Tue, 04 Jul 2017 03:55:48 +0000 Subject: [issue30790] Can't use proxy to connect internet on windows Message-ID: <1499140548.24.0.12484858575.issue30790@psf.upfronthosting.co.za> Changes by Wu Zongyong : ---------- pull_requests: +2623 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 00:00:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Jul 2017 04:00:00 +0000 Subject: [issue30789] Redesign PyCodeObject.co_extras to use a single memory block, instead of two In-Reply-To: <1498608641.09.0.230211440925.issue30789@psf.upfronthosting.co.za> Message-ID: <1499140800.63.0.206000196343.issue30789@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2624 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 00:01:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Jul 2017 04:01:06 +0000 Subject: [issue30789] Redesign PyCodeObject.co_extras to use a single memory block, instead of two In-Reply-To: <1498608641.09.0.230211440925.issue30789@psf.upfronthosting.co.za> Message-ID: <1499140866.6.0.640940318592.issue30789@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since nobody has provided a patch I have made it myself. ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 00:22:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Jul 2017 04:22:15 +0000 Subject: [issue30441] os.environ raises RuntimeError: dictionary changed size during iteration In-Reply-To: <1495550150.73.0.497197540263.issue30441@psf.upfronthosting.co.za> Message-ID: <1499142135.54.0.876956064308.issue30441@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2625 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 00:24:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Jul 2017 04:24:29 +0000 Subject: [issue30441] os.environ raises RuntimeError: dictionary changed size during iteration In-Reply-To: <1495550150.73.0.497197540263.issue30441@psf.upfronthosting.co.za> Message-ID: <1499142269.5.0.500572290381.issue30441@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2626 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 00:54:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 04:54:54 +0000 Subject: [issue25497] Rewrite test_robotparser In-Reply-To: <1446041150.72.0.906837091061.issue25497@psf.upfronthosting.co.za> Message-ID: <1499144094.67.0.280379562669.issue25497@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 00:55:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Jul 2017 04:55:34 +0000 Subject: [issue30441] os.environ raises RuntimeError: dictionary changed size during iteration In-Reply-To: <1495550150.73.0.497197540263.issue30441@psf.upfronthosting.co.za> Message-ID: <1499144134.24.0.843946142546.issue30441@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset bebd2cfa5f21811dd0ee4f3b1a1b85d379b83436 by Serhiy Storchaka in branch '3.6': [3.6] bpo-30441: Fix bug when modifying os.environ while iterating over it (GH-2409). (#2556) https://github.com/python/cpython/commit/bebd2cfa5f21811dd0ee4f3b1a1b85d379b83436 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 00:55:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Jul 2017 04:55:47 +0000 Subject: [issue30441] os.environ raises RuntimeError: dictionary changed size during iteration In-Reply-To: <1495550150.73.0.497197540263.issue30441@psf.upfronthosting.co.za> Message-ID: <1499144147.95.0.611787624754.issue30441@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 1a3bc5546aa27f01426ad76618a9b2c3b698ae68 by Serhiy Storchaka in branch '3.5': [3.5] bpo-30441: Fix bug when modifying os.environ while iterating over it (GH-2409). (#2557) https://github.com/python/cpython/commit/1a3bc5546aa27f01426ad76618a9b2c3b698ae68 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 01:19:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Jul 2017 05:19:33 +0000 Subject: [issue30441] os.environ raises RuntimeError: dictionary changed size during iteration In-Reply-To: <1495550150.73.0.497197540263.issue30441@psf.upfronthosting.co.za> Message-ID: <1499145573.08.0.311103207166.issue30441@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Osvaldo. ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 02:10:32 2017 From: report at bugs.python.org (James Tocknell) Date: Tue, 04 Jul 2017 06:10:32 +0000 Subject: [issue23835] configparser does not convert defaults to strings In-Reply-To: <1427862188.44.0.00358189102447.issue23835@psf.upfronthosting.co.za> Message-ID: <1499148632.26.0.368581783947.issue23835@psf.upfronthosting.co.za> Changes by James Tocknell : ---------- pull_requests: +2628 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 02:48:40 2017 From: report at bugs.python.org (Glyph Lefkowitz) Date: Tue, 04 Jul 2017 06:48:40 +0000 Subject: [issue30392] default webbrowser fails on macOS Sierra 10.12.5 In-Reply-To: <1495050601.31.0.205212071557.issue30392@psf.upfronthosting.co.za> Message-ID: <1499150920.22.0.867950484929.issue30392@psf.upfronthosting.co.za> Changes by Glyph Lefkowitz : ---------- nosy: +glyph status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 02:48:58 2017 From: report at bugs.python.org (Glyph Lefkowitz) Date: Tue, 04 Jul 2017 06:48:58 +0000 Subject: [issue30392] default webbrowser fails on macOS Sierra 10.12.5 In-Reply-To: <1495050601.31.0.205212071557.issue30392@psf.upfronthosting.co.za> Message-ID: <1499150938.21.0.516422100301.issue30392@psf.upfronthosting.co.za> Changes by Glyph Lefkowitz : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 02:59:24 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Jul 2017 06:59:24 +0000 Subject: [issue29293] Missing parameter "n" on multiprocessing.Condition.notify() In-Reply-To: <1484642636.98.0.126375980974.issue29293@psf.upfronthosting.co.za> Message-ID: <1499151564.7.0.903019250736.issue29293@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 48350412b70c76fa51f488cfc736c80d59b5e8eb by Antoine Pitrou in branch 'master': bpo-29293: multiprocessing.Condition.notify() lacks parameter `n` (#2480) https://github.com/python/cpython/commit/48350412b70c76fa51f488cfc736c80d59b5e8eb ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 02:59:42 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Jul 2017 06:59:42 +0000 Subject: [issue29293] Missing parameter "n" on multiprocessing.Condition.notify() In-Reply-To: <1484642636.98.0.126375980974.issue29293@psf.upfronthosting.co.za> Message-ID: <1499151582.12.0.407327249437.issue29293@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 03:50:02 2017 From: report at bugs.python.org (Pim Klanke) Date: Tue, 04 Jul 2017 07:50:02 +0000 Subject: [issue30844] selector_events.py lacks exceptional event support Message-ID: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> New submission from Pim Klanke: To be able to use GPIO Sysfs Interface on our embedded platforms we require exceptional event support. ---------- components: asyncio messages: 297629 nosy: pklanke, yselivanov priority: normal severity: normal status: open title: selector_events.py lacks exceptional event support type: enhancement versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 04:40:44 2017 From: report at bugs.python.org (Pim Klanke) Date: Tue, 04 Jul 2017 08:40:44 +0000 Subject: [issue30844] selector_events.py lacks exceptional event support In-Reply-To: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> Message-ID: <1499157644.52.0.252069651445.issue30844@psf.upfronthosting.co.za> Changes by Pim Klanke : ---------- pull_requests: +2629 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 05:16:57 2017 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 04 Jul 2017 09:16:57 +0000 Subject: [issue30837] Mac OS High Sierra Beta - Python Crash In-Reply-To: <1499092741.8.0.363302866556.issue30837@psf.upfronthosting.co.za> Message-ID: <1499159817.46.0.775264621913.issue30837@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Joshua: does your script use os.fork(), or multiprocessing? In that case this is a known issue made worse on High Sierra: _scproxy uses Cocoa libraries, and those cause problems when using for without exec. In High Sierra the Cocoa libraries are more strict and are hence more likely to cause problems like this. There's not much we can do about that, other than avoiding using _scproxy. If you don't use a proxy server setting "no_proxy" in your shell environment should do the trick. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 05:24:31 2017 From: report at bugs.python.org (Vegard) Date: Tue, 04 Jul 2017 09:24:31 +0000 Subject: [issue1751519] curses - new window methods: addchstr and addchnstr Message-ID: <1499160271.42.0.35975229357.issue1751519@psf.upfronthosting.co.za> Vegard added the comment: Bump, I just found out addchstr() is unsupported, which is unfortunate as there doesn't seem to be any other easy way to prevent line wrapping if you submit too long strings to addstr() without keeping track of the x location and/or the string length by hand. ---------- nosy: +vegard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 05:31:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 09:31:32 +0000 Subject: [issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows In-Reply-To: <1489280495.74.0.987527414659.issue29796@psf.upfronthosting.co.za> Message-ID: <1499160692.7.0.262359104616.issue29796@psf.upfronthosting.co.za> STINNER Victor added the comment: Another option is to change time.sleep() rounding, but it would impact all Python2 code using sleep()... I dislike this option. I expect many complains from users about such backward incompatible change in a minor release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 05:32:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 09:32:02 +0000 Subject: [issue30843] [2.7] Lib/test/site.py conflicts with Lib/site.py when running tests In-Reply-To: <1499120069.02.0.752757937577.issue30843@psf.upfronthosting.co.za> Message-ID: <1499160722.8.0.831608935831.issue30843@psf.upfronthosting.co.za> STINNER Victor added the comment: This bug only impacts the Python test suite. I see two options: * Add "from __future__ import absolute_import" to all .py files in Lib/... I would prefer to not modify too many files to fix a regression caused by a new debug tool * Rename Lib/test/bisect.py to Lib/test/bisectcmd.py. I prefer the second option :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 05:33:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 09:33:51 +0000 Subject: [issue30843] [2.7] Lib/test/bisect.py conflicts with Lib/bisect.py when running tests In-Reply-To: <1499120069.02.0.752757937577.issue30843@psf.upfronthosting.co.za> Message-ID: <1499160831.84.0.89619929718.issue30843@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: [2.7] Lib/test/site.py conflicts with Lib/site.py when running tests -> [2.7] Lib/test/bisect.py conflicts with Lib/bisect.py when running tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 05:35:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 09:35:54 +0000 Subject: [issue30843] [2.7] Lib/test/bisect.py conflicts with Lib/bisect.py when running tests In-Reply-To: <1499120069.02.0.752757937577.issue30843@psf.upfronthosting.co.za> Message-ID: <1499160954.54.0.374941234166.issue30843@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2630 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 05:36:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 09:36:18 +0000 Subject: [issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows In-Reply-To: <1489280495.74.0.987527414659.issue29796@psf.upfronthosting.co.za> Message-ID: <1499160978.24.0.824188112389.issue29796@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 1fef0154d97bd7f01c5bc59954a278bacf1a3f0e by Victor Stinner in branch '2.7': bpo-29796: test_weakref: Fix collect_in_thread() on Windows (#2553) https://github.com/python/cpython/commit/1fef0154d97bd7f01c5bc59954a278bacf1a3f0e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 05:40:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 09:40:33 +0000 Subject: [issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows In-Reply-To: <1489280495.74.0.987527414659.issue29796@psf.upfronthosting.co.za> Message-ID: <1499161233.35.0.67209911107.issue29796@psf.upfronthosting.co.za> STINNER Victor added the comment: I looked at test_weakref duration on buildbots before my change: * AMD64 Windows7 SP1 2.7: (less than 30 seconds) * AMD64 Windows8 2.7: 36 sec * AMD64 Windows8.1 Non-Debug 2.7: 450.6 sec Hum. That's strange. I don't understand why sometimes test_weakref hangs, whereaas sometimes it pass in less than 60 seconds? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 05:45:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 09:45:06 +0000 Subject: [issue30843] [2.7] Lib/test/bisect.py conflicts with Lib/bisect.py when running tests In-Reply-To: <1499120069.02.0.752757937577.issue30843@psf.upfronthosting.co.za> Message-ID: <1499161506.46.0.566541459492.issue30843@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 28b72baf3c1e57af0c9338fb41c89d62aa47a355 by Victor Stinner in branch '2.7': bpo-30843: Rename Lib/test/bisect.py to Lib/test/bisectcmd.py (#2563) https://github.com/python/cpython/commit/28b72baf3c1e57af0c9338fb41c89d62aa47a355 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 05:45:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 09:45:29 +0000 Subject: [issue30843] [2.7] Lib/test/bisect.py conflicts with Lib/bisect.py when running tests In-Reply-To: <1499120069.02.0.752757937577.issue30843@psf.upfronthosting.co.za> Message-ID: <1499161529.69.0.911836956879.issue30843@psf.upfronthosting.co.za> STINNER Victor added the comment: Fixed: I renamed Lib/test/bisect.py to Lib/test/bisectcmd.py. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 06:00:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 10:00:02 +0000 Subject: [issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows In-Reply-To: <1489280495.74.0.987527414659.issue29796@psf.upfronthosting.co.za> Message-ID: <1499162402.16.0.716183335751.issue29796@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh wow! The commit 1fef0154d97bd7f01c5bc59954a278bacf1a3f0e fixed PGO compilation on Python 2.7: http://buildbot.python.org/all/builders/AMD64%20Debian%20PGO%202.7/builds/227 is the first successful build since June 20. I didn't notice that the PGO buildbot was also stuck in running test_weakref in the compile step: job killed after 30 min. --- ... 0:06:01 [380/400] test_warnings 0:06:02 [381/400] test_wave 0:06:02 [382/400] test_weakref command timed out: 1200 seconds without output running ['make', 'all'], attempting to kill process killed by signal 9 program finished with exit code -1 elapsedTime=1699.111100 --- While build 206 was green, the buildbot started to fail in build 207: http://buildbot.python.org/all/builders/AMD64%20Debian%20PGO%202.7/builds/207 The strange thing is that this change only contains two small changes: * commit b39a7481ee7e6166d6d2b252a7a514b1f6553dfa * commit d4324baca4c03eb8d55446cd1b74b32ec5633af5 I fail to understand how these changes make test_weakref hangs. Well, at least the good news is that it's now fixed ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 06:19:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 10:19:08 +0000 Subject: [issue30845] [3.5] test_first_completed_some_already_completed() of test_concurrent_futures.ProcessPoolWaitTests: time.sleep() fails with "sleep length must be non-negative" in setUp() on x86 Tiger 3.5 Message-ID: <1499163547.99.0.882941259602.issue30845@psf.upfronthosting.co.za> New submission from STINNER Victor: Code of the setUp() method: class ExecutorMixin: worker_count = 5 def setUp(self): self.t1 = time.time() try: self.executor = self.executor_type(max_workers=self.worker_count) except NotImplementedError as e: self.skipTest(str(e)) self._prime_executor() def _prime_executor(self): # Make sure that the executor is ready to do work before running the # tests. This should reduce the probability of timeouts in the tests. futures = [self.executor.submit(time.sleep, 0.1) for _ in range(self.worker_count)] for f in futures: f.result() I don't understand how the child process can fail with ValueError("sleep length must be non-negative") when running time.sleep(0.1). Code of the sleep function: static PyObject * time_sleep(PyObject *self, PyObject *obj) { _PyTime_t secs; if (_PyTime_FromSecondsObject(&secs, obj, _PyTime_ROUND_CEILING)) return NULL; if (secs < 0) { PyErr_SetString(PyExc_ValueError, "sleep length must be non-negative"); return NULL; } if (pysleep(secs) != 0) return NULL; Py_INCREF(Py_None); return Py_None; } Can it be a major rounding issue in time_sleep()? Or concurrent.futures failed completely to serialized the floating point number 0.1? http://buildbot.python.org/all/builders/x86%20Tiger%203.5/builds/324/steps/test/logs/stdio 0:27:59 load avg: 1.54 [211/398/1] test_concurrent_futures test_cancel (test.test_concurrent_futures.FutureTests) ... ok test_cancelled (test.test_concurrent_futures.FutureTests) ... ok test_done (test.test_concurrent_futures.FutureTests) ... ok test_done_callback_already_cancelled (test.test_concurrent_futures.FutureTests) ... ok test_done_callback_already_failed (test.test_concurrent_futures.FutureTests) ... ok test_done_callback_already_successful (test.test_concurrent_futures.FutureTests) ... ok test_done_callback_raises (test.test_concurrent_futures.FutureTests) ... ok test_done_callback_with_cancel (test.test_concurrent_futures.FutureTests) ... ok test_done_callback_with_exception (test.test_concurrent_futures.FutureTests) ... ok test_done_callback_with_result (test.test_concurrent_futures.FutureTests) ... ok test_exception_with_success (test.test_concurrent_futures.FutureTests) ... ok test_exception_with_timeout (test.test_concurrent_futures.FutureTests) ... ok test_repr (test.test_concurrent_futures.FutureTests) ... ok test_result_with_cancel (test.test_concurrent_futures.FutureTests) ... ok test_result_with_success (test.test_concurrent_futures.FutureTests) ... ok test_result_with_timeout (test.test_concurrent_futures.FutureTests) ... ok test_running (test.test_concurrent_futures.FutureTests) ... ok test_duplicate_futures (test.test_concurrent_futures.ProcessPoolAsCompletedTests) ... 2.20s ok test_no_timeout (test.test_concurrent_futures.ProcessPoolAsCompletedTests) ... 0.18s ok test_zero_timeout (test.test_concurrent_futures.ProcessPoolAsCompletedTests) ... 2.20s ok test_killed_child (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.21s ok test_map (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.20s ok test_map_chunksize (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.21s ok test_map_exception (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.19s ok test_map_timeout (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 6.18s ok test_max_workers_negative (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.21s ok test_no_stale_references (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.20s ok test_shutdown_race_issue12456 (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.19s ok test_submit (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.18s ok test_submit_keyword (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.21s ok test_traceback (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.20s ok test_context_manager_shutdown (test.test_concurrent_futures.ProcessPoolShutdownTest) ... 0.10s ok test_del_shutdown (test.test_concurrent_futures.ProcessPoolShutdownTest) ... 0.10s ok test_hang_issue12364 (test.test_concurrent_futures.ProcessPoolShutdownTest) ... 1.09s ok test_interpreter_shutdown (test.test_concurrent_futures.ProcessPoolShutdownTest) ... 2.13s ok test_processes_terminate (test.test_concurrent_futures.ProcessPoolShutdownTest) ... 0.09s ok test_run_after_shutdown (test.test_concurrent_futures.ProcessPoolShutdownTest) ... 0.00s ok test_all_completed (test.test_concurrent_futures.ProcessPoolWaitTests) ... 0.20s ok test_first_completed (test.test_concurrent_futures.ProcessPoolWaitTests) ... 1.69s ok test_first_completed_some_already_completed (test.test_concurrent_futures.ProcessPoolWaitTests) ... ERROR test_first_exception (test.test_concurrent_futures.ProcessPoolWaitTests) ... 3.20s ok test_first_exception_one_already_failed (test.test_concurrent_futures.ProcessPoolWaitTests) ... 2.20s ok test_first_exception_some_already_complete (test.test_concurrent_futures.ProcessPoolWaitTests) ... 1.70s ok test_timeout (test.test_concurrent_futures.ProcessPoolWaitTests) ... 6.18s ok test_duplicate_futures (test.test_concurrent_futures.ThreadPoolAsCompletedTests) ... 2.11s ok test_no_timeout (test.test_concurrent_futures.ThreadPoolAsCompletedTests) ... 0.11s ok test_zero_timeout (test.test_concurrent_futures.ThreadPoolAsCompletedTests) ... 2.10s ok test_default_workers (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 0.10s ok test_map (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 0.11s ok test_map_exception (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 0.11s ok test_map_submits_without_iteration (test.test_concurrent_futures.ThreadPoolExecutorTest) Tests verifying issue 11777. ... 0.11s ok test_map_timeout (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 6.10s ok test_max_workers_negative (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 0.10s ok test_no_stale_references (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 0.10s ok test_shutdown_race_issue12456 (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 0.11s ok test_submit (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 0.10s ok test_submit_keyword (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 0.10s ok test_context_manager_shutdown (test.test_concurrent_futures.ThreadPoolShutdownTest) ... 0.01s ok test_del_shutdown (test.test_concurrent_futures.ThreadPoolShutdownTest) ... 0.01s ok test_hang_issue12364 (test.test_concurrent_futures.ThreadPoolShutdownTest) ... 1.04s ok test_interpreter_shutdown (test.test_concurrent_futures.ThreadPoolShutdownTest) ... 1.74s ok test_run_after_shutdown (test.test_concurrent_futures.ThreadPoolShutdownTest) ... 0.00s ok test_threads_terminate (test.test_concurrent_futures.ThreadPoolShutdownTest) ... 0.00s ok test_all_completed (test.test_concurrent_futures.ThreadPoolWaitTests) ... 0.11s ok test_first_completed (test.test_concurrent_futures.ThreadPoolWaitTests) ... 1.60s ok test_first_completed_some_already_completed (test.test_concurrent_futures.ThreadPoolWaitTests) ... 1.60s ok test_first_exception (test.test_concurrent_futures.ThreadPoolWaitTests) ... 3.10s ok test_first_exception_one_already_failed (test.test_concurrent_futures.ThreadPoolWaitTests) ... 2.10s ok test_first_exception_some_already_complete (test.test_concurrent_futures.ThreadPoolWaitTests) ... 1.60s ok test_pending_calls_race (test.test_concurrent_futures.ThreadPoolWaitTests) ... 0.90s ok test_timeout (test.test_concurrent_futures.ThreadPoolWaitTests) ... 6.10s ok ====================================================================== ERROR: test_first_completed_some_already_completed (test.test_concurrent_futures.ProcessPoolWaitTests) ---------------------------------------------------------------------- concurrent.futures.process._RemoteTraceback: """ Traceback (most recent call last): File "/Users/db3l/buildarea/3.5.bolen-tiger/build/Lib/concurrent/futures/process.py", line 175, in _process_worker r = call_item.fn(*call_item.args, **call_item.kwargs) ValueError: sleep length must be non-negative """ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/db3l/buildarea/3.5.bolen-tiger/build/Lib/test/test_concurrent_futures.py", line 71, in setUp self._prime_executor() File "/Users/db3l/buildarea/3.5.bolen-tiger/build/Lib/test/test_concurrent_futures.py", line 87, in _prime_executor f.result() File "/Users/db3l/buildarea/3.5.bolen-tiger/build/Lib/concurrent/futures/_base.py", line 398, in result return self.__get_result() File "/Users/db3l/buildarea/3.5.bolen-tiger/build/Lib/concurrent/futures/_base.py", line 357, in __get_result raise self._exception ValueError: sleep length must be non-negative ---------------------------------------------------------------------- Ran 71 tests in 65.994s FAILED (errors=1) Warning -- multiprocessing.process._dangling was modified by test_concurrent_futures Before: <_weakrefset.WeakSet object at 0x1491884> After: <_weakrefset.WeakSet object at 0x1567f14> Warning -- threading._dangling was modified by test_concurrent_futures Before: <_weakrefset.WeakSet object at 0x149161c> After: <_weakrefset.WeakSet object at 0x120db24> test test_concurrent_futures failed ---------- components: Tests, macOS messages: 297639 nosy: bquinlan, haypo, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: [3.5] test_first_completed_some_already_completed() of test_concurrent_futures.ProcessPoolWaitTests: time.sleep() fails with "sleep length must be non-negative" in setUp() on x86 Tiger 3.5 versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 06:48:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 10:48:25 +0000 Subject: [issue29868] multiprocessing.dummy missing cpu_count In-Reply-To: <1490137146.46.0.712424049962.issue29868@psf.upfronthosting.co.za> Message-ID: <1499165305.92.0.874640288542.issue29868@psf.upfronthosting.co.za> STINNER Victor added the comment: multiprocessing.dummy lacks many symbols: >>> set(multiprocessing.__all__) - set(multiprocessing.dummy.__all__) {'RawArray', 'set_forkserver_preload', 'ProcessError', 'RawValue', 'BufferTooShort', 'reducer', 'set_executable', 'Array', 'cpu_count', 'get_all_start_methods', 'get_start_method', 'AuthenticationError', 'Value', 'set_start_method', 'allow_connection_pickling', 'get_logger', 'SimpleQueue', 'TimeoutError', 'log_to_stderr', 'get_context'} ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 06:52:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 10:52:14 +0000 Subject: [issue30845] [3.5] test_first_completed_some_already_completed() of test_concurrent_futures.ProcessPoolWaitTests: time.sleep() fails with "sleep length must be non-negative" in setUp() on x86 Tiger 3.5 In-Reply-To: <1499163547.99.0.882941259602.issue30845@psf.upfronthosting.co.za> Message-ID: <1499165534.16.0.867028352003.issue30845@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2631 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 07:10:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 11:10:14 +0000 Subject: [issue30846] test_rapid_restart() of test_multiprocessing_fork fails randomly on AMD64 Debian PGO 3.6 Message-ID: <1499166614.41.0.795338423823.issue30846@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Debian%20PGO%203.6/builds/517/steps/test/logs/stdio ====================================================================== ERROR: test_rapid_restart (test.test_multiprocessing_fork.WithProcessesTestManagerRestart) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.6.gps-debian-profile-opt.nondebug/build/Lib/test/_test_multiprocessing.py", line 2410, in test_rapid_restart manager.start() File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.6.gps-debian-profile-opt.nondebug/build/Lib/multiprocessing/managers.py", line 517, in start self._address = reader.recv() File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.6.gps-debian-profile-opt.nondebug/build/Lib/multiprocessing/connection.py", line 250, in recv buf = self._recv_bytes() File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.6.gps-debian-profile-opt.nondebug/build/Lib/multiprocessing/connection.py", line 407, in _recv_bytes buf = self._recv(4) File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.6.gps-debian-profile-opt.nondebug/build/Lib/multiprocessing/connection.py", line 383, in _recv raise EOFError EOFError (...) Re-running test 'test_multiprocessing_fork' in verbose mode (...) test_rapid_restart (test.test_multiprocessing_fork.WithManagerTestManagerRestart) ... ok ---------- components: Library (Lib) messages: 297641 nosy: davin, haypo priority: normal severity: normal status: open title: test_rapid_restart() of test_multiprocessing_fork fails randomly on AMD64 Debian PGO 3.6 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 07:10:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 11:10:19 +0000 Subject: [issue30846] [3.6] test_rapid_restart() of test_multiprocessing_fork fails randomly on AMD64 Debian PGO 3.6 In-Reply-To: <1499166614.41.0.795338423823.issue30846@psf.upfronthosting.co.za> Message-ID: <1499166619.75.0.249334798457.issue30846@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_rapid_restart() of test_multiprocessing_fork fails randomly on AMD64 Debian PGO 3.6 -> [3.6] test_rapid_restart() of test_multiprocessing_fork fails randomly on AMD64 Debian PGO 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 07:14:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 11:14:07 +0000 Subject: [issue30845] [3.5] test_first_completed_some_already_completed() of test_concurrent_futures.ProcessPoolWaitTests: time.sleep() fails with "sleep length must be non-negative" in setUp() on x86 Tiger 3.5 In-Reply-To: <1499163547.99.0.882941259602.issue30845@psf.upfronthosting.co.za> Message-ID: <1499166847.2.0.0183950483892.issue30845@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3df9dec425b0254df1cdf41922fd8d6b08bf47e4 by Victor Stinner in branch 'master': bpo-30845: Enhance test_concurrent_futures cleanup (#2564) https://github.com/python/cpython/commit/3df9dec425b0254df1cdf41922fd8d6b08bf47e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 07:15:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 11:15:12 +0000 Subject: [issue30844] selector_events.py lacks exceptional event support In-Reply-To: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> Message-ID: <1499166912.11.0.444517267966.issue30844@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 07:19:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 11:19:26 +0000 Subject: [issue30844] selectors and asyncio: add_excepter(), 3rd argument of select.select() In-Reply-To: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> Message-ID: <1499167166.43.0.594262415692.issue30844@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: selector_events.py lacks exceptional event support -> selectors and asyncio: add_excepter(), 3rd argument of select.select() versions: -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 07:45:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 11:45:36 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499168736.32.0.541920449984.issue30319@psf.upfronthosting.co.za> STINNER Victor added the comment: I propose to ignore ECONNRESET in socket.close() and ENOTCONN and WSAEINVAL on socket.shutdown(). If we see more failures later, we can extend these lists. asyncore also ignores ENOTCONN on socket.close(), but I don't trust this module at this point: it seems like asyncore also handles pipes, not only socket.socket. Errors seen on buildbots: * ECONNRESET (ConnectionResetError) on socket.close() * ENOTCONN and WSAEINVAL on socket.shutdown() -- that's why I ignored these errors in poplib and imaplib The Python standard library already ignores some errors on socket.shutdown() and socket.close() depending on the module: * poplib, imaplib: ignore ENOTCONN and WSAEINVAL on socket.shutdown() * asyncore: ignore ENOTCONN and EBADF on socket.close(). asyncore ignores much more errors on functions doing read, write or close (depending on the received event): ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED, EPIPE, EBADF. In a function doing read+close, it says "winsock sometimes raises ENOTCONN". * asyncio: don't log a fatal error for EPIPE, ESHUTDOWN, ECONNRESET, ECONNABORTED errors. Lib/asyncio/base_events.py: # Exceptions which must not call the exception handler in fatal error # methods (_fatal_error()) _FATAL_ERROR_IGNORE = (BrokenPipeError, ConnectionResetError, ConnectionAbortedError) Mapping of exceptions to error codes: * BrokenPipeError: EPIPE, ESHUTDOWN * ConnectionResetError: ECONNRESET * ConnectionAbortedError: ECONNABORTED ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 07:47:46 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Jul 2017 11:47:46 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499168866.28.0.438353169773.issue30319@psf.upfronthosting.co.za> Antoine Pitrou added the comment: shutdown() is not the same thing as close(). If you want to ignore errors on shutdown() you should open a separate issue (and argument for it, because "I saw the error on the buildbots" is not a sufficient reason IMHO). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 07:50:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 11:50:00 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499169000.37.0.0161614059738.issue30319@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2632 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 08:00:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 12:00:13 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499169613.95.0.76220362253.issue30319@psf.upfronthosting.co.za> STINNER Victor added the comment: Antoine Pitrou: "shutdown() is not the same thing as close()." I consider that the bug is similar to socket.close() error, since we also get an exception because the peer closed the connection. It's just the error code which is different. Antoine Pitrou: "If you want to ignore errors on shutdown() you should open a separate issue (and argument for it, because "I saw the error on the buildbots" is not a sufficient reason IMHO)." bpo-4473 modified poplib to ignore ENOTCONN on shutdown(), patch by Lorenzo Catucci committed by you :-) Commit d89824b0e2fa9a44b56394a5185de737a6527ea7. Commit 81c87c5e9a81728f4c7b022e3786ce11d53ed3c9 modified impalib to ignore ENOTCONN, commit written and pushed by you ;-) In the bpo-30329, I modified poplib and imaplib to also ignore WSAEINVAL on shutdown(). I don't see the need to separate socket.close() and socket.shutdown() error handling in two issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 08:00:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 12:00:39 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499169639.05.0.965846942628.issue30319@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote https://github.com/python/cpython/pull/2565 * socket.close() now ignores ECONNRESET error * socket.shutdown() now ignores ENOTCONN and WSAEINVAL errors ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 08:03:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 12:03:51 +0000 Subject: [issue29796] [2.7] test_weakref hangs on Python 2.7 on Windows In-Reply-To: <1489280495.74.0.987527414659.issue29796@psf.upfronthosting.co.za> Message-ID: <1499169831.94.0.481802454484.issue29796@psf.upfronthosting.co.za> STINNER Victor added the comment: With commit 1fef0154d97bd7f01c5bc59954a278bacf1a3f0e, test_weakref takes 11 seconds on my Windows VM. Without this fix, test_weakref runs for longer than 2 hour and 19 min on my Windows VM. I decided to kill the test, I don't want to burn my CPU too long :-) So at least, on my Windows VM, the bug is trivial to reproduce! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 08:06:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 12:06:18 +0000 Subject: [issue30789] Redesign PyCodeObject.co_extras to use a single memory block, instead of two In-Reply-To: <1498608641.09.0.230211440925.issue30789@psf.upfronthosting.co.za> Message-ID: <1499169978.21.0.218812374616.issue30789@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 378ebb6578b9d709f38b888d23874c0b18125249 by Victor Stinner (Serhiy Storchaka) in branch 'master': bpo-30789: Use a single memory block for co_extra. (#2555) https://github.com/python/cpython/commit/378ebb6578b9d709f38b888d23874c0b18125249 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 08:06:52 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Jul 2017 12:06:52 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1499169613.95.0.76220362253.issue30319@psf.upfronthosting.co.za> Message-ID: Antoine Pitrou added the comment: Le 04/07/2017 ? 14:00, STINNER Victor a ?crit : > > Antoine Pitrou: "shutdown() is not the same thing as close()." > > I consider that the bug is similar to socket.close() error, > [...] First, let's not call it a bug when an error is reported to the user. A bug would be to silence all errors just because they annoy one core developer. Second, close() and shutdown() are different functions operating at different levels. close() operates at the OS level and releases resources associated with the given file descriptor. It might, but might not, do any I/O (such as flush buffers or send a TCP RST) -- for example, if you duplicated a fd after fork(), calling close() on only one of them will do absolutely nothing at the I/O level. shutdown() operates at the transport level. Someone who calls shutdown() *must* be notified that the shutdown went wrong, because that's the only thing shutdown() does. shutdown() does nothing at the OS level. It makes sense to silence some errors in close() because, most of the time, people call close() to release resources and they don't care whether the other end of the connection was notified in time. It doesn't make sense to do the same for shutdown(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 08:18:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Jul 2017 12:18:48 +0000 Subject: [issue30789] Redesign PyCodeObject.co_extras to use a single memory block, instead of two In-Reply-To: <1498608641.09.0.230211440925.issue30789@psf.upfronthosting.co.za> Message-ID: <1499170728.25.0.889854407825.issue30789@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 Tue Jul 4 08:22:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 12:22:13 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499170933.55.0.0748202134006.issue30319@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, I rewrote my PR to only ignore ECONNRESET in socket.close(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 08:26:21 2017 From: report at bugs.python.org (Pim Klanke) Date: Tue, 04 Jul 2017 12:26:21 +0000 Subject: [issue30844] selectors: add_excepter(), 3rd argument of select.select() In-Reply-To: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> Message-ID: <1499171181.3.0.376607743601.issue30844@psf.upfronthosting.co.za> Changes by Pim Klanke : ---------- components: -asyncio title: selectors and asyncio: add_excepter(), 3rd argument of select.select() -> selectors: add_excepter(), 3rd argument of select.select() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 08:35:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 12:35:42 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499171742.79.0.35113604777.issue30319@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote https://github.com/python/cpython/pull/2565 because the ConnectionResetError error on socket.close() is more and more a cause of failures on FreeBSD buildbots. I mean that I fixed enough other bugs to start to only see one specific bug more often ;-) (Before we had dozens of random bugs.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 09:12:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 13:12:39 +0000 Subject: [issue30231] test_imaplib needs a TLS server accepting self-signed certificates In-Reply-To: <1493736284.13.0.622029485806.issue30231@psf.upfronthosting.co.za> Message-ID: <1499173959.11.0.303690043179.issue30231@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2634 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 09:49:33 2017 From: report at bugs.python.org (Pim Klanke) Date: Tue, 04 Jul 2017 13:49:33 +0000 Subject: [issue30844] selectors: Add exceptional urgent data event In-Reply-To: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> Message-ID: <1499176173.15.0.0657582370066.issue30844@psf.upfronthosting.co.za> Changes by Pim Klanke : ---------- title: selectors: add_excepter(), 3rd argument of select.select() -> selectors: Add exceptional urgent data event _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 09:51:23 2017 From: report at bugs.python.org (Pim Klanke) Date: Tue, 04 Jul 2017 13:51:23 +0000 Subject: [issue30847] asyncio: selector_events: add_excepter(), 3rd argument of select.select() Message-ID: <1499176283.3.0.750942928243.issue30847@psf.upfronthosting.co.za> New submission from Pim Klanke: depends on bpo-30844 ---------- components: asyncio messages: 297652 nosy: pklanke, yselivanov priority: normal severity: normal status: open title: asyncio: selector_events: add_excepter(), 3rd argument of select.select() type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 09:54:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 13:54:28 +0000 Subject: [issue30847] asyncio: selector_events: add_excepter(), 3rd argument of select.select() In-Reply-To: <1499176283.3.0.750942928243.issue30847@psf.upfronthosting.co.za> Message-ID: <1499176468.2.0.164272262077.issue30847@psf.upfronthosting.co.za> STINNER Victor added the comment: Please elaborate the description :-) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 09:55:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 13:55:09 +0000 Subject: [issue30847] asyncio: selector_events: add_excepter(), 3rd argument of select.select() In-Reply-To: <1499176283.3.0.750942928243.issue30847@psf.upfronthosting.co.za> Message-ID: <1499176509.59.0.797797691822.issue30847@psf.upfronthosting.co.za> STINNER Victor added the comment: Does the Windows Proactor event loop has a similar concept of "excepter"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:15:26 2017 From: report at bugs.python.org (Pim Klanke) Date: Tue, 04 Jul 2017 14:15:26 +0000 Subject: [issue30847] asyncio: selector_events: add_excepter(), 3rd argument of select.select() In-Reply-To: <1499176283.3.0.750942928243.issue30847@psf.upfronthosting.co.za> Message-ID: <1499177726.62.0.377673795787.issue30847@psf.upfronthosting.co.za> Pim Klanke added the comment: To be able to use GPIO Sysfs Interface with asyncio on our embedded platforms, we require exceptional event support in asyncio. depends on bpo-30844 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:20:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:20:08 +0000 Subject: [issue26685] Raise errors from socket.close() In-Reply-To: <1459509388.35.0.801044830009.issue26685@psf.upfronthosting.co.za> Message-ID: <1499178008.28.0.228936821954.issue26685@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 67e1478dba6efe60b8e1890192014b8b06dd6bd9 by Victor Stinner in branch 'master': bpo-30319: socket.close() now ignores ECONNRESET (#2565) https://github.com/python/cpython/commit/67e1478dba6efe60b8e1890192014b8b06dd6bd9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:20:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:20:08 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499178008.41.0.00900339769243.issue30319@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 67e1478dba6efe60b8e1890192014b8b06dd6bd9 by Victor Stinner in branch 'master': bpo-30319: socket.close() now ignores ECONNRESET (#2565) https://github.com/python/cpython/commit/67e1478dba6efe60b8e1890192014b8b06dd6bd9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:31:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:31:42 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499178702.86.0.0495770634824.issue30319@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2635 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:31:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:31:43 +0000 Subject: [issue26685] Raise errors from socket.close() In-Reply-To: <1459509388.35.0.801044830009.issue26685@psf.upfronthosting.co.za> Message-ID: <1499178703.0.0.229873903815.issue26685@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2636 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:45:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:45:04 +0000 Subject: [issue30843] [2.7] Lib/test/bisect.py conflicts with Lib/bisect.py when running tests In-Reply-To: <1499120069.02.0.752757937577.issue30843@psf.upfronthosting.co.za> Message-ID: <1499179504.2.0.382155794112.issue30843@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2637 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:46:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:46:12 +0000 Subject: [issue26685] Raise errors from socket.close() In-Reply-To: <1459509388.35.0.801044830009.issue26685@psf.upfronthosting.co.za> Message-ID: <1499179572.21.0.598583564099.issue26685@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 580cd5cd3603317d294a881628880a92ea221334 by Victor Stinner in branch '3.6': bpo-30319: socket.close() now ignores ECONNRESET (#2565) (#2566) https://github.com/python/cpython/commit/580cd5cd3603317d294a881628880a92ea221334 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:46:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:46:12 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499179572.32.0.290207406991.issue30319@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 580cd5cd3603317d294a881628880a92ea221334 by Victor Stinner in branch '3.6': bpo-30319: socket.close() now ignores ECONNRESET (#2565) (#2566) https://github.com/python/cpython/commit/580cd5cd3603317d294a881628880a92ea221334 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:47:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:47:39 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499179659.63.0.584773950261.issue30319@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok. I modified socket.close() to ignore ECONNRESET in Python 3.6 and 3.7. I will leave the issue open a few days to see if it helps to reduce buildbot failure rate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:48:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:48:56 +0000 Subject: [issue30543] test_timeout fails on AMD64 FreeBSD CURRENT Debug 3.x: ConnectionResetError: [Errno 54] Connection reset by peer In-Reply-To: <1496352422.89.0.341222891297.issue30543@psf.upfronthosting.co.za> Message-ID: <1499179736.66.0.534081246672.issue30543@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Change socket.close() to ignore ECONNRESET _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:50:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:50:02 +0000 Subject: [issue30328] test_ssl.test_connect_with_context(): ConnectionResetError on AMD64 FreeBSD 9.x 3.6 In-Reply-To: <1494419046.55.0.785376173684.issue30328@psf.upfronthosting.co.za> Message-ID: <1499179802.04.0.665489953878.issue30328@psf.upfronthosting.co.za> STINNER Victor added the comment: Duplicate of bpo-30319. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Change socket.close() to ignore ECONNRESET _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:50:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:50:54 +0000 Subject: [issue30315] test_ftplib.TestTLS_FTPClass: "[Errno 54] Connection reset by peer" on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot In-Reply-To: <1494344869.6.0.553746122368.issue30315@psf.upfronthosting.co.za> Message-ID: <1499179854.85.0.422303159392.issue30315@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue seems like a duplicate of bpo-30319. While I'm not 100% confident, I'm quite sure that ignoring ECONNRESET in socket.close() should help ;-) ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Change socket.close() to ignore ECONNRESET _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:52:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:52:46 +0000 Subject: [issue30106] test_asyncore: test_handle_write() fails in tearDown() In-Reply-To: <1492642462.27.0.792408985482.issue30106@psf.upfronthosting.co.za> Message-ID: <1499179966.23.0.527043587275.issue30106@psf.upfronthosting.co.za> STINNER Victor added the comment: File "/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/socket.py", line 411, in _real_close _ss.close(self) ConnectionResetError: [Errno 54] Connection reset by peer This bug was fixed by bpo-30319. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:53:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:53:30 +0000 Subject: [issue27784] Random failure of test_TCPServer() of test.test_socketserver.SocketServerTest and test_handle_accept() of test.test_asyncore.TestAPI_UseIPv6Select on FreeBSD buildbots In-Reply-To: <1471422222.08.0.731040607027.issue27784@psf.upfronthosting.co.za> Message-ID: <1499180010.3.0.406468086465.issue27784@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: out of date -> duplicate superseder: -> Change socket.close() to ignore ECONNRESET _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:54:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:54:42 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499180082.52.0.920672689331.issue30319@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't see the link between this issue and bpo-30652 or bpo-30391, I removed these dependencies. I marked bpo-27784, bpo-30328, bpo-30543 and bpo-30315 as duplicates of this issue. bpo-30106 was already fixed, differently, but I mentioned this issue in it. ---------- dependencies: -Random failure of test_TCPServer() of test.test_socketserver.SocketServerTest and test_handle_accept() of test.test_asyncore.TestAPI_UseIPv6Select on FreeBSD buildbots, test_asyncore: test_handle_write() fails in tearDown(), test_ftplib.TestTLS_FTPClass: "[Errno 54] Connection reset by peer" on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot, test_ssl.test_connect_with_context(): ConnectionResetError on AMD64 FreeBSD 9.x 3.6, test_threading_handled() of test_socketserver hangs randomly on AMD64 FreeBSD 10.x Shared 3.6, test_threading_not_handled() of test_socketserver hangs randomly on AMD64 FreeBSD 10.x Shared 3.6, test_timeout fails on AMD64 FreeBSD CURRENT Debug 3.x: ConnectionResetError: [Errno 54] Connection reset by peer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:55:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:55:28 +0000 Subject: [issue30652] test_threading_not_handled() of test_socketserver hangs randomly on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1497353158.56.0.0471147763095.issue30652@psf.upfronthosting.co.za> Message-ID: <1499180128.4.0.382038126912.issue30652@psf.upfronthosting.co.za> STINNER Victor added the comment: While the traceback is not identify, this issue really looks like a duplicate of bpo-30391. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_threading_handled() of test_socketserver hangs randomly on AMD64 FreeBSD 10.x Shared 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:56:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:56:25 +0000 Subject: [issue30391] test_threading_handled() and test_threading_not_handled() of test_socketserver hangs randomly on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1495048024.31.0.0717718671213.issue30391@psf.upfronthosting.co.za> Message-ID: <1499180185.85.0.0205100848131.issue30391@psf.upfronthosting.co.za> STINNER Victor added the comment: I marked bpo-30652 as duplicate of this issue. Copy of the first message msg295903: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.6/builds/218/steps/test/logs/stdio 0:16:16 [405/405] test_socketserver crashed Timeout (0:15:00)! Thread 0x0000000802006400 (most recent call first): File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/threading.py", line 295 in wait File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/threading.py", line 551 in wait File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/test_socketserver.py", line 369 in wait_done File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/test_socketserver.py", line 341 in __init__ File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/test_socketserver.py", line 362 in __init__ File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/test_socketserver.py", line 312 in test_threading_not_handled File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/case.py", line 601 in run File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/case.py", line 649 in __call__ File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/runner.py", line 176 in run File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/support/__init__.py", line 1889 in _run_suite File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/support/__init__.py", line 1923 in run_unittest File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest.py", line 164 in test_runner File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest.py", line 165 in runtest_inner File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest.py", line 119 in runtest File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest_mp.py", line 71 in run_tests_slave File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 475 in _main File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 468 in main File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 532 in main File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/regrtest.py", line 46 in _main File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/regrtest.py", line 50 in File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/runpy.py", line 85 in _run_code File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/runpy.py", line 193 in _run_module_as_main ---------- title: test_threading_handled() of test_socketserver hangs randomly on AMD64 FreeBSD 10.x Shared 3.6 -> test_threading_handled() and test_threading_not_handled() of test_socketserver hangs randomly on AMD64 FreeBSD 10.x Shared 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:56:52 2017 From: report at bugs.python.org (Alex Gaynor) Date: Tue, 04 Jul 2017 14:56:52 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499180212.94.0.46378183087.issue30319@psf.upfronthosting.co.za> Changes by Alex Gaynor : ---------- nosy: -alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 10:56:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 14:56:54 +0000 Subject: [issue27784] Random failure of test_TCPServer() of test.test_socketserver.SocketServerTest and test_handle_accept() of test.test_asyncore.TestAPI_UseIPv6Select on FreeBSD buildbots In-Reply-To: <1471422222.08.0.731040607027.issue27784@psf.upfronthosting.co.za> Message-ID: <1499180214.58.0.0151772916572.issue27784@psf.upfronthosting.co.za> STINNER Victor added the comment: Duplicate of bpo-30319. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 11:02:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 15:02:30 +0000 Subject: [issue30844] selectors: Add exceptional urgent data event In-Reply-To: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> Message-ID: <1499180550.64.0.35465280866.issue30844@psf.upfronthosting.co.za> STINNER Victor added the comment: > To be able to use GPIO Sysfs Interface on our embedded platforms we require exceptional event support. Antoine Pitrou noticed that "exception" term can be confusion in Python, since exceptions are like "raise ValueError(...)". The manual page mentions "out-of-band (OOB) data". http://man7.org/linux/man-pages/man2/select_tut.2.html exceptfds This set is watched for "exceptional conditions". In practice, only one such exceptional condition is common: the availability of out-of-band (OOB) data for reading from a TCP socket. See recv(2), send(2), and tcp(7) for more details about OOB data. (One other less common case where select(2) indicates an exceptional condition occurs with pseudoterminals in packet mode; see ioctl_tty(2).) After select() has returned, exceptfds will be cleared of all file descriptors except for those for which an exceptional condition has occurred. Is it what you need for a GPIO? GPIO is unrelated to TCP, right? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 11:03:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 15:03:43 +0000 Subject: [issue30844] selectors: Add exceptional urgent data event In-Reply-To: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> Message-ID: <1499180623.51.0.689848502372.issue30844@psf.upfronthosting.co.za> STINNER Victor added the comment: http://man7.org/linux/man-pages/man7/tcp.7.html Sockets API TCP provides limited support for out-of-band data, in the form of (a single byte of) urgent data. In Linux this means if the other end sends newer out-of-band data the older urgent data is inserted as normal data into the stream (even when SO_OOBINLINE is not set). This differs from BSD-based stacks. Linux uses the BSD compatible interpretation of the urgent pointer field by default. This violates RFC 1122, but is required for interoperability with other stacks. It can be changed via /proc/sys/net/ipv4/tcp_stdurg. It is possible to peek at out-of-band data using the recv(2) MSG_PEEK flag. Since version 2.4, Linux supports the use of MSG_TRUNC in the flags argument of recv(2) (and recvmsg(2)). This flag causes the received bytes of data to be discarded, rather than passed back in a caller- supplied buffer. Since Linux 2.4.4, MSG_TRUNC also has this effect when used in conjunction with MSG_OOB to receive out-of-band data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 11:05:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 15:05:12 +0000 Subject: [issue30844] selectors: Add exceptional urgent data event In-Reply-To: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> Message-ID: <1499180712.82.0.0296555889493.issue30844@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't know anything about OOB data, so I continue to add more pointers :-) https://en.wikipedia.org/wiki/Out-of-band_data "Out of band data is a logically independent transmission channel between a pair of connected stream sockets." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 11:10:05 2017 From: report at bugs.python.org (Pim Klanke) Date: Tue, 04 Jul 2017 15:10:05 +0000 Subject: [issue30844] selectors: Add exceptional conditions event In-Reply-To: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> Message-ID: <1499181005.97.0.591509130443.issue30844@psf.upfronthosting.co.za> Changes by Pim Klanke : ---------- title: selectors: Add exceptional urgent data event -> selectors: Add exceptional conditions event _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 11:10:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 15:10:18 +0000 Subject: [issue30848] test_multiprocessing_forkserver hangs on AMD64 FreeBSD CURRENT Debug 3.x Message-ID: <1499181018.19.0.70320374178.issue30848@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/546/steps/test/logs/stdio ... 0:23:06 load avg: 0.73 [402/406] test_multiprocessing_fork passed (84 sec) -- running: test_multiprocessing_forkserver (287 sec) 0:23:06 load avg: 0.73 [403/406] test_yield_from passed -- running: test_multiprocessing_forkserver (288 sec) 0:23:07 load avg: 0.73 [404/406] test_codecencodings_kr passed -- running: test_multiprocessing_forkserver (288 sec) 0:23:09 load avg: 0.84 [405/406] test_urllib2_localnet passed -- running: test_multiprocessing_forkserver (291 sec) command timed out: 1200 seconds without output running ['make', 'buildbottest', 'TESTOPTS=-j2', 'TESTPYTHONOPTS=', 'TESTTIMEOUT=900'], attempting to kill process killed by signal 9 program finished with exit code -1 elapsedTime=2591.955936 ---------- components: Tests messages: 297671 nosy: haypo priority: normal severity: normal status: open title: test_multiprocessing_forkserver hangs on AMD64 FreeBSD CURRENT Debug 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 11:11:44 2017 From: report at bugs.python.org (=?utf-8?q?J=C3=B6rn_Hees?=) Date: Tue, 04 Jul 2017 15:11:44 +0000 Subject: [issue12910] urrlib.quote quotes too many chars, e.g., '()' In-Reply-To: <1315304798.98.0.174203108938.issue12910@psf.upfronthosting.co.za> Message-ID: <1499181104.51.0.365988299293.issue12910@psf.upfronthosting.co.za> Changes by J?rn Hees : ---------- pull_requests: +2638 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 11:11:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 15:11:52 +0000 Subject: [issue30848] test_multiprocessing_forkserver hangs on AMD64 FreeBSD CURRENT Debug 3.x In-Reply-To: <1499181018.19.0.70320374178.issue30848@psf.upfronthosting.co.za> Message-ID: <1499181112.27.0.988524011328.issue30848@psf.upfronthosting.co.za> STINNER Victor added the comment: This buildbot run uses --timeout=900, so test_multiprocessing_forkserver was supposed to be killed after 15 minutes by faulthandler, but buildbot had to kill it after 20 min. Moreover, the main regrtest process is supposed to log "running: ..." messages every 30 secondes, it didn't... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 11:16:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 15:16:51 +0000 Subject: [issue30849] test_stress_delivery_dependent() randomly fails on AMD64 Debian root 3.6 Message-ID: <1499181411.1.0.541300647507.issue30849@psf.upfronthosting.co.za> New submission from STINNER Victor: Antoine: I told you that such stess-test is going to require work to polish it. So here is another example of failure. Enjoy :-) http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.6/builds/534/steps/test/logs/stdio == CPython 3.6.2rc1+ (heads/3.6:580cd5c, Jul 5 2017, 00:47:42) [GCC 4.9.2] == Linux-3.16.0-4-amd64-x86_64-with-debian-8.7 little-endian ... == CPU count: 1 ... Run tests in parallel using 2 child processes 0:11:40 load avg: 1.29 [383/405/1] test_signal failed -- running: test_datetime (38 sec) ... ====================================================================== FAIL: test_stress_delivery_dependent (test.test_signal.StressTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.6.angelico-debian-amd64/build/Lib/test/test_signal.py", line 1053, in test_stress_delivery_dependent self.assertEqual(len(sigs), N, "Some signals were lost") AssertionError: 4602 != 10000 : Some signals were lost ====================================================================== FAIL: test_stress_delivery_simultaneous (test.test_signal.StressTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.6.angelico-debian-amd64/build/Lib/test/test_signal.py", line 1086, in test_stress_delivery_simultaneous self.assertEqual(len(sigs), N, "Some signals were lost") AssertionError: 8206 != 10000 : Some signals were lost ---------- assignee: pitrou components: Tests messages: 297674 nosy: haypo, pitrou priority: normal severity: normal status: open title: test_stress_delivery_dependent() randomly fails on AMD64 Debian root 3.6 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 11:16:51 2017 From: report at bugs.python.org (=?utf-8?q?J=C3=B6rn_Hees?=) Date: Tue, 04 Jul 2017 15:16:51 +0000 Subject: [issue12910] urrlib.quote quotes too many chars, e.g., '()' In-Reply-To: <1315304798.98.0.174203108938.issue12910@psf.upfronthosting.co.za> Message-ID: <1499181411.14.0.907765915914.issue12910@psf.upfronthosting.co.za> J?rn Hees added the comment: It's been a while... nowadays I would mostly change the documentation of the quote function to point out that it is likely to quote more characters than absolutely necessary by SPEC. The function is in place for so long, (even in py3) that people will rely on the behavior. I made an attempt to update the docstring accordingly in https://github.com/python/cpython/pull/2568 What i think is most confusing is the current docs mentioning the reserved chars (which are btw. definitely wrong wrt. RFC3986). Actually as one can see in the code the reserved chars don't play any role for quote, but much more the unreserved chars (called _ALWAYS_SAFE https://github.com/python/cpython/blob/master/Lib/urllib/parse.py#L716 ). unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" The current quote function's approach is to simply quote everything that is not in unreserved + safe (per arg). In that aspect it is quite close to the old javascript.escape function: https://www.w3schools.com/jsref/jsref_escape.asp quick links py2.7: https://github.com/python/cpython/blob/2.7/Lib/urllib.py#L1261 py3: https://github.com/python/cpython/blob/master/Lib/urllib/parse.py#L745 RFC3986: https://tools.ietf.org/html/rfc3986#appendix-A ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 11:20:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 15:20:07 +0000 Subject: [issue30850] [2.7] bsddb3: test01_basic_replication() of test_bsddb3 fails randomly on AMD64 Windows8.1 Refleaks 2.7 Message-ID: <1499181607.72.0.534776800166.issue30850@psf.upfronthosting.co.za> New submission from STINNER Victor: See also bpo-30778: "test_bsddb3 crash on x86 Windows XP 2.7". http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%202.7/builds/40/steps/test/logs/stdio 1:07:30 [145/403/1] test_bsddb3 failed -- running: test_weakref (4038 sec), test_io (2487 sec), test_mmap (1406 sec) test_bsddb3 still working, be patient... test_bsddb3 still working, be patient... test_bsddb3 still working, be patient... Berkeley DB 4.7.25: (May 15, 2008) Test path prefix: d:\temp\z-test_bsddb3-5156 XXX: timeout happened beforestartup was confirmed - see issue 3892 test test_bsddb3 failed -- Traceback (most recent call last): File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\bsddb\test\test_replication.py", line 384, in test01_basic_replication self.assertTrue(time.time() _______________________________________ From report at bugs.python.org Tue Jul 4 11:22:42 2017 From: report at bugs.python.org (=?utf-8?q?J=C3=B6rn_Hees?=) Date: Tue, 04 Jul 2017 15:22:42 +0000 Subject: [issue12910] urrlib.quote quotes too many chars, e.g., '()' In-Reply-To: <1315304798.98.0.174203108938.issue12910@psf.upfronthosting.co.za> Message-ID: <1499181762.72.0.876355998517.issue12910@psf.upfronthosting.co.za> Changes by J?rn Hees : ---------- versions: +Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 11:55:44 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Jul 2017 15:55:44 +0000 Subject: [issue30844] selectors: Add exceptional conditions event In-Reply-To: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> Message-ID: <1499183744.59.0.293347134882.issue30844@psf.upfronthosting.co.za> Antoine Pitrou added the comment: About naming: it is true that the manpage for select() uses the wording "exceptional condition". But the Linux man page for poll() (and by extension epoll_wait()) does not use that wording, it says "There is urgent data to read". The POSIX man page for poll() says "High-priority data may be read without blocking". I would not argue about this if this weren't for the fact that "exception" already has a different meaning in Python land. Re-using the term for something else is confusing. Since "urgent data" and "high-priority data" are already accepted elsewhere for the same concept, reusing one of them should be ok. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 12:49:25 2017 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 04 Jul 2017 16:49:25 +0000 Subject: [issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers In-Reply-To: <1485909545.04.0.650924943503.issue29406@psf.upfronthosting.co.za> Message-ID: <1499186965.73.0.0200998909196.issue29406@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Yury, based on the most recent comments, can this issue be closed now? Not sure, I'm reviewing the patch for #30698, let's see if it fixes the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 13:00:59 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 04 Jul 2017 17:00:59 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1499187659.87.0.701287228043.issue30814@psf.upfronthosting.co.za> Brett Cannon added the comment: My guess is the import of package has completed but package.submodule hasn't (I don't know what state it would be in, but obviously before the module is assigned as an attribute on the package), a context switch occurs, and then the assignment fails due to package.submodule not being set on package yet. I wonder if package.submodule is in sys.modules when the AttributeError is triggered? I don't remember when the assignment of a submodule to an attriute on a package occurs, but this suggests it's rather late and that's why this is failing. Maybe the assignment is outside of the per-module lock being released and that is what's causing this? Hey, at least importing in a thread doesn't deadlock anymore like it used to. ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 13:13:35 2017 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 04 Jul 2017 17:13:35 +0000 Subject: [issue30828] Out of bounds write in _asyncio_Future_remove_done_callback In-Reply-To: <1498998277.02.0.104703912354.issue30828@psf.upfronthosting.co.za> Message-ID: <1499188415.14.0.206434613274.issue30828@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +2640 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 14:04:59 2017 From: report at bugs.python.org (Segev Finer) Date: Tue, 04 Jul 2017 18:04:59 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499191499.78.0.128422067966.issue30726@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2641 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 14:05:08 2017 From: report at bugs.python.org (Segev Finer) Date: Tue, 04 Jul 2017 18:05:08 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499191508.95.0.455390020962.issue30726@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2642 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 14:07:57 2017 From: report at bugs.python.org (Segev Finer) Date: Tue, 04 Jul 2017 18:07:57 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499191677.64.0.139436964622.issue30726@psf.upfronthosting.co.za> Segev Finer added the comment: Python 2.7 diverged https://github.com/python/cpython/commit/ab3b0ade505ce07a3d5ec4fbc991a154242732e6. It's only missing _CRT_SECURE_NO_WARNINGS. :P ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 14:16:34 2017 From: report at bugs.python.org (Segev Finer) Date: Tue, 04 Jul 2017 18:16:34 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499192194.84.0.146779954726.issue30726@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2643 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 14:24:15 2017 From: report at bugs.python.org (Vitor Pereira) Date: Tue, 04 Jul 2017 18:24:15 +0000 Subject: [issue30794] Add multiprocessing.Process.kill() In-Reply-To: <1498680221.55.0.739149893408.issue30794@psf.upfronthosting.co.za> Message-ID: <1499192655.34.0.686454717702.issue30794@psf.upfronthosting.co.za> Vitor Pereira added the comment: Hey, I submitted a PR and just signed the CLA. If you could please take a look. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 14:38:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 18:38:49 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499193529.25.0.754153274337.issue30726@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d02c8416fe1b29b3322004b73133bf6c8a2e353a by Victor Stinner (Segev Finer) in branch '3.6': [3.6] bpo-30726: Also fix pyexpat.vcxproj (GH-2375) (#2570) https://github.com/python/cpython/commit/d02c8416fe1b29b3322004b73133bf6c8a2e353a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 14:39:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 18:39:31 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499193571.03.0.448385377083.issue30726@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 320ee67f981f766ff55c55ef87d5ef17ce297824 by Victor Stinner (Segev Finer) in branch '3.5': [3.5] bpo-30726: Also fix pyexpat.vcxproj (GH-2375) (#2571) https://github.com/python/cpython/commit/320ee67f981f766ff55c55ef87d5ef17ce297824 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 14:40:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 18:40:06 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499193606.03.0.0127390874554.issue30726@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d0ae4be443332d63fafb304944842fbaece734a3 by Victor Stinner (Segev Finer) in branch '2.7': bpo-30726: Add _CRT_SECURE_NO_WARNINGS to _elementtree and pyexpat projects (#2572) https://github.com/python/cpython/commit/d0ae4be443332d63fafb304944842fbaece734a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 14:48:36 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Jul 2017 18:48:36 +0000 Subject: [issue30794] Add multiprocessing.Process.kill() In-Reply-To: <1498680221.55.0.739149893408.issue30794@psf.upfronthosting.co.za> Message-ID: <1499194116.95.0.52686481849.issue30794@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you Vitor! I posted some review comments on your PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 15:03:15 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Jul 2017 19:03:15 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1499194995.39.0.537675210375.issue30814@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 16:49:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 20:49:59 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499201399.63.0.392858446174.issue30726@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Segev Finer for backports. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 17:08:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 21:08:57 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499202537.48.0.723740958338.issue30726@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 17:10:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 21:10:08 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499202608.07.0.370742234986.issue30726@psf.upfronthosting.co.za> STINNER Victor added the comment: > It doesn't even fix a warning - only suppresses it. Since there is no behavior change at all, I'm not inclined to backport any further than is trivial. I like decreasing the number of warnings. It helps to detect new warnings, and so to prevent bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 17:57:14 2017 From: report at bugs.python.org (Steve Dower) Date: Tue, 04 Jul 2017 21:57:14 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499205434.94.0.242009350875.issue30726@psf.upfronthosting.co.za> Steve Dower added the comment: > I like decreasing the number of warnings. It helps to detect new warnings, and so to prevent bugs. The approach used to suppress this warning will also suppress other warnings that might be fixable. Hard to say it's definitely a good thing in this case, though in general I agree that selectively suppressing warnings that cannot be fixed is a good thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 18:45:30 2017 From: report at bugs.python.org (Segev Finer) Date: Tue, 04 Jul 2017 22:45:30 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499208330.16.0.584427329332.issue30726@psf.upfronthosting.co.za> Segev Finer added the comment: > The approach used to suppress this warning will also suppress other warnings that might be fixable. Hard to say it's definitely a good thing in this case, though in general I agree that selectively suppressing warnings that cannot be fixed is a good thing. Most secure CRT warnings are a bit useless in portable code since you are unlikely to really use strcpy_s and friends... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 19:41:11 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 04 Jul 2017 23:41:11 +0000 Subject: [issue1612262] Class Browser doesn't show internal classes Message-ID: <1499211671.42.0.952622634141.issue1612262@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +2644 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 19:46:57 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 04 Jul 2017 23:46:57 +0000 Subject: [issue27636] Refactor IDLE htest In-Reply-To: <1469675068.09.0.412407912627.issue27636@psf.upfronthosting.co.za> Message-ID: <1499212017.88.0.545805053934.issue27636@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Htest should extract version from __file__, and module from spec, and display both. ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 19:47:54 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 04 Jul 2017 23:47:54 +0000 Subject: [issue21624] Idle: Improve htests In-Reply-To: <1401597670.32.0.0453403071197.issue21624@psf.upfronthosting.co.za> Message-ID: <1499212074.04.0.766930393586.issue21624@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Current htest issues from this and two other issues, notes, and running htests with htest.py. (Default master window placement is ok. Can move.) h1. At least one test window overlaps the test window. Others are not centered (y-position). Fix by passing _htest and changing geometry accordingly. Use f-strings. Develop formula for centering? (Test messages "might use editing" is too vague. Ditto for EditorWindow 'might be split'.) h2. All widgets should be displayed. A couple of htests test behavior in widgets otherwise displayed, and *these* should be unittested if possible. h3. Force focus to opened widget window. Probably still needed. h4. Putting imports only needed by htest functions in the function is a good idea. Introducing a regression by mistake is not. Do this when edit after thorough tests. h5. # htest # is present on all current htest functions. Check that is documented, including .coveragerc entry. h6. What is left from #22629 after patch applied? h7. #27636: incapsulate common features in classes defined in htest.py. 3 Specific TODOs in htest.py: h8. Improve message for dyn_option_menu. h9. Improve wrapper for EditorWindow. h10. Update GetKeysDialog test now that #21519 closed. h11. My note: Get keys dialog prints blank line to console, something prints 'None'. Check when run all tests. h12. Test window should show version and module (from __file__). Make part of #27636. ---------- dependencies: +Idle: update htest.py and htests, Refactor IDLE htest title: Idle: polish htests -> Idle: Improve htests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 21:25:39 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 01:25:39 +0000 Subject: [issue30851] IDLE: configdialog -- fix tkinter Variables Message-ID: <1499217939.06.0.00487588238252.issue30851@psf.upfronthosting.co.za> New submission from Terry J. Reedy: As part of #30777, Cheryl Sabella listed Variables defined for a tab page, and the use thereof, in the docstring for the tab page. This revealed some anomalies. Duplicate: font_name is defined on font and highlight pages. The first StringVariable should be attached to a widget before the name is rebound. We should investigate after there are tests for the two pages. Unused: for anything deleted, make sure that there is no corresponding trace function left. binding_target (keys) sounds like something that was never an external option but just an internal implementation detail; delete. encoding (general) *is* an external option, but I believe used only by 2.x. Recheck (in config.py also) and probably delete. user_help_browser and help_browser (general) may have once been options. We now use the system browser, which, at least on some systems, users can set. Delete. ---------- assignee: terry.reedy components: IDLE messages: 297692 nosy: csabella, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: configdialog -- fix tkinter Variables type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 21:26:12 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 01:26:12 +0000 Subject: [issue30851] IDLE: configdialog -- fix tkinter Variables In-Reply-To: <1499217939.06.0.00487588238252.issue30851@psf.upfronthosting.co.za> Message-ID: <1499217972.04.0.757323212458.issue30851@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- dependencies: +IDLE: configdialog - add tests for ConfigDialog GUI. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 21:31:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 01:31:03 +0000 Subject: [issue30777] IDLE: configdialog -- add docstrings and improve comments In-Reply-To: <1498514221.98.0.774452449719.issue30777@psf.upfronthosting.co.za> Message-ID: <1499218263.12.0.140519945786.issue30777@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 7eb5883ac59833bf63f0e1f7fb95671a1ac1ee08 by terryjreedy (csabella) in branch 'master': bpo-30777: IDLE: configdialog - add docstrings and improve comments (#2440) https://github.com/python/cpython/commit/7eb5883ac59833bf63f0e1f7fb95671a1ac1ee08 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 21:35:38 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 01:35:38 +0000 Subject: [issue21624] Idle: Improve htests In-Reply-To: <1401597670.32.0.0453403071197.issue21624@psf.upfronthosting.co.za> Message-ID: <1499218538.27.0.12611390704.issue21624@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2645 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 22:41:16 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 02:41:16 +0000 Subject: [issue21624] Idle: Improve htests In-Reply-To: <1401597670.32.0.0453403071197.issue21624@psf.upfronthosting.co.za> Message-ID: <1499222476.07.0.400657599014.issue21624@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 2000150c569941584994ec4ec59171961209bec3 by terryjreedy in branch 'master': bpo-21624: IDLE -- minor htest fixes (#2575) https://github.com/python/cpython/commit/2000150c569941584994ec4ec59171961209bec3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 22:48:06 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 02:48:06 +0000 Subject: [issue30777] IDLE: configdialog -- add docstrings and improve comments In-Reply-To: <1498514221.98.0.774452449719.issue30777@psf.upfronthosting.co.za> Message-ID: <1499222886.62.0.430456429331.issue30777@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2646 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 23:02:11 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 03:02:11 +0000 Subject: [issue30777] IDLE: configdialog -- add docstrings and improve comments In-Reply-To: <1498514221.98.0.774452449719.issue30777@psf.upfronthosting.co.za> Message-ID: <1499223731.67.0.268147016738.issue30777@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2647 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 23:02:53 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 03:02:53 +0000 Subject: [issue21624] Idle: Improve htests In-Reply-To: <1401597670.32.0.0453403071197.issue21624@psf.upfronthosting.co.za> Message-ID: <1499223773.43.0.44661402073.issue21624@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 23:05:10 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 03:05:10 +0000 Subject: [issue30777] IDLE: configdialog -- add docstrings and improve comments In-Reply-To: <1498514221.98.0.774452449719.issue30777@psf.upfronthosting.co.za> Message-ID: <1499223910.03.0.0427511974805.issue30777@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2649 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 23:46:48 2017 From: report at bugs.python.org (Osvaldo Santana Neto) Date: Wed, 05 Jul 2017 03:46:48 +0000 Subject: [issue30441] os.environ raises RuntimeError: dictionary changed size during iteration In-Reply-To: <1495550150.73.0.497197540263.issue30441@psf.upfronthosting.co.za> Message-ID: <1499226408.41.0.787011249739.issue30441@psf.upfronthosting.co.za> Osvaldo Santana Neto added the comment: Hi Serhiy Storchaka, I need to thank you for your valuable guidance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 23:49:48 2017 From: report at bugs.python.org (=?utf-8?b?55ub6IyC5a62?=) Date: Wed, 05 Jul 2017 03:49:48 +0000 Subject: [issue30852] _PyObject_GC_UNTRACK corruption when call a lambda function with C API Message-ID: <1499226588.16.0.740981062292.issue30852@psf.upfronthosting.co.za> New submission from ???: This corruption is so strange that I can't even reappear it. (gdb) bt #0 0x00000000006d7e9f in func_dealloc.lto_priv () at Objects/funcobject.c:451 #1 0x00000000005c730b in ask (printException=true, okIfFunctionNull=, errorPrefix=0x884bca "", pArgs=0x300dd440, pFunction=0x1d1f1de8) at script.cpp:758 #2 Script::call(_object*, _object*, char const*, bool) (pFunction=0x1d1f1de8, pArgs=0x300dd440, errorPrefix=0x884bca "", okIfFunctionNull=) at /home/smj/original/bwengine/src/lib/pyscript/script.ipp:25 now I know that in _PyObject_GC_UNTRACK, (gdb) x/40x op 0x1d1f1da8: 0x6d 0x6f 0x6e 0x5f 0x73 0x65 0x72 0x76 0x1d1f1db0: 0x65 0x72 0x2f 0x72 0x75 0x6e 0x5f 0x73 0x1d1f1db8: 0x63 0x72 0x69 0x70 0x74 0x2e 0x70 0x79 0x1d1f1dc0: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x1d1f1dc8: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -> mov -0x20(%rdi),%rax -> %rax = 0 0x1d1f1dd0: 0xf8 0x4d 0xc5 0x2a 0x00 0x00 0x00 0x00 -> mov -0x18(%rdi),%rdx -> %rdx = 0x2ac54df8 0x1d1f1dd8: 0xfe 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0x1d1f1de0: 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0x1d1f1de8: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 <--PyFunctionObject ob_refcnt 0 %rdi 0x1d1f1df0: 0x00 0xff 0xba 0x00 0x00 0x00 0x00 0x00 -> _typeobject* -> name function 0x1d1f1df8: 0x30 0x1e 0x78 0x21 0x00 0x00 0x00 0x00 0x1d1f1e00: 0x28 0xaa 0xba 0x24 0x00 0x00 0x00 0x00 0x1d1f1e08: 0x10 0x53 0xfb 0x2f 0x00 0x00 0x00 0x00 When corruption, the ob_refcnt is 0, the gc_refs is _PyGC_REFS_UNTRACKED, the gc_next is NULL but gc_prev is not. How can it be? Is there some unknown bug in GC? ---------- components: Interpreter Core messages: 297696 nosy: ??? priority: normal severity: normal status: open title: _PyObject_GC_UNTRACK corruption when call a lambda function with C API type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 00:16:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jul 2017 04:16:46 +0000 Subject: [issue30850] [2.7] bsddb3: test01_basic_replication() of test_bsddb3 fails randomly on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1499181607.72.0.534776800166.issue30850@psf.upfronthosting.co.za> Message-ID: <1499228206.0.0.769598976882.issue30850@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: First at all replace self.assertTrue(time.time() _______________________________________ From report at bugs.python.org Wed Jul 5 00:41:27 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 05 Jul 2017 04:41:27 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1499229687.94.0.772631174016.issue30814@psf.upfronthosting.co.za> Nick Coghlan added the comment: Documenting explicitly what I believe the expected order of module lock acquisition would be in this case: Thread A acquires package.subpackage lock Thread B blocks on package.subpackage lock Thread A acquires package lock Thread A releases package lock Thread A releases package.subpackage lock Thread B acquires & immediately releases package.subpackage lock Looking at https://hg.python.org/cpython/rev/64f195790a3a#l4.367 (the commit for issue 22557), there's a potentially suspect change in the scope of a "_PyImport_AcquireLock/_PyImport_ReleaseLock" pair inside PyImport_ImportModuleLevelObject Specifically, I think we may now have a race condition at https://github.com/python/cpython/blob/master/Python/import.c#L1534, where two threads can *both* end up trying to initialize the same module, since we're no longer holding the global import lock around that "mod = PyDict_GetItem(interp->modules, abs_name);" call and the associated state updates where the first thread indicates that it is already initializing that module so the second thread should just wait for it to finish doing so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 00:54:58 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 04:54:58 +0000 Subject: [issue30777] IDLE: configdialog -- add docstrings and improve comments In-Reply-To: <1498514221.98.0.774452449719.issue30777@psf.upfronthosting.co.za> Message-ID: <1499230498.37.0.931634302116.issue30777@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset e5bb112ba2048cb3ea19481a7b38fe1433c5a7ef by terryjreedy in branch '3.6': [3.6] bpo-30777: IDLE: configdialog - add docstrings and improve comments (GH-2440) (#2577) https://github.com/python/cpython/commit/e5bb112ba2048cb3ea19481a7b38fe1433c5a7ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 00:55:31 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 04:55:31 +0000 Subject: [issue21624] Idle: Improve htests In-Reply-To: <1401597670.32.0.0453403071197.issue21624@psf.upfronthosting.co.za> Message-ID: <1499230531.18.0.52892764507.issue21624@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 1278d29000794085f1d9e25f2dadbf70b9076e30 by terryjreedy in branch '3.6': [3.6] bpo-21624: IDLE -- minor htest fixes (GH-2575) (#2578) https://github.com/python/cpython/commit/1278d29000794085f1d9e25f2dadbf70b9076e30 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 00:56:34 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 04:56:34 +0000 Subject: [issue30777] IDLE: configdialog -- add docstrings and improve comments In-Reply-To: <1498514221.98.0.774452449719.issue30777@psf.upfronthosting.co.za> Message-ID: <1499230594.37.0.151538357859.issue30777@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 01:30:39 2017 From: report at bugs.python.org (Ethan Smith) Date: Wed, 05 Jul 2017 05:30:39 +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: <1499232639.96.0.349512729691.issue9949@psf.upfronthosting.co.za> Changes by Ethan Smith : ---------- nosy: +Ethan Smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 01:40:16 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 05 Jul 2017 05:40:16 +0000 Subject: [issue30836] test_c_locale_coercion fails on AIX In-Reply-To: <1499090256.88.0.435528352442.issue30836@psf.upfronthosting.co.za> Message-ID: <1499233216.46.0.828243456934.issue30836@psf.upfronthosting.co.za> Nick Coghlan added the comment: Removing the "easy" tag, as I realised this isn't as clearcut a change as I first thought. Specifically, I'm wondering if in addition to changing the expectations for this particular test, we should *also* be disabling locale coercion on AIX in general. After all, latin-1 already round trips just as well as UTF-8+surrogateescape does, and IBM don't seem to have any plans in progress to change the default environment on AIX away from latin-1. ---------- components: +Build _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 01:48:21 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 05 Jul 2017 05:48:21 +0000 Subject: [issue30836] test_c_locale_coercion fails on AIX In-Reply-To: <1499090256.88.0.435528352442.issue30836@psf.upfronthosting.co.za> Message-ID: <1499233701.11.0.976098235682.issue30836@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note that as far as I'm aware, AIX doesn't actually provide any of our coercion target locales yet, so the question in my previous comment is about how we want 3.7.x releases to behave on AIX if IBM *do* introduce a C.UTF-8 locale. The main argument I see in favour of leaving locale coercion enabled is that the latin-1 default will cope with UTF-8 encoded data from Python 3.7+ applications (even if it displays them incorrectly), but may raise UnicodeEncodeError if an application attempts to create arbitrary Unicode filenames, or write arbitrary unicode data to the standard streams. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 01:49:20 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 05 Jul 2017 05:49:20 +0000 Subject: [issue30836] test_c_locale_coercion fails on AIX In-Reply-To: <1499090256.88.0.435528352442.issue30836@psf.upfronthosting.co.za> Message-ID: <1499233760.85.0.148781667108.issue30836@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 02:03:26 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 06:03:26 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Variable subclass Message-ID: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> New submission from Terry J. Reedy: configdialog.ConfigDialog creates about 20 tk Variables corresponding to configuration options. It defines a var_changed_xyz callback for each xyz variable. 6 have a common template. ConfigDialog turns tracing on in attach_var_callbacks and off in remove_var_callbacks. Each of these two functions has the callbacks set hard-coded. Proposal: Factor out what can. Register callbacks in set when var created. Iterate register to attach and remove callbacks. Something like def IVariable: changes = # set externally somehow var = set() def register(self, callback) if isinstance(callback, tuple): self.callback = default_callback self.args = callback else: self.callback = callback self.vars.add() def default_callback(self): # Used for 6 vars. changes.add_item(*self.args, self.get()) @classmethod def attach(cls): for var in cls.vars: var.trace_add('write', self.callback) @classmethod def remove(cls): for var in cls.vars: var.trace_remove('write', var.trace_info()[0][1]) cls.vars = set() To get String/Int/BooleanVars, maybe this will work. (I have only toyed with multiple inheritance.) class IString(tk.StringVar, IVariable): def __init__(self, callback). StringVar.__init() # Possibly not needed with no value to pass. self.register(callback) ---------- assignee: terry.reedy components: IDLE messages: 297703 nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE: configdialog -- factor out Variable subclass type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 02:24:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jul 2017 06:24:06 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1499235846.0.0.315710901491.issue30814@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2650 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 02:28:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jul 2017 06:28:15 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1499236095.22.0.0802699141566.issue30814@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have came to the same conclusion. PR 2580 adds a double check in _bootstrap._find_and_load() (and also moves the locking into it). It also simplifies the C code by removing the fast path for the case sys.module[name] is None. ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 02:35:55 2017 From: report at bugs.python.org (Pim Klanke) Date: Wed, 05 Jul 2017 06:35:55 +0000 Subject: [issue30844] selectors: Add urgent data to read event In-Reply-To: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> Message-ID: <1499236555.29.0.124760701692.issue30844@psf.upfronthosting.co.za> Changes by Pim Klanke : ---------- title: selectors: Add exceptional conditions event -> selectors: Add urgent data to read event _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 02:44:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 06:44:55 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499237095.01.0.315723061315.issue30726@psf.upfronthosting.co.za> STINNER Victor added the comment: Steve Dower: "The approach used to suppress this warning will also suppress other warnings that might be fixable. Hard to say it's definitely a good thing in this case, though in general I agree that selectively suppressing warnings that cannot be fixed is a good thing." First of all, Modules/expat/ is a copy of https://github.com/libexpat/libexpat/. In the past, it contained significant patches. Today, it almost contains zero patch, the major addition is the pyexpatns.h file: https://github.com/python/cpython/blob/master/Modules/expat/pyexpatns.h If someone considers that the following warning deserves a fix, please report it upstream: Warning C4996 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. _elementtree C:\Users\Segev\prj\python\cpython\Modules\expat\xmlparse.c 796 I read the code, and I don't think that it deserves a fix. Using non-portable function _dupenv_s() makes the code a little bit more complex for a little benefit. I agree that if libexpat is upgraded again, suppressing warnings can hide a future real bug. But right now, we embed a copy of libexpat 2.1.1 and I don't want to modify our downstream copy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 02:48:26 2017 From: report at bugs.python.org (Pim Klanke) Date: Wed, 05 Jul 2017 06:48:26 +0000 Subject: [issue30847] asyncio: selector_events: add_urgent() for urgent data to read, 3rd argument of select.select() In-Reply-To: <1499176283.3.0.750942928243.issue30847@psf.upfronthosting.co.za> Message-ID: <1499237306.1.0.981880596493.issue30847@psf.upfronthosting.co.za> Changes by Pim Klanke : ---------- title: asyncio: selector_events: add_excepter(), 3rd argument of select.select() -> asyncio: selector_events: add_urgent() for urgent data to read, 3rd argument of select.select() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 03:16:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 07:16:49 +0000 Subject: [issue30843] [2.7] Lib/test/bisect.py conflicts with Lib/bisect.py when running tests In-Reply-To: <1499120069.02.0.752757937577.issue30843@psf.upfronthosting.co.za> Message-ID: <1499239009.59.0.991267259624.issue30843@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3050987d85d7cf8cdd4b3c053e673d13cd8dfb12 by Victor Stinner in branch '2.7': bpo-30843: regrtest fixes sys.path, restore test.bisect (#2567) https://github.com/python/cpython/commit/3050987d85d7cf8cdd4b3c053e673d13cd8dfb12 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 03:32:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 07:32:03 +0000 Subject: [issue30844] selectors: Add urgent data to read event In-Reply-To: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> Message-ID: <1499239923.68.0.10670982913.issue30844@psf.upfronthosting.co.za> STINNER Victor added the comment: > "urgent data", "High-priority data" How is an application supposed to handle these data? Read them before any other data? The selectors API returns a list of (key, events) tuples. So an application has to iterate on this list twice? A first time to look for urgent data, and then iterate again to handle other events? Pseudo-code: ready = selector.select(timeout) for key, events in ready: if events & selectors.EVENT_URGENT: process_urgent_event(key, events) for key, events in ready: process_other_events(key, events) I just want to make sure that I understand correctly how these events should be used. Would it be worth it to provide an helper to group urgent event and other events? Maybe a new select_urgent() method which would return two lists? A selector which creates the ready list already knows if an event is urgent or not, and so could directly group them in two separated lists. "Urgent event" doens't mean that key.events would only contain EVENT_URGENT, it can contain other events. So maybe the grouping function should be something like: --- ready_urgent = [] ready = [] for ...: key = ... events = ... if not key: continue if events == EVENT_URGENT: ready_urgent.append((key, key.events & events)) elif events & EVENT_URGENT: ready_urgent.append((key, key.events & events)) ready.append((key, key.events & events)) else: ready.append((key, key.events & events)) --- I don't know if it makes sense :-) Maybe it's better to let applications handle that themself ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 03:34:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 07:34:50 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499240090.61.0.567303072588.issue30319@psf.upfronthosting.co.za> STINNER Victor added the comment: Antoine: FYI I abandonned my idea of ignoring errors on socket.shutdown(), since I agree with your rationale. An application may rely on shutdown() exception to trigger some events, and a socket can still be used after a shutdown(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 03:36:05 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 05 Jul 2017 07:36:05 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499240165.95.0.225163239569.issue30319@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you Victor :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 03:36:24 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 05 Jul 2017 07:36:24 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499240184.8.0.046341225181.issue30319@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 03:41:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 07:41:21 +0000 Subject: [issue30843] [2.7] Lib/test/bisect.py conflicts with Lib/bisect.py when running tests In-Reply-To: <1499120069.02.0.752757937577.issue30843@psf.upfronthosting.co.za> Message-ID: <1499240481.52.0.546645948831.issue30843@psf.upfronthosting.co.za> STINNER Victor added the comment: With the help of Nick Coghlan, I fixed regrtest.py to remove '' and Lib/test/ from sys.path, so multiprocessing should now pick Lib/bisect.py, and I was able to rename again Lib/test/bisectcmd.py to Lib/test/bisect.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 03:53:20 2017 From: report at bugs.python.org (Masayuki Yamamoto) Date: Wed, 05 Jul 2017 07:53:20 +0000 Subject: [issue30854] Compile error on Python/ceval.c Message-ID: <1499241200.52.0.677511540864.issue30854@psf.upfronthosting.co.za> New submission from Masayuki Yamamoto: I found a syntax error when compiling without threads. In that place, the colon has been used instead of semicolon at end of statement. build commands and error log: $ uname -a Linux masayuki-P35-DS3 4.4.0-83-generic #106-Ubuntu SMP Mon Jun 26 17:54:25 UTC 2017 i686 i686 i686 GNU/Linux $ git checkout master $ ./configure --without-threads && LC_ALL=C make -j2 (snip) gcc -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I. -I./Include -DPy_BUILD_CORE -o Python/ceval.o Python/ceval.c Python/ceval.c: In function 'Py_MakePendingCalls': Python/ceval.c:551:23: error: expected ';' before ':' token goto error: ^ Makefile:1551: recipe for target 'Python/ceval.o' failed make: *** [Python/ceval.o] Error 1 related changeset: 3024c0529077f5cff0b32dc84b5923c8fba99a87 [3.6] bpo-30703: Improve signal delivery (GH-2415) (#2527) c08177a1ccad2ed0d50898c2731b518c631aed14 bpo-30703: Improve signal delivery (#2415) I open one line change PR that replaces colon with semicolon for master branch right away. ---------- components: Build messages: 297711 nosy: masamoto, pitrou priority: normal severity: normal status: open title: Compile error on Python/ceval.c type: compile error versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 04:00:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 08:00:30 +0000 Subject: [issue30850] [2.7] bsddb3: test01_basic_replication() of test_bsddb3 fails randomly on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1499181607.72.0.534776800166.issue30850@psf.upfronthosting.co.za> Message-ID: <1499241630.41.0.26151114079.issue30850@psf.upfronthosting.co.za> STINNER Victor added the comment: "First at all replace self.assertTrue(time.time() _______________________________________ From report at bugs.python.org Wed Jul 5 04:00:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 08:00:36 +0000 Subject: [issue30759] [2.7] Fix python2 -m test --list-cases test_multibytecodec_support test_robotparser In-Reply-To: <1498470245.46.0.632048342488.issue30759@psf.upfronthosting.co.za> Message-ID: <1499241636.42.0.135919958358.issue30759@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 668489a6d5a5b124aea35820ca90cb5e3b2b3ecd by Victor Stinner in branch '2.7': bpo-30759: Copy test_robotparser from master (#2546) https://github.com/python/cpython/commit/668489a6d5a5b124aea35820ca90cb5e3b2b3ecd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 04:01:51 2017 From: report at bugs.python.org (Masayuki Yamamoto) Date: Wed, 05 Jul 2017 08:01:51 +0000 Subject: [issue30854] Compile error on Python/ceval.c In-Reply-To: <1499241200.52.0.677511540864.issue30854@psf.upfronthosting.co.za> Message-ID: <1499241711.05.0.152825198123.issue30854@psf.upfronthosting.co.za> Changes by Masayuki Yamamoto : ---------- pull_requests: +2651 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 04:01:51 2017 From: report at bugs.python.org (Masayuki Yamamoto) Date: Wed, 05 Jul 2017 08:01:51 +0000 Subject: [issue30703] Non-reentrant signal handler (test_multiprocessing_forkserver hangs) In-Reply-To: <1497885657.03.0.477288552654.issue30703@psf.upfronthosting.co.za> Message-ID: <1499241711.12.0.391007314344.issue30703@psf.upfronthosting.co.za> Changes by Masayuki Yamamoto : ---------- pull_requests: +2652 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 04:21:09 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Jul 2017 08:21:09 +0000 Subject: [issue30854] Compile error on Python/ceval.c In-Reply-To: <1499241200.52.0.677511540864.issue30854@psf.upfronthosting.co.za> Message-ID: <1499242869.82.0.604974552235.issue30854@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 04:24:37 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Wed, 05 Jul 2017 08:24:37 +0000 Subject: [issue30802] datetime.datetime.strptime('200722', '%Y%U') In-Reply-To: <1498726688.6.0.920894490968.issue30802@psf.upfronthosting.co.za> Message-ID: <1499243077.9.0.531467391172.issue30802@psf.upfronthosting.co.za> Utkarsh Upadhyay added the comment: This case is explicitly mentioned in the documentation: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior > 7. When used with the strptime() method, %U and %W are only used in calculations when the day of the week and the calendar year (%Y) are specified. The documentation also says that the %u (day of the week) format specifier was added only in Python 3.6. ~ ut ---------- nosy: +musically_ut _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 04:31:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 08:31:13 +0000 Subject: [issue30759] [2.7] Fix python2 -m test --list-cases test_multibytecodec_support test_robotparser In-Reply-To: <1498470245.46.0.632048342488.issue30759@psf.upfronthosting.co.za> Message-ID: <1499243473.87.0.187545543303.issue30759@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2653 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 04:33:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 08:33:55 +0000 Subject: [issue30759] [2.7] Fix python2 -m test --list-cases test_multibytecodec_support test_robotparser In-Reply-To: <1498470245.46.0.632048342488.issue30759@psf.upfronthosting.co.za> Message-ID: <1499243635.11.0.138196958537.issue30759@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, it still doesn't work. With my latest PR, "./python -m test --list-cases" now work on all tests of Python 2.7: https://github.com/python/cpython/pull/2582 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 04:39:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 08:39:19 +0000 Subject: [issue30854] Compile error on Python/ceval.c In-Reply-To: <1499241200.52.0.677511540864.issue30854@psf.upfronthosting.co.za> Message-ID: <1499243959.74.0.306271498095.issue30854@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0c3116309307ad2c7f8e2d2096612f4ab33cbb62 by Victor Stinner (Masayuki Yamamoto) in branch 'master': bpo-30854: Fix compile error when --without-threads (#2581) https://github.com/python/cpython/commit/0c3116309307ad2c7f8e2d2096612f4ab33cbb62 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 04:52:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 08:52:09 +0000 Subject: [issue30759] [2.7] Fix python2 -m test --list-cases test_multibytecodec_support test_robotparser In-Reply-To: <1498470245.46.0.632048342488.issue30759@psf.upfronthosting.co.za> Message-ID: <1499244729.64.0.555451822643.issue30759@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8767de2f776e0c8c7404680cdacad83e5d902955 by Victor Stinner in branch '2.7': bpo-30759: regrtest: list_cases() now unload modules (#2582) https://github.com/python/cpython/commit/8767de2f776e0c8c7404680cdacad83e5d902955 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 04:54:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 08:54:15 +0000 Subject: [issue30759] [2.7] Fix python2 -m test --list-cases test_multibytecodec_support test_robotparser In-Reply-To: <1498470245.46.0.632048342488.issue30759@psf.upfronthosting.co.za> Message-ID: <1499244855.21.0.906316228118.issue30759@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, this one is now fixed ;-) ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 04:54:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 08:54:38 +0000 Subject: [issue30854] Compile error on Python/ceval.c without threads In-Reply-To: <1499241200.52.0.677511540864.issue30854@psf.upfronthosting.co.za> Message-ID: <1499244878.07.0.801156293411.issue30854@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Compile error on Python/ceval.c -> Compile error on Python/ceval.c without threads _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 04:57:43 2017 From: report at bugs.python.org (Masayuki Yamamoto) Date: Wed, 05 Jul 2017 08:57:43 +0000 Subject: [issue30854] Compile error on Python/ceval.c without threads In-Reply-To: <1499241200.52.0.677511540864.issue30854@psf.upfronthosting.co.za> Message-ID: <1499245063.36.0.516182187333.issue30854@psf.upfronthosting.co.za> Changes by Masayuki Yamamoto : ---------- pull_requests: +2654 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 05:09:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jul 2017 09:09:09 +0000 Subject: [issue30850] [2.7] bsddb3: test01_basic_replication() of test_bsddb3 fails randomly on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1499181607.72.0.534776800166.issue30850@psf.upfronthosting.co.za> Message-ID: <1499245749.5.0.0966260616364.issue30850@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Can you please propose a PR for that Serhiy, please? Will do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 05:10:05 2017 From: report at bugs.python.org (Pim Klanke) Date: Wed, 05 Jul 2017 09:10:05 +0000 Subject: [issue30844] selectors: Add urgent data to read event In-Reply-To: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> Message-ID: <1499245805.94.0.250772511318.issue30844@psf.upfronthosting.co.za> Pim Klanke added the comment: > "The selectors API returns a list of (key, events) tuples. So an application has to iterate on this list twice?" No. "urgent data" means 'urgent' towards other events for th?s key (key being the file object), not towards events for other file objects. AFAIK the returned ready list contains a single tuple for each file object, containing all events for that file object. Most likely urgent data events should be handled before handling other events for a given file object, but IMO there is no need to handle urgent data events of all file objects, before handling other events. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 05:20:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 09:20:49 +0000 Subject: [issue30844] selectors: Add urgent data to read event In-Reply-To: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> Message-ID: <1499246449.05.0.693206443293.issue30844@psf.upfronthosting.co.za> STINNER Victor added the comment: Pim Klanke: "(...) IMO there is no need to handle urgent data events of all file objects, before handling other events." Hum, ok. So no need to extend the selectors API for that. I also understand that it's better to let applications decide how to prioritize these events :-) I'm totally fine if we only provide events and let the application decide how to handle them. The question will be more important in the asyncio API, bpo-30847. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 05:24:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 09:24:38 +0000 Subject: [issue30847] asyncio: selector_events: add_urgent() for urgent data to read, 3rd argument of select.select() In-Reply-To: <1499176283.3.0.750942928243.issue30847@psf.upfronthosting.co.za> Message-ID: <1499246678.9.0.534554154646.issue30847@psf.upfronthosting.co.za> STINNER Victor added the comment: In the selectors issue, we discussed how an application should prioritize "urgent" events: http://bugs.python.org/issue30844#msg297707 While I now agree that it's not the role of selectors to decide, I would like to discuss the plan for asyncio. Let's say that we got read event on sockets A and B (in an ordered list from selectors: A, then B), but B gets urgent data: should we handle B urgent data before not-urgent A data? Would it be possible to let the developer decide how to prioritize events? How does Twisted or Node.JS handle urgent data? ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 05:24:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 09:24:49 +0000 Subject: [issue30854] Compile error on Python/ceval.c without threads In-Reply-To: <1499241200.52.0.677511540864.issue30854@psf.upfronthosting.co.za> Message-ID: <1499246689.4.0.337393314863.issue30854@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e3a0ff0d76b9e7a994afa7f2c54b19a63f1bb57d by Victor Stinner (Masayuki Yamamoto) in branch '3.6': [3.6] bpo-30854: Fix compile error when --without-threads (GH-2581) (#2583) https://github.com/python/cpython/commit/e3a0ff0d76b9e7a994afa7f2c54b19a63f1bb57d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 05:25:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 09:25:12 +0000 Subject: [issue30854] Compile error on Python/ceval.c without threads In-Reply-To: <1499241200.52.0.677511540864.issue30854@psf.upfronthosting.co.za> Message-ID: <1499246712.11.0.164635174491.issue30854@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Masayuki Yamamoto for your fixes! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 05:37:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jul 2017 09:37:47 +0000 Subject: [issue30850] [2.7] bsddb3: test01_basic_replication() of test_bsddb3 fails randomly on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1499181607.72.0.534776800166.issue30850@psf.upfronthosting.co.za> Message-ID: <1499247467.67.0.0587259678061.issue30850@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2655 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 07:08:09 2017 From: report at bugs.python.org (Riccardo Magliocchetti) Date: Wed, 05 Jul 2017 11:08:09 +0000 Subject: [issue10141] SocketCan support In-Reply-To: <1287449366.98.0.655876257649.issue10141@psf.upfronthosting.co.za> Message-ID: <1499252889.45.0.105085126361.issue10141@psf.upfronthosting.co.za> Riccardo Magliocchetti added the comment: I have an issue related to this while trying to compile statically Python 3.6.1 against a static musl. The problem is that i have AF_CAN defined because it's defined in linux/socket.h but by not having HAVE_LINUX_CAN_H defined in pyconfig.h the header which contains the definition of struct sockaddr_can is not included. So i think (at least for linux) using AF_CAN for the conditionals is wrong and the HAVE_LINUX_CAN_H should be used instead. I think the same applies for CAN_RAW and CAN_BCM because they are defined in the generic linux/can.h and not in a feature specific header. ---------- nosy: +Riccardo Magliocchetti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 08:09:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 12:09:38 +0000 Subject: [issue30850] [2.7] bsddb3: test01_basic_replication() of test_bsddb3 fails randomly on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1499181607.72.0.534776800166.issue30850@psf.upfronthosting.co.za> Message-ID: <1499256578.38.0.195314191927.issue30850@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2b92cd3b16ba83aaaf11a91a19845ca6804663d9 by Victor Stinner (Serhiy Storchaka) in branch '2.7': bpo-30850: Use specialized assert methods in bsddb tests. (#2584) https://github.com/python/cpython/commit/2b92cd3b16ba83aaaf11a91a19845ca6804663d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 08:18:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 12:18:47 +0000 Subject: [issue30855] test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 Message-ID: <1499257127.67.0.747001147165.issue30855@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Windows8%203.5/builds/323/steps/test/logs/stdio ====================================================================== ERROR: test_use (tkinter.test.test_tkinter.test_widgets.ToplevelTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\3.5.bolen-windows8\build\lib\tkinter\test\test_tkinter\test_widgets.py", line 95, in test_use widget2 = self.create(use=wid) File "D:\buildarea\3.5.bolen-windows8\build\lib\tkinter\test\test_tkinter\test_widgets.py", line 70, in create return tkinter.Toplevel(self.root, **kwargs) File "D:\buildarea\3.5.bolen-windows8\build\lib\tkinter\__init__.py", line 2191, in __init__ BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra) File "D:\buildarea\3.5.bolen-windows8\build\lib\tkinter\__init__.py", line 2148, in __init__ (widgetName, self._w) + extra + self._options(cnf)) _tkinter.TclError: integer value too large to represent ---------- components: Tkinter, Windows messages: 297727 nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 08:20:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 12:20:29 +0000 Subject: [issue30855] [3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 In-Reply-To: <1499257127.67.0.747001147165.issue30855@psf.upfronthosting.co.za> Message-ID: <1499257229.76.0.829116156511.issue30855@psf.upfronthosting.co.za> STINNER Victor added the comment: This bug looks similar to issue25263. ---------- title: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 -> [3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 08:22:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 12:22:44 +0000 Subject: [issue30855] [3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 In-Reply-To: <1499257127.67.0.747001147165.issue30855@psf.upfronthosting.co.za> Message-ID: <1499257364.25.0.551872081471.issue30855@psf.upfronthosting.co.za> STINNER Victor added the comment: The compile step mentions Tk version 8.6.4.2: "tk-8.6.4.2 already exists, skipping." http://buildbot.python.org/all/builders/AMD64%20Windows8%203.5/builds/323/steps/compile/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 08:26:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 12:26:45 +0000 Subject: [issue30855] [3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 In-Reply-To: <1499257127.67.0.747001147165.issue30855@psf.upfronthosting.co.za> Message-ID: <1499257605.69.0.948992892369.issue30855@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2656 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 08:28:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 12:28:59 +0000 Subject: [issue30855] [3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 In-Reply-To: <1499257127.67.0.747001147165.issue30855@psf.upfronthosting.co.za> Message-ID: <1499257739.32.0.925176510856.issue30855@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2657 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 08:31:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 12:31:09 +0000 Subject: [issue30855] [3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 In-Reply-To: <1499257127.67.0.747001147165.issue30855@psf.upfronthosting.co.za> Message-ID: <1499257869.64.0.822081382745.issue30855@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like the test never fails on 3.6, while 3.6 contains the fix b9d672491d5082c541bf267eb7bb99fdc6529324. Let's try to backport this change to 3.5 and 2.7 branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 08:37:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 12:37:07 +0000 Subject: [issue30855] [3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 In-Reply-To: <1499257127.67.0.747001147165.issue30855@psf.upfronthosting.co.za> Message-ID: <1499258227.27.0.892635966439.issue30855@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-16840. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 08:38:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 12:38:57 +0000 Subject: [issue30849] test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6 In-Reply-To: <1499181411.1.0.541300647507.issue30849@psf.upfronthosting.co.za> Message-ID: <1499258337.89.0.119507222675.issue30849@psf.upfronthosting.co.za> STINNER Victor added the comment: Another fail. The test pass when run again later. http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.6/builds/538/steps/test/logs/stdio ====================================================================== FAIL: test_stress_delivery_dependent (test.test_signal.StressTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.6.angelico-debian-amd64/build/Lib/test/test_signal.py", line 1053, in test_stress_delivery_dependent self.assertEqual(len(sigs), N, "Some signals were lost") AssertionError: 4073 != 10000 : Some signals were lost ---------- title: test_stress_delivery_dependent() randomly fails on AMD64 Debian root 3.6 -> test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 08:41:11 2017 From: report at bugs.python.org (Michael) Date: Wed, 05 Jul 2017 12:41:11 +0000 Subject: [issue29759] Deadlock in multiprocessing.pool.Pool on terminate In-Reply-To: <1488995446.21.0.189589252767.issue29759@psf.upfronthosting.co.za> Message-ID: <1499258471.83.0.379714600854.issue29759@psf.upfronthosting.co.za> Michael added the comment: If `task_handler._state = TERMINATE` is done before call to _help_stuff_finish(), then the following loop `while task_handler.is_alive() and inqueue._reader.poll()` in that function won't work as `is_alive()` will obviously return False. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 08:42:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 12:42:23 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499258543.85.0.926997894663.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: It's not just a matter of making test_datetime "faster". I see it as a regression, since now it fails randomly on slow buildbots. Maybe we should revert the change until a solution is found. http://buildbot.python.org/all/builders/ARMv7%20Ubuntu%203.x/builds/1025/steps/test/logs/stdio running: test_datetime (802 sec) running: test_datetime (832 sec) running: test_datetime (862 sec) running: test_datetime (892 sec) 0:15:02 load avg: 2.30 [406/406/1] test_datetime crashed (Exit code 1) Timeout (0:15:00)! Thread 0x400b4110 (most recent call first): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/datetime.py", line 394 in __new__ File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/datetime.py", line 1519 in local File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/datetime.py", line 1522 in _mktime File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/datetime.py", line 1550 in timestamp File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/datetimetester.py", line 4836 in test_system_transitions File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/case.py", line 615 in run File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/case.py", line 663 in __call__ File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/suite.py", line 122 in run File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/suite.py", line 84 in __call__ File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/suite.py", line 122 in run File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/suite.py", line 84 in __call__ File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/unittest/runner.py", line 176 in run File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/support/__init__.py", line 1896 in _run_suite File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/support/__init__.py", line 1940 in run_unittest File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_datetime.py", line 54 in test_main File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/runtest.py", line 172 in runtest_inner File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/runtest.py", line 130 in runtest File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/runtest_mp.py", line 71 in run_tests_slave File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/main.py", line 519 in _main File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/main.py", line 512 in main File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/libregrtest/main.py", line 587 in main File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/regrtest.py", line 46 in _main File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/regrtest.py", line 50 in File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/runpy.py", line 85 in _run_code File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/runpy.py", line 193 in _run_module_as_main ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 08:44:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 12:44:03 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499258643.06.0.830002221464.issue30822@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2658 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:08:41 2017 From: report at bugs.python.org (Michael) Date: Wed, 05 Jul 2017 13:08:41 +0000 Subject: [issue29759] Deadlock in multiprocessing.pool.Pool on terminate In-Reply-To: <1488995446.21.0.189589252767.issue29759@psf.upfronthosting.co.za> Message-ID: <1499260121.56.0.840144893684.issue29759@psf.upfronthosting.co.za> Michael added the comment: I found a couple of other cases when deadlock still occurs. 1. _help_stuff_finish may remove sentinels from the queue. Some of the workers will then never get a signal to terminate. 2. worker handler thread may be terminated too late, so it may spawn new workers while terminating is in progress. I tried to fix these two issues too in following commit: https://github.com/michael-a-cliqz/cpython/commit/3a767ee7b33a194c193e39e0f614796130568630 NB: This updated snippet has higher chances for deadlock: """ import logging import multiprocessing.pool import signal import time def foo(num): return num * num def signal_handler(signum, frame): pass if __name__ == '__main__': signal.signal(signal.SIGTERM, signal_handler) logger = multiprocessing.log_to_stderr() logger.setLevel(logging.DEBUG) pool = multiprocessing.pool.Pool(processes=16) time.sleep(0.5) pool.map_async(foo, range(16)) pool.terminate() """ (I am running it from dead loop in a shell script) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:13:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jul 2017 13:13:43 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499260423.79.0.861995758997.issue30822@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Another solution -- disable "cpu" and "tzdata" resources on slow buildbots (see issue30417). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:29:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jul 2017 13:29:17 +0000 Subject: [issue30855] [3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 In-Reply-To: <1499257127.67.0.747001147165.issue30855@psf.upfronthosting.co.za> Message-ID: <1499261357.39.0.221294890028.issue30855@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for backporting the fix. Seems I just forgot about this. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:31:04 2017 From: report at bugs.python.org (Pim Klanke) Date: Wed, 05 Jul 2017 13:31:04 +0000 Subject: [issue30844] selectors: Add urgent data to read event In-Reply-To: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> Message-ID: <1499261464.0.0.43315310577.issue30844@psf.upfronthosting.co.za> Pim Klanke added the comment: I'm confused about the wrapper method around winsock select and curious to why this is necessary. I have send an email to neologix to share some light on the subject. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:36:35 2017 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 05 Jul 2017 13:36:35 +0000 Subject: [issue30772] Normalise non-ASCII variable names in __all__ In-Reply-To: <1498500531.27.0.587971014084.issue30772@psf.upfronthosting.co.za> Message-ID: <1499261795.93.0.0479768561352.issue30772@psf.upfronthosting.co.za> Matthias Bussonnier added the comment: > I think that the names in __all__ should have the same NFKC normalisation applied as the identifiers. Does it make sens to add to this issue : Ensure that all elements of __all__ are str ? (At least emit a warning ?) I have encounter a small number of libraries where some member of all are the actual objects. Easy mistake to make if you make a public decorator: __all__ = [] def public(o): __all__.append(o) return o @public def bar(): pass Happy to open a different issue if deemed necessary. Thanks ! ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:44:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 13:44:55 +0000 Subject: [issue21624] Idle: Improve htests In-Reply-To: <1401597670.32.0.0453403071197.issue21624@psf.upfronthosting.co.za> Message-ID: <1499262295.58.0.846542320188.issue21624@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 by Victor Stinner in branch 'master': Revert "bpo-30822: Fix testing of datetime module." (#2588) https://github.com/python/cpython/commit/8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:44:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 13:44:55 +0000 Subject: [issue30777] IDLE: configdialog -- add docstrings and improve comments In-Reply-To: <1498514221.98.0.774452449719.issue30777@psf.upfronthosting.co.za> Message-ID: <1499262295.7.0.941021511864.issue30777@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 by Victor Stinner in branch 'master': Revert "bpo-30822: Fix testing of datetime module." (#2588) https://github.com/python/cpython/commit/8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:44:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 13:44:55 +0000 Subject: [issue30854] Compile error on Python/ceval.c without threads In-Reply-To: <1499241200.52.0.677511540864.issue30854@psf.upfronthosting.co.za> Message-ID: <1499262295.79.0.585113317428.issue30854@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 by Victor Stinner in branch 'master': Revert "bpo-30822: Fix testing of datetime module." (#2588) https://github.com/python/cpython/commit/8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:44:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 13:44:55 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499262295.87.0.709533470002.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 by Victor Stinner in branch 'master': Revert "bpo-30822: Fix testing of datetime module." (#2588) https://github.com/python/cpython/commit/8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:44:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 13:44:55 +0000 Subject: [issue30764] regrtest: Add --fail-env-changed option In-Reply-To: <1498479429.85.0.905289080128.issue30764@psf.upfronthosting.co.za> Message-ID: <1499262295.96.0.0879754500463.issue30764@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 by Victor Stinner in branch 'master': Revert "bpo-30822: Fix testing of datetime module." (#2588) https://github.com/python/cpython/commit/8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:44:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 13:44:56 +0000 Subject: [issue30845] [3.5] test_first_completed_some_already_completed() of test_concurrent_futures.ProcessPoolWaitTests: time.sleep() fails with "sleep length must be non-negative" in setUp() on x86 Tiger 3.5 In-Reply-To: <1499163547.99.0.882941259602.issue30845@psf.upfronthosting.co.za> Message-ID: <1499262296.31.0.110562223843.issue30845@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 by Victor Stinner in branch 'master': Revert "bpo-30822: Fix testing of datetime module." (#2588) https://github.com/python/cpython/commit/8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:44:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 13:44:56 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499262296.19.0.588858845416.issue30319@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 by Victor Stinner in branch 'master': Revert "bpo-30822: Fix testing of datetime module." (#2588) https://github.com/python/cpython/commit/8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:44:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 13:44:56 +0000 Subject: [issue29464] Specialize FASTCALL for functions with positional-only parameters In-Reply-To: <1486394565.83.0.903919283463.issue29464@psf.upfronthosting.co.za> Message-ID: <1499262296.41.0.897107783876.issue29464@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 by Victor Stinner in branch 'master': Revert "bpo-30822: Fix testing of datetime module." (#2588) https://github.com/python/cpython/commit/8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:44:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 13:44:56 +0000 Subject: [issue30789] Redesign PyCodeObject.co_extras to use a single memory block, instead of two In-Reply-To: <1498608641.09.0.230211440925.issue30789@psf.upfronthosting.co.za> Message-ID: <1499262296.02.0.867420498241.issue30789@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 by Victor Stinner in branch 'master': Revert "bpo-30822: Fix testing of datetime module." (#2588) https://github.com/python/cpython/commit/8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:44:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 13:44:56 +0000 Subject: [issue30832] Remove own implementation for thread-local storage In-Reply-To: <1499070233.45.0.628514473579.issue30832@psf.upfronthosting.co.za> Message-ID: <1499262296.61.0.625603695504.issue30832@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 by Victor Stinner in branch 'master': Revert "bpo-30822: Fix testing of datetime module." (#2588) https://github.com/python/cpython/commit/8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:44:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 13:44:56 +0000 Subject: [issue29293] Missing parameter "n" on multiprocessing.Condition.notify() In-Reply-To: <1484642636.98.0.126375980974.issue29293@psf.upfronthosting.co.za> Message-ID: <1499262296.7.0.659137523773.issue29293@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 by Victor Stinner in branch 'master': Revert "bpo-30822: Fix testing of datetime module." (#2588) https://github.com/python/cpython/commit/8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:44:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 13:44:56 +0000 Subject: [issue6691] Support for nested classes and function for pyclbr In-Reply-To: <1250117262.14.0.353515413158.issue6691@psf.upfronthosting.co.za> Message-ID: <1499262296.83.0.477781414557.issue6691@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 by Victor Stinner in branch 'master': Revert "bpo-30822: Fix testing of datetime module." (#2588) https://github.com/python/cpython/commit/8207c17486baece8ed0ac42d9f8d69ecec4ba7e4 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:45:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 13:45:43 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499262343.06.0.51599608694.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: I reverted the change to repair buildbots and get more time to find a proper fix: https://github.com/python/cpython/pull/2588#issuecomment-313092304 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:47:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 13:47:35 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499262455.32.0.725140289466.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: > Another solution -- disable "cpu" and "tzdata" resources on slow buildbots (see issue30417). I didn't read test_datetime. How test_datetime can spend 20 minutes to test timestamps? Does it spawn subprocesses? Why is it so slow? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:55:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 13:55:03 +0000 Subject: [issue30855] [3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 In-Reply-To: <1499257127.67.0.747001147165.issue30855@psf.upfronthosting.co.za> Message-ID: <1499262903.42.0.286603576901.issue30855@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy Storchaka added the comment: > Thank you for backporting the fix. Seems I just forgot about this. The bug wasn't notice before since test_tk fails once, but then pass when run again... It fails randomly. But I noticed a warning on a build, and so saw the bug. More stable buildbots should help to catch more random bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:55:16 2017 From: report at bugs.python.org (Vitor Pereira) Date: Wed, 05 Jul 2017 13:55:16 +0000 Subject: [issue30553] Add HTTP Response code 421 In-Reply-To: <1496407832.3.0.808781068022.issue30553@psf.upfronthosting.co.za> Message-ID: <1499262916.16.0.817363266995.issue30553@psf.upfronthosting.co.za> Changes by Vitor Pereira : ---------- pull_requests: +2659 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:56:31 2017 From: report at bugs.python.org (Vitor Pereira) Date: Wed, 05 Jul 2017 13:56:31 +0000 Subject: [issue30553] Add HTTP Response code 421 In-Reply-To: <1496407832.3.0.808781068022.issue30553@psf.upfronthosting.co.za> Message-ID: <1499262991.19.0.903998028678.issue30553@psf.upfronthosting.co.za> Vitor Pereira added the comment: I just submitted a PR, feel free to take a look. ---------- nosy: +vmsp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:56:36 2017 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 05 Jul 2017 13:56:36 +0000 Subject: [issue30856] unittest.TestResult.addSubTest should be called immediately after subtest finishes Message-ID: <1499262996.04.0.921631870961.issue30856@psf.upfronthosting.co.za> New submission from Sergey Fedoseev: Currently TestResult.addSubTest() is called just before TestResult.stopTest(), but docs says that addSubTest is "Called when a subtest finishes". IMO that means that it will be called immediately after subtest finishes, but not after indefinite time. Test is attached. ---------- files: test_subtest.py messages: 297756 nosy: sir-sigurd priority: normal severity: normal status: open title: unittest.TestResult.addSubTest should be called immediately after subtest finishes type: behavior Added file: http://bugs.python.org/file46990/test_subtest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:58:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 13:58:26 +0000 Subject: [issue30855] [3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 In-Reply-To: <1499257127.67.0.747001147165.issue30855@psf.upfronthosting.co.za> Message-ID: <1499263106.58.0.306756019042.issue30855@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c48a000c74b48586742c4b7eb42bba93f15953a9 by Victor Stinner in branch '3.5': [3.5] bpo-30855: Trying to fix test_use on Windows. (#2585) https://github.com/python/cpython/commit/c48a000c74b48586742c4b7eb42bba93f15953a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 10:05:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 14:05:25 +0000 Subject: [issue30857] test_bsddb3 hangs longer than 37 minutes on x86 Tiger 2.7 Message-ID: <1499263525.13.0.741673625602.issue30857@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Tiger%202.7/builds/227/steps/test/logs/stdio ... running: test_bsddb3 (2204 sec), test_itertools (30 sec) 0:50:54 [394/403] test_itertools passed (42 sec) -- running: test_bsddb3 (2217 sec) 0:51:00 [395/403] test_telnetlib passed -- running: test_bsddb3 (2223 sec) 0:51:06 [396/403] test_urllibnet passed -- running: test_bsddb3 (2228 sec) 0:51:07 [397/403] test_xrange passed -- running: test_bsddb3 (2230 sec) 0:51:07 [398/403] test_buffer passed -- running: test_bsddb3 (2230 sec) 0:51:08 [399/403] test_sys_setprofile passed -- running: test_bsddb3 (2231 sec) 0:51:09 [400/403] test_sysconfig passed -- running: test_bsddb3 (2232 sec) [21696 refs] [21696 refs] 0:51:10 [401/403] test_pkg passed -- running: test_bsddb3 (2233 sec) 0:51:13 [402/403] test_capi passed -- running: test_bsddb3 (2236 sec) command timed out: 1800 seconds without output running ['make', 'buildbottest', 'TESTOPTS=-j2', 'TESTPYTHONOPTS=', 'TESTTIMEOUT=1500'], attempting to kill process killed by signal 9 program finished with exit code -1 elapsedTime=4880.023461 ---------- components: Tests, macOS messages: 297758 nosy: haypo, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: test_bsddb3 hangs longer than 37 minutes on x86 Tiger 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 10:06:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 14:06:02 +0000 Subject: [issue30857] test_bsddb3 hangs longer than 37 minutes on x86 Tiger 2.7 In-Reply-To: <1499263525.13.0.741673625602.issue30857@psf.upfronthosting.co.za> Message-ID: <1499263562.18.0.994509664666.issue30857@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-30850 " [2.7] bsddb3: test01_basic_replication() of test_bsddb3 fails randomly on AMD64 Windows8.1 Refleaks 2.7 " and bpo-30778 " test_bsddb3 crash on x86 Windows XP 2.7 ". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 10:09:03 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 05 Jul 2017 14:09:03 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499263743.63.0.634853682458.issue30822@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > Why is it so slow? The tests enabled by "-utzdata" check UTC to local and back conversions at several points around *every* time transition in *every* timezone. On systems with a complete installation of IANA tzdata, this is a lot of test points. These tests were supposed to be exhaustive and I did not expect them to be run by default. that's why I introduced the -utzdata flag in the first place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 10:11:26 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 05 Jul 2017 14:11:26 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499263886.45.0.211849962964.issue30726@psf.upfronthosting.co.za> Steve Dower added the comment: I hope you notice I'm not against this particular change. I'm just voicing a general belief that suppressing an entire category of warnings for a whole project is not necessarily an improvement. In future, and when applied to our own project files, expect me to push back against this kind of fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 10:28:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 14:28:57 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1499263743.63.0.634853682458.issue30822@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > These tests were supposed to be exhaustive and I did not expect them to be run by default. that's why I introduced the -utzdata flag in the first place. Buildbots use "-u all" and so enables tzdata tests. Is it useful to run all these tests on all branches for each Python commit? Maybe we should disable these tests on all CI, and maybe setup a buildbot which runs these tests? Instead of being exhaustive, would it be possible to pick a few significant tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 10:58:35 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jul 2017 14:58:35 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499266715.87.0.669574622944.issue30822@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Two timezones (America/New_York and Asia/Tehran) are picked for testing independently from the -utzdata flag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 11:01:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jul 2017 15:01:24 +0000 Subject: [issue30789] Redesign PyCodeObject.co_extras to use a single memory block, instead of two In-Reply-To: <1498608641.09.0.230211440925.issue30789@psf.upfronthosting.co.za> Message-ID: <1499266884.92.0.0781354736644.issue30789@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: How is this related to datetime module? I hope you didn't reverted too much? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 11:09:54 2017 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 05 Jul 2017 15:09:54 +0000 Subject: [issue30847] asyncio: selector_events: add_urgent() for urgent data to read, 3rd argument of select.select() In-Reply-To: <1499176283.3.0.750942928243.issue30847@psf.upfronthosting.co.za> Message-ID: <1499267394.11.0.928113682403.issue30847@psf.upfronthosting.co.za> Guido van Rossum added the comment: How do you define "urgent data"? Is this just the third category of select(), Read, Write, Exceptional? I don't know if that should be considered urgent, it's just "out of band" IIRC. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 11:19:42 2017 From: report at bugs.python.org (David Lord) Date: Wed, 05 Jul 2017 15:19:42 +0000 Subject: [issue30838] re \w does not match some valid Unicode characters In-Reply-To: <1499096369.93.0.459837201925.issue30838@psf.upfronthosting.co.za> Message-ID: <1499267982.24.0.0187967922296.issue30838@psf.upfronthosting.co.za> David Lord added the comment: After thinking about it more, I guess I misunderstood what \w was doing compared to isidentifier. Since Python just relies on the Unicode database, there's not much to be done anyway. Closing this. For anyone interested, we ended up with a hybrid approach for lexing identifiers: build a regex group that includes all valid ranges not matched by \w, then validate with isidentifier later. https://github.com/pallets/jinja/pull/731/files ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 11:23:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jul 2017 15:23:56 +0000 Subject: [issue30857] test_bsddb3 hangs longer than 37 minutes on x86 Tiger 2.7 In-Reply-To: <1499263525.13.0.741673625602.issue30857@psf.upfronthosting.co.za> Message-ID: <1499268236.31.0.356866640717.issue30857@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: On http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%202.7/builds/41/steps/test/logs/stdio test_bsddb3 is passed but takes more than 2 hours. It is the slowest test. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 11:25:22 2017 From: report at bugs.python.org (Vitor Pereira) Date: Wed, 05 Jul 2017 15:25:22 +0000 Subject: [issue12920] inspect.getsource only works for objects loaded from files, not interactive session In-Reply-To: <1315334278.72.0.69534403863.issue12920@psf.upfronthosting.co.za> Message-ID: <1499268322.57.0.494616574538.issue12920@psf.upfronthosting.co.za> Vitor Pereira added the comment: So, what would be the right approach here? Store the interactive session's input text in memory? ---------- nosy: +vmsp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 11:59:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 15:59:10 +0000 Subject: [issue30789] Redesign PyCodeObject.co_extras to use a single memory block, instead of two In-Reply-To: <1499266884.92.0.0781354736644.issue30789@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > How is this related to datetime module? I hope you didn't reverted too much? I'm sorry for the spam. It was the first time that I really used the [Revert] button: even if the revert change is correct, the *commit message* is completely wrong :-/ https://mail.python.org/pipermail/python-committers/2017-July/004674.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 11:59:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 15:59:12 +0000 Subject: [issue30789] Redesign PyCodeObject.co_extras to use a single memory block, instead of two In-Reply-To: <1498608641.09.0.230211440925.issue30789@psf.upfronthosting.co.za> Message-ID: <1499270352.06.0.268170666904.issue30789@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm sorry for the spam. It was the first time that I really used the [Revert] button: even if the revert change is correct, the *commit message* is completely wrong :-/ https://mail.python.org/pipermail/python-committers/2017-July/004674.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 13:17:32 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Jul 2017 17:17:32 +0000 Subject: [issue30835] AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding In-Reply-To: <1499089023.06.0.76757916564.issue30835@psf.upfronthosting.co.za> Message-ID: <1499275052.53.0.417835251159.issue30835@psf.upfronthosting.co.za> R. David Murray added the comment: There's a deeper problem here involving how Header is used in compat32 that I've been aware of for a while but haven't had time to try to think through a fix for (there may not be one, given the history of the compat32 code). In the meantime, the proposed fix is reasonable. (It isn't needed for the new policies, but it doesn't hurt.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 13:17:49 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Jul 2017 17:17:49 +0000 Subject: [issue30835] AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding In-Reply-To: <1499089023.06.0.76757916564.issue30835@psf.upfronthosting.co.za> Message-ID: <1499275069.21.0.0979988888078.issue30835@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 13:21:20 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Wed, 05 Jul 2017 17:21:20 +0000 Subject: [issue30858] Keyword can't be an expression? Message-ID: <1499275280.43.0.372385518137.issue30858@psf.upfronthosting.co.za> New submission from Vedran ?a?i?: Look at this (from https://www.quora.com/Is-end1-a-keyword-in-Python-3-6-1): print(end1 + end2 + end3 + end4 + end5 + end6 + end=' ') ^ SyntaxError: keyword can't be an expression Wouldn't it be better if the message said "keyword for an argument must be a simple name"? Or something like that. Newbies, when they think of keywords, they think something from keyword.kwlist, not something used to pass arguments to a function in a particular way. ---------- messages: 297772 nosy: veky priority: normal severity: normal status: open title: Keyword can't be an expression? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 13:22:30 2017 From: report at bugs.python.org (Matthew Barnett) Date: Wed, 05 Jul 2017 17:22:30 +0000 Subject: [issue30838] re \w does not match some valid Unicode characters In-Reply-To: <1499096369.93.0.459837201925.issue30838@psf.upfronthosting.co.za> Message-ID: <1499275350.26.0.834984469014.issue30838@psf.upfronthosting.co.za> Matthew Barnett added the comment: Python identifiers match the regex: [_\p{XID_Start}]\p{XID_Continue}* The standard re module doesn't support \p{...}, but the third-party "regex" module does. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 13:32:05 2017 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Jul 2017 17:32:05 +0000 Subject: [issue30828] Out of bounds write in _asyncio_Future_remove_done_callback In-Reply-To: <1498998277.02.0.104703912354.issue30828@psf.upfronthosting.co.za> Message-ID: <1499275925.68.0.0595259881689.issue30828@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 833a3b0d3707200daeaccdd218e8f18a190284aa by Yury Selivanov in branch 'master': bpo-30828: Fix out of bounds write in `asyncio.CFuture.remove_done_callback() (#2569) https://github.com/python/cpython/commit/833a3b0d3707200daeaccdd218e8f18a190284aa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 13:34:04 2017 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Jul 2017 17:34:04 +0000 Subject: [issue30828] Out of bounds write in _asyncio_Future_remove_done_callback In-Reply-To: <1498998277.02.0.104703912354.issue30828@psf.upfronthosting.co.za> Message-ID: <1499276044.94.0.180659018262.issue30828@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +2660 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 14:03:12 2017 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Jul 2017 18:03:12 +0000 Subject: [issue30828] Out of bounds write in _asyncio_Future_remove_done_callback In-Reply-To: <1498998277.02.0.104703912354.issue30828@psf.upfronthosting.co.za> Message-ID: <1499277792.87.0.184109800876.issue30828@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset aaa4f991518611d101fba1ef3ecb18d7b385ad5b by Yury Selivanov in branch '3.6': [3.6] bpo-30828: Fix out of bounds write in `asyncio.CFuture.remove_done_callback() (GH-2569) (#2590) https://github.com/python/cpython/commit/aaa4f991518611d101fba1ef3ecb18d7b385ad5b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 15:23:15 2017 From: report at bugs.python.org (Joe Jacobs) Date: Wed, 05 Jul 2017 19:23:15 +0000 Subject: [issue30859] Can't install Python for Windows 3.6.1 on multiple profiles Message-ID: <1499282595.77.0.384129179383.issue30859@psf.upfronthosting.co.za> New submission from Joe Jacobs: Windows 7 Ultimate: SP1. Fully pathed as of July 4th, 2017 My Windows 7 install has multiple user accounts. The main install account is set up with "Administrator" privledges. Some point in the past I had installed Python 3.6.1 on the main account. Did not install for all users. That put the python files inside the %appdata% folder. I was then trying to go through the Python Minecraft book with my daughter. We had logged in as my daughters login and tried to install Python 3.6.1 for her. Got an error stating Python was already installed, even though she couldn't access it for her Windows login. Ultimately, had to uninstall Python 3.6, and reinstall for "All users". Would think that multiple users could install Python in their own folder regardless of versions that other people have installed. ---------- components: Windows messages: 297776 nosy: Joe Jacobs, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Can't install Python for Windows 3.6.1 on multiple profiles type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 15:45:59 2017 From: report at bugs.python.org (Robert Boehne) Date: Wed, 05 Jul 2017 19:45:59 +0000 Subject: [issue30819] Linking with 'ld -b' fails with 64-bit using Itanium HP compiler In-Reply-To: <1498842690.63.0.786379991477.issue30819@psf.upfronthosting.co.za> Message-ID: <1499283959.91.0.424001257925.issue30819@psf.upfronthosting.co.za> Changes by Robert Boehne : ---------- pull_requests: +2661 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 16:00:12 2017 From: report at bugs.python.org (Joel Hillacre) Date: Wed, 05 Jul 2017 20:00:12 +0000 Subject: [issue30532] email.policy.SMTP.fold() mangles long headers In-Reply-To: <1496268533.13.0.885025594185.issue30532@psf.upfronthosting.co.za> Message-ID: <1499284812.85.0.614294746951.issue30532@psf.upfronthosting.co.za> Changes by Joel Hillacre : ---------- pull_requests: +2662 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 16:14:27 2017 From: report at bugs.python.org (Joel Hillacre) Date: Wed, 05 Jul 2017 20:14:27 +0000 Subject: [issue30532] email.policy.SMTP.fold() mangles long headers In-Reply-To: <1496268533.13.0.885025594185.issue30532@psf.upfronthosting.co.za> Message-ID: <1499285667.54.0.492530111628.issue30532@psf.upfronthosting.co.za> Changes by Joel Hillacre : ---------- pull_requests: +2663 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 16:17:24 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 20:17:24 +0000 Subject: [issue6691] Support for nested classes and function for pyclbr In-Reply-To: <1250117262.14.0.353515413158.issue6691@psf.upfronthosting.co.za> Message-ID: <1499285844.37.0.0851069422921.issue6691@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- Removed message: http://bugs.python.org/msg297751 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 16:18:14 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 20:18:14 +0000 Subject: [issue6691] Support for nested classes and function for pyclbr In-Reply-To: <1250117262.14.0.353515413158.issue6691@psf.upfronthosting.co.za> Message-ID: <1499285894.35.0.527611539995.issue6691@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Unlinked bogus revert message. I checked the file and it has the new function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 16:20:34 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 20:20:34 +0000 Subject: [issue30777] IDLE: configdialog -- add docstrings and improve comments In-Reply-To: <1498514221.98.0.774452449719.issue30777@psf.upfronthosting.co.za> Message-ID: <1499286034.39.0.165524701389.issue30777@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- Removed message: http://bugs.python.org/msg297741 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 16:21:04 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 20:21:04 +0000 Subject: [issue30777] IDLE: configdialog -- add docstrings and improve comments In-Reply-To: <1498514221.98.0.774452449719.issue30777@psf.upfronthosting.co.za> Message-ID: <1499286064.83.0.757091830651.issue30777@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Unlinked bogus revert message. configdialog still has new docstrings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 16:21:52 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 20:21:52 +0000 Subject: [issue30777] IDLE: configdialog -- add docstrings and improve comments In-Reply-To: <1498514221.98.0.774452449719.issue30777@psf.upfronthosting.co.za> Message-ID: <1499286112.68.0.255952818731.issue30777@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 16:22:18 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 20:22:18 +0000 Subject: [issue21624] Idle: Improve htests In-Reply-To: <1401597670.32.0.0453403071197.issue21624@psf.upfronthosting.co.za> Message-ID: <1499286138.23.0.817243729133.issue21624@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- Removed message: http://bugs.python.org/msg297740 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 16:27:37 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Jul 2017 20:27:37 +0000 Subject: [issue30839] Larger and/or configurable _MAX_LENGTH for unittest messages In-Reply-To: <1499104766.61.0.0657645860519.issue30839@psf.upfronthosting.co.za> Message-ID: <1499286457.26.0.809481317486.issue30839@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, setting _MAX_LENGTH can be an independent feature request. The default will not be changed, however, since it is the most useful default given that assertEquals in general produces a much more useful diff output in addition to the one-line summary. You might also/alternatively want to look in to providing your own assertEqual extension to produce a useful diff of your particular data structure. ---------- dependencies: +Unittest truncating of error message not works nosy: +r.david.murray versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 16:30:30 2017 From: report at bugs.python.org (Eric Snow) Date: Wed, 05 Jul 2017 20:30:30 +0000 Subject: [issue30860] Consolidate stateful C globals under a single struct. Message-ID: <1499286630.32.0.878971862649.issue30860@psf.upfronthosting.co.za> New submission from Eric Snow: CPython's C code makes extensive use of global variables. The globals fall into one of several categories: * (effectively) constants (incl. static types) * freelists, caches, and counters * used exclusively in main or in REPL * process-global state * module state * Python runtime state Those in the last category are not explicitly organized nor easily discoverable. Among other things, this has an impact on efforts that change the runtime (e.g. my multi-core Python project). To improve the situation I'd like to do the following: 1. group the (stateful) runtime globals into various topical structs 2. consolidate the topical structs under a single top-level _PyRuntimeState struct 3. add a check-c-globals.py script that helps identify runtime globals One side effect of consolidating these globals is a significant performance improvement of CPython. Presumably this is due to the caching behavior of a single struct vs. that of dozens of separate globals. I have a patch and will put up a PR momentarily. ---------- assignee: eric.snow messages: 297780 nosy: eric.snow, haypo, ncoghlan, yselivanov priority: normal severity: normal stage: patch review status: open title: Consolidate stateful C globals under a single struct. type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 16:55:08 2017 From: report at bugs.python.org (pfreixes) Date: Wed, 05 Jul 2017 20:55:08 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption Message-ID: <1499288108.18.0.207232280352.issue30861@psf.upfronthosting.co.za> New submission from pfreixes: Current implementation of StreamReader does not take care of the status of the buffer, once an exception has been set via `set_exception` any call to the read methods won't be able to get the missing data still pending to be processed. >From the point of view of the developer, if there is no scheduled task for waiting data into the Streamreader between a network data gets into the buffer socket and a closing connection by the other peer arrives, the developer won't be able to gather the previous data. ---------- components: asyncio messages: 297781 nosy: pfreixes, yselivanov priority: normal severity: normal status: open title: StreamReader does not return reamaing and ready data buffer before raise the Exeption versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 16:59:19 2017 From: report at bugs.python.org (pfreixes) Date: Wed, 05 Jul 2017 20:59:19 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499288108.18.0.207232280352.issue30861@psf.upfronthosting.co.za> Message-ID: <1499288359.75.0.687033213059.issue30861@psf.upfronthosting.co.za> Changes by pfreixes : ---------- pull_requests: +2664 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 17:10:39 2017 From: report at bugs.python.org (Eric Snow) Date: Wed, 05 Jul 2017 21:10:39 +0000 Subject: [issue30860] Consolidate stateful C globals under a single struct. In-Reply-To: <1499286630.32.0.878971862649.issue30860@psf.upfronthosting.co.za> Message-ID: <1499289039.07.0.835016775324.issue30860@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- pull_requests: +2665 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 17:12:49 2017 From: report at bugs.python.org (Eric Snow) Date: Wed, 05 Jul 2017 21:12:49 +0000 Subject: [issue30860] Consolidate stateful C globals under a single struct. In-Reply-To: <1499286630.32.0.878971862649.issue30860@psf.upfronthosting.co.za> Message-ID: <1499289169.57.0.353065445133.issue30860@psf.upfronthosting.co.za> Eric Snow added the comment: One thing I'd like to also try is to use a freelist embedded in _PyRuntimeState for the PyInterpreterState and PyThreadState linked lists. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 17:19:21 2017 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 05 Jul 2017 21:19:21 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499288108.18.0.207232280352.issue30861@psf.upfronthosting.co.za> Message-ID: <1499289561.41.0.746177153861.issue30861@psf.upfronthosting.co.za> Guido van Rossum added the comment: Do you have a specific use case where it's important to access the remaining data? ISTM that this is happening when the connection is lost and then it shouldn't matter how much of the data you read or not -- the connection was broken before the remote side closed it, and you should not trust the data. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 17:27:10 2017 From: report at bugs.python.org (pfreixes) Date: Wed, 05 Jul 2017 21:27:10 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499289561.41.0.746177153861.issue30861@psf.upfronthosting.co.za> Message-ID: pfreixes added the comment: Yeps, I have an example related to Redis [1], the server warns that the connection will be closed because you reached out the maximum number of connections. But IMHO the example it's just that an example, if the connection at some point was not broken/closed/... and some data came into the buffer, this data should be put available for the user. [1] https://github.com/antirez/redis/blob/09dd7b5ff02de4a311032939c27fd6fc62fbd4a3/src/networking.c#L615 On Wed, Jul 5, 2017 at 11:19 PM, Guido van Rossum wrote: > > Guido van Rossum added the comment: > > Do you have a specific use case where it's important to access the remaining data? ISTM that this is happening when the connection is lost and then it shouldn't matter how much of the data you read or not -- the connection was broken before the remote side closed it, and you should not trust the data. > > ---------- > nosy: +gvanrossum > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 17:29:16 2017 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Jul 2017 21:29:16 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499288108.18.0.207232280352.issue30861@psf.upfronthosting.co.za> Message-ID: <1499290156.24.0.403208629131.issue30861@psf.upfronthosting.co.za> Yury Selivanov added the comment: > But IMHO the example it's just that an example, if the connection at some point was not broken/closed/... and some data came into the buffer, this data should be put available for the user. In my experience, you never want to recover any data from broken connections. In cases where it's safe, StreamReader attaches the buffered data to the exception (see IncompleteReadError). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 17:30:36 2017 From: report at bugs.python.org (Eryk Sun) Date: Wed, 05 Jul 2017 21:30:36 +0000 Subject: [issue30859] Can't install Python for Windows 3.6.1 on multiple profiles In-Reply-To: <1499282595.77.0.384129179383.issue30859@psf.upfronthosting.co.za> Message-ID: <1499290236.43.0.460159429884.issue30859@psf.upfronthosting.co.za> Eryk Sun added the comment: In Windows 10, I have 32-bit 3.6.1 installed for both an administrator and a standard user, both per-user installations. Maybe the logs from the failed attempt will help clarify what went wrong. If they still exist in the account's %temp% folder, please zip them up to a single file and upload it to this issue. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 18:00:47 2017 From: report at bugs.python.org (pfreixes) Date: Wed, 05 Jul 2017 22:00:47 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499290156.24.0.403208629131.issue30861@psf.upfronthosting.co.za> Message-ID: pfreixes added the comment: One of the disadvantages with the Exception is that you are relying on how the events are being succeeded, and this is something that you can't predict. With just a different delay between the data and the RST packet and you might get the data in two different ways, either via a regular read or via one adhoc Exception. This might be confusing for the developer and will end up with the second thing that IMHO is also important, the code that has to be produced by the developer gets complicated. On Wed, Jul 5, 2017 at 11:29 PM, Yury Selivanov wrote: > > Yury Selivanov added the comment: > >> But IMHO the example it's just that an example, if the connection at > some point was not broken/closed/... and some data came into the > buffer, this data should be put available for the user. > > In my experience, you never want to recover any data from broken connections. In cases where it's safe, StreamReader attaches the buffered data to the exception (see IncompleteReadError). > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 18:34:39 2017 From: report at bugs.python.org (Joe Jacobs) Date: Wed, 05 Jul 2017 22:34:39 +0000 Subject: [issue30859] Can't install Python for Windows 3.6.1 on multiple profiles In-Reply-To: <1499282595.77.0.384129179383.issue30859@psf.upfronthosting.co.za> Message-ID: <1499294079.52.0.158237287748.issue30859@psf.upfronthosting.co.za> Joe Jacobs added the comment: I checked, there are no install logs. Just realized, maybe an issue with the web installer rather than the base installer. python-3.6.1-amd64-webinstall Had downloaded this file and tried to run it. I wouldn't even get to the screen that asks you to do a standard or custom install. The only screen that popped up said python was already installed. I run it now after i uninstalled and re-installed for "All Users" and i don't have that issue. Are the logs for the web installer stored somewhere else? If not, maybe i'll try again and see if i can replicate again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 19:05:22 2017 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 05 Jul 2017 23:05:22 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499288108.18.0.207232280352.issue30861@psf.upfronthosting.co.za> Message-ID: <1499295922.14.0.880915413427.issue30861@psf.upfronthosting.co.za> Guido van Rossum added the comment: The Redis example doesn't sound valid to me, as (IIUC) it closes the connection immediately? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 20:35:22 2017 From: report at bugs.python.org (Martin Panter) Date: Thu, 06 Jul 2017 00:35:22 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1499301322.77.0.907705417166.issue30319@psf.upfronthosting.co.za> Martin Panter added the comment: Thanks for handling this Victor. To answer some of your earlier questions, this is my understanding of the Free BSD behaviour (although I don't have Free BSD to experiment with): When writing to TCP sockets, I believe the data is buffered by the local OS (as well as the network, remote peer, etc). The send call will normally return straight away. In the background, the OS might combine the data with existing buffers, send it to the network, wait for acknowledgements, retransmit it, etc. On Free BSD, steps to trigger ECONNRESET might be: 1. Establish a TCP connection. 2. Send some data to the remote peer. OS returns immediately without indicating if data will successfully be sent. 3. Remote receives data packet, but decides the connection is not valid, so responds with reset message. Maybe its socket was shut down, or the OS rebooted. 4. Close the local socket. If TCP reset message was received in time, Free BSD raises ECONNRESET. I understand ECONNRESET is an _indication_ that not all pending data was delivered. But this is asynchronous, and a lack of ECONNRESET does not guarantee that all pending data was delivered. Imagine if steps 3 and 4 were swapped above. I doubt Free BSD will block the close call until the data is acknowledged, so it won't know if the peer will reset the connection in the future. To guarantee the data was delivered to the application (not just the remote OS), you do need an application-level acknowledgement. For SSL, when you call the top-level SSLSocket.close, I don't think that does much at the SSL level. Again, if you need delivery indication, I would use an app-level acknowledgement. Also beware that by default, Python doesn't report a secure EOF signal sent from the remote peer, so I think you either need a specific app-level message, or should disable the suppress_ragged_eofs mode (see Issue 27815). Antoine: sorry for abusing the dependencies list; I will try to avoid that in the future. It seemed the easiest way to get a two-way link to a bunch of other bugs that could be duplicates, but I wasn't sure at the time. My theory was if this bug was fixed, someone could review those other bugs and see if they could also be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 21:06:28 2017 From: report at bugs.python.org (TaoQingyun) Date: Thu, 06 Jul 2017 01:06:28 +0000 Subject: [issue30862] parent logger should also check the level Message-ID: <1499303188.28.0.222364614313.issue30862@psf.upfronthosting.co.za> Changes by TaoQingyun <845767657 at qq.com>: ---------- components: Library (Lib) nosy: qingyunha priority: normal severity: normal status: open title: parent logger should also check the level type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 21:11:03 2017 From: report at bugs.python.org (TaoQingyun) Date: Thu, 06 Jul 2017 01:11:03 +0000 Subject: [issue30862] parent logger should also check the level Message-ID: <1499303463.12.0.427912984431.issue30862@psf.upfronthosting.co.za> New submission from TaoQingyun: ``` import logging logging.basicConfig(level=logging.ERROR) l = logging.getLogger("test") l.setLevel(logging.DEBUG) l.debug("Hello world") ``` it will print 'Hello world' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 21:26:45 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Jul 2017 01:26:45 +0000 Subject: [issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names In-Reply-To: <1387635003.7.0.211054481065.issue20042@psf.upfronthosting.co.za> Message-ID: <1499304405.68.0.394164382969.issue20042@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Is this still relevant or should it be closed? On Win10, I created a short script ??????.py using Save As from IDLE. py -2 ??????.py produces C:\Programs\Python27\python.exe: can't open file '??????.py': [Errno 22] Invalid argument If the patch fixes 2.7 and looks okay, maybe we should apply. If 'no' or 'no', maybe we should forget 2.7 running files with such names. On 3.5 and 3.6, the file runs without issue. The issue was opened with 3.3; 3.5 switched to a much more recent compiler, and I did not see any indication in the messages that this was tested on 3.5 before it was added. So perhaps for 3.5+, this is out-of-date. ---------- nosy: +terry.reedy -BreamoreBoy versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 23:27:49 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Jul 2017 03:27:49 +0000 Subject: [issue30840] Contrary to documentation, relative imports cannot pass through the top level In-Reply-To: <1499109292.04.0.970471813466.issue30840@psf.upfronthosting.co.za> Message-ID: <1499311669.53.0.610960596081.issue30840@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: -> docs at python components: +Documentation nosy: +brett.cannon, docs at python, eric.snow, ncoghlan versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 23:41:26 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Jul 2017 03:41:26 +0000 Subject: [issue23835] configparser does not convert defaults to strings In-Reply-To: <1427862188.44.0.00358189102447.issue23835@psf.upfronthosting.co.za> Message-ID: <1499312486.15.0.443343648963.issue23835@psf.upfronthosting.co.za> R. David Murray added the comment: I'm guessing we can only do something here in 3.7, for backward compatibility reasons, but maybe I'm wrong. Hopefully Lukasz will notice the activity on the issue and have time to take a look. ---------- nosy: +r.david.murray versions: +Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 23:42:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Jul 2017 03:42:10 +0000 Subject: [issue30860] Consolidate stateful C globals under a single struct. In-Reply-To: <1499286630.32.0.878971862649.issue30860@psf.upfronthosting.co.za> Message-ID: <1499312530.09.0.33000288142.issue30860@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue29881. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 23:54:49 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Jul 2017 03:54:49 +0000 Subject: [issue10141] SocketCan support In-Reply-To: <1287449366.98.0.655876257649.issue10141@psf.upfronthosting.co.za> Message-ID: <1499313289.75.0.357205276441.issue10141@psf.upfronthosting.co.za> R. David Murray added the comment: This issue is closed. Please open a new issue for your problem and proposal. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 23:58:09 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 06 Jul 2017 03:58:09 +0000 Subject: [issue30840] Contrary to documentation, relative imports cannot pass through the top level In-Reply-To: <1499109292.04.0.970471813466.issue30840@psf.upfronthosting.co.za> Message-ID: <1499313489.24.0.268319834386.issue30840@psf.upfronthosting.co.za> Nick Coghlan added the comment: That part of the PEP was never implemented - relative imports have never been allowed to cross package boundaries in practice (which is also why "from . import sys" doesn't work as an equivalent to "import sys" at the interactive prompt or in a top level module). Rather than amending the PEP, my inclination is to drop that cross-reference from the documentation, and instead add a new subsection to https://docs.python.org/3/reference/import.html covering "Package relative imports" The key section that needs to be extracted is https://www.python.org/dev/peps/pep-0328/#guido-s-decision (minus the part about cross-package relative imports being permitted). The following section about __name__ is also worth including but needs to be updated to account for __package__ (added by PEP 366), and __spec__ (added by PEP 451). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 00:00:32 2017 From: report at bugs.python.org (Ned Deily) Date: Thu, 06 Jul 2017 04:00:32 +0000 Subject: [issue30862] parent logger should also check the level In-Reply-To: <1499303463.12.0.427912984431.issue30862@psf.upfronthosting.co.za> Message-ID: <1499313632.55.0.608857227357.issue30862@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 00:04:18 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Jul 2017 04:04:18 +0000 Subject: [issue12920] inspect.getsource only works for objects loaded from files, not interactive session In-Reply-To: <1315334278.72.0.69534403863.issue12920@psf.upfronthosting.co.za> Message-ID: <1499313858.45.0.465560815218.issue12920@psf.upfronthosting.co.za> R. David Murray added the comment: Probably. Figure out a protocol to inject them into linecache, perhaps. But I'm not sure such a thing would be accepted. If you can figure out a way to make it work at least theoretically, it would probably be best to talk about it on python-ideas first. In the meantime it would be nice to improve the error message, which is what we should use this issue for. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 00:10:59 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Jul 2017 04:10:59 +0000 Subject: [issue30858] Keyword can't be an expression? In-Reply-To: <1499275280.43.0.372385518137.issue30858@psf.upfronthosting.co.za> Message-ID: <1499314259.85.0.882635142208.issue30858@psf.upfronthosting.co.za> R. David Murray added the comment: I think the current error message is more informative than your suggestion, myself. However, the message could say "keyword argument name" instead of just "keyword", which I think would be quite a bit clearer. I seem to remember another discussion where I suggested disambiguating "keyword" by using "keyword argument name", but I have no idea how to phrase a search to find that issue :( ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 00:20:00 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Jul 2017 04:20:00 +0000 Subject: [issue30862] parent logger should also check the level In-Reply-To: <1499303463.12.0.427912984431.issue30862@psf.upfronthosting.co.za> Message-ID: <1499314800.01.0.820259053282.issue30862@psf.upfronthosting.co.za> R. David Murray added the comment: I will let Vinay answer definitively, but this is working as designed. This allows you to set 'debug' level on a sub-logger without getting debug output for every logger in your system, which is what you would get otherwise as the default logging level is NOTSET. The documentation for setLevel could probably be improved slightly in this regard, as currently you have to infer this behavior from the fact that NOTSET causes the ancestor logger's level to be used, implying that if you set it, that setting is used and not the ancestor logger's level. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 00:21:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Jul 2017 04:21:37 +0000 Subject: [issue30858] Keyword can't be an expression? In-Reply-To: <1499275280.43.0.372385518137.issue30858@psf.upfronthosting.co.za> Message-ID: <1499314897.87.0.134407428267.issue30858@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Issue29951. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 00:37:35 2017 From: report at bugs.python.org (Konstantin Zemlyak) Date: Thu, 06 Jul 2017 04:37:35 +0000 Subject: [issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names In-Reply-To: <1499304405.68.0.394164382969.issue20042@psf.upfronthosting.co.za> Message-ID: <38f328f7-eae6-4fbc-e126-fe512d805e43@zartsoft.ru> Konstantin Zemlyak added the comment: Terry J. Reedy wrote: > Is this still relevant or should it be closed? Should be closed. > On Win10, I created a short script ??????.py using Save As from IDLE. > > py -2 ??????.py produces > C:\Programs\Python27\python.exe: can't open file '??????.py': [Errno 22] Invalid argument > If the patch fixes 2.7 and looks okay, maybe we should apply. If 'no' or 'no', maybe we should forget 2.7 running files with such names. This outcome is expected and error comes from python itself, not from launcher. > On 3.5 and 3.6, the file runs without issue. The issue was opened with 3.3; 3.5 switched to a much more recent compiler, and I did not see any indication in the messages that this was tested on 3.5 before it was added. So perhaps for 3.5+, this is out-of-date. Launcher works fine now from my testing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 00:46:02 2017 From: report at bugs.python.org (Joe Jacobs) Date: Thu, 06 Jul 2017 04:46:02 +0000 Subject: [issue30859] Can't install Python for Windows 3.6.1 on multiple profiles In-Reply-To: <1499282595.77.0.384129179383.issue30859@psf.upfronthosting.co.za> Message-ID: <1499316362.69.0.623981739317.issue30859@psf.upfronthosting.co.za> Joe Jacobs added the comment: So, with the feedback, i uninstalled everything and tried installing again, but in the %appdata% folder for both users and everything worked fine. Both users have python installed. If i run the web launcher, the first time it installs on the second account and subsequent running of the launcher ask me to uninstall or repair as expected. I'm unable to find logs for the failed installs in the %temp% folder. If i'm able to duplicate the issue, i'll open a new bug report. Please go ahead and close this report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 01:09:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Jul 2017 05:09:05 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1499317745.34.0.964434868519.issue30814@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b4baacee1adc06edbe30ac7574d17a8cd168e2e0 by Serhiy Storchaka in branch 'master': bpo-30814: Fixed a race condition when import a submodule from a package. (#2580) https://github.com/python/cpython/commit/b4baacee1adc06edbe30ac7574d17a8cd168e2e0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 01:23:39 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Jul 2017 05:23:39 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499318619.07.0.440300830385.issue30779@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To get moving and unblock other issues, I decided to start with the simplest not-bad change that will work. The factored out code belongs in config.py. This will separate integration with ConfigDialog into 2 steps. 1. Add code and tests to config and test_config, leaving configdialog untouched. 2. Modify configdialog and tests to import and use the new classes, removing the refactored classes. We should start with ConfigChanges as a subclass of dict, with added methods as unchanged as possible. No Page class, but the page idea appears, and will later be applied elsewhere. No apply method, as the code only accesses changes but does not modify them. No save_new_config, as that code bypasses changes completely. No set_user_value, as that only access idleConf. I guessed at what delete_section should look like as I don't know where the original code is. Attached is my untested ConfigChanges. With step 1 done, I believe step 2 would consist of: A. add ConfigChanges to the config import. B. make 'changes' a global (like idleConf), after imports, with changes = ConfigChanges() [This could go in config, but CD is its only user.] Remove self.reset_changed_items in CD.__init__. C. replace names throughout file /self.changed_items/changes/ /self.reset_changed_items/changes.clear/ /self.add_changed_items/changes.add_item/ /self.save_all_changed_configs/changes.save_all/ C. Removed renamed methods. (Could do before B.) D. Replace code moved to .delete_section with a call thereto. E. Change test_configdialog If you wrote tests for methods not included in ConfigChanges, they could be added here anyway. PR2 could be prepared before PR1 is merged, but must not be applied before PR1 is merged and backported, and has to be consistent with final applied version of PR1. ---------- Added file: http://bugs.python.org/file46991/changes_class_v4.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 01:23:44 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 06 Jul 2017 05:23:44 +0000 Subject: [issue30858] Keyword can't be an expression? In-Reply-To: <1499275280.43.0.372385518137.issue30858@psf.upfronthosting.co.za> Message-ID: <1499318624.96.0.182778694435.issue30858@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: I agree it's more _correct_. But it's also more confusing. As far as I can tell, when writing error messages, we tend to minimize confusion, not maximize correctness. Of course, it would be great to have both. Your "keyword argument name" seems pretty good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 01:26:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Jul 2017 05:26:51 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1499318811.5.0.564681307346.issue30814@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2666 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 01:37:49 2017 From: report at bugs.python.org (Sergey Fedoseev) Date: Thu, 06 Jul 2017 05:37:49 +0000 Subject: [issue30856] unittest.TestResult.addSubTest should be called immediately after subtest finishes In-Reply-To: <1499262996.04.0.921631870961.issue30856@psf.upfronthosting.co.za> Message-ID: <1499319469.87.0.169242940165.issue30856@psf.upfronthosting.co.za> Changes by Sergey Fedoseev : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 01:38:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Jul 2017 05:38:27 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1499319507.25.0.635100128078.issue30814@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 03b0e8374b2ea93adf8fb6a48db2916f3b0388cc by Serhiy Storchaka in branch '3.6': [3.6] bpo-30814: Fixed a race condition when import a submodule from a package. (GH-2580). (#2598) https://github.com/python/cpython/commit/03b0e8374b2ea93adf8fb6a48db2916f3b0388cc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 01:53:14 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Jul 2017 05:53:14 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499320394.42.0.221228273178.issue30779@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Comments on difficulties and questions. D1. I will look at test changes where there is a PR to run. I wrote what you changed, but might not have considered what you did. D2. Moot for the moment. D3. Ditto. D4. If not needed, skip for now. D5. I will be more comfortable changing and presumably improving working code when we have good tests. GetDefaultItems (needs renaming) could save references to page and section dicts. We are in a bit of a chicken and egg situation when we need better tests to improve code and better code to write better tests. After steps 1 and 2, I want to work on tests. Then we can work on more code changes. Q1. dict.get is a way to avoid the existence check, and I am thinking of trying it out when tests are in place. It may not have existed when this code was written. I don't know what else DefaultDict adds. Q2. I was aware of the connection to tab pages, but it is not exact. I decided on 'config_type' for the string argument and local name page for the corresponding dict. Note: Yes, a bug. I save usercfg so I could restore it. The fix should be a PR for #30780. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 01:54:42 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Jul 2017 05:54:42 +0000 Subject: [issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names In-Reply-To: <1387635003.7.0.211054481065.issue20042@psf.upfronthosting.co.za> Message-ID: <1499320482.09.0.793204654968.issue20042@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 02:40:28 2017 From: report at bugs.python.org (Dima Tisnek) Date: Thu, 06 Jul 2017 06:40:28 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499288108.18.0.207232280352.issue30861@psf.upfronthosting.co.za> Message-ID: <1499323228.71.0.235811206514.issue30861@psf.upfronthosting.co.za> Dima Tisnek added the comment: My 2c: Pau's concern seems valid, in a sense that stream should work like TCP. That's what most users would assume -- read out data until the end, only then you can see what the actual error was (socket closed, or timeout or hard error) However, I suspect the devil may be in details -- the patch appears to assume that exception is only set by the underlying source of data (in which case user wants to read out everything up to the exception). I can imagine a couple of use-case where an exception is set "out of band": * to terminate bad reader (e.g. against Slowris attack) * there's a matching StreamWriter (e.g. shared socket) P.S. If I'm wrong here, then bug report and patch must be clearer :) ---------- nosy: +Dima.Tisnek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 03:07:56 2017 From: report at bugs.python.org (Pim Klanke) Date: Thu, 06 Jul 2017 07:07:56 +0000 Subject: [issue30847] asyncio: selector_events: add_urgent() for urgent data to read, 3rd argument of select.select() In-Reply-To: <1499176283.3.0.750942928243.issue30847@psf.upfronthosting.co.za> Message-ID: <1499324876.25.0.582362357113.issue30847@psf.upfronthosting.co.za> Pim Klanke added the comment: This is in fact the third catagory of select(), "exceptional conditions", but because some find the term "exceptional" confusing when used in a Python module, we decided to use the term "urgent data", borrowed from the poll(2) man page. (see bpo-30844) An example of an exceptional conditions event is "out of band", another one is edge detection from GPIO Sysfs Interface. The patch for fulfilling this issue can and will be supplied if and when bpo-30844 is merged. 30844 originally also contained the patch to asyncio, but I was asked to split it into two separate patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 03:10:11 2017 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 06 Jul 2017 07:10:11 +0000 Subject: [issue30862] parent logger should also check the level In-Reply-To: <1499303463.12.0.427912984431.issue30862@psf.upfronthosting.co.za> Message-ID: <1499325011.8.0.889620207948.issue30862@psf.upfronthosting.co.za> Vinay Sajip added the comment: As RDM says, this behaviour is as designed. The logger's setLevel documentation says: "Sets the threshold for this logger to lvl. Logging messages which are less severe than lvl will be ignored. When a logger is created, the level is set to NOTSET (which causes all messages to be processed when the logger is the root logger, or delegation to the parent when the logger is a non-root logger). Note that the root logger is created with level WARNING. The term ?delegation to the parent? means that if a logger has a level of NOTSET, its chain of ancestor loggers is traversed until either an ancestor with a level other than NOTSET is found, or the root is reached. If an ancestor is found with a level other than NOTSET, then that ancestor?s level is treated as the effective level of the logger where the ancestor search began, and is used to determine how a logging event is handled. If the root is reached, and it has a level of NOTSET, then all messages will be processed. Otherwise, the root?s level will be used as the effective level." Not sure how I can improve upon that, as it seems clear enough, but any suggestions are welcome. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 03:29:27 2017 From: report at bugs.python.org (chexex) Date: Thu, 06 Jul 2017 07:29:27 +0000 Subject: [issue30799] Improved test coverage Lib/_osx_support.py 99% Message-ID: <1499326167.93.0.491914452114.issue30799@psf.upfronthosting.co.za> New submission from chexex: I will appreciate any feedback. ---------- nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 03:45:10 2017 From: report at bugs.python.org (Wolfgang Maier) Date: Thu, 06 Jul 2017 07:45:10 +0000 Subject: [issue27268] Incorrect error message on float('') In-Reply-To: <1465396464.66.0.148764915141.issue27268@psf.upfronthosting.co.za> Message-ID: <1499327110.73.0.553927789952.issue27268@psf.upfronthosting.co.za> Wolfgang Maier added the comment: Could somebody turn this into a PR to move things forward? I guess Nofar mistakenly set resolution to "works for me", but meant "patch works for me"? ---------- nosy: +wolma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 03:53:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Jul 2017 07:53:21 +0000 Subject: [issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() Message-ID: <1499327601.89.0.422030261957.issue30863@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Since Python 3.3 PyUnicode_AsUnicodeAndSize() is deprecated in favour of PyUnicode_AsWideChar() and PyUnicode_AsWideCharString(). But the latter two are implemented using PyUnicode_AsUnicodeAndSize(). This prevents adding the deprecation compiler warning for PyUnicode_AsUnicodeAndSize(). Other side effect -- PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() cache the wchar_t* representation of the PyUnicode object increasing its memory consumption. Proposed patch reimplements PyUnicode_AsWideChar(), PyUnicode_AsWideCharString() and PyUnicode_AsUnicodeAndSize() using two common helper functions. PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() no longer cache the wchar_t* representation. ---------- components: Interpreter Core, Unicode messages: 297813 nosy: ezio.melotti, haypo, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 03:56:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Jul 2017 07:56:29 +0000 Subject: [issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() In-Reply-To: <1499327601.89.0.422030261957.issue30863@psf.upfronthosting.co.za> Message-ID: <1499327789.49.0.732541978078.issue30863@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2667 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 04:17:15 2017 From: report at bugs.python.org (TaoQingyun) Date: Thu, 06 Jul 2017 08:17:15 +0000 Subject: [issue30862] parent logger should also check the level In-Reply-To: <1499303463.12.0.427912984431.issue30862@psf.upfronthosting.co.za> Message-ID: <1499329035.65.0.857338805211.issue30862@psf.upfronthosting.co.za> TaoQingyun added the comment: yes, I understand the effective level. my question is that before call ancestor's handler, should also check `c.isEnabledFor(record.levelno)` ``` def callHandlers(self, record): """ Pass a record to all relevant handlers. Loop through all handlers for this logger and its parents in the logger hierarchy. If no handler was found, output a one-off error message to sys.stderr. Stop searching up the hierarchy whenever a logger with the "propagate" attribute set to zero is found - that will be the last logger whose handlers are called. """ c = self found = 0 while c: for hdlr in c.handlers: found = found + 1 if record.levelno >= hdlr.level: hdlr.handle(record) if not c.propagate: c = None #break out else: c = c.parent ... ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 04:22:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 08:22:54 +0000 Subject: [issue30855] [3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 In-Reply-To: <1499257127.67.0.747001147165.issue30855@psf.upfronthosting.co.za> Message-ID: <1499329374.6.0.37405729163.issue30855@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f6d6480b93eca6f353784579108957108750c004 by Victor Stinner in branch '2.7': [2.7] bpo-30855: Trying to fix test_use on Windows. (#2586) https://github.com/python/cpython/commit/f6d6480b93eca6f353784579108957108750c004 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 04:36:05 2017 From: report at bugs.python.org (Riccardo Magliocchetti) Date: Thu, 06 Jul 2017 08:36:05 +0000 Subject: [issue30864] Compile failure for linux socket CAN support Message-ID: <1499330165.39.0.665036659676.issue30864@psf.upfronthosting.co.za> New submission from Riccardo Magliocchetti: I have an issue related to this while trying to compile statically Python 3.6.1 (but latest master looks the same) against a static musl. The problem is that i have AF_CAN defined because it's defined in linux/socket.h but by not having HAVE_LINUX_CAN_H defined in pyconfig.h the header which contains the definition of struct sockaddr_can is not included. I think (at least for linux) using AF_CAN for the conditionals is wrong and the HAVE_LINUX_CAN_H should be used instead. I think the same applies for CAN_RAW and CAN_BCM because they are defined in the generic linux/can.h and not in a feature specific header. Reference: http://bugs.python.org/issue10141 ---------- components: IO messages: 297816 nosy: Riccardo Magliocchetti priority: normal severity: normal status: open title: Compile failure for linux socket CAN support versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 04:50:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 08:50:25 +0000 Subject: [issue30319] Change socket.close() to ignore ECONNRESET In-Reply-To: <1499301322.77.0.907705417166.issue30319@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Thanks Martin for the long explanation. To simplify a lot, there is and was never any warranty that a successful sock.send() call delivered data to the peer. Each layer does its best, but the data can be lost at any layer, and the peer is free to close the connection *before* getting the data. Yeah, I agree that application level signaling is required. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 04:53:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 08:53:42 +0000 Subject: [issue30339] test_multiprocessing_main_handling: "RuntimeError: Timed out waiting for results" on x86 Windows7 3.x In-Reply-To: <1494463699.01.0.364437710045.issue30339@psf.upfronthosting.co.za> Message-ID: <1499331222.05.0.329289149043.issue30339@psf.upfronthosting.co.za> STINNER Victor added the comment: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.5/builds/229/steps/test/logs/stdio ====================================================================== FAIL: test_directory (test.test_multiprocessing_main_handling.SpawnCmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\test_multiprocessing_main_handling.py", line 197, in test_directory self._check_script(script_dir) File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\test_multiprocessing_main_handling.py", line 155, in _check_script rc, out, err = assert_python_ok(*run_args, __isolated=False) File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\support\script_helper.py", line 150, in assert_python_ok return _assert_python(True, *args, **env_vars) File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\support\script_helper.py", line 136, in _assert_python err)) AssertionError: Process return code is 1 command line: ['C:\\buildbot.python.org\\3.5.kloth-win64\\build\\PCbuild\\amd64\\python_d.exe', '-X', 'faulthandler', '-E', 'C:\\Users\\Buildbot\\AppData\\Local\\Temp\\tmp7w5hs4kq', 'spawn'] stdout: --- --- stderr: --- Traceback (most recent call last): File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\Buildbot\AppData\Local\Temp\tmp7w5hs4kq\__main__.py", line 23, in raise RuntimeError("Timed out waiting for results") RuntimeError: Timed out waiting for results --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 04:56:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 08:56:51 +0000 Subject: [issue30855] [3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 In-Reply-To: <1499257127.67.0.747001147165.issue30855@psf.upfronthosting.co.za> Message-ID: <1499331411.8.0.880526534267.issue30855@psf.upfronthosting.co.za> STINNER Victor added the comment: I backported fixes to 2.7 and 3.5 branches. The test fails randomly, so I close the issue and hope that it doesn't come back. If it comes back on 3.5, we should now get the identifier which caused the failure. I will reopen the issue if the bug occurs again. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 05:51:02 2017 From: report at bugs.python.org (=?utf-8?q?Adrien_Pr=C3=A9?=) Date: Thu, 06 Jul 2017 09:51:02 +0000 Subject: [issue30865] python cannot import module located on a "VOLUME" directory Message-ID: <1499334662.04.0.074611059565.issue30865@psf.upfronthosting.co.za> New submission from Adrien Pr?: This issue created on python-docker project https://github.com/docker-library/python/issues/210 indicates that python cannot import a module if it is located on a docker-volume. yosifkit's comment suggest there is an issue in the UNC resolution with paths starting with `\\?\` Thesre is probably a fix to do in Lib\ntpath.py, however I am not sure how to fix that. Steps to reproduce the issues are here: https://github.com/apre/windows-volume-issue ---------- components: Library (Lib) messages: 297820 nosy: Adrien Pr? priority: normal severity: normal status: open title: python cannot import module located on a "VOLUME" directory type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 06:22:25 2017 From: report at bugs.python.org (Pim Klanke) Date: Thu, 06 Jul 2017 10:22:25 +0000 Subject: [issue30847] asyncio: selector_events: add_urgent() for urgent data to read, 3rd argument of select.select() In-Reply-To: <1499176283.3.0.750942928243.issue30847@psf.upfronthosting.co.za> Message-ID: <1499336545.65.0.142719140041.issue30847@psf.upfronthosting.co.za> Pim Klanke added the comment: > "Let's say that we got read event on sockets A and B (in an ordered list from selectors: A, then B), but B gets urgent data: should we handle B urgent data before not-urgent A data?" IMO No. The same strategy applies. urgent data events on B have priority over other events on B, but not necessarily over events on A. As long as the urgent data events for a certain file object are handled before other events for that file object, it should be fine. > "Would it be possible to let the developer decide how to prioritize events?" At this point asyncio has no support for prioritizing event handlers. If prioritizing should be necessary, it should IMO be implemented in a way that all event handlers can be prioritized and not just these events. I think we can agree that this falls outside the scope of this patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 06:51:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 10:51:20 +0000 Subject: [issue30866] Add _testcapi.stack_pointer() to measure the C stack consumption Message-ID: <1499338279.97.0.650027004501.issue30866@psf.upfronthosting.co.za> New submission from STINNER Victor: In issues bpo-28870, bpo-29227, bpo-29233 and bpo-29234, I worked on reducing the C stack consumption. I now would to add the _testcapi.stack_pointer() that I used to be able to easily measure the stack consumption. Try for example attached stack_overflow-3.py to measure the maximum number of C calls before a C stack overflow. The script also computes the average stack usage per C call for a specific kind of C call. ---------- files: stack_overflow-3.py messages: 297822 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: Add _testcapi.stack_pointer() to measure the C stack consumption versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file46992/stack_overflow-3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 06:51:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 10:51:43 +0000 Subject: [issue30866] Add _testcapi.stack_pointer() to measure the C stack consumption In-Reply-To: <1499338279.97.0.650027004501.issue30866@psf.upfronthosting.co.za> Message-ID: <1499338303.04.0.605318195389.issue30866@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2668 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 06:53:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 10:53:21 +0000 Subject: [issue30866] Add _testcapi.stack_pointer() to measure the C stack consumption In-Reply-To: <1499338279.97.0.650027004501.issue30866@psf.upfronthosting.co.za> Message-ID: <1499338401.14.0.352797128919.issue30866@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2669 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 06:54:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 10:54:28 +0000 Subject: [issue30866] Add _testcapi.stack_pointer() to measure the C stack consumption In-Reply-To: <1499338279.97.0.650027004501.issue30866@psf.upfronthosting.co.za> Message-ID: <1499338468.92.0.401459453231.issue30866@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2670 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 06:56:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 10:56:46 +0000 Subject: [issue30866] Add _testcapi.stack_pointer() to measure the C stack consumption In-Reply-To: <1499338279.97.0.650027004501.issue30866@psf.upfronthosting.co.za> Message-ID: <1499338606.84.0.474347177541.issue30866@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2671 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 07:22:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 11:22:47 +0000 Subject: [issue30847] asyncio: selector_events: add_urgent() for urgent data to read, 3rd argument of select.select() In-Reply-To: <1499336545.65.0.142719140041.issue30847@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Ok, it makes sense. Thanks :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 07:25:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Jul 2017 11:25:16 +0000 Subject: [issue30866] Add _testcapi.stack_pointer() to measure the C stack consumption In-Reply-To: <1499338279.97.0.650027004501.issue30866@psf.upfronthosting.co.za> Message-ID: <1499340316.91.0.516546767219.issue30866@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Usually we first merge a patch in master and after that cherry-pick it to other branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 07:30:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Jul 2017 11:30:50 +0000 Subject: [issue30865] python cannot import module located on a "VOLUME" directory In-Reply-To: <1499334662.04.0.074611059565.issue30865@psf.upfronthosting.co.za> Message-ID: <1499340650.68.0.669486832697.issue30865@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 07:37:12 2017 From: report at bugs.python.org (signal1587) Date: Thu, 06 Jul 2017 11:37:12 +0000 Subject: [issue30867] Add necessary macro `HAVE_OPENSSL_VERIFY_PARAM` to avoid invalid declaration Message-ID: <1499341032.83.0.909280464114.issue30867@psf.upfronthosting.co.za> New submission from signal1587: Compile Python (2.7.13) on platform which has OpenSSL (<0.9.8) will met error: /opt/Python-2.7.13/Modules/_ssl.c:177: error: syntax error before ?*? token Since return type `X509_VERIFY_PARAM` got added to OpenSSL in version 0.9.8. Surround the implementation of function `X509_STORE_get0_param` in (#ifdef HAVE_OPENSSL_VERIFY_PARAM ... #endif) guarantee to solve this problem. ---------- assignee: christian.heimes components: SSL files: _ssl.patch keywords: patch messages: 297825 nosy: christian.heimes, signal1587 priority: normal severity: normal status: open title: Add necessary macro `HAVE_OPENSSL_VERIFY_PARAM` to avoid invalid declaration type: compile error versions: Python 2.7 Added file: http://bugs.python.org/file46993/_ssl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 07:50:30 2017 From: report at bugs.python.org (signal1587) Date: Thu, 06 Jul 2017 11:50:30 +0000 Subject: [issue30867] Add necessary macro that insure`HAVE_OPENSSL_VERIFY_PARAM` to avoid invalid function declaration In-Reply-To: <1499341032.83.0.909280464114.issue30867@psf.upfronthosting.co.za> Message-ID: <1499341830.57.0.878119149031.issue30867@psf.upfronthosting.co.za> Changes by signal1587 : ---------- title: Add necessary macro `HAVE_OPENSSL_VERIFY_PARAM` to avoid invalid declaration -> Add necessary macro that insure`HAVE_OPENSSL_VERIFY_PARAM` to avoid invalid function declaration _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 07:51:15 2017 From: report at bugs.python.org (signal1587) Date: Thu, 06 Jul 2017 11:51:15 +0000 Subject: [issue30867] Add necessary macro that insure `HAVE_OPENSSL_VERIFY_PARAM` to avoid invalid function declaration In-Reply-To: <1499341032.83.0.909280464114.issue30867@psf.upfronthosting.co.za> Message-ID: <1499341875.15.0.777637635707.issue30867@psf.upfronthosting.co.za> Changes by signal1587 : ---------- title: Add necessary macro that insure`HAVE_OPENSSL_VERIFY_PARAM` to avoid invalid function declaration -> Add necessary macro that insure `HAVE_OPENSSL_VERIFY_PARAM` to avoid invalid function declaration _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 09:27:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 13:27:09 +0000 Subject: [issue30866] Add _testcapi.stack_pointer() to measure the C stack consumption In-Reply-To: <1499338279.97.0.650027004501.issue30866@psf.upfronthosting.co.za> Message-ID: <1499347629.58.0.282981370734.issue30866@psf.upfronthosting.co.za> STINNER Victor added the comment: > Usually we first merge a patch in master and after that cherry-pick it to other branches. Right. But in this case, I needed the patch for each branch, to run the test on all branches to write a blog post :-) Here are results (blog post spoiler!): Table showing the C stack consumption in bytes, and the difference compared to Python 3.5 (last release before I started working on FASTCALL): ==================== ================ ===== ================ ================ Function 2.7 3.5 3.6 3.7 ==================== ================ ===== ================ ================ test_python_call 1,360 (**+352**) 1,008 1,120 (**+112**) 960 (**-48**) test_python_getitem 1,408 (**+288**) 1,120 1,168 (**+48**) 880 (**-240**) test_python_iterator 1,424 (**+192**) 1,232 1,200 (**-32**) 1,024 (**-208**) Total 4,192 (**+832**) 3,360 3,488 (**+128**) 2,864 (**-496**) ==================== ================ ===== ================ ================ Table showing the number of function calls before a stack overflow, and the difference compared to Python 3.5: ==================== =================== ====== =================== =================== Function 2.7 3.5 3.6 3.7 ==================== =================== ====== =================== =================== test_python_call 6,161 (**-2,153**) 8,314 7,482 (**-832**) 8,729 (**+415**) test_python_getitem 5,951 (**-1,531**) 7,482 7,174 (**-308**) 9,522 (**+2,040**) test_python_iterator 5,885 (**-916**) 6,801 6,983 (**+182**) 8,184 (**+1,383**) Total 17,997 (**-4600**) 22,597 21,639 (**-958**) 26,435 (**+3,838**) ==================== =================== ====== =================== =================== ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 09:44:09 2017 From: report at bugs.python.org (Melroy van den Berg) Date: Thu, 06 Jul 2017 13:44:09 +0000 Subject: =?utf-8?q?=5Bissue23644=5D_g++_module_compile_fails_with_=E2=80=98=5FAtom?= =?utf-8?q?ic=E2=80=99_does_not_name_a_type?= In-Reply-To: <1426172340.82.0.788562357439.issue23644@psf.upfronthosting.co.za> Message-ID: <1499348649.76.0.674767169083.issue23644@psf.upfronthosting.co.za> Melroy van den Berg added the comment: I also got this problem with gcc/g++ version 4.9.3. ./Include/pyatomic.h:37:5: error: 'atomic_int' does not name a type I'm using Python 3.6.1. It's not fixed! ---------- nosy: +Melroy van den Berg versions: +Python 3.6 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 09:46:12 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Jul 2017 13:46:12 +0000 Subject: [issue30858] Keyword can't be an expression? In-Reply-To: <1499275280.43.0.372385518137.issue30858@psf.upfronthosting.co.za> Message-ID: <1499348772.72.0.468883230091.issue30858@psf.upfronthosting.co.za> R. David Murray added the comment: If I saw your message, I would think "what is a 'simple name'?". There's no glossary entry for that, nor is it a concept used elsewhere in the documentation as far as I remember. One could instead use "single identifier", but the problem with both of those is that "end" *is* a simple name/single identifier. The error isn't that an identifier was not used, the error is that an expression was used. We unfortunately can't read the mind of the programmer to know that the *actual* error was using a '+' instead of a ','. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 09:52:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 13:52:43 +0000 Subject: [issue30866] Add _testcapi.stack_pointer() to measure the C stack consumption In-Reply-To: <1499338279.97.0.650027004501.issue30866@psf.upfronthosting.co.za> Message-ID: <1499349163.7.0.240109633226.issue30866@psf.upfronthosting.co.za> STINNER Victor added the comment: I just published my blog post: "My contributions to CPython during 2017 Q1" https://haypo.github.io/contrib-cpython-2017q1.html See the "Stack consumption" section. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 09:54:01 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Thu, 06 Jul 2017 13:54:01 +0000 Subject: [issue30860] Consolidate stateful C globals under a single struct. In-Reply-To: <1499286630.32.0.878971862649.issue30860@psf.upfronthosting.co.za> Message-ID: <1499349241.78.0.943613516549.issue30860@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 09:58:43 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Jul 2017 13:58:43 +0000 Subject: [issue30862] parent logger should also check the level In-Reply-To: <1499303463.12.0.427912984431.issue30862@psf.upfronthosting.co.za> Message-ID: <1499349523.34.0.394117401638.issue30862@psf.upfronthosting.co.za> R. David Murray added the comment: @qingyunha: we are telling you that that would *introduce* a bug. This is working the way it is supposed to. Vinay, what if we rewrote the beginning of that paragraph like this: Sets the threshold for this logger to lvl. Logging messages which are less severe than lvl will be ignored, logging messages which have severity lvl or higher will be emitted by whichever handler or handlers service this logger, unless the handler's level has been set to a higher severity level than lvl. When a logger is created, the level is set to NOTSET.... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 10:16:10 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Jul 2017 14:16:10 +0000 Subject: [issue30865] python cannot import module located on a "VOLUME" directory In-Reply-To: <1499334662.04.0.074611059565.issue30865@psf.upfronthosting.co.za> Message-ID: <1499350570.72.0.215748447622.issue30865@psf.upfronthosting.co.za> R. David Murray added the comment: Reading through some of the linked material, it looks like the issue is with how UNC "symlinks" are resolved. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 10:46:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 14:46:47 +0000 Subject: =?utf-8?q?=5Bissue23644=5D_g++_module_compile_fails_with_=E2=80=98=5FAtom?= =?utf-8?q?ic=E2=80=99_does_not_name_a_type?= In-Reply-To: <1426172340.82.0.788562357439.issue23644@psf.upfronthosting.co.za> Message-ID: <1499352407.32.0.682489005682.issue23644@psf.upfronthosting.co.za> STINNER Victor added the comment: > I'm using Python 3.6.1. It's not fixed! Thanks for the confirmation of the fix ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 11:39:33 2017 From: report at bugs.python.org (Melroy van den Berg) Date: Thu, 06 Jul 2017 15:39:33 +0000 Subject: =?utf-8?q?=5Bissue23644=5D_g++_module_compile_fails_with_=E2=80=98=5FAtom?= =?utf-8?q?ic=E2=80=99_does_not_name_a_type?= In-Reply-To: <1426172340.82.0.788562357439.issue23644@psf.upfronthosting.co.za> Message-ID: <1499355573.04.0.961669819346.issue23644@psf.upfronthosting.co.za> Melroy van den Berg added the comment: Ow sorry, I though it was already fixed in the latest stable version of 3.x. Since is issue is from 2015. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 12:45:53 2017 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 06 Jul 2017 16:45:53 +0000 Subject: [issue30862] parent logger should also check the level In-Reply-To: <1499303463.12.0.427912984431.issue30862@psf.upfronthosting.co.za> Message-ID: <1499359553.09.0.584810246084.issue30862@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- pull_requests: +2672 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 12:51:30 2017 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 06 Jul 2017 16:51:30 +0000 Subject: [issue30862] parent logger should also check the level In-Reply-To: <1499303463.12.0.427912984431.issue30862@psf.upfronthosting.co.za> Message-ID: <1499359890.94.0.147487213806.issue30862@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset 0653fba51c03d20fa4381ba0836acd17fd05b04b by Vinay Sajip in branch 'master': bpo-30862: Updated Logger.setLevel documentation. (GH-2604) https://github.com/python/cpython/commit/0653fba51c03d20fa4381ba0836acd17fd05b04b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 14:51:20 2017 From: report at bugs.python.org (Cathy Avery) Date: Thu, 06 Jul 2017 18:51:20 +0000 Subject: [issue27584] New addition of vSockets to the python socket module In-Reply-To: <1469115390.74.0.838831983223.issue27584@psf.upfronthosting.co.za> Message-ID: <1499367080.79.0.517795974247.issue27584@psf.upfronthosting.co.za> Cathy Avery added the comment: So I revised my code based on the reviews and I passed all the checks ... now what? Thanks, Cathy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 15:31:00 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 06 Jul 2017 19:31:00 +0000 Subject: [issue26506] [EASY] hex() documentation: mention "%x" % int In-Reply-To: <1457372823.56.0.270827849914.issue26506@psf.upfronthosting.co.za> Message-ID: <1499369460.59.0.286198158113.issue26506@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 67ba4fa467ffff825d6a0c0a21cc54ff1df2ed1b by Mariatta (Manvisha Kodali) in branch 'master': bpo-26506: hex() documentation: mention %x % int (GH-2525) https://github.com/python/cpython/commit/67ba4fa467ffff825d6a0c0a21cc54ff1df2ed1b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 15:32:11 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Jul 2017 19:32:11 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499369531.16.0.125897260612.issue30779@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am working on this now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 15:45:57 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Jul 2017 19:45:57 +0000 Subject: [issue30780] IDLE: configdialog - add tests for ConfigDialog GUI. In-Reply-To: <1498516711.25.0.892352273971.issue30780@psf.upfronthosting.co.za> Message-ID: <1499370357.06.0.106334966609.issue30780@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2673 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 15:46:44 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Jul 2017 19:46:44 +0000 Subject: [issue30780] IDLE: configdialog - add tests for ConfigDialog GUI. In-Reply-To: <1498516711.25.0.892352273971.issue30780@psf.upfronthosting.co.za> Message-ID: <1499370404.19.0.0480342753548.issue30780@psf.upfronthosting.co.za> Terry J. Reedy added the comment: PR to fix type in moduleTearDown. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 16:10:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 20:10:55 +0000 Subject: =?utf-8?q?=5Bissue23644=5D_g++_module_compile_fails_with_=E2=80=98=5FAtom?= =?utf-8?q?ic=E2=80=99_does_not_name_a_type?= In-Reply-To: <1426172340.82.0.788562357439.issue23644@psf.upfronthosting.co.za> Message-ID: <1499371855.83.0.11886837158.issue23644@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, wait, I read your message backward. You said that the fix doesn't work? Hum, how can I reproduce the issue? What is your use case? ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 16:25:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 20:25:58 +0000 Subject: =?utf-8?q?=5Bissue23644=5D_g++_module_compile_fails_with_=E2=80=98=5FAtom?= =?utf-8?q?ic=E2=80=99_does_not_name_a_type?= In-Reply-To: <1426172340.82.0.788562357439.issue23644@psf.upfronthosting.co.za> Message-ID: <1499372758.2.0.676022051534.issue23644@psf.upfronthosting.co.za> STINNER Victor added the comment: > ./Include/pyatomic.h:37:5: error: 'atomic_int' does not name a type I don't understand how you got this error. The line 37 of pyatomic.h is only compiled when you build Python itself. At least, since Python 3.5.1 and Python 3.6.0. Did you try to build Python? Or did you try to build a C extension? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 16:27:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 20:27:10 +0000 Subject: =?utf-8?q?=5Bissue23644=5D_g++_module_compile_fails_with_=E2=80=98=5FAtom?= =?utf-8?q?ic=E2=80=99_does_not_name_a_type?= In-Reply-To: <1426172340.82.0.788562357439.issue23644@psf.upfronthosting.co.za> Message-ID: <1499372830.9.0.605084869258.issue23644@psf.upfronthosting.co.za> STINNER Victor added the comment: See the following commit of bpo-25150: commit 6df29ada02d22c43a8d439a70b820cb1ceacca42 Author: Victor Stinner Date: Fri Sep 18 15:06:34 2015 +0200 Issue #25150: Hide the private _Py_atomic_xxx symbols from the public Python.h header to fix a compilation error with OpenMP. PyThreadState_GET() becomes an alias to PyThreadState_Get() to avoid ABI incompatibilies. It is important that the _PyThreadState_Current variable is always accessed with the same implementation of pyatomic.h. Use the PyThreadState_Get() function so extension modules will all reuse the same implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 16:57:39 2017 From: report at bugs.python.org (Robert Boehne) Date: Thu, 06 Jul 2017 20:57:39 +0000 Subject: [issue30819] Linking with 'ld -b' fails with 64-bit using Itanium HP compiler In-Reply-To: <1498842690.63.0.786379991477.issue30819@psf.upfronthosting.co.za> Message-ID: <1499374659.31.0.552010582338.issue30819@psf.upfronthosting.co.za> Changes by Robert Boehne : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 17:04:22 2017 From: report at bugs.python.org (pfreixes) Date: Thu, 06 Jul 2017 21:04:22 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499288108.18.0.207232280352.issue30861@psf.upfronthosting.co.za> Message-ID: <1499375062.97.0.701646595603.issue30861@psf.upfronthosting.co.za> pfreixes added the comment: As was said, the assumption here is the data that came to the buffer must be available. For example, the next snippet shows a Redis client that expects the data message plus the RST packet, where the redis-server was configured to accept max N connections, the connection used by this snippet was the N+1 import socket import time s = socket.socket( socket.AF_INET, socket.SOCK_STREAM) s.connect(("localhost", 6379)) # give enought time to get the # data plus the RST Package time.sleep(1) # read the data print(s.recv(100)) It works like a charm. IMHO this is not a matter of RST vs close graceful, its a matter of giving always the chance to the developer to read the data that is still remaining and ready into the buffer. The current implementation is in somehow not predictable. Different network latencies with the same scenario can produce different outputs and the same with how the read of the Streamer is handled by the developer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 17:28:25 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Jul 2017 21:28:25 +0000 Subject: [issue30532] email.policy.SMTP.fold() mangles long headers In-Reply-To: <1496268533.13.0.885025594185.issue30532@psf.upfronthosting.co.za> Message-ID: <1499376505.75.0.554767831626.issue30532@psf.upfronthosting.co.za> R. David Murray added the comment: New changeset c60d2f5e8609b040ab58c498fde23928fe9dbef5 by R. David Murray (Joel Hillacre) in branch '3.6': bpo-30532: Fix whitespace folding in certain cases (#2591) https://github.com/python/cpython/commit/c60d2f5e8609b040ab58c498fde23928fe9dbef5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 17:29:12 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Jul 2017 21:29:12 +0000 Subject: [issue30532] email.policy.SMTP.fold() mangles long headers In-Reply-To: <1496268533.13.0.885025594185.issue30532@psf.upfronthosting.co.za> Message-ID: <1499376552.02.0.028749554556.issue30532@psf.upfronthosting.co.za> R. David Murray added the comment: New changeset 3bbdf990a2c1b0b303b950058e3177a1bd5f697a by R. David Murray (Joel Hillacre) in branch '3.5': bpo-30532: Fix whitespace folding in certain cases (#2592) https://github.com/python/cpython/commit/3bbdf990a2c1b0b303b950058e3177a1bd5f697a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 17:30:10 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Jul 2017 21:30:10 +0000 Subject: [issue30532] email.policy.SMTP.fold() mangles long headers In-Reply-To: <1496268533.13.0.885025594185.issue30532@psf.upfronthosting.co.za> Message-ID: <1499376610.15.0.406623159118.issue30532@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Joel! ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 17:52:37 2017 From: report at bugs.python.org (Robert Boehne) Date: Thu, 06 Jul 2017 21:52:37 +0000 Subject: [issue30183] [HPUX] compilation error in pytime.c with cc compiler In-Reply-To: <1493267090.1.0.00115311377195.issue30183@psf.upfronthosting.co.za> Message-ID: <1499377957.86.0.0264926009106.issue30183@psf.upfronthosting.co.za> Changes by Robert Boehne : ---------- pull_requests: +2674 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 17:52:59 2017 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 06 Jul 2017 21:52:59 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499288108.18.0.207232280352.issue30861@psf.upfronthosting.co.za> Message-ID: <1499377979.82.0.105084839661.issue30861@psf.upfronthosting.co.za> Guido van Rossum added the comment: We seem to have a failure to communicate. I'm sure your example code "works", but you're not showing what's in the data it receives that is important for the app to read (your example just prints it). And surely your app should be robust even if the connection is closed *without* ever receiving that data (since it may be lost in transit). If you need an application-level error your design should include it in the protocol, not use the connection closing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 18:05:42 2017 From: report at bugs.python.org (Melroy van den Berg) Date: Thu, 06 Jul 2017 22:05:42 +0000 Subject: =?utf-8?q?=5Bissue23644=5D_g++_module_compile_fails_with_=E2=80=98=5FAtom?= =?utf-8?q?ic=E2=80=99_does_not_name_a_type?= In-Reply-To: <1426172340.82.0.788562357439.issue23644@psf.upfronthosting.co.za> Message-ID: <1499378742.19.0.0717681725935.issue23644@psf.upfronthosting.co.za> Melroy van den Berg added the comment: Yea I'm building Python 3.6.1 from source, using gcc and --with-cxx-main=correct/location/to/g++ flag. So the warning message appears during ./configure about that it can't find g++. I didn't try to patch it using the attachments of this issue. Since I was hoping it's fixed in the release itself. I was using gcc/g++ version 4.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 18:08:39 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 06 Jul 2017 22:08:39 +0000 Subject: [issue30860] Consolidate stateful C globals under a single struct. In-Reply-To: <1499286630.32.0.878971862649.issue30860@psf.upfronthosting.co.za> Message-ID: <1499378919.38.0.630578077035.issue30860@psf.upfronthosting.co.za> Antoine Pitrou added the comment: After looking at the PR, I'm a bit skeptical about this. Suddenly a lot of things which are implementation details get moved to the public include files, which makes things more confusing from my POV. I also don't know why all globals should be consolidated in a single place (it is not a widespread policy in other projects AFAIK, but I may be mistaken). Perhaps it would be more reasonable to consolidate the globals in each .c file independently, without trying to join all of them together in one place nor expose them in the public include files. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 18:18:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 22:18:31 +0000 Subject: =?utf-8?q?=5Bissue23644=5D_g++_module_compile_fails_with_=E2=80=98=5FAtom?= =?utf-8?q?ic=E2=80=99_does_not_name_a_type?= In-Reply-To: <1499378742.19.0.0717681725935.issue23644@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: I don't think that CPython can be built by g++. If you consider that it should, please open a new issue since it's a different use case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 18:45:18 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 06 Jul 2017 22:45:18 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499381118.34.0.336689795753.issue30779@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +2675 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 19:05:12 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 06 Jul 2017 23:05:12 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499382312.44.0.387414727946.issue30779@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I've made the first pull request for the changes to config.py. I have to apologize because I really couldn't figure out how to do 'save_all' without including 'set_user_value' since 'set_user_value' updates userCfg with the values from ConfigChanges. Also, in `__init__`, you had self.pages, but *self* itself is the same thing, i.e. self['main'], etc is created in the for-loop, so I couldn't figure out the difference between self and self.pages, except in the context of the Page class. I kept the code as close to the original as possible. One side effect is that sometimes we have `self[page]` and sometimes `self[config_type]`. I also commented out the call to `self.save_all_changed_extensions` in `save_all`. In configdialog, `save_all_changed_extensions` iterates over what would be ConfigChanges['extensions'], with the section = ext_name and item = opt. It calls `set_extension_value` with each ext_name/opt, but the difference between this and the others is that opt (item) itself is a dictionary with 'name', 'default', and 'var' keys, whereas 'main', 'keys', and 'highlight' have items with one value (at least in set_user_value). So, if `set_user_value` stays in ConfigChanges, I believe `set_extension_value` and `save_all_changed_extensions` can be copied there as intact also. Neither one uses anything from configdialog directly, just things from ConfigChanges and idleConf. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 21:30:10 2017 From: report at bugs.python.org (Wu Zongyong) Date: Fri, 07 Jul 2017 01:30:10 +0000 Subject: [issue30790] Can't use proxy to connect internet on windows Message-ID: <1499391010.26.0.522956114839.issue30790@psf.upfronthosting.co.za> Changes by Wu Zongyong : ---------- pull_requests: +2676 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 21:59:22 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 07 Jul 2017 01:59:22 +0000 Subject: [issue30860] Consolidate stateful C globals under a single struct. In-Reply-To: <1499286630.32.0.878971862649.issue30860@psf.upfronthosting.co.za> Message-ID: <1499392762.68.0.3413338947.issue30860@psf.upfronthosting.co.za> Nick Coghlan added the comment: The core motivation driving the original refactoring was to better understand and consolidate our runtime state in order to clarify what the GIL is actually protecting (aside from the reference counts). That then turned out to have surprising performance benefits (presumably by way of loading all of this state permanently into the CPU cache and then keeping it there). The changes to the public include files arise more from the fact we don't currently have a common place to put internal CPython headers for declarations we want to share across compilation modules. I agree the latter is confusing, and it could be worth having a separate "Include/internal/CPython.h" header that outright failed the build if you attempted to include it without Py_BUILD_CORE set. (This also ties into my comments on the PR, where I believe the current approach of mixing public and private state in the same structs will cause problems with compilers generating incorrect field offsets in extension modules and embedding applications) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 22:19:15 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 02:19:15 +0000 Subject: [issue30780] IDLE: configdialog - add tests for ConfigDialog GUI. In-Reply-To: <1498516711.25.0.892352273971.issue30780@psf.upfronthosting.co.za> Message-ID: <1499393955.61.0.830687186033.issue30780@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 25a4206c243e3b1fa6f5b1c72a11b409b007694d by terryjreedy in branch 'master': bpo-30780: Fix error in idlelib.test_idle.test_configdialog (#2606) https://github.com/python/cpython/commit/25a4206c243e3b1fa6f5b1c72a11b409b007694d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 22:27:07 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 02:27:07 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499394427.12.0.261910694988.issue30779@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2677 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 22:46:49 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 02:46:49 +0000 Subject: [issue30780] IDLE: configdialog - add tests for ConfigDialog GUI. In-Reply-To: <1498516711.25.0.892352273971.issue30780@psf.upfronthosting.co.za> Message-ID: <1499395609.64.0.707393027107.issue30780@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I posted PR 2612 for #30779 and expect to merge it tomorrow after sleep and final review. It includes passing revisions of existing configdialog tests. A PR dependent on 2612 could be posted before I do the merge. Follow the model of using xyzpage names in asserts and tests would survive the refactoring of ConfigChanges discussed as a possibility on #30779. I want to move forward on this, but not duplicate your work, so please post work done and immediate plans. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 22:56:35 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 02:56:35 +0000 Subject: [issue30868] IDLE: Improve configuration tests with mock Save. Message-ID: <1499396195.9.0.947887140078.issue30868@psf.upfronthosting.co.za> New submission from Terry J. Reedy: When writing tests for config and configdialog, I blocked the user configs from hitting the filesystem by passing '' as the file name. This disables the Save function. To know that Save is called, a mock is needed. To know what would have been written to disk, the mock could write to a StringIO. Since there are 4 files and 4 config parsers, there are 4 save functions. I would mock each separately so it can be determined that the right one was called. I plan to create a specialized version of idle_mock.Func with a simplified version of Save's body in the __call__ method. ---------- assignee: terry.reedy components: IDLE messages: 297854 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Improve configuration tests with mock Save. type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 23:04:41 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 03:04:41 +0000 Subject: [issue30780] IDLE: configdialog - add tests for ConfigDialog GUI. In-Reply-To: <1498516711.25.0.892352273971.issue30780@psf.upfronthosting.co.za> Message-ID: <1499396681.92.0.932205517771.issue30780@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2678 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 23:16:33 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 03:16:33 +0000 Subject: [issue30780] IDLE: configdialog - add tests for ConfigDialog GUI. In-Reply-To: <1498516711.25.0.892352273971.issue30780@psf.upfronthosting.co.za> Message-ID: <1499397393.54.0.3973706523.issue30780@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset df0f99329843c10701ffaefbd3948ac698c12220 by terryjreedy in branch '3.6': [3.6] bpo-30780: Fix error in idlelib.test_idle.test_configdialog (GH-2606) (#2613) https://github.com/python/cpython/commit/df0f99329843c10701ffaefbd3948ac698c12220 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 23:21:06 2017 From: report at bugs.python.org (Louie Lu) Date: Fri, 07 Jul 2017 03:21:06 +0000 Subject: [issue30869] regrtest: Add .idlerc to saved_test_environment Message-ID: <1499397666.15.0.337246084117.issue30869@psf.upfronthosting.co.za> New submission from Louie Lu: In bpo #30780, there is a mistake of tearDownModule didn't restore the use rCfg. To prevent future mistake, Adding .idlerc to regrtest saved_test_environment, so that `--fail-env-changed` option can detect .idlerc been changed in IDLE test. ---------- components: Library (Lib) messages: 297856 nosy: haypo, louielu, terry.reedy priority: normal severity: normal status: open title: regrtest: Add .idlerc to saved_test_environment versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 23:22:06 2017 From: report at bugs.python.org (Louie Lu) Date: Fri, 07 Jul 2017 03:22:06 +0000 Subject: [issue30869] regrtest: Add .idlerc to saved_test_environment In-Reply-To: <1499397666.15.0.337246084117.issue30869@psf.upfronthosting.co.za> Message-ID: <1499397726.67.0.611464157153.issue30869@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +2679 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 23:45:44 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 03:45:44 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499399144.86.0.971990426435.issue30779@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Whoops, we seems to have partly overlapped (and made some of the same changes). I plan to push my PR sometime tomorrow (it also changes configdialog and revised tests) after looking as yours. Then move on to adding config tests, #30780. The tests for config need the real config parsers, except for save. But to fully test config, a mock save is needed. I opened #30868 for this. set_value (set_user_value) accesses neither configdialog nor changes. So it is a function rather than a method, and I could have put it in config as such. I added it as a staticmethod just above save_all instead because it is only used by save_all. Any other of the now 74 methods of ConfigDialog that are not really methods thereof (don't use self) should also be removed and made module functions, in either module, or possibly changes methods. I just want them tested first, if possible. I *would* like to put all the extension changes in changes instead of some in a separate structure. I believe the 'hard' part is that key changes have to be handled separately from the non-extension keys. The code was contributed by someone else and once I determined that it worked by manual testing, I left it alone. Testing and moving and possibly rewriting the extension stuff would be a coherent issue and PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 00:32:38 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 04:32:38 +0000 Subject: [issue30869] regrtest: Add .idlerc to saved_test_environment In-Reply-To: <1499397666.15.0.337246084117.issue30869@psf.upfronthosting.co.za> Message-ID: <1499401958.64.0.510842337751.issue30869@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I would have liked the mistake in #30780 to have been noticed, but I don't think the patch would have caught it. What I failed to restore was an in memory date structure that is part of the config module. The patch seems to be concerned only with the filesystem, which is something different. On IDLE startup, config tries 1. to find a home directory, 2. within that a .idlerc directory, and 3. within that user config files. If 1. fails, it used getcwd() as home. Either way, if 2. fails, config tries to make .idlerc. Failure here is currently fatal, though I would like to eventually change that. So I presume creation succeeds at least once on each buildbot. Creating .idlerc is intentional behavior, not a mistake, and in the absence of buildbot owners complaining, I don't think it should be made a test failure. Creating non-empty user config files during a test (on user machines) would be a mistake, and I have made sure that tests do not touch them. Checking for user config changes within .idlerc would be okay, Victor, it is up to you as regrtest expert to review both the implied policy change and the effect of the code change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 01:14:18 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Jul 2017 05:14:18 +0000 Subject: [issue30797] ./pyconfig.h:1438:0: warning: "_GNU_SOURCE" redefined [enabled by default] In-Reply-To: <1498688645.93.0.221276689872.issue30797@psf.upfronthosting.co.za> Message-ID: <1499404458.08.0.306115703723.issue30797@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +2680 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 01:14:18 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Jul 2017 05:14:18 +0000 Subject: [issue30694] Update embedded copy of expat to 2.2.1 In-Reply-To: <1497754887.58.0.724129384272.issue30694@psf.upfronthosting.co.za> Message-ID: <1499404458.14.0.408776049475.issue30694@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +2681 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 01:31:46 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Jul 2017 05:31:46 +0000 Subject: [issue30694] Update embedded copy of expat to 2.2.1 In-Reply-To: <1497754887.58.0.724129384272.issue30694@psf.upfronthosting.co.za> Message-ID: <1499405506.09.0.57694738923.issue30694@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 05b72ede95521b2d897cb4c7b034139b5437c592 by Ned Deily in branch '3.6': bpo-30797, bpo-30694: Avoid _GNU_SOURCE redefined warning in xmlparse.c (#2615) https://github.com/python/cpython/commit/05b72ede95521b2d897cb4c7b034139b5437c592 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 01:31:46 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Jul 2017 05:31:46 +0000 Subject: [issue30797] ./pyconfig.h:1438:0: warning: "_GNU_SOURCE" redefined [enabled by default] In-Reply-To: <1498688645.93.0.221276689872.issue30797@psf.upfronthosting.co.za> Message-ID: <1499405506.59.0.777608783442.issue30797@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 05b72ede95521b2d897cb4c7b034139b5437c592 by Ned Deily in branch '3.6': bpo-30797, bpo-30694: Avoid _GNU_SOURCE redefined warning in xmlparse.c (#2615) https://github.com/python/cpython/commit/05b72ede95521b2d897cb4c7b034139b5437c592 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 01:53:17 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Jul 2017 05:53:17 +0000 Subject: [issue30797] ./pyconfig.h:1438:0: warning: "_GNU_SOURCE" redefined [enabled by default] In-Reply-To: <1498688645.93.0.221276689872.issue30797@psf.upfronthosting.co.za> Message-ID: <1499406797.01.0.0537840016907.issue30797@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report. This warning is currently visible on many/all of the buildbots on all branches. The conflict is caused by the upgrade of the bundled to libexpat to version 2.2.1 (bpo-30694). 2.2.1 introduced a define of _GNU_SOURCE into Modules/expat/xmlparse.c. The definition in xmlparse is simply: #define _GNU_SOURCE But Python, in pyconfig.h, which ./configure generates from pyconfig.h.in, may already have defined _GNU_SOURCE thusly: #define _GNU_SOURCE 1 pyconfig.h gets included into our copy of Modules/expat/expat_config.h which is included later in xmlparse.c causing the compile warning. The simplest way to avoid the warning is to just change the definition in xmlparse.c to match that in pyconfig.h; the compilers don't complain if the definition is identical. I have now merged that fix into the 3.6 branch so builders of 3.6.2 won't see the warning. I will leave this open for @haypo to review and to handle merging into the other branches affected by bpo-30694 (master, 3.5, 2.7, 3.4, 3.3). ---------- assignee: -> haypo nosy: +haypo stage: -> backport needed type: compile error -> versions: +Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 01:54:57 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Jul 2017 05:54:57 +0000 Subject: [issue30694] Update embedded copy of expat to 2.2.1 In-Reply-To: <1497754887.58.0.724129384272.issue30694@psf.upfronthosting.co.za> Message-ID: <1499406897.56.0.0690128997968.issue30694@psf.upfronthosting.co.za> Ned Deily added the comment: See bpo-30797 for compile warning introduced here. ---------- assignee: -> haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 02:10:48 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 07 Jul 2017 06:10:48 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499407848.22.0.611749946318.issue29854@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset fae8f4a9cb88a68eb14750cbb8ddf8740fd67b8b by Berker Peksag (Nir Soffer) in branch 'master': bpo-29854: Fix segfault in call_readline() (GH-728) https://github.com/python/cpython/commit/fae8f4a9cb88a68eb14750cbb8ddf8740fd67b8b ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 02:11:59 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 07 Jul 2017 06:11:59 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499407919.02.0.125155831913.issue29854@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 02:26:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 06:26:48 +0000 Subject: [issue24845] IDLE functional/integration testing In-Reply-To: <1439325481.18.0.135721195599.issue24845@psf.upfronthosting.co.za> Message-ID: <1499408808.42.0.478330068774.issue24845@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have accepted what I think is the core idea -- testing functional pathways starting with user actions instead or in addition to pure unit tests. For instance, test_configdialog.GeneralTest (newly revised in PR 2612) invokes buttons and inserts entries. These simulated user actions change Variable values; the trace callback is then called to add an option to the changes data structure. The test is that the right addition was made. I will not bother to test the callback separately as a unit. Test speed is very important to me as I rerun a module's tests constantly when editing a module or test_module. I try to efficiently cover the code, including taking branches both ways, without heaps of redundancy. The search box tests use tk introspecton, but I didn't like it as it. For me, it made the tests less clear. I would rather trade space for speed and clarity by keeping named references to all python objects needed for tests. So for the moment, I prefer my implementation of the core idea. ---------- assignee: -> terry.reedy stage: -> patch review versions: +Python 3.7 -Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 03:08:10 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Fri, 07 Jul 2017 07:08:10 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1499411290.13.0.179046926116.issue30302@psf.upfronthosting.co.za> Utkarsh Upadhyay added the comment: Bump! ---- > >>> time.gmtime(1121871596)[:] > (2005, 7, 20, 14, 59, 56, 2, 201, 0) I wouldn't mind implementing `__getitem__` for timedeltas, such that this becomes possible: >> (D.fromtimestamp(1390953543.1) - D.fromtimestamp(1121871596))[:] (3114, 28747, 100000) (Though, TBH, it does feel a little weird that `time.struct_time` allows indexing). ~ ut ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 03:10:33 2017 From: report at bugs.python.org (pfreixes) Date: Fri, 07 Jul 2017 07:10:33 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499288108.18.0.207232280352.issue30861@psf.upfronthosting.co.za> Message-ID: <1499411433.06.0.624895918421.issue30861@psf.upfronthosting.co.za> pfreixes added the comment: I think that we are not in the same page, the following snippet is a nodejs client that emulates the same: var net = require('net'); var sleep = require('sleep'); var client = new net.Socket(); client.connect(6379, '127.0.0.1', function() { console.log('Connected'); sleep.sleep(10); // wait for data and RST package }); client.on('data', function(data) { console.log('Received: ' + data); }); client.on('close', function() { console.log('Connection closed'); }); The client will be able to get the data, even taking into account that the RST package has been processed by the Operating System. Meanwhile, the same behavior with asyncio is unpredictable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 03:37:15 2017 From: report at bugs.python.org (Louie Lu) Date: Fri, 07 Jul 2017 07:37:15 +0000 Subject: [issue13802] IDLE Prefernces/Fonts: use multiple alphabets in examples In-Reply-To: <1326756140.29.0.0714084996967.issue13802@psf.upfronthosting.co.za> Message-ID: <1499413035.19.0.940169595585.issue13802@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +2682 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 03:51:29 2017 From: report at bugs.python.org (Louie Lu) Date: Fri, 07 Jul 2017 07:51:29 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down Message-ID: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> New submission from Louie Lu: Add event for KeyRelease-Up and KeyRelease-Down to change sample font. Current code only changed font when using button-click on listbox. ---------- assignee: terry.reedy components: IDLE messages: 297867 nosy: louielu, terry.reedy priority: normal severity: normal status: open title: IDLE: configdialog/fonts: change font when select by key up/down versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 03:52:22 2017 From: report at bugs.python.org (Louie Lu) Date: Fri, 07 Jul 2017 07:52:22 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499413942.03.0.629392495152.issue30870@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +2683 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 04:12:17 2017 From: report at bugs.python.org (Louie Lu) Date: Fri, 07 Jul 2017 08:12:17 +0000 Subject: [issue13802] IDLE Prefernces/Fonts: use multiple alphabets in examples In-Reply-To: <1326756140.29.0.0714084996967.issue13802@psf.upfronthosting.co.za> Message-ID: <1499415137.5.0.03840330704.issue13802@psf.upfronthosting.co.za> Louie Lu added the comment: Add the string with pangram and chinese, now sample text shows: AaBbCcDdEe FfGgHhIiJjK 1234567890 #:+=(){}[] The quick brown fox jumps over the lazy dog. [1] ??????????? [2] ---------------------- [1]: https://en.wikipedia.org/wiki/The_quick_brown_fox_jumps_over_the_lazy_dog [2]: http://blog.justfont.com/2014/12/jfbook-example/ ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 04:20:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Jul 2017 08:20:28 +0000 Subject: [issue13802] IDLE Prefernces/Fonts: use multiple alphabets in examples In-Reply-To: <1326756140.29.0.0714084996967.issue13802@psf.upfronthosting.co.za> Message-ID: <1499415628.14.0.188447015001.issue13802@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are many different alphabets in the world. Why Chines but not Cyrillic or Devanagari? An example that includes all scripts would be too large (and likely most characters would not be rendered correctly with an arbitrary font). I suggest just make the box for examples editable and save entered examples in the configuration files. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 04:32:09 2017 From: report at bugs.python.org (Louie Lu) Date: Fri, 07 Jul 2017 08:32:09 +0000 Subject: [issue13802] IDLE Prefernces/Fonts: use multiple alphabets in examples In-Reply-To: <1326756140.29.0.0714084996967.issue13802@psf.upfronthosting.co.za> Message-ID: <1499416329.63.0.706219833712.issue13802@psf.upfronthosting.co.za> Louie Lu added the comment: Serhiy: Or would it be to detect the user language environment, and come up with user language example sentence? What I remember that Windows font preview will change the sentence in the different language. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 04:37:04 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Jul 2017 08:37:04 +0000 Subject: [issue30797] ./pyconfig.h:1438:0: warning: "_GNU_SOURCE" redefined [enabled by default] In-Reply-To: <1498688645.93.0.221276689872.issue30797@psf.upfronthosting.co.za> Message-ID: <1499416624.6.0.729184554372.issue30797@psf.upfronthosting.co.za> Ned Deily added the comment: One more thing: building with a recent gcc on Linux: $ gcc --version gcc (Debian 6.3.0-18) 6.3.0 20170516 also gives an "unused but set variable" warning. ./Modules/expat/xmlparse.c: In function ?gather_time_entropy?: ./Modules/expat/xmlparse.c:780:7: warning: variable ?gettimeofday_res? set but not used [-Wunused-but-set-variable] int gettimeofday_res; ^~~~~~~~~~~~~~~~ Since I didn't see it in time, I didn't try to fix this for 3.6.2 but it would be best to silence it going forward. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 05:03:04 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Jul 2017 09:03:04 +0000 Subject: [issue30714] test_ssl fails with openssl 1.1.0f In-Reply-To: <1497972401.5.0.807136343886.issue30714@psf.upfronthosting.co.za> Message-ID: <1499418184.51.0.790567255966.issue30714@psf.upfronthosting.co.za> Ned Deily added the comment: Sorry, this didn't make it in time for 3.6.2. There is still at least a couple of weeks to get it into 3.5.4 and 2.7.14. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 05:37:19 2017 From: report at bugs.python.org (Dima Tisnek) Date: Fri, 07 Jul 2017 09:37:19 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499288108.18.0.207232280352.issue30861@psf.upfronthosting.co.za> Message-ID: <1499420239.16.0.441556914865.issue30861@psf.upfronthosting.co.za> Dima Tisnek added the comment: It seems Guido sets a higher bar on the proposed change. @pfreixes, if you can show that this change is needed to implement "TCP half-closed" state (i.e. when remote calls shutdown(SHUT_WR) after it's done sending data but continues to recv(), then local is expected to read out the data, and then confirm reception and issue it's own shutdown(SHUT_WR) so that remote gets the acknowledgement), then there would be no question. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 05:42:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jul 2017 09:42:13 +0000 Subject: [issue30869] regrtest: Add .idlerc to saved_test_environment In-Reply-To: <1499397666.15.0.337246084117.issue30869@psf.upfronthosting.co.za> Message-ID: <1499420533.68.0.204926952039.issue30869@psf.upfronthosting.co.za> STINNER Victor added the comment: I dislike the idea of opening all $HOME/.idlerc/ directory and store their content in memory. If a unit test writes into $HOME, we already have an issue. Unit tests must not modify the user configuration. If an unit test is interrupted, there is a high risk of leaving the modified configuration. If idle tests need a well defined configuration, I suggest to start by modifiying idlelib.config.idleConf to use a temporary directory, or mock the whole object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 05:42:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jul 2017 09:42:57 +0000 Subject: [issue30869] regrtest: Add .idlerc to saved_test_environment In-Reply-To: <1499397666.15.0.337246084117.issue30869@psf.upfronthosting.co.za> Message-ID: <1499420577.14.0.474667700704.issue30869@psf.upfronthosting.co.za> STINNER Victor added the comment: test_site has a similar issue: bpo-30227, "test_site must not write outside the build directory: must not write into $HOME/.local/". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 05:44:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jul 2017 09:44:38 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499420678.73.0.318307815819.issue29854@psf.upfronthosting.co.za> STINNER Victor added the comment: The test fails on AMD64 FreeBSD 10.x Shared 3.x: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/551/steps/test/logs/stdio ====================================================================== FAIL: test_history_size (test.test_readline.TestReadline) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_readline.py", line 247, in test_history_size self.assertEqual(len(lines), history_size) AssertionError: 21 != 10 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 05:49:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jul 2017 09:49:48 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499420988.75.0.0161286207371.issue29854@psf.upfronthosting.co.za> STINNER Victor added the comment: Similar failure on x86 Tiger 3.x. Maybe we need to skip the test on old macOS and old FreeBSD versions? Maybe it's related to the libncurses version? http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/908/steps/test/logs/stdio ====================================================================== FAIL: test_history_size (test.test_readline.TestReadline) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_readline.py", line 247, in test_history_size self.assertEqual(len(lines), history_size) AssertionError: 21 != 10 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 06:17:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Jul 2017 10:17:42 +0000 Subject: [issue13802] IDLE Prefernces/Fonts: use multiple alphabets in examples In-Reply-To: <1326756140.29.0.0714084996967.issue13802@psf.upfronthosting.co.za> Message-ID: <1499422662.86.0.51857921235.issue13802@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think that it is worth to include in Python distribution examples for a hundred of languages. If there are some system-wide collections of examples we can use them, but this should be platform specific and not always available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 06:24:30 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 07 Jul 2017 10:24:30 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499423070.76.0.0832142004777.issue29854@psf.upfronthosting.co.za> Berker Peksag added the comment: > Similar failure on x86 Tiger 3.x. This one is interesting. I thought we don't have OS X buildbots with readline installed. I would prefer skipping the test based on readline version installed. Side note: I think we should print readline, sqlite3 etc. versions in https://github.com/python/cpython/blob/fae8f4a9cb88a68eb14750cbb8ddf8740fd67b8b/Lib/test/libregrtest/main.py#L421 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 06:49:24 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 07 Jul 2017 10:49:24 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499424564.31.0.01238170821.issue29854@psf.upfronthosting.co.za> Berker Peksag added the comment: I've opened PR 2618 to print readline version and implementation in regrtest's display_header() method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 07:54:04 2017 From: report at bugs.python.org (Nir Soffer) Date: Fri, 07 Jul 2017 11:54:04 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499428444.88.0.894902480605.issue29854@psf.upfronthosting.co.za> Nir Soffer added the comment: The failures looks like libedit failures on OS X, where history size is ignored. The test is skipped if is_editline is set, we should probably skip on these platforms too. ---------- nosy: +Nir Soffer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 08:19:23 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 07 Jul 2017 12:19:23 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499429963.57.0.0258724477344.issue30779@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Sorry about that. When I read msg297804, I thought your intention was for me to work on the PRs. I didn't see your other note until now. It will be good for me to learn from your changes. As far as mocking Save, I sort of did that (very basically) in my PR by using Func(). It wasn't covering everything because I only added it for 'main'. Do you think I should continue with that in #30868 or did you want to do it a different way? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 08:24:03 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 07 Jul 2017 12:24:03 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499430243.58.0.73396776694.issue29854@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- pull_requests: +2684 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 08:46:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jul 2017 12:46:36 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499431596.34.0.313043226587.issue29854@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2685 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 09:45:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Jul 2017 13:45:16 +0000 Subject: [issue13802] IDLE Prefernces/Fonts: use multiple alphabets in examples In-Reply-To: <1326756140.29.0.0714084996967.issue13802@psf.upfronthosting.co.za> Message-ID: <1499435116.08.0.270933531371.issue13802@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: On other hand, we can use the standard font chooser dialog. But it doesn't allow to configure the sample text at all (at least on X Window). Terry, try please the following commands on Windows: import tkinter root = tkinter.Tk() root.tk.call('tk', 'fontchooser', 'show') How it looks? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 10:07:01 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jul 2017 14:07:01 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499436421.0.0.834264129847.issue29854@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 1881befb905553618f1e7ad2cef8f6ff07e1b8ef by Victor Stinner in branch 'master': bpo-29854: test_readline logs versions (#2619) https://github.com/python/cpython/commit/1881befb905553618f1e7ad2cef8f6ff07e1b8ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 10:48:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jul 2017 14:48:35 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies Message-ID: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> New submission from STINNER Victor: While discussing how to dump the readline version in regrtest or test_readline in bpo-29854, I proposed to add a new buildbot step to dump any kinds of debug information. It would avoid to pollute test output with useless information. For example, while the hash implementation is useful for unit tests on the hash function, I dislike always dumping it in the regrtest header. The idea would be to get a phpinfo-like report: http://php.net/phpinfo We can start with an hardcoded list using "try: import xxx except ImportError: pass else: ...", but later we may it more "pluggable" somehow? Maybe define a protocol (function with a specific name, maybe a private function?) for each module, add a command which can dump info on a single module, or all modules. Maybe start with an hardcoded list of modules, but later discover automatically all stdlib modules? I don't expect a regular list of information, but more like a long key-value list. Attached pythoninfo.py is an example of such script. It works on Python 2.7-3.7. Example of Python 3.7 output on my Linux PC: --- cpu_count: 4 cwd: /home/haypo/prog/GIT/misc/python filesystem_encoding: utf-8 filesystem_errors: surrogateescape gdb_version: GNU gdb (GDB) Fedora 7.12.1-48.fc25 hash algorithm: ('siphash24', '64bit') locale_encoding: UTF-8 platform: Linux-4.11.6-201.fc25.x86_64-x86_64-with-fedora-25-Twenty_Five python_implementation: CPython readline_library_version: 6.3 readline_runtime_version: 0x603 readline_version: 0x603 sys.byteorder: little sys.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) sys.maxsize: 9223372036854775807 sys.version: 3.7.0a0 (heads/testcapi_stack_pointer_master:81dd3fb, Jul 6 2017, 13:10:36) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] tcl_version: 8.6 --- Later, we may add a JSON output format, to allow to collect informations of all buildbots. For example, check all tested readline versions. ---------- components: Tests files: pythoninfo.py messages: 297885 nosy: haypo priority: normal severity: normal status: open title: Add a "python info" command somewhere to dump versions of all dependencies type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file46994/pythoninfo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 10:52:49 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 07 Jul 2017 14:52:49 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499439169.1.0.642451359684.issue30779@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Terry, Any interest on using gitter or slack (or something like that) while trying to coordinate work between you, Louie, me, and others? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 10:53:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jul 2017 14:53:53 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499439233.56.0.0720503694053.issue29854@psf.upfronthosting.co.za> STINNER Victor added the comment: AMD64 FreeBSD 9.x 3.x, test_history_size() fails: readline version: 0x502 readline runtime version: 0x502 readline library version: '5.2' use libedit emulation? False AMD64 FreeBSD 10.x Shared 3.x, test_history_size() fails: readline version: 0x502 readline runtime version: 0x502 readline library version: '5.2' use libedit emulation? False x86 Tiger 3.x, test_history_size() fails: readline version: 0x501 readline runtime version: 0x501 readline library version: '5.1' use libedit emulation? False -- My Linux box, test_history_size() pass: readline version: 0x603 readline runtime version: 0x603 readline library version: '6.3' use libedit emulation? False ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 10:57:24 2017 From: report at bugs.python.org (Nir Soffer) Date: Fri, 07 Jul 2017 14:57:24 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1499439444.42.0.638549431678.issue30871@psf.upfronthosting.co.za> Nir Soffer added the comment: I like the idea, may be also useful in https://github.com/sosreport/sos/blob/master/sos/plugins/python.py ---------- nosy: +Nir Soffer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 11:01:15 2017 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 07 Jul 2017 15:01:15 +0000 Subject: [issue30837] Mac OS High Sierra Beta - Python Crash In-Reply-To: <1499092741.8.0.363302866556.issue30837@psf.upfronthosting.co.za> Message-ID: <1499439675.93.0.563823697246.issue30837@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I proprose closing this issue as there's too little information to reproduce the problem, the crash is using a system build of Python on a beta version of macOS and this appears to be a known issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 11:06:24 2017 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 07 Jul 2017 15:06:24 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499420239.16.0.441556914865.issue30861@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: But half closed state is already supported. On Jul 7, 2017 2:37 AM, "Dima Tisnek" wrote: > > Dima Tisnek added the comment: > > It seems Guido sets a higher bar on the proposed change. > > @pfreixes, if you can show that this change is needed to implement "TCP > half-closed" state (i.e. when remote calls shutdown(SHUT_WR) after it's > done sending data but continues to recv(), then local is expected to read > out the data, and then confirm reception and issue it's own > shutdown(SHUT_WR) so that remote gets the acknowledgement), then there > would be no question. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 11:08:18 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Jul 2017 15:08:18 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1499440098.38.0.734383988922.issue30871@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Something like the CLI of modules site, sysconfig and platform? Note that there are two versions: the version with which the interpreter is build, and the version of the dynamic library. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 11:14:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Jul 2017 15:14:13 +0000 Subject: [issue30872] Update curses docs to Python 3 Message-ID: <1499440453.75.0.308646182968.issue30872@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The curses libraries works with strings and characters. But what are strings? In different functions this means different: Unicode strings, byte strings or any. Proposed PR explains this. It also unifies the documentation of boolean arguments, and fixes some references and formatting. ---------- assignee: docs at python components: Documentation messages: 297892 nosy: docs at python, r.david.murray, serhiy.storchaka, twouters priority: normal severity: normal stage: patch review status: open title: Update curses docs to Python 3 type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 11:15:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Jul 2017 15:15:46 +0000 Subject: [issue30872] Update curses docs to Python 3 In-Reply-To: <1499440453.75.0.308646182968.issue30872@psf.upfronthosting.co.za> Message-ID: <1499440546.38.0.524615441586.issue30872@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2686 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 11:24:19 2017 From: report at bugs.python.org (David Haney) Date: Fri, 07 Jul 2017 15:24:19 +0000 Subject: [issue30183] [HPUX] compilation error in pytime.c with cc compiler In-Reply-To: <1493267090.1.0.00115311377195.issue30183@psf.upfronthosting.co.za> Message-ID: <1499441059.94.0.163871335948.issue30183@psf.upfronthosting.co.za> David Haney added the comment: I've attached the test output summary from a recent build. ---------- Added file: http://bugs.python.org/file46995/tests.out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 11:59:13 2017 From: report at bugs.python.org (pfreixes) Date: Fri, 07 Jul 2017 15:59:13 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: Message-ID: pfreixes added the comment: I would like to focus the issue as was initially described, Im still convinced that this is a buggy behaviour. As has been seen other systems such as python sync or nodejs behaves as is expected. This last one is IMHO something that can be skipped. Im wondering how curio or trio will handle this scenario. My bet is on as nodejs. El 07/07/2017 17:06, "Guido van Rossum" escribi?: > > Guido van Rossum added the comment: > > But half closed state is already supported. > > On Jul 7, 2017 2:37 AM, "Dima Tisnek" wrote: > > > > > Dima Tisnek added the comment: > > > > It seems Guido sets a higher bar on the proposed change. > > > > @pfreixes, if you can show that this change is needed to implement "TCP > > half-closed" state (i.e. when remote calls shutdown(SHUT_WR) after it's > > done sending data but continues to recv(), then local is expected to read > > out the data, and then confirm reception and issue it's own > > shutdown(SHUT_WR) so that remote gets the acknowledgement), then there > > would be no question. > > > > ---------- > > > > _______________________________________ > > Python tracker > > > > _______________________________________ > > > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 12:12:32 2017 From: report at bugs.python.org (Nir Soffer) Date: Fri, 07 Jul 2017 16:12:32 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499443952.87.0.920316635952.issue29854@psf.upfronthosting.co.za> Nir Soffer added the comment: So we have version 0x502 without libedit emulation succeeding on FreeBSD 9.x, and failing on 10.x. I think we are missing something, or maybe the libedit check is wrong. We need results from all builders to do something with this. I think at least for now we want to see readline info from all builders, not only for failed tests. Maybe switch the failing test to run only on Linux for now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 12:34:49 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 07 Jul 2017 16:34:49 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499445289.12.0.0557157163269.issue29854@psf.upfronthosting.co.za> Berker Peksag added the comment: > So we have version 0x502 without libedit emulation succeeding on > FreeBSD 9.x, and failing on 10.x. test_history_size() fails on FreeBSD 9.x too: ====================================================================== FAIL: test_history_size (test.test_readline.TestReadline) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/test_readline.py", line 263, in test_history_size self.assertEqual(len(lines), history_size) AssertionError: 21 != 10 http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/316/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 12:49:11 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 07 Jul 2017 16:49:11 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499446151.92.0.864163348582.issue29854@psf.upfronthosting.co.za> Berker Peksag added the comment: According to https://cnswww.cns.cwru.edu/php/chet/readline/CHANGES, the history-size setting was added in readline 6.0: e. A new user-settable variable, `history-size', allows setting the maximum number of entries in the history list. The only thing we need to do is skip the test if readline version is older than 6.0. We discussed this with Nir on IRC, and he will send another PR to tweak the test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 13:01:05 2017 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 07 Jul 2017 17:01:05 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: Message-ID: Guido van Rossum added the comment: IMO you haven't demonstrated a need, you are just complaining that you don't like it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 13:13:58 2017 From: report at bugs.python.org (Nir Soffer) Date: Fri, 07 Jul 2017 17:13:58 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499447638.55.0.249043110946.issue29854@psf.upfronthosting.co.za> Changes by Nir Soffer : ---------- pull_requests: +2687 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 13:52:52 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 07 Jul 2017 17:52:52 +0000 Subject: [issue30858] Keyword can't be an expression? In-Reply-To: <1499275280.43.0.372385518137.issue30858@psf.upfronthosting.co.za> Message-ID: <1499449972.85.0.212494420685.issue30858@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, I prefer the current error message and my students don't seem to have issues with it. No matter what wording we put in, someone will always find a way to misread it, in part because the "end6 + end=' '" example isn't a simple mistake, it reflects an incorrect mental model that isn't easily fixed by an error message. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 14:04:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Jul 2017 18:04:46 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1499450686.09.0.542932344548.issue30814@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 Fri Jul 7 14:14:05 2017 From: report at bugs.python.org (Joel Hillacre) Date: Fri, 07 Jul 2017 18:14:05 +0000 Subject: [issue30788] email.policy.SMTP.fold() issue for long filenames with spaces In-Reply-To: <1498593521.18.0.236128551176.issue30788@psf.upfronthosting.co.za> Message-ID: <1499451245.14.0.190656684319.issue30788@psf.upfronthosting.co.za> Changes by Joel Hillacre : ---------- pull_requests: +2688 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 14:14:58 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 07 Jul 2017 18:14:58 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499288108.18.0.207232280352.issue30861@psf.upfronthosting.co.za> Message-ID: <1499451298.6.0.245943181992.issue30861@psf.upfronthosting.co.za> Yury Selivanov added the comment: I looked at the PR and it looks good. The intent is also clear. But the idea of delaying exceptions in StreamReader read methods still feels finicky. To go forward with this we need more examples than just nodejs. And it doesn't really matter what trio and curio do, as they aren't mainstream. We need a (set of) *concrete* examples where this is needed. An analysis of how this is approached in another mainstream libraries/ecosystems like C#, Twisted, etc would also help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 14:20:23 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 07 Jul 2017 18:20:23 +0000 Subject: [issue30553] Add HTTP Response code 421 In-Reply-To: <1496407832.3.0.808781068022.issue30553@psf.upfronthosting.co.za> Message-ID: <1499451623.97.0.617544204095.issue30553@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 14:55:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Jul 2017 18:55:19 +0000 Subject: [issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t In-Reply-To: <1408140199.72.0.115939936455.issue22207@psf.upfronthosting.co.za> Message-ID: <1499453719.08.0.279036633505.issue22207@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2689 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 14:55:53 2017 From: report at bugs.python.org (Joey Harrington) Date: Fri, 07 Jul 2017 18:55:53 +0000 Subject: [issue30511] shutil.make_archive should not need to chdir (alternatively: make shutil.make_archive thread-safe) In-Reply-To: <1496151978.87.0.20600653197.issue30511@psf.upfronthosting.co.za> Message-ID: <1499453753.25.0.906994489086.issue30511@psf.upfronthosting.co.za> Joey Harrington added the comment: It would be nice if there was at least a warning in the docs that make_archive is not thread-safe, and that if you have two threads creating archives that it's extremely likely you'll get erroneous results since the race condition lasts for the entire duration of the archive creation. ---------- nosy: +Joey Harrington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 14:57:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Jul 2017 18:57:19 +0000 Subject: [issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t In-Reply-To: <1408140199.72.0.115939936455.issue22207@psf.upfronthosting.co.za> Message-ID: <1499453839.56.0.558107461973.issue22207@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I extracted the cases that really can happen in PR 2623. ---------- assignee: -> serhiy.storchaka resolution: fixed -> stage: resolved -> status: closed -> open versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 15:18:05 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Fri, 07 Jul 2017 19:18:05 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1499455085.66.0.616518621783.issue27099@psf.upfronthosting.co.za> Charles Wohlganger added the comment: Progress Update: I've moved all of the basic functionality of the extensions into the regular parts of IDLE, including menus and keyboard shortcuts. parenmatch and codecontext have all of their settings now in the Highlighting settings tab. I have added theme elements for both, as that was both easier and more in-line with what the rest of the IDLE settings were doing than trying to have a separate color-picker for them. The attached image is what it looks like. What is left for me to do: add the configuration dialogs and proper setting saving for the remaining extensions/modules. Change help texts. Once the configdialog changes patch (#30779) goes through, I will of course, need to fix anything both touch, but that shouldn't be too difficult. ---------- nosy: +wohlganger Added file: http://bugs.python.org/file46996/2017-07-07 13_58_45-Settings.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 15:23:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Jul 2017 19:23:13 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1499455393.65.0.894432496038.issue30296@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2690 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 15:23:18 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Fri, 07 Jul 2017 19:23:18 +0000 Subject: [issue30809] IDLE parenmatch - highlighting options In-Reply-To: <1498768567.92.0.13204753323.issue30809@psf.upfronthosting.co.za> Message-ID: <1499455398.2.0.978201036857.issue30809@psf.upfronthosting.co.za> Charles Wohlganger added the comment: I've rolled pretty much all this was going to do, other than underlining and font work into #27099. Trying to bring parenmatch into main otherwise would have been just as much of a hassle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 15:26:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Jul 2017 19:26:10 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1499455570.73.0.0375754366998.issue30296@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since some changes looks worse than the old code to me (see my comments on GitHub), I have created PR 2624 which reverts changes with which I disagree or applies alternate changes. ---------- resolution: fixed -> stage: resolved -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 15:33:45 2017 From: report at bugs.python.org (pfreixes) Date: Fri, 07 Jul 2017 19:33:45 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499451298.6.0.245943181992.issue30861@psf.upfronthosting.co.za> Message-ID: pfreixes added the comment: fair enough. I'm out with few chances to grab a computer. I'll be back in a week with more information. El 07/07/2017 20:14, "Yury Selivanov" escribi?: > > Yury Selivanov added the comment: > > I looked at the PR and it looks good. The intent is also clear. But the > idea of delaying exceptions in StreamReader read methods still feels > finicky. > > To go forward with this we need more examples than just nodejs. And it > doesn't really matter what trio and curio do, as they aren't mainstream. We > need a (set of) *concrete* examples where this is needed. > > An analysis of how this is approached in another mainstream > libraries/ecosystems like C#, Twisted, etc would also help. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 16:00:59 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 20:00:59 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499457659.87.0.78206754008.issue30779@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 349abd9e37dfdc077bc21f19e6ed2292c767f0e8 by terryjreedy in branch 'master': bpo-30779: IDLE -- Factor ConfigChanges class from configdialog, put in config; test. (#2612) https://github.com/python/cpython/commit/349abd9e37dfdc077bc21f19e6ed2292c767f0e8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 16:07:28 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 20:07:28 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499458048.22.0.825586953203.issue30779@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2691 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 16:37:41 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 20:37:41 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499459861.16.0.10710420851.issue30779@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset edc034221f878b437748cef0f05c782d8190499d by terryjreedy in branch '3.6': [3.6] bpo-30779: IDLE -- Factor ConfigChanges class from configdialog, put in config; test. (GH-2612) (#2625) https://github.com/python/cpython/commit/edc034221f878b437748cef0f05c782d8190499d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 16:57:50 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Jul 2017 20:57:50 +0000 Subject: [issue30837] Mac OS High Sierra Beta - Python Crash In-Reply-To: <1499092741.8.0.363302866556.issue30837@psf.upfronthosting.co.za> Message-ID: <1499461070.07.0.151513741243.issue30837@psf.upfronthosting.co.za> Ned Deily added the comment: I agree with Ronald. Feel free to reopen if a reproducible test case can be supplied and duplicated with, say, a python.org Python. We still may not be able to do much about it other than suggest avoiding the proxy lookup. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 17:01:54 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 07 Jul 2017 21:01:54 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1499461314.04.0.778562550602.issue30296@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Why do you think that adding an unnecessary list comprehension around tuple() call makes them better? Also, I don't think you should be able to override and revert all the judgments I made when carefully reviewing all the OP's PR. You are NOT the sole arbiter of what goes into Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 17:29:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Jul 2017 21:29:55 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1499462995.66.0.89482311294.issue30296@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Why do you think that adding an unnecessary list comprehension around tuple() call makes them better? I just restore the original code because I don't think the changes make it better. > Also, I don't think you should be able to override and revert all the judgments I made when carefully reviewing all the OP's PR. You are NOT the sole arbiter of what goes into Python. You asked my review and vetoing, and assigned this issue to me. I started reviewing, but when I finished it I found that the PR already is merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 17:39:06 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 21:39:06 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499463546.02.0.838265101734.issue30779@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Cheryl, thank you for reviewing. I am answering the question about #30868 on that issue. I did not want to immediately test user parser Save() calls in the .save_all test for two reasons. 1. I want to first reconsider the general question what to do about Save in the new issue. 2. The only specification for .save_all calls to .Save is the code itself, and I am not convinced it is correct. I want to review before semi-freezing the code by testing that it does what it does. Even if it is correct, it will will be tricky to test all paths. For instance, save_all unconditionally call usermain.Save before looking at changes. Then, if changes has changes for usermain, usermain.Save is called again. To test that there are two saves, Func could easily be changed to increment .called instead of setting it to 1. My guess for the double save is that ConfigDialog *might* write some changes directly to userCfg, so the unconditional save makes sure they are written. But why bypass? If the dialog is cancelled, the 'unconditional' save will not happen, and any directly written changes might affect the current session, but might never be saved to disk. That would seem like a bug. I have similar questions about the unconditional save of highlights and keys. If all three files are always overwritten, why not push any changes to userCfg and then write all three without bothering about keeping check if there are additional changes? I am leaving this until I/we have reviewed configdialog while writing tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 18:15:16 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 22:15:16 +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: <1499465716.2.0.857994679849.issue8231@psf.upfronthosting.co.za> Terry J. Reedy added the comment: > GetUserCfgDir() is called in three places, (buried in one of Mark's posts). On the fact of it, this seems like something that should be fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 18:18:40 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 22:18:40 +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: <1499465920.39.0.891943550584.issue8231@psf.upfronthosting.co.za> Terry J. Reedy added the comment: My second patch did fix that. I think I will extract that part immediately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 18:59:06 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 07 Jul 2017 22:59:06 +0000 Subject: [issue30851] IDLE: configdialog -- fix tkinter Variables In-Reply-To: <1499217939.06.0.00487588238252.issue30851@psf.upfronthosting.co.za> Message-ID: <1499468346.68.0.404155467072.issue30851@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +2692 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 19:00:02 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 07 Jul 2017 23:00:02 +0000 Subject: [issue30851] IDLE: configdialog -- fix tkinter Variables In-Reply-To: <1499217939.06.0.00487588238252.issue30851@psf.upfronthosting.co.za> Message-ID: <1499468402.06.0.849549987813.issue30851@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Created the pull request so it's ready once the tests are available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 19:10:49 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 23:10:49 +0000 Subject: [issue30869] regrtest: Add .idlerc to saved_test_environment In-Reply-To: <1499397666.15.0.337246084117.issue30869@psf.upfronthosting.co.za> Message-ID: <1499469049.02.0.240493703855.issue30869@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The current tests do not write anything. But IDLE currently requires the existence of .idlerc to run, and tries to write it if not found. Changing this requirement without disabling multiple features would not be trivial. On possibility might be to replace builtin open with a wrapper that returned named StringIO objects when the path began with '.idlerc/'. The StringIO would have to be cached so that closing and reopening the same path got the same object. But this is only good for one process. See below. There are two existing issues, #8231 and #15862, about HOME not being writable and not existing. The first has a patch I wrote 2 years ago trying to do what you suggest above. It used tempfile.mkdtemp for 2.7 compatibility, by I would now use TemporaryDirectory. The discussion ended at that time with some unresolved issues. One in particular is that IDLE runs with two processes, with the user execution process being based on run.py. One of the idlelib modules imported by run eventually imports config. See msg253681 and msg253714. The is already a mechanism for test_idle to tell idlelib module 'testing'. If and when #8231 is solved, that mechanism could be used to ignore $HOME. ---------- dependencies: +IDLE: startup problem when HOME does not exist, Unable to run IDLE without write-access to home directory _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 20:03:16 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 00:03:16 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499472196.07.0.516188470804.issue30779@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 Fri Jul 7 20:04:09 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 00:04:09 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1499472249.24.0.654998729368.issue27099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 30779 was merged and backported today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 20:19:11 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 00:19:11 +0000 Subject: [issue30821] unittest.mock.Mocks with specs aren't aware of default arguments In-Reply-To: <1498842809.59.0.716482523297.issue30821@psf.upfronthosting.co.za> Message-ID: <1499473151.76.0.34222991276.issue30821@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 20:48:52 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 00:48:52 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499474932.82.0.193691261766.issue30779@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2693 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 20:49:40 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 00:49:40 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499474980.43.0.123630448536.issue30779@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 24f2e19d68cc6ca563d2be5944d11d5f55a46918 by terryjreedy in branch 'master': bpo-30779: News (#2627) https://github.com/python/cpython/commit/24f2e19d68cc6ca563d2be5944d11d5f55a46918 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 21:13:55 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 01:13: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: <1499476435.57.0.610184893881.issue8231@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2694 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 21:20:31 2017 From: report at bugs.python.org (ppperry) Date: Sat, 08 Jul 2017 01:20:31 +0000 Subject: [issue13220] print function unable while multiprocessing.Process is being run In-Reply-To: <1319038082.58.0.169311394229.issue13220@psf.upfronthosting.co.za> Message-ID: <1499476831.19.0.471907023306.issue13220@psf.upfronthosting.co.za> ppperry added the comment: Duplicate of issue11820. ---------- nosy: +ppperry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 21:58:23 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 01:58:23 +0000 Subject: [issue13220] print function unable while multiprocessing.Process is being run In-Reply-To: <1319038082.58.0.169311394229.issue13220@psf.upfronthosting.co.za> Message-ID: <1499479103.13.0.865114551867.issue13220@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> idle3 shell os.system swallows shell command output _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 21:59:04 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 01:59:04 +0000 Subject: [issue11820] idle3 shell os.system swallows shell command output In-Reply-To: <1302421540.99.0.957938249964.issue11820@psf.upfronthosting.co.za> Message-ID: <1499479144.39.0.502165764245.issue11820@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Closed #13220 as duplicate of this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 22:13:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 02:13:48 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499480028.3.0.394805416901.issue30779@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2695 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 22:17:01 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 02:17:01 +0000 Subject: [issue30823] os.startfile("") craches Python 2.7, 3.4 in Windows 7 32 bit in ConEmu 161002 [32] In-Reply-To: <1498930979.02.0.689634433232.issue30823@psf.upfronthosting.co.za> Message-ID: <1499480221.11.0.25784458028.issue30823@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 22:26:13 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 02:26:13 +0000 Subject: [issue30825] csv.Sniffer does not detect lineterminator In-Reply-To: <1498944224.71.0.636990812421.issue30825@psf.upfronthosting.co.za> Message-ID: <1499480773.71.0.450729855815.issue30825@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 22:26:55 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 02:26:55 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499480815.19.0.971934990427.issue30779@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 9d8abf31c430dd83d073660cc92f1fe4ca6f2cd4 by terryjreedy in branch '3.6': [3.6] bpo-30779: News (GH-2627) (#2630) https://github.com/python/cpython/commit/9d8abf31c430dd83d073660cc92f1fe4ca6f2cd4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 22:28:08 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 02:28:08 +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: <1499480888.24.0.531702615315.issue8231@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 223c7e70e48eb6eed4aab3906fbe32b098faafe3 by terryjreedy in branch 'master': bpo-8231: Call idlelib.IdleConf.GetUserCfgDir only once. (#2629) https://github.com/python/cpython/commit/223c7e70e48eb6eed4aab3906fbe32b098faafe3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 22:29:24 2017 From: report at bugs.python.org (ppperry) Date: Sat, 08 Jul 2017 02:29:24 +0000 Subject: [issue30873] `SystemError: returned NULL without setting an error` from imp.create_builtin Message-ID: <1499480964.67.0.223894670164.issue30873@psf.upfronthosting.co.za> New submission from ppperry: The following rather long code, reduced from the same example as issue30626, produces a SystemError: import builtins from importlib.machinery import PathFinder import importlib import sys import _imp from functools import partial def copy_module(module): new = type(sys)(module.__name__) new.__dict__.update(module.__dict__) return new _absent = object() def new_exec(code, globals=_absent, locals=_absent, *, new_builtins): if globals == _absent: frame = sys._getframe(2) globals = frame.f_globals locals = frame.f_locals elif locals == _absent: locals = globals globals.setdefault("__builtins__", new_builtins); return exec(code, globals, locals) dct={} dct["__builtins__"] = b = copy_module(builtins) b.exec = partial(new_exec, new_builtins=b) spec = PathFinder.find_spec("_bootstrap",importlib.__path__) source_bootstrap = type(sys)("_bootstrap"); spec.loader.exec_module(source_bootstrap); external_spec = PathFinder.find_spec("_bootstrap_external",importlib.__path__) source_bootstrap_external = type(sys)("_bootstrap_external"); external_spec.loader.exec_module(source_bootstrap_external); source_bootstrap.__name__ = "importlib._bootstrap"; source_bootstrap_external.__name__ = "importlib._bootstrap_external"; new_sys = copy_module(sys) new_sys.path_importer_cache = {} new_sys.path_hooks = [] new_sys.meta_path = [] new_sys.modules = { "importlib._bootstrap":source_bootstrap, "importlib._bootstrap_external":source_bootstrap_external, } for mod in new_sys.modules.values(): mod.__builtins__ = b b.__import__ = source_bootstrap.__import__ source_bootstrap._install(new_sys,_imp) exec("import _pickle", dct) ---------- components: Interpreter Core, Library (Lib) messages: 297924 nosy: brett.cannon, eric.snow, ncoghlan, ppperry priority: normal severity: normal status: open title: `SystemError: returned NULL without setting an error` from imp.create_builtin type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 22:29:26 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 02:29:26 +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: <1499480966.95.0.662185048374.issue8231@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2696 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 22:31:09 2017 From: report at bugs.python.org (ppperry) Date: Sat, 08 Jul 2017 02:31:09 +0000 Subject: [issue30873] `SystemError: returned NULL without setting an error` from importing _pickle In-Reply-To: <1499480964.67.0.223894670164.issue30873@psf.upfronthosting.co.za> Message-ID: <1499481069.35.0.916618201374.issue30873@psf.upfronthosting.co.za> Changes by ppperry : ---------- title: `SystemError: returned NULL without setting an error` from imp.create_builtin -> `SystemError: returned NULL without setting an error` from importing _pickle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 22:47:20 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 02:47:20 +0000 Subject: [issue30826] More details in reference 'Looping through a list in Python and modifying it' In-Reply-To: <1498969328.51.0.74139016573.issue30826@psf.upfronthosting.co.za> Message-ID: <1499482040.41.0.573478796257.issue30826@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Are you looking for something like: Let it = iter(words). When next(it) returns 'defenestrate', insertion at the beginning moves the original 'defenestrate' over so that next(words) returns 'defenestrate' again. ? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 22:47:39 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 02:47:39 +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: <1499482059.79.0.322493558344.issue8231@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 552f26680d3806df7c27dd7161fd7d57ac815f78 by terryjreedy in branch '3.6': [3.6] bpo-8231: Call idlelib.IdleConf.GetUserCfgDir only once. (GH-2629) (#2631) https://github.com/python/cpython/commit/552f26680d3806df7c27dd7161fd7d57ac815f78 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 23:00:08 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 03:00:08 +0000 Subject: [issue30841] A shadowing variable naming emitted for Python-ast.c In-Reply-To: <1499109660.71.0.721864284128.issue30841@psf.upfronthosting.co.za> Message-ID: <1499482808.22.0.852610285387.issue30841@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +benjamin.peterson, brett.cannon, ncoghlan, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 23:02:54 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 03:02:54 +0000 Subject: [issue30856] unittest.TestResult.addSubTest should be called immediately after subtest finishes In-Reply-To: <1499262996.04.0.921631870961.issue30856@psf.upfronthosting.co.za> Message-ID: <1499482974.2.0.691757287478.issue30856@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +ezio.melotti, michael.foord, rbcollins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 23:03:49 2017 From: report at bugs.python.org (Alessandro Cannini) Date: Sat, 08 Jul 2017 03:03:49 +0000 Subject: [issue30874] unittest execute tests twice in some conditions Message-ID: <1499483029.13.0.269254590088.issue30874@psf.upfronthosting.co.za> New submission from Alessandro Cannini: Unittest execute the tests twice in some conditions. You can see the log here: https://travis-ci.org/ale5000-git/test/builds/251382617 based on this code: https://github.com/ale5000-git/test/tree/7a64f24a8bfea0579e30346ba993744272aa9c36 The code to load tests is this: def custom_test_suite(): import unittest return unittest.TestLoader().discover("tests", pattern="*_test.py") ---------- messages: 297927 nosy: Alessandro Cannini priority: normal severity: normal status: open title: unittest execute tests twice in some conditions type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 23:07:40 2017 From: report at bugs.python.org (john Forgue) Date: Sat, 08 Jul 2017 03:07:40 +0000 Subject: [issue30875] round(number[, digits]) does not return value with >12 decimal places Message-ID: <1499483260.9.0.266536317438.issue30875@psf.upfronthosting.co.za> New submission from john Forgue: I have a sensor that returns float with 15 decimal places. Using "round(number[, digits])" in a program I get no rounding Using the same command in the terminal interpreter it returns ... (3 periods) then hangs requiring ^C to continue. I'm using Python 3.4.2 on RasPi Jessie. ---------- components: Library (Lib) messages: 297928 nosy: john Forgue priority: normal severity: normal status: open title: round(number[, digits]) does not return value with >12 decimal places versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 23:11:12 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 03:11:12 +0000 Subject: [issue30859] Can't install Python for Windows 3.6.1 on multiple profiles In-Reply-To: <1499282595.77.0.384129179383.issue30859@psf.upfronthosting.co.za> Message-ID: <1499483472.21.0.95103806775.issue30859@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 23:30:08 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 08 Jul 2017 03:30:08 +0000 Subject: [issue30875] round(number[, digits]) does not return value with >12 decimal places In-Reply-To: <1499483260.9.0.266536317438.issue30875@psf.upfronthosting.co.za> Message-ID: <1499484608.03.0.401085146923.issue30875@psf.upfronthosting.co.za> Steven D'Aprano added the comment: > Using "round(number[, digits])" in a program I get no rounding It works for me. Can you show an example of it not working? py> round(1.23456789012345, 3) 1.235 > Using the same command in the terminal interpreter it returns > ... (3 periods) then hangs requiring ^C to continue. That sounds like the interactive interpreter is waiting for a closing parenthesis (round bracket). It will sit and wait forever for you to finish typing the command. If you hit ENTER, you'll just get another prompt. py> round(1.23456789012345, 3 ... ... ... ) 1.235 If this does not explain what you are seeing, you will have to give us more information, including examples of the failures and instructions for how to replicate the failure. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 00:51:39 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 08 Jul 2017 04:51:39 +0000 Subject: [issue30745] Warnings in Modules/_winapi.c In-Reply-To: <1498299239.67.0.774522890033.issue30745@psf.upfronthosting.co.za> Message-ID: <1499489499.09.0.510572320916.issue30745@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset d1d65015fca44b8d1f0b1df78694310270f03a6d by Ned Deily (Serhiy Storchaka) in branch '3.6': [3.6] bpo-30745: Fix compiler warnings introduced in bpo-30730. (GH-2376) (#2378) https://github.com/python/cpython/commit/d1d65015fca44b8d1f0b1df78694310270f03a6d ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 00:51:39 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 08 Jul 2017 04:51:39 +0000 Subject: [issue30797] ./pyconfig.h:1438:0: warning: "_GNU_SOURCE" redefined [enabled by default] In-Reply-To: <1498688645.93.0.221276689872.issue30797@psf.upfronthosting.co.za> Message-ID: <1499489499.41.0.39930953407.issue30797@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset bdabd7666032ce356d550da21c35e4bee5b3448c by Ned Deily in branch '3.6': bpo-30797, bpo-30694: Avoid _GNU_SOURCE redefined warning in xmlparse.c (#2615) https://github.com/python/cpython/commit/bdabd7666032ce356d550da21c35e4bee5b3448c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 00:51:39 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 08 Jul 2017 04:51:39 +0000 Subject: [issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472) In-Reply-To: <1487345979.72.0.358826213221.issue29591@psf.upfronthosting.co.za> Message-ID: <1499489499.68.0.829295392619.issue29591@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 5777e79ecbd1f2adf36456e09f210608ee221691 by Ned Deily (Victor Stinner) in branch '3.6': [3.6] bpo-30726: PCbuild _elementtree: remove duplicate defines (#2348) (#2349) https://github.com/python/cpython/commit/5777e79ecbd1f2adf36456e09f210608ee221691 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 00:51:40 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 08 Jul 2017 04:51:40 +0000 Subject: [issue30694] Update embedded copy of expat to 2.2.1 In-Reply-To: <1497754887.58.0.724129384272.issue30694@psf.upfronthosting.co.za> Message-ID: <1499489500.08.0.871341464515.issue30694@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset ea1ab803ddc14ab02ffed50ecc5089897f259623 by Ned Deily (Victor Stinner) in branch '3.6': bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300) (#2313) https://github.com/python/cpython/commit/ea1ab803ddc14ab02ffed50ecc5089897f259623 New changeset bdabd7666032ce356d550da21c35e4bee5b3448c by Ned Deily in branch '3.6': bpo-30797, bpo-30694: Avoid _GNU_SOURCE redefined warning in xmlparse.c (#2615) https://github.com/python/cpython/commit/bdabd7666032ce356d550da21c35e4bee5b3448c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 00:51:40 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 08 Jul 2017 04:51:40 +0000 Subject: [issue30704] test_free_different_thread() of test_code leaks references on Python 3.6 In-Reply-To: <1497886091.03.0.481986477889.issue30704@psf.upfronthosting.co.za> Message-ID: <1499489500.22.0.477422227646.issue30704@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset c794b643c9172d69afa46f85982befd82511d9df by Ned Deily (Victor Stinner) in branch '3.6': bpo-30704, bpo-30604: Fix memleak in code_dealloc() (#2455) (#2456) https://github.com/python/cpython/commit/c794b643c9172d69afa46f85982befd82511d9df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 00:51:40 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 08 Jul 2017 04:51:40 +0000 Subject: [issue30687] build.bat should locate msbuild.exe rather than vcvarsall.bat In-Reply-To: <1497650629.64.0.20299274819.issue30687@psf.upfronthosting.co.za> Message-ID: <1499489500.55.0.393395571297.issue30687@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 00134f64d982561750f57f1a0bb7bb073f9f237c by Ned Deily (Steve Dower) in branch '3.6': bpo-30687: Fixes build scripts to find msbuild.exe and stop relying on vcvarsall.bat (#2252) (#2280) https://github.com/python/cpython/commit/00134f64d982561750f57f1a0bb7bb073f9f237c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 00:51:40 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 08 Jul 2017 04:51:40 +0000 Subject: [issue30730] [security] Injecting environment variable in subprocess on Windows In-Reply-To: <1498118820.13.0.596038385019.issue30730@psf.upfronthosting.co.za> Message-ID: <1499489500.79.0.271437009141.issue30730@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset a9b16cff35811f88cdfeb4f50758140dfff36ebc by Ned Deily (Serhiy Storchaka) in branch '3.6': [3.6] bpo-30730: Prevent environment variables injection in subprocess on Windows. (GH-2325) (#2360) https://github.com/python/cpython/commit/a9b16cff35811f88cdfeb4f50758140dfff36ebc New changeset d1d65015fca44b8d1f0b1df78694310270f03a6d by Ned Deily (Serhiy Storchaka) in branch '3.6': [3.6] bpo-30745: Fix compiler warnings introduced in bpo-30730. (GH-2376) (#2378) https://github.com/python/cpython/commit/d1d65015fca44b8d1f0b1df78694310270f03a6d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 00:51:41 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 08 Jul 2017 04:51:41 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499489501.11.0.00936634797987.issue30726@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 5777e79ecbd1f2adf36456e09f210608ee221691 by Ned Deily (Victor Stinner) in branch '3.6': [3.6] bpo-30726: PCbuild _elementtree: remove duplicate defines (#2348) (#2349) https://github.com/python/cpython/commit/5777e79ecbd1f2adf36456e09f210608ee221691 New changeset b6012f982fabed6029d7e2db2a509a8b28b4f6e1 by Ned Deily (Segev Finer) in branch '3.6': [3.6] bpo-30726: Also fix pyexpat.vcxproj (GH-2375) (#2570) https://github.com/python/cpython/commit/b6012f982fabed6029d7e2db2a509a8b28b4f6e1 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 00:51:41 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 08 Jul 2017 04:51:41 +0000 Subject: [issue30604] co_extra_freefuncs is stored thread locally and can lead to crashes In-Reply-To: <1496957823.48.0.898285168896.issue30604@psf.upfronthosting.co.za> Message-ID: <1499489501.23.0.875189962209.issue30604@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset c794b643c9172d69afa46f85982befd82511d9df by Ned Deily (Victor Stinner) in branch '3.6': bpo-30704, bpo-30604: Fix memleak in code_dealloc() (#2455) (#2456) https://github.com/python/cpython/commit/c794b643c9172d69afa46f85982befd82511d9df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 00:51:41 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 08 Jul 2017 04:51:41 +0000 Subject: [issue30500] [security] urllib connects to a wrong host In-Reply-To: <1496030652.64.0.90102082916.issue30500@psf.upfronthosting.co.za> Message-ID: <1499489501.44.0.375395204982.issue30500@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset b0fba8874a4bd6bf4773e6efdbd8fa762e9f05bd by Ned Deily (Victor Stinner) in branch '3.6': bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) (#2289) https://github.com/python/cpython/commit/b0fba8874a4bd6bf4773e6efdbd8fa762e9f05bd ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 01:07:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Jul 2017 05:07:16 +0000 Subject: [issue30876] SystemError on import Message-ID: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: It is possible to get SystemError on import (see attached archive). $ ./python -c 'import package.module1' Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/package/module1.py", line 3, in from . import module2 SystemError: Parent module 'package' not loaded, cannot perform relative import SystemError means a programming error in interpreter core or extension. It is comparable to an assert in C code, but without immediate crashing. Since this situation can be provoked by user code, it should be replaced with other exception (KeyError, RuntimeError, ImportError, etc). ---------- components: Interpreter Core files: import-systemerror.zip messages: 297940 nosy: brett.cannon, eric.snow, ncoghlan, serhiy.storchaka priority: normal severity: normal status: open title: SystemError on import type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file46997/import-systemerror.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 01:21:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Jul 2017 05:21:16 +0000 Subject: [issue30873] `SystemError: returned NULL without setting an error` from importing _pickle In-Reply-To: <1499480964.67.0.223894670164.issue30873@psf.upfronthosting.co.za> Message-ID: <1499491276.64.0.727272894646.issue30873@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 01:33:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Jul 2017 05:33:08 +0000 Subject: [issue30873] `SystemError: returned NULL without setting an error` from importing _pickle In-Reply-To: <1499480964.67.0.223894670164.issue30873@psf.upfronthosting.co.za> Message-ID: <1499491988.23.0.34851339456.issue30873@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I get the following error on 3.7: $ ./python issue30873.py Traceback (most recent call last): File "issue30873.py", line 44, in exec("import _pickle", dct) File "", line 1, in File "/home/serhiy/py/cpython/Lib/importlib/_bootstrap.py", line 1059, in __import__ module = _gcd_import(name) File "/home/serhiy/py/cpython/Lib/importlib/_bootstrap.py", line 986, in _gcd_import return _find_and_load(name, _gcd_import) File "/home/serhiy/py/cpython/Lib/importlib/_bootstrap.py", line 963, in _find_and_load return _find_and_load_unlocked(name, import_) File "/home/serhiy/py/cpython/Lib/importlib/_bootstrap.py", line 948, in _find_and_load_unlocked raise ModuleNotFoundError(_ERR_MSG.format(name), name=name) ModuleNotFoundError: No module named '_pickle' On 3.6: $ ./python issue30873.py Traceback (most recent call last): File "issue30873.py", line 44, in exec("import _pickle", dct) File "", line 1, in File "/home/serhiy/py/cpython3.6/Lib/importlib/_bootstrap.py", line 1059, in __import__ module = _gcd_import(name) File "/home/serhiy/py/cpython3.6/Lib/importlib/_bootstrap.py", line 986, in _gcd_import return _find_and_load(name, _gcd_import) File "/home/serhiy/py/cpython3.6/Lib/importlib/_bootstrap.py", line 963, in _find_and_load return _find_and_load_unlocked(name, import_) File "/home/serhiy/py/cpython3.6/Lib/importlib/_bootstrap.py", line 950, in _find_and_load_unlocked module = _load_unlocked(spec) File "/home/serhiy/py/cpython3.6/Lib/importlib/_bootstrap.py", line 648, in _load_unlocked module = module_from_spec(spec) File "/home/serhiy/py/cpython3.6/Lib/importlib/_bootstrap.py", line 560, in module_from_spec module = spec.loader.create_module(spec) File "", line 922, in create_module File "/home/serhiy/py/cpython3.6/Lib/importlib/_bootstrap.py", line 205, in _call_with_frames_removed return f(*args, **kwds) KeyError: 'copyreg' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 02:14:28 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Jul 2017 06:14:28 +0000 Subject: [issue30876] SystemError on import In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499494468.26.0.0808942765175.issue30876@psf.upfronthosting.co.za> Nick Coghlan added the comment: I don't think we're that strict with SystemError - once folks are messing about with deleting things from the sys module, they *are* writing their own system level code, and may end up provoking SystemError if they corrupt the interpreter state in the process. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 02:19:30 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Jul 2017 06:19:30 +0000 Subject: [issue30876] SystemError on import In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499494770.07.0.336986777327.issue30876@psf.upfronthosting.co.za> Nick Coghlan added the comment: To summarise what the attached source archive is doing, module1.py is essentially: import sys del sys.modules(__package__) from . import module2 So the only way to trigger this is by corrupting the import state, which seems like an appropriate use of SystemError to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 02:28:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Jul 2017 06:28:16 +0000 Subject: [issue30876] SystemError on import In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499495296.76.0.63693011997.issue30876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't know other way to provoke SystemError by Python code. Always if SystemError was leaked this considered a bug and was fixed. When unload package you need to remove its name and names of its submodules from sys.modules. This is a common case. If the submodule is imported at the same time in other thread you can get SystemError (randomly, with very small probability). I think that if the error can't be avoided, SystemError is a wrong exception for this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 02:48:08 2017 From: report at bugs.python.org (PilatFirst) Date: Sat, 08 Jul 2017 06:48:08 +0000 Subject: [issue30877] possibe typo in json/scanner.py Message-ID: <1499496488.53.0.464628157168.issue30877@psf.upfronthosting.co.za> New submission from PilatFirst: Should "py_make_scanner" return "scan_once" function rather than "_scan_once"? ---------- components: Library (Lib) messages: 297945 nosy: PilatFirst priority: normal severity: normal status: open title: possibe typo in json/scanner.py type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 02:48:37 2017 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Jul 2017 06:48:37 +0000 Subject: [issue30877] possibe typo in json/scanner.py In-Reply-To: <1499496488.53.0.464628157168.issue30877@psf.upfronthosting.co.za> Message-ID: <1499496517.27.0.560595418341.issue30877@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +2697 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 03:00:06 2017 From: report at bugs.python.org (Kay Hayen) Date: Sat, 08 Jul 2017 07:00:06 +0000 Subject: [issue30878] The staticmethod doesn't properly reject keyword arguments Message-ID: <1499497206.26.0.40333592604.issue30878@psf.upfronthosting.co.za> New submission from Kay Hayen: Check out this: python3.6 -c "staticmethod(function=1)" Traceback (most recent call last): File "", line 1, in TypeError: staticmethod expected 1 arguments, got 0 python3.6 -c "staticmethod()" Traceback (most recent call last): File "", line 1, in TypeError: staticmethod expected 1 arguments, got 0 python3.6 -c "staticmethod(f=1)" Traceback (most recent call last): File "", line 1, in TypeError: staticmethod expected 1 arguments, got 0 I believe Python 2.7 behaves the same. What should happen is more like this: python3.6 -c "range(f=1)" Traceback (most recent call last): File "", line 1, in TypeError: range() does not take keyword arguments While statically optimizing, I came across this as a first. At least "classmethod" behaves the same. I suppose it is because these are not intended for manual use anymore. I would recommend to fix up the argument parsing to either indicate its rejection of keyword arguments, or to accept "function = " for input (preferred). Thanks, Kay Hayen ---------- components: Interpreter Core messages: 297946 nosy: kayhayen priority: normal severity: normal status: open title: The staticmethod doesn't properly reject keyword arguments versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 03:19:28 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Jul 2017 07:19:28 +0000 Subject: [issue30876] SystemError on import In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499498368.06.0.664954561474.issue30876@psf.upfronthosting.co.za> Nick Coghlan added the comment: If there are intermittent concurrent problems associated with this behaviour, I think that may be a sign that the current management of the per-module import locks is inadequate, since it isn't adequately accounting for direct manipulation of sys.modules in user code. Fully resolving that would probably mean ensuring that: 1. For submodule imports, we always acquire the parent module locks in a consistent order, and then hang onto them until the submodule import is complete rather than letting them go as soon as the parent module import is complete 2. We move the current sys.modules to sys._modules, and make sys.modules a proxy mapping that acquires the relevant import locks in the same consistent order for set and delete operations before mutating sys._modules If we did that, then we should consistently get one of the following two orders: 1. Thread A imports package, package.module1, package.module2; Thread B then unloads (and maybe reloads) package; or 2. Thread B then unloads (and maybe reloads) package; Thread A imports package, package.module1, package.module2 By contrast, at the moment there's a window where the following can happen: - Thread A finishes importing "package" and starts importing "package.module1" - Thread B unloads "package" - Thread A hits SystemError through no fault of its own when it hits the "from . import module2" line That said, formulating the problem that way does suggest another potential resolution: in this scenario, we could treat "from . import module2" *exactly* the same way we would handle "import package.module2", which would be to just import "package" again, rather than complaining that it "should" already be imported. In addition to being vastly simpler to implement, that approach would have the virtue of also fixing the "del sys.modules(__package__)" case, not just the potential race condition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 03:32:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Jul 2017 07:32:21 +0000 Subject: [issue30878] The staticmethod doesn't properly reject keyword arguments In-Reply-To: <1499497206.26.0.40333592604.issue30878@psf.upfronthosting.co.za> Message-ID: <1499499141.16.0.0394086481224.issue30878@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is similar to recently fixed issue30534 and issue30627. The solution is simple as for issue30627. ---------- keywords: +easy (C) nosy: +SylvainDe, serhiy.storchaka stage: -> needs patch type: -> enhancement versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 03:39:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Jul 2017 07:39:09 +0000 Subject: [issue30877] possibe typo in json/scanner.py In-Reply-To: <1499496488.53.0.464628157168.issue30877@psf.upfronthosting.co.za> Message-ID: <1499499549.87.0.613700548112.issue30877@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good catch c-fos! The scan_once() wrapper was introduced in issue7451, but py_make_scanner() still returns unwrapped _scan_once(). Is it possible to write a test that catches this bug? ---------- nosy: +pitrou, serhiy.storchaka stage: -> patch review versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 03:48:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Jul 2017 07:48:19 +0000 Subject: [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1499500099.68.0.630038372284.issue10438@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 04:00:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Jul 2017 08:00:38 +0000 Subject: [issue26528] NameError for built in function open when re-raising stored exception from yielded function In-Reply-To: <1457611797.69.0.202848672993.issue26528@psf.upfronthosting.co.za> Message-ID: <1499500838.08.0.255080762696.issue26528@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The interpreter makes a copy of the builtins module dict at startup and restores it at shutdown. open() is imported from the io module after making the copy, and therefore it is absent in restored module. ---------- nosy: +haypo, pitrou, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 04:40:42 2017 From: report at bugs.python.org (c-fos) Date: Sat, 08 Jul 2017 08:40:42 +0000 Subject: [issue30877] possibe typo in json/scanner.py In-Reply-To: <1499496488.53.0.464628157168.issue30877@psf.upfronthosting.co.za> Message-ID: <1499503242.93.0.727725151692.issue30877@psf.upfronthosting.co.za> c-fos added the comment: The possible test: import unittest from json.decoder import JSONDecoder class Memo_Test(unittest.TestCase): def test_for_empty_memo(self): json_str = '{"a": 1}' decoder = JSONDecoder() decoder.decode(json_str) self.assertEqual(decoder.memo, {}) suite = unittest.TestSuite() suite.addTest(Memo_Test("test_for_empty_memo")) runner = unittest.TextTestRunner() runner.run(suite) But it works only when _json import fails ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 05:20:14 2017 From: report at bugs.python.org (c-fos) Date: Sat, 08 Jul 2017 09:20:14 +0000 Subject: [issue30877] possibe typo in json/scanner.py In-Reply-To: <1499496488.53.0.464628157168.issue30877@psf.upfronthosting.co.za> Message-ID: <1499505614.8.0.561247887507.issue30877@psf.upfronthosting.co.za> c-fos added the comment: Test independent from _json library: import unittest from json.decoder import JSONDecoder from json.scanner import py_make_scanner class Memo_Test(unittest.TestCase): def test_for_empty_memo(self): json_str = '{"a": 1}' decoder = JSONDecoder() decoder.scan_once = py_make_scanner(decoder) result = decoder.decode(json_str) self.assertEqual(result, {"a":1}) self.assertEqual(decoder.memo, {}) suite = unittest.TestSuite() suite.addTest(Memo_Test("test_for_empty_memo")) runner = unittest.TextTestRunner() runner.run(suite) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 09:27:49 2017 From: report at bugs.python.org (ppperry) Date: Sat, 08 Jul 2017 13:27:49 +0000 Subject: [issue30873] `SystemError: returned NULL without setting an error` from importing _pickle In-Reply-To: <1499480964.67.0.223894670164.issue30873@psf.upfronthosting.co.za> Message-ID: <1499520469.8.0.838652313807.issue30873@psf.upfronthosting.co.za> ppperry added the comment: Interesting. For you, `_pickle` seems to be an extension module, which is thus trying to call `imp.create_dynamic`, whereas for me it is a builtin module. Perhaps that explains why you get a KeyError and I get a SystemError (my traceback ends with): File "C:\Program Files\Python36\lib\importlib\_bootstrap.py", line 560, in module_from_spec module = spec.loader.create_module(spec) File "C:\Program Files\Python36\lib\importlib\_bootstrap.py", line 725, in create_module return _call_with_frames_removed(_imp.create_builtin, spec) File "C:\Program Files\Python36\lib\importlib\_bootstrap.py", line 205, in _call_with_frames_removed return f(*args, **kwds) SystemError: returned NULL without setting an error (and is the same as your 3.6 traceback up to that point) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 09:51:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Jul 2017 13:51:41 +0000 Subject: [issue30873] `SystemError: returned NULL without setting an error` from importing _pickle In-Reply-To: <1499480964.67.0.223894670164.issue30873@psf.upfronthosting.co.za> Message-ID: <1499521901.17.0.576619571549.issue30873@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, this is Windows-only _imp.create_builtin(). ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 09:58:09 2017 From: report at bugs.python.org (ppperry) Date: Sat, 08 Jul 2017 13:58:09 +0000 Subject: [issue30873] `SystemError: returned NULL without setting an error` from importing _pickle on Windows In-Reply-To: <1499480964.67.0.223894670164.issue30873@psf.upfronthosting.co.za> Message-ID: <1499522289.01.0.409472601516.issue30873@psf.upfronthosting.co.za> Changes by ppperry : ---------- title: `SystemError: returned NULL without setting an error` from importing _pickle -> `SystemError: returned NULL without setting an error` from importing _pickle on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 10:34:29 2017 From: report at bugs.python.org (Berker Peksag) Date: Sat, 08 Jul 2017 14:34:29 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499524469.89.0.632801917039.issue29854@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset aa6a4d6ed881f79c51fb91dd928ed9496737b420 by Berker Peksag (Nir Soffer) in branch 'master': bpo-29854: Skip history-size test on older readline (GH-2621) https://github.com/python/cpython/commit/aa6a4d6ed881f79c51fb91dd928ed9496737b420 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 10:35:41 2017 From: report at bugs.python.org (Gautam krishna.R) Date: Sat, 08 Jul 2017 14:35:41 +0000 Subject: [issue30444] Add ability to change "-- more --" text in pager module In-Reply-To: <1495578658.44.0.821056048769.issue30444@psf.upfronthosting.co.za> Message-ID: <1499524541.7.0.275439688483.issue30444@psf.upfronthosting.co.za> Gautam krishna.R added the comment: Thank you! closing this due to inncativity.. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 10:45:12 2017 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 08 Jul 2017 14:45:12 +0000 Subject: [issue30522] Allow replacing a logging.StreamHandler's stream In-Reply-To: <1496218150.64.0.987173470763.issue30522@psf.upfronthosting.co.za> Message-ID: <1499525112.13.0.0988104809059.issue30522@psf.upfronthosting.co.za> Vinay Sajip added the comment: How about this as an API? def setStream(self, stream): """ Sets the StreamHandler's stream to the specified value, if it is different. Returns the old stream, if the stream was changed, or None if it wasn't. """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 11:20:50 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Jul 2017 15:20:50 +0000 Subject: [issue30522] Allow replacing a logging.StreamHandler's stream In-Reply-To: <1496218150.64.0.987173470763.issue30522@psf.upfronthosting.co.za> Message-ID: <1499527250.18.0.964389132672.issue30522@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Vinay, yes, that sounds fine to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 11:38:25 2017 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 08 Jul 2017 15:38:25 +0000 Subject: [issue30875] round(number[, digits]) does not return value with >12 decimal places In-Reply-To: <1499483260.9.0.266536317438.issue30875@psf.upfronthosting.co.za> Message-ID: <1499528305.86.0.480215539078.issue30875@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 12:00:02 2017 From: report at bugs.python.org (Nir Soffer) Date: Sat, 08 Jul 2017 16:00:02 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499529602.32.0.508879655504.issue29854@psf.upfronthosting.co.za> Changes by Nir Soffer : ---------- pull_requests: +2698 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 12:26:57 2017 From: report at bugs.python.org (john Forgue) Date: Sat, 08 Jul 2017 16:26:57 +0000 Subject: [issue30875] round(number[, digits]) does not return value with >12 decimal places In-Reply-To: <1499483260.9.0.266536317438.issue30875@psf.upfronthosting.co.za> Message-ID: <1499531217.33.0.0224375142222.issue30875@psf.upfronthosting.co.za> john Forgue added the comment: I found a programming issue that circumvented the round function. As for the terminal "verification" I reported.... I'm not sure what I did and cannot repeat. Sorry for the false alarm. John ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 12:27:45 2017 From: report at bugs.python.org (Armin Rigo) Date: Sat, 08 Jul 2017 16:27:45 +0000 Subject: [issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes Message-ID: <1499531265.54.0.318966689253.issue30879@psf.upfronthosting.co.za> New submission from Armin Rigo: The ``os`` functions generally accept any buffer-supporting object as file names, and interpret it as if ``bytes()`` had been called on it. However, ``os.listdir(x)`` uses the type of ``x`` to know if it should return a list of bytes or a list of unicodes---and the condition seems to be ``isinstance(x, bytes)``. So we get this kind of inconsistent behaviour: >>> os.listdir(b".") [b'python', b'Include', b'python-config.py', ...] >>> os.listdir(bytearray(b".")) ['python', 'Include', 'python-config.py', ...] ---------- components: Library (Lib) messages: 297960 nosy: arigo priority: normal severity: normal status: open title: os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes type: behavior versions: Python 3.5, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 12:28:28 2017 From: report at bugs.python.org (Alex Gaynor) Date: Sat, 08 Jul 2017 16:28:28 +0000 Subject: [issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes In-Reply-To: <1499531265.54.0.318966689253.issue30879@psf.upfronthosting.co.za> Message-ID: <1499531308.02.0.468969718772.issue30879@psf.upfronthosting.co.za> Changes by Alex Gaynor : ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 13:14:16 2017 From: report at bugs.python.org (Evelyn Mitchell) Date: Sat, 08 Jul 2017 17:14:16 +0000 Subject: [issue30880] PCG random number generator Message-ID: <1499534056.83.0.338813805746.issue30880@psf.upfronthosting.co.za> New submission from Evelyn Mitchell: John Cook tested the quality of the PCG Random Number generator (http://www.pcg-random.org/index.html) and it appears to have good performance. His report is at: https://www.johndcook.com/blog/2017/07/07/testing-the-pcg-random-number-generator/ This is a suggestion to add a PCG implementation. ---------- messages: 297961 nosy: Evelyn Mitchell priority: normal severity: normal status: open title: PCG random number generator type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 13:28:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Jul 2017 17:28:28 +0000 Subject: [issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes In-Reply-To: <1499531265.54.0.318966689253.issue30879@psf.upfronthosting.co.za> Message-ID: <1499534908.0.0.841164806122.issue30879@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2699 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 13:33:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Jul 2017 17:33:56 +0000 Subject: [issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes In-Reply-To: <1499531265.54.0.318966689253.issue30879@psf.upfronthosting.co.za> Message-ID: <1499535236.7.0.281675351132.issue30879@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good catch Armin! PR 2634 fixes this inconsistency. Maybe it is worth to deprecate support of other bytes-like object except bytes. open(), os.fspath() and os.path functions don't support them. ---------- nosy: +serhiy.storchaka stage: -> patch review versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 13:36:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Jul 2017 17:36:19 +0000 Subject: [issue30880] PCG random number generator In-Reply-To: <1499534056.83.0.338813805746.issue30880@psf.upfronthosting.co.za> Message-ID: <1499535379.02.0.0447655598362.issue30880@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Extension Modules nosy: +mark.dickinson, rhettinger versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 14:21:16 2017 From: report at bugs.python.org (Armin Rigo) Date: Sat, 08 Jul 2017 18:21:16 +0000 Subject: [issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes In-Reply-To: <1499531265.54.0.318966689253.issue30879@psf.upfronthosting.co.za> Message-ID: <1499538076.86.0.541183041387.issue30879@psf.upfronthosting.co.za> Armin Rigo added the comment: I've also been pointed to https://bugs.python.org/issue26800 . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 14:33:37 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Jul 2017 18:33:37 +0000 Subject: [issue30876] SystemError on import In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499538817.11.0.592298723073.issue30876@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I concur with Serhiy: SystemError is a smell that C code isn't taking appropriate precautions before dealing with user code or data. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 14:36:40 2017 From: report at bugs.python.org (Brett Cannon) Date: Sat, 08 Jul 2017 18:36:40 +0000 Subject: [issue30876] SystemError on import In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499539000.67.0.547103836473.issue30876@psf.upfronthosting.co.za> Brett Cannon added the comment: So this is very old semantics from the Python 2 days. I think Nick's idea of transforming the import to `import pkg.mod` when pkg isn't in sys.modules is probably the simplest, cleanest solution if we're going to change this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 14:37:59 2017 From: report at bugs.python.org (Brett Cannon) Date: Sat, 08 Jul 2017 18:37:59 +0000 Subject: [issue30841] A shadowing variable naming emitted for Python-ast.c In-Reply-To: <1499109660.71.0.721864284128.issue30841@psf.upfronthosting.co.za> Message-ID: <1499539079.95.0.602914473096.issue30841@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- type: compile error -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 14:38:06 2017 From: report at bugs.python.org (Brett Cannon) Date: Sat, 08 Jul 2017 18:38:06 +0000 Subject: [issue30841] A shadowing variable naming emitted for Python-ast.c In-Reply-To: <1499109660.71.0.721864284128.issue30841@psf.upfronthosting.co.za> Message-ID: <1499539086.03.0.377597081352.issue30841@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 14:39:45 2017 From: report at bugs.python.org (Brett Cannon) Date: Sat, 08 Jul 2017 18:39:45 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1499539185.14.0.951656200363.issue30814@psf.upfronthosting.co.za> Brett Cannon added the comment: I just wanted to say thanks to everyone who helped to fix this bug. The locking situation in import is probably the trickiest part of it and has also been tweaked the most as of late and so solving these kinds of issues is tricky. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 14:51:23 2017 From: report at bugs.python.org (Berker Peksag) Date: Sat, 08 Jul 2017 18:51:23 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499539883.6.0.459995266654.issue29854@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 04f77d4677e7508b6ec8de9d0331fdabbcd11d30 by Berker Peksag (Nir Soffer) in branch '3.6': [3.6] bpo-29854: Fix segfault in call_readline() (GH-728) https://github.com/python/cpython/commit/04f77d4677e7508b6ec8de9d0331fdabbcd11d30 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 15:06:16 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jul 2017 19:06:16 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499540776.29.0.434116909679.issue30870@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> patch review type: -> enhancement versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 15:23:09 2017 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 08 Jul 2017 19:23:09 +0000 Subject: [issue30880] PCG random number generator In-Reply-To: <1499534056.83.0.338813805746.issue30880@psf.upfronthosting.co.za> Message-ID: <1499541789.53.0.534346872185.issue30880@psf.upfronthosting.co.za> Mark Dickinson added the comment: Some previous discussions: "Time for a change of random number generator": https://mail.python.org/pipermail/python-dev/2016-February/143268.html "Should our default random number generator be secure?": (warning: long) https://mail.python.org/pipermail/python-ideas/2015-September/035820.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 15:23:48 2017 From: report at bugs.python.org (SylvainDe) Date: Sat, 08 Jul 2017 19:23:48 +0000 Subject: [issue30878] The staticmethod doesn't properly reject keyword arguments In-Reply-To: <1499497206.26.0.40333592604.issue30878@psf.upfronthosting.co.za> Message-ID: <1499541828.64.0.929753726346.issue30878@psf.upfronthosting.co.za> SylvainDe added the comment: I have a fix ready but I'll look if other functions using _PyArg_NoKeywords may have the same defect before submitting it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 16:03:19 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 08 Jul 2017 20:03:19 +0000 Subject: [issue30868] IDLE: Improve configuration tests with mock Save. In-Reply-To: <1499396195.9.0.947887140078.issue30868@psf.upfronthosting.co.za> Message-ID: <1499544199.42.0.813051946674.issue30868@psf.upfronthosting.co.za> Cheryl Sabella added the comment: If it's helpful, here's some history on Save and save_as in configdialog. -------------- Item: Code change which added the lines to always save 'highlight' and 'keys'. November 16, 2004, commit 5acdf9308191b6356fb3ed4ba691ba5cd391f202 commit message: Saving a Keyset w/o making changes (by using the "Save as New Custom ? ?Key Set" button) caused IDLE to fail on restart (no new keyset was created in config-keys.cfg). Also true for Theme/highlights. Python Bug 1064535. -------------- Item: Code change to always save 'main' first. Not much information, but seems to be part of the handling of the help source changes. March 26, 2002 commit 0c5bc8c9518fd18d41aedede536c4a9aa8dfa619 Commit message: further work on new config system; user defined help items -------------- ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 16:25:55 2017 From: report at bugs.python.org (Evelyn Mitchell) Date: Sat, 08 Jul 2017 20:25:55 +0000 Subject: [issue30880] PCG random number generator In-Reply-To: <1499534056.83.0.338813805746.issue30880@psf.upfronthosting.co.za> Message-ID: <1499545555.31.0.680441059812.issue30880@psf.upfronthosting.co.za> Evelyn Mitchell added the comment: Mark, thanks for the background links. My suggestion is much more constrained than the territory covered by those links. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 17:28:34 2017 From: report at bugs.python.org (ppperry) Date: Sat, 08 Jul 2017 21:28:34 +0000 Subject: [issue30876] SystemError on importing module that deletes itself from sys.modules In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499549314.64.0.148535103866.issue30876@psf.upfronthosting.co.za> Changes by ppperry : ---------- title: SystemError on import -> SystemError on importing module that deletes itself from sys.modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 17:56:39 2017 From: report at bugs.python.org (SylvainDe) Date: Sat, 08 Jul 2017 21:56:39 +0000 Subject: [issue30878] The staticmethod doesn't properly reject keyword arguments In-Reply-To: <1499497206.26.0.40333592604.issue30878@psf.upfronthosting.co.za> Message-ID: <1499550999.34.0.993339527462.issue30878@psf.upfronthosting.co.za> Changes by SylvainDe : ---------- pull_requests: +2700 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 19:05:39 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 08 Jul 2017 23:05:39 +0000 Subject: [issue27068] Add a detach() method to subprocess.Popen In-Reply-To: <1463739584.18.0.0161123331788.issue27068@psf.upfronthosting.co.za> Message-ID: <1499555139.97.0.42265816871.issue27068@psf.upfronthosting.co.za> Martin Panter added the comment: Personally, I haven?t needed this feature. But I still think it may be a decent solution for the ?webbrowser? module, potentially your ?asyncio? problem, and other cases that could now trigger an unwanted ResourceWarning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 19:22:20 2017 From: report at bugs.python.org (Nir Soffer) Date: Sat, 08 Jul 2017 23:22:20 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499556140.1.0.330916799995.issue29854@psf.upfronthosting.co.za> Changes by Nir Soffer : ---------- pull_requests: +2701 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 19:28:04 2017 From: report at bugs.python.org (Nir Soffer) Date: Sat, 08 Jul 2017 23:28:04 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499556484.62.0.310675737673.issue29854@psf.upfronthosting.co.za> Changes by Nir Soffer : ---------- pull_requests: +2702 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 19:58:09 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 08 Jul 2017 23:58:09 +0000 Subject: [issue30881] IDLE: add docstrings to browser.py Message-ID: <1499558289.01.0.144008987806.issue30881@psf.upfronthosting.co.za> New submission from Cheryl Sabella: Add docstrings to browser.py to aid to unit test creation. ---------- assignee: terry.reedy components: IDLE messages: 297973 nosy: csabella, terry.reedy priority: normal severity: normal status: open title: IDLE: add docstrings to browser.py type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 20:01:22 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 09 Jul 2017 00:01:22 +0000 Subject: [issue30881] IDLE: add docstrings to browser.py In-Reply-To: <1499558289.01.0.144008987806.issue30881@psf.upfronthosting.co.za> Message-ID: <1499558482.59.0.295657126165.issue30881@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +2703 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 20:02:55 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 09 Jul 2017 00:02:55 +0000 Subject: [issue1612262] Class Browser doesn't show internal classes Message-ID: <1499558575.73.0.58378827755.issue1612262@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I created issue 30881 to add docstrings to browser.py to make creating user tests easier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 21:46:58 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 09 Jul 2017 01:46:58 +0000 Subject: [issue30868] IDLE: Improve configuration tests with mock Save. In-Reply-To: <1499396195.9.0.947887140078.issue30868@psf.upfronthosting.co.za> Message-ID: <1499564818.12.0.611088991643.issue30868@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Very helpful. Is there a git equivalent to hg annotate, or did you have to trudge through the commit log? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 22:26:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 09 Jul 2017 02:26:03 +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: <1499567163.61.0.872725269313.issue8231@psf.upfronthosting.co.za> Terry J. Reedy added the comment: #27534 is about reducing the imports into the user runcode process. Without rechecking the reason for each import, I think it possible that this might result in config not being indirectly imported. ---------- dependencies: +IDLE: Reduce number and time for user process imports _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 22:36:35 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 09 Jul 2017 02:36:35 +0000 Subject: [issue30880] PCG random number generator In-Reply-To: <1499534056.83.0.338813805746.issue30880@psf.upfronthosting.co.za> Message-ID: <1499567795.6.0.0779966423853.issue30880@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, the previous discussions on the MersenneTwister have all resulted in a decision to stick with it. The PCG family of PRNG is relatively new. IIRC, the paper for it was never accepted for publication and some of its bolder claims haven't been proven. It is far being standard or widely adopted. In addition, there is not a single "the PCG RNG". Instead, it is a collection of ideas and patterns for creating RNGs without recommending a single one that the "here use this one". Tim reminded us that any issues for the MersenneTwister didn't surface for many years after its initial publication and wide-spread acceptance. That is a cautionary note for adopting something too soon. FWIW, I reviewed the PCG work a good while ago and discussed it with Guido. The decision was to stick with the current safe choice. That said, if someone wants to add this to PyPi, it is a really easy coding task. There isn't much to the PCG code and the Python random module was designed to be "pluggable" so that other RNGs can easily be substituted by user. ---------- assignee: -> rhettinger resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 23:13:57 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 09 Jul 2017 03:13:57 +0000 Subject: [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1499570037.31.0.715683773748.issue10438@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I also don't think this is worth it. The extra wording will likely cause more confusion that it clears up. Also, calling a staticmethod from within a class isn't a common thing to do. The principal use case for Python's static methods is to attach a function to a class for the sole purpose of making it findable by someone using that class. ---------- nosy: +rhettinger status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 23:15:19 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 09 Jul 2017 03:15:19 +0000 Subject: [issue30821] unittest.mock.Mocks with specs aren't aware of default arguments In-Reply-To: <1498842809.59.0.716482523297.issue30821@psf.upfronthosting.co.za> Message-ID: <1499570119.02.0.326008207281.issue30821@psf.upfronthosting.co.za> Raymond Hettinger added the comment: No need to spend time making a PR until there is a decision about whether this is something we want to do. ---------- assignee: -> michael.foord nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 23:19:44 2017 From: report at bugs.python.org (Tim Peters) Date: Sun, 09 Jul 2017 03:19:44 +0000 Subject: [issue30880] PCG random number generator In-Reply-To: <1499534056.83.0.338813805746.issue30880@psf.upfronthosting.co.za> Message-ID: <1499570384.38.0.0421263269262.issue30880@psf.upfronthosting.co.za> Tim Peters added the comment: I agree closing was appropriate at this time. I quite like PCG, but as Raymond said it's more a template for creating PRNGs than a specific generator. So even if a compelling case could be made, there's still a long way to having specific code in mind. In the Python world, the only non-trivial (i.e., not just a pure-Python toy demo program) PCG work I'm aware of is Robert Kern's (numpy's PRNG specialist) experiment with wrapping it: https://github.com/rkern/pcg-python But it hasn't been touched since late 2015. It's also a bit concerning that Prof. O'Neill hasn't posted to her PCG blog in over 2 years: http://www.pcg-random.org/blog/ I'm not concerned that the paper still hasn't been published - papers can sit a loooong time in review queues, and I'm afraid her paper is far too down-to-earth, readable, entertaining, and long for the TOMS editors' tastes <0.3 wink>. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 23:40:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Jul 2017 03:40:58 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499571658.33.0.845739377251.issue30876@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: SystemError on importing module that deletes itself from sys.modules -> SystemError on importing module from unloaded package _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 23:45:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Jul 2017 03:45:08 +0000 Subject: [issue30878] The staticmethod doesn't properly reject keyword arguments In-Reply-To: <1499497206.26.0.40333592604.issue30878@psf.upfronthosting.co.za> Message-ID: <1499571908.86.0.416039484692.issue30878@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 9648088e6ccd6d0cc04f450f55628fd8eda3784c by Serhiy Storchaka (Sylvain) in branch 'master': bpo-30878: Fix error message when keyword arguments are passed (#2635) https://github.com/python/cpython/commit/9648088e6ccd6d0cc04f450f55628fd8eda3784c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 23:47:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Jul 2017 03:47:09 +0000 Subject: [issue30878] The staticmethod doesn't properly reject keyword arguments In-Reply-To: <1499497206.26.0.40333592604.issue30878@psf.upfronthosting.co.za> Message-ID: <1499572029.01.0.0713139126457.issue30878@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report Kay and thank you for your patch SylvainDe. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 23:55:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 09 Jul 2017 03:55:56 +0000 Subject: [issue30868] IDLE: Improve configuration tests with mock Save. In-Reply-To: <1499396195.9.0.947887140078.issue30868@psf.upfronthosting.co.za> Message-ID: <1499572556.2.0.364103108677.issue30868@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This issue began with #27173 which added test_config with CurrentColorKeysTest to test the new IdleConf.current_colors_and_keys. Those tests never called any user parser.Save, but I knew I had to remove the possibility that any future test would touch anyone's working .idlerc. I thought of at least some of the following: 1. Directly replace config.IdleUserConfParser.Save. Since 4 instances are created during import, this would require recreating idleCong.userCfg after import. Restore the status quo by saving the original userCfg and restoring it after tests. The same applies to 3. and 4. 2. Give instances a Save function, as Cheryl did in PR2610, test_config.ConfigChangesTest.test_save_all, to mask the instance method. idleConf.userCfg['main'].Save = Func() Restore the status quo by removing the instance function. 3. Subclass IdleUserConfigParser with a new Save and recreate userCfg, as Cheryl did in configdialog_tests_v1.py on #30868. But instead of a dummy function, the replacement should be a mock. class DummyUserConfParser(config.IdleUserConfParser): Save = Func() # or other Mock. This is essentially 1. with subclassing being an alternate way to replace the original Save. 4. It turns out the initializing IdleUserConfParser with file name '' works to disable both Load and Save without raising an exception. (Plain open('') gives me FileNotFoundError.) So, recreate userCfg with instances initialized with ''. When I opened this issue, I forgot about the no load part. But it is in the comment near the top of test_config, and it is essential. This suggests combining 3. and 4. by initializing a subclass with ''. A. Testing ConfigChanges.save_all requires a count of calls. Func can easily be upgraded to do that. B. The real save function does not just save a page. Instead, it removes empty sections and if the result is an empty page, the corresponding file is deleted, not just emptied. Testing the function requires a fairly functional substitute. I am not sure yet how the solution for this should relate to A and its solution. In #8231, I tried and failed to get IDLE to run with a temporary directory as the home directory, so people without a writeable home directory can still run IDLE. Having to run with 2.7 is no more, for me, an issue. Running in 2 processes, and having config indirectly inported into the run process is. As I noted there, #27534 could result in this issue going away. I also want to look into a simulated in-memory 'directory', class IdleRC, contains StringIO instances, with a simulated open and any needed os functions. (For instance, mock-open('.idlerc/config-main.cfg') returns the StringIO for 'main'.) This would be fast and instrumented for testing as we please. C. 'Other tests' at the top of this post include both other tests in test_config and other test files. If Solutions 1. to 4. have to include restoration, then they should be repeated in every test_file that imports config. So why bother restoring, only to repatch? This suggests that when testing, usefCfg should be created in an alternate state. However, ... the current mechanism is that test.test_idle sets idlelib.__init__.testing to True. This is fine for buildbots, which only run idle test by running test_idle. So an IdelConf.set_testing, called from test_xyz would be needed. D. Other modules write other configuration files into .idlerc. When a file is opened, it is added or moved to the top of recent-files.lst. When the debugger is on and a file with breakpoints is run, the filename and breakpoint lines are supposed to be saved to breakpoints.lst. (Withoug tests, this could have stop working without me noticing.) So disabling parser saves during tests is not enough. The other .idlerc saves must also be blocked. Some sort of temporary directory is needed. E. On the next issue after this, #30869, Victor Stinner requested that IDLE not even create $HOME/.idlerc on buildbots. F. There systems on which IDLE does not find a place to write .idlerc. IDLE now quits. Any temporary directory would be better, at least as a choice. See #8231 and #15862. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 23:59:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Jul 2017 03:59:36 +0000 Subject: [issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes In-Reply-To: <1499531265.54.0.318966689253.issue30879@psf.upfronthosting.co.za> Message-ID: <1499572776.09.0.901035902443.issue30879@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, I forgot that this feature already is deprecated! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 00:04:46 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 09 Jul 2017 04:04:46 +0000 Subject: [issue30869] regrtest: Add .idlerc to saved_test_environment In-Reply-To: <1499397666.15.0.337246084117.issue30869@psf.upfronthosting.co.za> Message-ID: <1499573086.84.0.847771504138.issue30869@psf.upfronthosting.co.za> Terry J. Reedy added the comment: #27534 is about reducing run's imports. I believe that the current patch may remove one path by which config is indirectly imported. While writing msg297983 of #30868, I remembered that config files are not the only files put in .idlerc. So a solution to block writing config files while testing is not enough. An in-memory .idlerc with StringIOs for files, both for testing and for user systems without a place to write it, is looking more inviting to me than it did yesterday. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 02:02:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Jul 2017 06:02:51 +0000 Subject: [issue29464] Specialize FASTCALL for functions with positional-only parameters In-Reply-To: <1486394565.83.0.903919283463.issue29464@psf.upfronthosting.co.za> Message-ID: <1499580171.35.0.468012189782.issue29464@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 Sun Jul 9 02:32:15 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Jul 2017 06:32:15 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499581935.91.0.679153352876.issue30876@psf.upfronthosting.co.za> Nick Coghlan added the comment: OK, so at least for 3.7, we'll replace the SystemError with a recursive import of the missing parent package, just as we'd expect to see with an absolute import. I'm classing this as "Won't fix" for the native import system in 2.7 - folks wanting the fix there will need to switch to using importlib2 (assuming that gets updated to include the fix at some point). That leaves 3.5 and 3.6, and I'd suggest we defer making a decision about whether or not to backport the fix to the maintenance branches until after we see how complex the patch for 3.7 ends up being. ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 02:52:18 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 09 Jul 2017 06:52:18 +0000 Subject: [issue24845] IDLE functional/integration testing In-Reply-To: <1439325481.18.0.135721195599.issue24845@psf.upfronthosting.co.za> Message-ID: <1499583138.83.0.355472510211.issue24845@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A different take on the proposal: A functional integration test for IDLE should open IDLE, rename .idlerc, open a new file, insert some text, and, for instance, at some point open the options dialog for testing. As part this, the font face change would simulate button clicks and then check that the the font had changed in the editor *and* in .idlerc/config-main.cfg. I have done this manually. A complete functional test would do what I also occasionally do. Exercise at least once every menu function, all dialog widgets, and a few invisible functions. Unless suppressed, even the print function should be included, verified by the user affirming that the printed page appeared. Such a test should be separate from the unittest test suite, just as is the htest module. Only a few buildbots run gui tests anyway, but some core devs run the suite regularly, some with gui enabled. I don't want to impose on them in any way, neither another minute or two of test time, nor flickers and bells. Running such a test suite should be strictly voluntary. A few files could go in idle_test, like htest.py. A large number might justify a separate func_test directory. I don't want the mode of invocation and operation and the code style to be limited to that of unittest. I envision IDLE and the functest code running in one process, with one Tk instance. Which starts first is to be decided. But if IDLE starts first, then Run Func Test can be a menu item. I have already though of adding Run Unit Tests (in a subprocess) and Run Visual Tests (in the same process) to the Help Menu. The main use of setup and teardown in IDLE unit tests is to create and destroy Tk roots; with one permanent root, these functionsgo away. If test_xyz functions are defined at module scope, they are easy to collect and run. This is the function I use in my own project. def main(namespace): for name, obj in namespace.items(): if name.startswith('test_') and hasattr(obj, '__call__'): print(name) obj() The obj() call could be wrapped with try: obj() except Exception as e: print(e, file=output_window) where output_window is an instance of IDLE's OutputWindow. A helper equal(x,y) function could send an error message to the same place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 03:19:41 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Jul 2017 07:19:41 +0000 Subject: [issue30836] test_c_locale_coercion fails on AIX In-Reply-To: <1499090256.88.0.435528352442.issue30836@psf.upfronthosting.co.za> Message-ID: <1499584781.61.0.496700637337.issue30836@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 03:27:41 2017 From: report at bugs.python.org (SylvainDe) Date: Sun, 09 Jul 2017 07:27:41 +0000 Subject: [issue30878] The staticmethod doesn't properly reject keyword arguments In-Reply-To: <1499497206.26.0.40333592604.issue30878@psf.upfronthosting.co.za> Message-ID: <1499585261.61.0.400164530526.issue30878@psf.upfronthosting.co.za> SylvainDe added the comment: Thanks Serhiy Storchaka ! This issue seems to affect (all) other Python versions. Should we proceed to a cherry-pick ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 06:42:39 2017 From: report at bugs.python.org (Berker Peksag) Date: Sun, 09 Jul 2017 10:42:39 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499596959.6.0.0216214021044.issue29854@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 68c3724651776f4ae90ed24d70cef6fd45bc7db5 by Berker Peksag (Nir Soffer) in branch '3.5': [3.5] bpo-29854: Fix segfault in call_readline() (GH-728) https://github.com/python/cpython/commit/68c3724651776f4ae90ed24d70cef6fd45bc7db5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 07:06:22 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 09 Jul 2017 11:06:22 +0000 Subject: [issue30868] IDLE: Improve configuration tests with mock Save. In-Reply-To: <1499396195.9.0.947887140078.issue30868@psf.upfronthosting.co.za> Message-ID: <1499598382.16.0.783129257795.issue30868@psf.upfronthosting.co.za> Cheryl Sabella added the comment: `git log` is the magic command. I won't be able to do it justice because it has too many options, but here are a few. `git log` shows all commit message history on the current branch. `git log -p` (p for patch) shows the actual diffs `git log -p -- path/to/file` shows the diffs for one file `git log --grep` (with or without file) greps the commit messages `git log -Sword` (with or without file) greps the file content for word https://stackoverflow.com/questions/1337320/how-to-grep-git-commit-diffs-or-contents-for-a-certain-word#1340245 I don't know how gitgui integrates those commands. Having said that, I also don't know how to look at branches, so because of the name change on the file, I looked at 3.3 in github and trudged through. But, it was more of a divide and conquer, so it didn't take long. I randomly opened a commit and checked the file for the line changes. I'm sure there would have been a way to do it with git log. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 07:30:10 2017 From: report at bugs.python.org (Ian) Date: Sun, 09 Jul 2017 11:30:10 +0000 Subject: [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1499599810.19.0.966876201836.issue10438@psf.upfronthosting.co.za> Ian added the comment: I agree that the use case is probably rare. I agree that to someone intimately familiar with the "self-consistent rules" of Python, the correctness of the C.f() approach is probably obvious. However, your documentation says: Static methods in Python are similar to those found in Java or C++. I feel that it's a mistake to purposefully avoid saying where that similarity ends. In those languages (and in many others), fully qualified function calls from within the same class are redundant and border on "code smell". We agree that this aspect of Python is not mentioned in the documentation, and we disagree on whether it should be. For myself, even in the 7 years and thousands of lines of Python since I opened this issue, I still don't find it intuitive or obvious that a method would need to know the name of the class that contains it. That doesn't make the language "wrong" in any way; it makes the documentation incomplete for not addressing it. The __class__.f() usage in Python 3 seems excellent. If that's the preferred way to do it, then that might be a way to approach the documentation. "To call one static method from another within the same class, as of Python 3 you may use __class__.f() instead of C.f(). For Python 2.x, you must still use the name of the class itself, C.f(), as if you were calling from outside the class." (My wording is still less than ideal, but you get the idea.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 10:18:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Jul 2017 14:18:50 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499609930.85.0.452800553337.issue30876@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2704 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 10:25:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Jul 2017 14:25:08 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499610308.15.0.80405356817.issue30876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is easy to replace the SystemError with a recursive import of the missing parent package. It is enough to remove raising the SystemError. The other effect of this change is that relative import from the top-level module now raises ImportError "attempted relative import with no known parent package" instead of SystemError "Parent module '' not loaded, cannot perform relative import". ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 13:53:28 2017 From: report at bugs.python.org (Christoph Deil) Date: Sun, 09 Jul 2017 17:53:28 +0000 Subject: [issue30882] Built-in list disappeared from Python 2.7 intersphinx inventory Message-ID: <1499622808.04.0.381858845257.issue30882@psf.upfronthosting.co.za> New submission from Christoph Deil: We have a project where we sub-class `list`. Since recently our docs build is failing because the intersphinx inventory entry for `list` on Python 2.7 doesn't exist any more. I think this is a regression, because Python 2.7 is supposed to be stable and other functions and classes here are still there, just "list" is missing: https://docs.python.org/2.7/library/functions.html#func-list Just in case someone else sees this issue, the Sphinx warning looks like this: ``` docs/api/pyregion.ShapeList.rst:7: WARNING: py:class reference target not found: list ``` if you have something like ``` class ShapeList(list): """My list sub-class""" ``` ---------- assignee: docs at python components: Documentation messages: 297993 nosy: Christoph.Deil, docs at python priority: normal severity: normal status: open title: Built-in list disappeared from Python 2.7 intersphinx inventory versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 15:21:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 09 Jul 2017 19:21:48 +0000 Subject: [issue24845] IDLE functional/integration testing In-Reply-To: <1439325481.18.0.135721195599.issue24845@psf.upfronthosting.co.za> Message-ID: <1499628108.35.0.174812487426.issue24845@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To clarify the 'tk introspection' I did not like was asking a widget for its children, getting a list of tk ids, and then testing the widgets by id. I prefer keeping and and directly using a python reference. I was not referring querying a widget for its configuration. [Not part of functional testing, but... Current unittests do not check that every widget is managed (placed, packed, or gridded). I just verified that commenting out a widget's .pack call did not affect the current test of the widget. We currently use the htests for that.] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 16:48:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Jul 2017 20:48:59 +0000 Subject: [issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address Message-ID: <1499633339.94.0.136665886268.issue30883@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/s390x%20Debian%203.6/builds/530/steps/test/logs/stdio ERROR: test_ftp (test.test_urllib2net.OtherNetworkTests) (url='ftp://ftp.debian.org/debian/README') ERROR: test_ftp_basic (test.test_urllib2net.TimeoutTest) ERROR: test_ftp_default_timeout (test.test_urllib2net.TimeoutTest) ... ftplib.error_temp: 421 There are too many connections from your internet address. ... urllib.error.URLError: ERROR: test_ftp_no_timeout (test.test_urllib2net.TimeoutTest) ERROR: test_ftp_timeout (test.test_urllib2net.TimeoutTest) ---------- components: Tests messages: 297995 nosy: haypo priority: normal severity: normal status: open title: test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 16:57:04 2017 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 09 Jul 2017 20:57:04 +0000 Subject: [issue29766] --with-lto still implied by --enable-optimizations in Python 2.7 In-Reply-To: <1489022104.7.0.601332376307.issue29766@psf.upfronthosting.co.za> Message-ID: <1499633824.57.0.61751842954.issue29766@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: > bpo-29766: Do not force --with-lto to true for --enable-optimizations (#1858) > > This fixes a faulty backport to the Python 2.7 branch only of http://bugs.python.org/issue28032. Details in the bpo-29766. This commit is still faulty :) . It changes configure without configure.ac, so this change is lost for these users who locally adjust configure.ac for some reason and regenerate configure with autoconf. ---------- nosy: +Arfrever resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 17:07:18 2017 From: report at bugs.python.org (sedrubal) Date: Sun, 09 Jul 2017 21:07:18 +0000 Subject: [issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb' In-Reply-To: <1330513271.31.0.437438851478.issue14156@psf.upfronthosting.co.za> Message-ID: <1499634438.73.0.740414353986.issue14156@psf.upfronthosting.co.za> sedrubal added the comment: What is the problem with using the patch by moritz (https://bugs.python.org/issue14156#msg162342) and change the unit test to this: class TestFileTypeWB(TempDirMixin, ParserTestCase): ... successes = [ ..., ('-x - -', NS(x=sys.stdout.buffer, spam=sys.stdout.buffer)), ] and respectively for stdin? ---------- nosy: +sedrubal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 17:11:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Jul 2017 21:11:20 +0000 Subject: [issue30884] regrtest -jN --timeout=TIMEOUT should kill child process running longer than TIMEOUT seconds Message-ID: <1499634680.38.0.350592946082.issue30884@psf.upfronthosting.co.za> New submission from STINNER Victor: "regrtest -jN --timeout=TIMEOUT" should kill a child process if it runs longer than TIMEOUT seconds. Maybe not exactly TIMEOUT, but TIMEOUT x 1.2? Example: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.x/builds/44/steps/test/logs/stdio running: test_mmap (3165 sec), test_subprocess (8003 sec) 3:03:20 [405/406/1] test_mmap passed (3186 sec) -- running: test_subprocess (8026 sec) beginning 6 repetitions 123456 ...... running: test_subprocess (8056 sec) running: test_subprocess (8086 sec) running: test_subprocess (8116 sec) running: test_subprocess (8146 sec) running: test_subprocess (8176 sec) ... running: test_subprocess (307672 sec) running: test_subprocess (307702 sec) running: test_subprocess (307732 sec) running: test_subprocess (307762 sec) ... ---------- messages: 297998 nosy: haypo priority: normal severity: normal status: open title: regrtest -jN --timeout=TIMEOUT should kill child process running longer than TIMEOUT seconds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 17:12:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Jul 2017 21:12:38 +0000 Subject: [issue30884] regrtest -jN --timeout=TIMEOUT should kill child process running longer than TIMEOUT seconds In-Reply-To: <1499634680.38.0.350592946082.issue30884@psf.upfronthosting.co.za> Message-ID: <1499634758.37.0.985454841401.issue30884@psf.upfronthosting.co.za> STINNER Victor added the comment: regrtest command line of this buildbot build, it uses --timeout 11700: D:\buildarea\3.x.ware-win81-release.refleak\build>"D:\buildarea\3.x.ware-win81-release.refleak\build\PCbuild\amd64\python_d.exe" -u -Wd -E -bb -m test -uall -rwW --slowest --timeout 1200 --fail-env-changed -j1 -j2 -R 3:3:refleaks.log -u-cpu -j4 --timeout 11700 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 17:38:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Jul 2017 21:38:15 +0000 Subject: [issue30183] [HPUX] compilation error in pytime.c with cc compiler In-Reply-To: <1493267090.1.0.00115311377195.issue30183@psf.upfronthosting.co.za> Message-ID: <1499636295.76.0.589034799141.issue30183@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh ok, a lot of tests fail on HP-UX. We are far from supporting HP-UX. 331 tests OK. 41 tests failed: test_asyncio test_asyncore test_c_locale_coercion test_calendar test_cmd_line test_cmd_line_script test_datetime test_distutils test_email test_faulthandler test_fileio test_httpservers test_imaplib test_imp test_import test_io test_logging test_macpath test_mailbox test_mmap test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_main_handling test_multiprocessing_spawn test_ntpath test_openpty test_os test_posix test_posixpath test_pty test_re test_signal test_strftime test_strptime test_subprocess test_time test_tools test_unicode test_unicode_file test_xmlrpc test_zipimport ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 17:58:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Jul 2017 21:58:44 +0000 Subject: [issue30885] test_subprocess hangs on AMD64 Windows8.1 Refleaks 3.x Message-ID: <1499637524.07.0.247905249864.issue30885@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.x/builds/44/steps/test/logs/stdio running: test_mmap (3165 sec), test_subprocess (8003 sec) 3:03:20 [405/406/1] test_mmap passed (3186 sec) -- running: test_subprocess (8026 sec) beginning 6 repetitions 123456 ...... running: test_subprocess (8056 sec) running: test_subprocess (8086 sec) running: test_subprocess (8116 sec) running: test_subprocess (8146 sec) running: test_subprocess (8176 sec) ... running: test_subprocess (307672 sec) running: test_subprocess (307702 sec) running: test_subprocess (307732 sec) running: test_subprocess (307762 sec) ... ---------- components: Tests, Windows messages: 298001 nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: test_subprocess hangs on AMD64 Windows8.1 Refleaks 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 18:16:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Jul 2017 22:16:02 +0000 Subject: [issue30885] test_subprocess hangs on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1499637524.07.0.247905249864.issue30885@psf.upfronthosting.co.za> Message-ID: <1499638562.31.0.795789428364.issue30885@psf.upfronthosting.co.za> STINNER Victor added the comment: I checked last builds up to build #20, it seems like build 44 is the first time that test_subprocess hangs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 18:57:21 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 09 Jul 2017 22:57:21 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499641041.08.0.15338490991.issue30870@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset bb2bae84d6b29f991b757b46430c3c15c60059e9 by terryjreedy (Louie Lu) in branch 'master': bpo-30870: IDLE: Change sample font when select by key-up/down (#2617) https://github.com/python/cpython/commit/bb2bae84d6b29f991b757b46430c3c15c60059e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 19:00:45 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 09 Jul 2017 23:00:45 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499641245.42.0.969405108528.issue30870@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If one scrolls with the mousewheel or scrollbar, the selection does not change and the example should not change, and I presume it will not with the patch. If one presses up or down, the selection does change, just as if one clicked, and the example should change. I consider it a bug that it does not. Good catch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 19:08:04 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 09 Jul 2017 23:08:04 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499641684.11.0.94305404556.issue30870@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 19:17:12 2017 From: report at bugs.python.org (Martin Panter) Date: Sun, 09 Jul 2017 23:17:12 +0000 Subject: [issue30393] test_readline hangs In-Reply-To: <1495057055.24.0.281941215032.issue30393@psf.upfronthosting.co.za> Message-ID: <1499642232.08.0.852907825472.issue30393@psf.upfronthosting.co.za> Martin Panter added the comment: Thanks for the information. That narrows the problem down, but I still don?t exactly know why it hangs. A good workaround may be to put a timeout in the ?select? call for a second or so, and if it times out, raise an exception which will fail the test but let the rest of the tests continue. To add the timeout, I would change the code in ?run_pty? to look like selected = sel.select(timeout=1) if not selected: raise Exception("Child timed out: remaining input {!r}, output {!r}".format( input, output)) for [_, events] in selected: ... This is what ?test_auto_history_enabled? is supposed to do: 1. Create a pseudo-terminal with master and slave file descriptors 2. Spawn a child process to read from the slave and then print the test result to the slave 3. Parent waits to be able to read from or write to the PTY master 4. Parent writes the bytes b"dummy input\r" to the PTY 5. Child calls ?input? which calls the Readline library and reads the input 6. Child writes the test result to the PTY slave 7. Parent reads the output from the child 8. Child closes its slave file descriptor and exits 9. On Linux, reading then raises EIO indicating all copies of the slave are closed and there is no more output left to read The parent is hanging at step 3, before entering step 4, 7, or 9. Some input may already have been written to the child, and some output may have been captured, but it assumes the child is still running and is waiting for it to exit, which should close the slave file descriptor. It would be interesting to confirm if the child has exited or is still waiting for the CR to terminate its input line. Or perhaps the slave file descriptor has somehow been duplicated in a third process without being closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 19:26:34 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 09 Jul 2017 23:26:34 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499642794.68.0.354573432766.issue30870@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 7ab334233394070a25344d481c8de1402fa12b29 by terryjreedy in branch '3.6': [3.6] bpo-30870: IDLE: Change sample font when select by key-up/down (GH-2617) (#2640) https://github.com/python/cpython/commit/7ab334233394070a25344d481c8de1402fa12b29 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 19:37:45 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 09 Jul 2017 23:37:45 +0000 Subject: [issue24845] IDLE functional/integration testing In-Reply-To: <1439325481.18.0.135721195599.issue24845@psf.upfronthosting.co.za> Message-ID: <1499643465.04.0.552673181243.issue24845@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The problem with this proposal, and with writing complete unittests, is that event_generate seems to be badly broken. I have spent hours doing experiments that mostly fail. I have read Stackoverflow questions and there seems to be no dependable rule for success. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 19:48:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Jul 2017 23:48:51 +0000 Subject: [issue30886] test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x Message-ID: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/557/steps/test/logs/stdio test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest) ... Warning -- threading_cleanup() failed to cleanup -1 threads after 3 sec (count: 0, dangling: 1) ok ---------- components: Tests messages: 298008 nosy: haypo priority: normal severity: normal status: open title: test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 19:55:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Jul 2017 23:55:16 +0000 Subject: [issue30886] test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499644516.45.0.886583947029.issue30886@psf.upfronthosting.co.za> STINNER Victor added the comment: The load average was 3.15: 0:04:33 load avg: 3.15 [176/406] test_logging failed (env changed) -- Another fail on AMD64 FreeBSD CURRENT Non-Debug 3.x: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.x/builds/568/steps/test/logs/stdio 0:01:56 load avg: 3.45 [ 44/406] test_logging failed (env changed) ... test_output (test.test_logging.UnixSocketHandlerTest) ... ok test_output (test.test_logging.UnixDatagramHandlerTest) ... ok test_output (test.test_logging.UnixSysLogHandlerTest) ... ok test__all__ (test.test_logging.MiscTestCase) ... ok test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest) ... Warning -- threading_cleanup() failed to cleanup -1 threads after 4 sec (count: 0, dangling: 1) ok test_handle_called_with_queue_queue (test.test_logging.QueueListenerTest) ... ok test_no_messages_in_queue_after_stop (test.test_logging.QueueListenerTest) ... ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 20:01:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 00:01:09 +0000 Subject: [issue30886] test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499644869.68.0.505867413732.issue30886@psf.upfronthosting.co.za> STINNER Victor added the comment: Previous issue which fixed QueueListenerTest of test_logging is bpo-30131: commit 8ca2f2faefa8dba323a2e4c4b86efb633d7a53cf Author: Victor Stinner Date: Wed Apr 26 15:56:25 2017 +0200 bpo-30131: test_logging now joins queue threads (#1298) QueueListenerTest of test_logging now closes the multiprocessing Queue and joins its thread to prevent leaking dangling threads to following tests. Add also @support.reap_threads to detect earlier if a test leaks threads (and try to "cleanup" these threads). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 20:16:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 00:16:33 +0000 Subject: [issue30886] test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499645793.93.0.463487095409.issue30886@psf.upfronthosting.co.za> STINNER Victor added the comment: While trying to reproduce the bug, I got: test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest) ... /usr/home/haypo/cpython/Lib/test/support/__init__.py:1515: ResourceWarning: unclosed gc.collect() ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 20:18:29 2017 From: report at bugs.python.org (David) Date: Mon, 10 Jul 2017 00:18:29 +0000 Subject: [issue30887] Syntax checking confuses Try: class_instance_name as ... is used before glabal declaration Message-ID: <1499645909.77.0.25257565507.issue30887@psf.upfronthosting.co.za> New submission from David: when I do anything like this: import flask ... try: current_user except NameError: global current_user current_user = User(request.form['parameter1'], request.form['parameter2'], '') I get the error that the_user was 'used' before the global declaration. The try ... except ... is so when the user enters this route / function the first time, a class instance is instantiated, but if they return the second time, the existing class instance is updated in lines of code downstream rather than declared again with the same name, and therefore overwritten. ---------- components: Interpreter Core, macOS messages: 298012 nosy: Davidt, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Syntax checking confuses Try: class_instance_name as ... is used before glabal declaration type: compile error versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 20:21:48 2017 From: report at bugs.python.org (David) Date: Mon, 10 Jul 2017 00:21:48 +0000 Subject: [issue30887] Syntax checking confuses Try: class_instance_name as ... is used before glabal declaration In-Reply-To: <1499645909.77.0.25257565507.issue30887@psf.upfronthosting.co.za> Message-ID: <1499646108.46.0.224608891157.issue30887@psf.upfronthosting.co.za> David added the comment: when I do anything like this: import flask ... class User...... . . . try: current_user except NameError: global current_user current_user = User(request.form['parameter1'], request.form['parameter2'], '') I get the error that current_user_user was 'used' before the global declaration. The try ... except ... is so when the user enters this route / function the first time, a class instance is instantiated, but if they return the second time, the existing class instance is updated in lines of code downstream rather than declared again with the same name, and therefore overwritten. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 20:30:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 00:30:35 +0000 Subject: [issue30886] test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499646635.91.0.785266634843.issue30886@psf.upfronthosting.co.za> STINNER Victor added the comment: The problem is that multiprocessing.Queue.join_thread() does nothing since the thread wasn't started by a subprocess. See also bpo-30171: Emit ResourceWarning in multiprocessing Queue destructor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 20:31:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 00:31:04 +0000 Subject: [issue30171] Emit ResourceWarning in multiprocessing Queue destructor In-Reply-To: <1493214770.49.0.943228970697.issue30171@psf.upfronthosting.co.za> Message-ID: <1499646664.92.0.095855899582.issue30171@psf.upfronthosting.co.za> STINNER Victor added the comment: Another example: http://bugs.python.org/issue30886#msg298014 "The problem is that multiprocessing.Queue.join_thread() does nothing since the thread wasn't started by a subprocess." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 21:05:41 2017 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 10 Jul 2017 01:05:41 +0000 Subject: [issue16806] col_offset is -1 and lineno is wrong for multiline string expressions In-Reply-To: <1356739702.66.0.625233113719.issue16806@psf.upfronthosting.co.za> Message-ID: <1499648741.17.0.134837657815.issue16806@psf.upfronthosting.co.za> Anthony Sottile added the comment: pypy seems to have this right (though I don't know enough about their internals to know if cpython can benefit from their patch) $ venvpypy/bin/pythonPython 2.7.10 (3260adbeba4a, Apr 19 2016, 17:42:20) [PyPy 5.1.0 with GCC 4.8.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>> import ast, astpretty >>>> astpretty.pprint(ast.parse('"""\n"""')) Module( body=[ Expr( lineno=1, col_offset=0, value=Str(lineno=1, col_offset=0, s='\n'), ), ], ) ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 21:53:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jul 2017 01:53:56 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499651636.37.0.600562781358.issue30870@psf.upfronthosting.co.za> Terry J. Reedy added the comment: We already know that setting StringVar font_name triggers a change to changes. We also know that manually clicking or Up or Down triggers <>, which sets font_name and redraws the box. The challenge is to do something that will trigger the virtual event. Then we can write a test methods something like def test_sample(self): fontlist = configure.fontlist if fontlist.size(): name0 = fontlist.get(0).lower() # fontlist.selection_set(0) # or something print('\n', changes) # temp to testing that changes changes self.assertEqual(changes['main']['EditorWindow']['font'], name0) But selection_set does not trigger the event. After fiddling around with various bindings event_generate()s and update()s and update_idletasks(), I concluded, again, that either event_generate or its documentation is badly broken. The only thing I got to work in hours of experiments is this: import tkinter as tk root = tk.Tk() seq = '' root.bind(seq, lambda event: print('generated', event)) root.update_idletasks() # or update() root.event_generate(seq) # update here fails Adding a widget and binding to the widget always failed. Here is my attempt using Serhiy's simulate_mouse_click. (This goes in test_configdialog.FontTabTest. def test_sample(self): fontlist = configure.fontlist if fontlist.size(): name0 = fontlist.get(0).lower() fontlist.see(0) x, y, dx, dy = fontlist.bbox(0) fontlist.bind('', lambda event: print(event)) mouse_click(fontlist, x + dx//2, y + dy//2) fontlist.update() print('\n', changes) # temporary, see if changes has anything self.assertEqual(changes['main']['EditorWindow']['font'], name0) Serhiy, do you have any idea why I cannot get event_generate to work for a listbox, even with your function? I have tried somewhere close to 20 variations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 22:13:00 2017 From: report at bugs.python.org (=?utf-8?b?6YKx5Lyf55Wl?=) Date: Mon, 10 Jul 2017 02:13:00 +0000 Subject: [issue30888] import class not isinstance of the class Message-ID: <1499652780.91.0.730599557685.issue30888@psf.upfronthosting.co.za> New submission from ???: the working directory is like below: bug/ dirc/ __init__.py foo.py foo2.py __init__.py foo1.py in foo.py: ``` class Event(object): pass ``` in foo2.py: ``` from a.foo import Event def fun(): return Event() ``` in foo1.py: ``` from bug.a.foo import Event from bug.a.foo2 import fun assert isinstance(fun(), Event) ``` when i try to execute the code in foo1.py, i got an assertion error. but if i change foo2.py to: ``` from ..a.foo import Event def fun(): return Event() ``` the code in foo1.py can be done well without the assertion error. i think it's about the import mechanism. i have checked pep328 I think when i do "from a.foo import Event", python import Event by the package name "a.foo.Event", but "from ..a.foo import Event" is going to import Event by "bug.a.foo.Event". and it is totally different in python. is it kind of bug python should prevent? ---------- components: macOS messages: 298018 nosy: ned.deily, ronaldoussoren, ??? priority: normal severity: normal status: open title: import class not isinstance of the class type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 22:42:51 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 10 Jul 2017 02:42:51 +0000 Subject: [issue30887] Syntax checking confuses Try: class_instance_name as ... is used before glabal declaration In-Reply-To: <1499645909.77.0.25257565507.issue30887@psf.upfronthosting.co.za> Message-ID: <1499654571.43.0.313827219287.issue30887@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Please copy and paste (don't retype from memory!) the *exact* error you are getting. You should be seeing something like: SyntaxWarning: name 'current_user' is used prior to global declaration (at least that's the warning I'm getting in Python 3.5), which is correct behaviour. The name is used prior to the global declaration. The Python interpreter is now discouraging the use of the "global" keyword anywhere except at the top of the function. (It may some day become an error.) If your code is unindented module-level code, as your code snippet suggests, you don't need the global declaration since current_user is automatically global. If it is function-level code, then move the global declaration to the top of the function, as the SyntaxWarning suggests. I don't believe this is a bug, I believe that what you are seeing is expected, so I am closing this bug report. If I have misunderstood what you are experiencing, then please re-open the ticket and give us some more information. Preferably give us some code that we can run that demonstrates the error. (Since the error doesn't have anything to do with flask, the `import flask` line is unnecessary.) ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 22:43:37 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 10 Jul 2017 02:43:37 +0000 Subject: [issue30887] Syntax checking confuses Try: class_instance_name as ... is used before glabal declaration In-Reply-To: <1499645909.77.0.25257565507.issue30887@psf.upfronthosting.co.za> Message-ID: <1499654617.68.0.717321747141.issue30887@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 23:23:35 2017 From: report at bugs.python.org (David) Date: Mon, 10 Jul 2017 03:23:35 +0000 Subject: [issue30887] Syntax checking confuses Try: class_instance_name as ... is used before glabal declaration In-Reply-To: <1499654571.43.0.313827219287.issue30887@psf.upfronthosting.co.za> Message-ID: David added the comment: I made the syntax error go away by moving the global current_user above the try...... I will have to revisit this one when time permits and write a script that recreates the error. This will probably be later this week. Thanks for your volunteer service. David On Jul 9, 2017 10:42 PM, "Steven D'Aprano" wrote: > > Steven D'Aprano added the comment: > > Please copy and paste (don't retype from memory!) the *exact* error you > are getting. > > You should be seeing something like: > > SyntaxWarning: name 'current_user' is used prior to global declaration > > (at least that's the warning I'm getting in Python 3.5), which is correct > behaviour. The name is used prior to the global declaration. > > The Python interpreter is now discouraging the use of the "global" keyword > anywhere except at the top of the function. (It may some day become an > error.) > > If your code is unindented module-level code, as your code snippet > suggests, you don't need the global declaration since current_user is > automatically global. > > If it is function-level code, then move the global declaration to the top > of the function, as the SyntaxWarning suggests. > > I don't believe this is a bug, I believe that what you are seeing is > expected, so I am closing this bug report. If I have misunderstood what you > are experiencing, then please re-open the ticket and give us some more > information. Preferably give us some code that we can run that demonstrates > the error. (Since the error doesn't have anything to do with flask, the > `import flask` line is unnecessary.) > > ---------- > nosy: +steven.daprano > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 23:46:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jul 2017 03:46:38 +0000 Subject: [issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address In-Reply-To: <1499633339.94.0.136665886268.issue30883@psf.upfronthosting.co.za> Message-ID: <1499658398.32.0.0657970081812.issue30883@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: All public-facing debian.org FTP services will be shut down on November 1, 2017. See https://www.debian.org/News/2017/20170425. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 23:55:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jul 2017 03:55:03 +0000 Subject: [issue30851] IDLE: configdialog -- fix tkinter Variables In-Reply-To: <1499217939.06.0.00487588238252.issue30851@psf.upfronthosting.co.za> Message-ID: <1499658903.97.0.352629780477.issue30851@psf.upfronthosting.co.za> Terry J. Reedy added the comment: After wresting with a test for #30870, I am not sure we will ever have the full tests I would like. Anyway, I concluded that the replacement of font_name is a bug. It did not matter because all pages are created before configuration is read. If any of font_name, font_bold, or font_size are changed, set_font_sample is called to define a new font and reset the fonts for the samples on both font and hightlight pages. I checked that this still works. I convinced myself that the 3.6+ dialog cannot change 'encoding' in userCfg. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 00:34:36 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 10 Jul 2017 04:34:36 +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: <1499661276.39.0.333375439482.issue8231@psf.upfronthosting.co.za> Louie Lu added the comment: How about only taking warning when not able to create dir at GetUserCfgDir(), then take the permission handler in other place? e.g. when user trying to save the config in bad dir, pop-out a dialog to tell it is permission problem or dir not eixsts...etc. ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 00:56:56 2017 From: report at bugs.python.org (Liu Cailiang) Date: Mon, 10 Jul 2017 04:56:56 +0000 Subject: [issue30889] distutils extra_link_args not working because it is added to cmd last. should before -llibs Message-ID: <1499662616.73.0.0979391647369.issue30889@psf.upfronthosting.co.za> New submission from Liu Cailiang: Following is the executed command line (g++ version 5): g++ -pthread -shared -L/conda/lib -Wl,-rpath=/conda/lib,--no-as-needed /tmp/tmp0lfzn4v9/home/ubuntu/pybind11_opencv_numpy/ndarray_converter.o /tmp/tmp0lfzn4v9/home/ubuntu/pybind11_opencv_numpy/.rendered.cpy.o -L/conda/lib -lopencv_core -lopencv_imgproc -lopencv_imgcodecs -lopencv_video -lopencv_videoio -lopencv_objdetect -lm -lz -lpython3.6m -o /tmp/tmp0lfzn4v9/cpy.cpython-36m-x86_64-linux-gnu.so -Wl,--as-needed -O3 -Wall If -Wl,--as-needed -O3 -Wall is before the .o files, the extra_args work. ---------- components: Installation messages: 298024 nosy: Liu Cailiang priority: normal severity: normal status: open title: distutils extra_link_args not working because it is added to cmd last. should before -llibs type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 01:56:07 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 10 Jul 2017 05:56:07 +0000 Subject: [issue15862] IDLE: startup problem when HOME does not exist In-Reply-To: <1346795014.76.0.789021764596.issue15862@psf.upfronthosting.co.za> Message-ID: <1499666167.44.0.547891217142.issue15862@psf.upfronthosting.co.za> Louie Lu added the comment: Terry: How about to support XDG base directory on Unix[1]? [1]: https://wiki.archlinux.org/index.php/XDG_Base_Directory_support ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 02:01:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jul 2017 06:01:21 +0000 Subject: [issue6159] Tkinter.PanedWindow: docstring fixes, change in paneconfigure and removed some returns In-Reply-To: <1243812482.01.0.481805459937.issue6159@psf.upfronthosting.co.za> Message-ID: <1499666481.4.0.111850993468.issue6159@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > However, while the revision describes how the Python wrapper should behave, I am dubious that tk.call itself returns either a list or a tuple, rather than a string such as '{0 sash}' unless verifed with a test. This depends on the value of wantobjects. If it is 0, PanedWindow.identify() returns a string such as '{0 sash}'. Otherwise it currently returns a pair of an integer and a string. But this depends on Tk implementation details. In future versions it could return a second item as a Tcl_Obj instead of a string. This can be changed even in a Tk bugfix release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 02:22:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jul 2017 06:22:58 +0000 Subject: [issue30882] Built-in list disappeared from Python 2.7 intersphinx inventory In-Reply-To: <1499622808.04.0.381858845257.issue30882@psf.upfronthosting.co.za> Message-ID: <1499667778.63.0.34152852876.issue30882@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is caused by backporting some changes from 3.x. In 3.x the list class is described in two places, in functions.rst and in stdtypes.rst, and these changes fixed the ambiguity by excluding the reference in functions.rst from the index. But in 2.7 this is the only description of the list class. We need either revert changes that exclude the reference to the list class description in functions.rst from the index, or add a description in stdtypes.rst. ---------- nosy: +serhiy.storchaka type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 02:33:39 2017 From: report at bugs.python.org (DelTos) Date: Mon, 10 Jul 2017 06:33:39 +0000 Subject: [issue30890] Comment error in Korean language Message-ID: <1499668419.76.0.67681471989.issue30890@psf.upfronthosting.co.za> New submission from DelTos: Like the attached image file, there is a little error in comments. If I write the comments with Korean, the last character is printed small and color is not applied. It can be fixed with pressing space bar once, but I hope it is solved in the editor. ---------- assignee: terry.reedy components: IDLE files: comments_error.png messages: 298028 nosy: DelTos, terry.reedy priority: normal severity: normal status: open title: Comment error in Korean language type: crash versions: Python 3.7 Added file: http://bugs.python.org/file46998/comments_error.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 03:01:17 2017 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 10 Jul 2017 07:01:17 +0000 Subject: [issue30888] import class not isinstance of the class In-Reply-To: <1499652780.91.0.730599557685.issue30888@psf.upfronthosting.co.za> Message-ID: <1499670077.15.0.9229725885.issue30888@psf.upfronthosting.co.za> Ronald Oussoren added the comment: In foo2.py you import "a.foo", which refers to module 'a' that isn't included in the directory structure you describe. I'm assuming 'dirc' should be 'a' to match the code. How did you run foo1.py? When running with 'python3.6 -m bug.foo1' I get an error about not being able to import 'a' (as expected, the package is 'bug.a'). When you run with "PYTHONPATH=. python3.6 bug/foo1.py" I get the assertion failure you mention, and that's expected behavior. This gets clearer when you print type(fun()) and Event, the output will be: As you can see these refer to two different classes, not the same class. The reason for this is that 'python3.6 bug/foo1.py' adds the 'bug' directory to the start of sys.path, hence the "import a.foo" in foo2 succeeds. The script foo1.py imports 'bug.a.foo', which is a different name that happens to refer to the same file on the filesystem. All in all this is expected behavior and not a bug. ---------- resolution: -> not a bug status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 03:22:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jul 2017 07:22:25 +0000 Subject: [issue29464] Specialize FASTCALL for functions with positional-only parameters In-Reply-To: <1486394565.83.0.903919283463.issue29464@psf.upfronthosting.co.za> Message-ID: <1499671345.08.0.823383503796.issue29464@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Josay noticed that _PyArg_NoStackKeywords() is not used anymore except for one place (_hashopenssl.c). Seems this is my oversign. Generated constructors in _hashopenssl.c use the METH_FASTCALL | METH_KEYWORDS calling method, but check that no keyword arguments are passed. They can now just use the METH_FASTCALL calling method. And _PyArg_NoStackKeywords() can be excluded from public header. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 03:33:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 07:33:49 +0000 Subject: [issue29464] Specialize FASTCALL for functions with positional-only parameters In-Reply-To: <1499671345.08.0.823383503796.issue29464@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Let's remove this function which became useless. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 03:48:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jul 2017 07:48:29 +0000 Subject: [issue29464] Specialize FASTCALL for functions with positional-only parameters In-Reply-To: <1486394565.83.0.903919283463.issue29464@psf.upfronthosting.co.za> Message-ID: <1499672909.67.0.326894741055.issue29464@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2706 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 04:39:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 08:39:31 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499675971.35.0.542111065809.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: I reverted the commit which fixes test_datetime to also test Lib/datetime.py, to repair buildbots. But since I reverted the change, nothing was done so datetime.py is still not tested :-( > The tests enabled by "-utzdata" check UTC to local and back conversions at several points around *every* time transition in *every* timezone. On systems with a complete installation of IANA tzdata, this is a lot of test points. > > These tests were supposed to be exhaustive and I did not expect them to be run by default. that's why I introduced the -utzdata flag in the first place. Alexander: yeah, having an opt-in option to test all timezones makes sense. It's likely to trigger bugs in some corner cases. But the question is really having our CI. Alexander, Serhiy: would you be ok to disable tzdata resource on all our CI (Travis CI, AppVeyor, all buildbots)? *Maybe* we might enable tzdata on selected (fast) buildbots where test_datetime takes less than 20 minutes. But I would prefer to keep the option as an *opt-in*, rather than always running all tests on all CI. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 04:40:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 08:40:39 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499676039.55.0.458882360004.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: > Two timezones (America/New_York and Asia/Tehran) are picked for testing independently from the -utzdata flag. By the way, if someone is aware of other interesting timezones, we may also test more timezones (without tzdata)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 04:56:20 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 10 Jul 2017 08:56:20 +0000 Subject: [issue30171] Emit ResourceWarning in multiprocessing Queue destructor In-Reply-To: <1493214770.49.0.943228970697.issue30171@psf.upfronthosting.co.za> Message-ID: <1499676980.45.0.773744197073.issue30171@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The problem is that multiprocessing.Queue.join_thread() does nothing since the thread wasn't started by a subprocess. I don't understand what this means. Can you clarify a bit? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 04:56:49 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 10 Jul 2017 08:56:49 +0000 Subject: [issue30171] Emit ResourceWarning in multiprocessing Queue destructor In-Reply-To: <1493214770.49.0.943228970697.issue30171@psf.upfronthosting.co.za> Message-ID: <1499677009.52.0.80139641295.issue30171@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Specifically "the thread wasn't started by a subprocess"... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 05:14:47 2017 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 10 Jul 2017 09:14:47 +0000 Subject: [issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing In-Reply-To: <1490694354.71.0.0417616939951.issue29930@psf.upfronthosting.co.za> Message-ID: <1499678087.35.0.244224183984.issue29930@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 05:15:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 09:15:35 +0000 Subject: [issue30171] Emit ResourceWarning in multiprocessing Queue destructor In-Reply-To: <1493214770.49.0.943228970697.issue30171@psf.upfronthosting.co.za> Message-ID: <1499678135.09.0.597431521483.issue30171@psf.upfronthosting.co.za> STINNER Victor added the comment: > Specifically "the thread wasn't started by a subprocess"... I'm talking about this check in Queue._start_thread() of multiprocessing.queues: created_by_this_process = (self._opid == os.getpid()) if not self._joincancelled and not created_by_this_process: self._jointhread = Finalize( self._thread, Queue._finalize_join, [weakref.ref(self._thread)], exitpriority=-5 ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 05:17:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 09:17:50 +0000 Subject: [issue30886] test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499678270.43.0.197344057811.issue30886@psf.upfronthosting.co.za> STINNER Victor added the comment: The warning is a race condition which can be reproduced easily on Linux using attached test_handle_called_with_mp_queue-bug.patch, run: haypo at selma$ ./python -m test --fail-env-changed -m test_handle_called_with_mp_queue test_logging Run tests sequentially 0:00:00 load avg: 0.22 [1/1] test_logging Warning -- threading_cleanup() failed to cleanup 20 threads after 0 sec (count: 20, dangling: 21) Warning -- threading._dangling was modified by test_logging Before: <_weakrefset.WeakSet object at 0x7fe1df5302c8> After: <_weakrefset.WeakSet object at 0x7fe1df5338e0> test_logging failed (env changed) 1 test altered the execution environment: test_logging Total duration: 718 ms Tests result: ENV CHANGED ---------- keywords: +patch Added file: http://bugs.python.org/file46999/test_handle_called_with_mp_queue-bug.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 05:24:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 09:24:34 +0000 Subject: [issue30886] test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499678674.57.0.720799582755.issue30886@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2707 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 05:27:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 09:27:06 +0000 Subject: [issue30886] test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499678826.37.0.565527833699.issue30886@psf.upfronthosting.co.za> STINNER Victor added the comment: https://github.com/python/cpython/pull/2642 fixes the warning. I tested the change with test_handle_called_with_mp_queue-bug.patch: no more warning. Sorry, I don't know multiprocessing to understand the purpose of the removed test. I would like to really make sure that a Queue object doesn't "leak" a thread when I close .close() + .join_thread(). It's surprising that .join_thread() doesn't join anything and leave a thread running in the background. Even if in the common case, when the system load is low, the thread quits quickly thanks to .close(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 05:27:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 09:27:39 +0000 Subject: [issue30886] multiprocessing.Queue.join_thread() does nothing if created and use in the same process In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499678859.78.0.6149916365.issue30886@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +davin, pitrou title: test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x -> multiprocessing.Queue.join_thread() does nothing if created and use in the same process _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 05:28:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 09:28:20 +0000 Subject: [issue30171] Emit ResourceWarning in multiprocessing Queue destructor In-Reply-To: <1493214770.49.0.943228970697.issue30171@psf.upfronthosting.co.za> Message-ID: <1499678900.11.0.24000682034.issue30171@psf.upfronthosting.co.za> STINNER Victor added the comment: Let's discuss created_by_this_process in bpo-30886. This issue is more about adding or not a ResourceWarning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 05:35:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 09:35:17 +0000 Subject: [issue30886] multiprocessing.Queue.join_thread() does nothing if created and use in the same process In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499679317.79.0.287002494251.issue30886@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, interesting, created_by_this_process was already removed from Python 2.7 in bpo-4106: commit 77657e40fa5f43fe6f7ffb6e32da4613dba657e1 Author: Antoine Pitrou Date: Wed Aug 24 22:41:05 2011 +0200 Issue #4106: Fix occasional exceptions printed out by multiprocessing on interpreter shutdown. This bug doesn't seem to exist on 3.2, where daemon threads are killed before Py_Finalize() is entered. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 05:39:14 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 10 Jul 2017 09:39:14 +0000 Subject: [issue30886] multiprocessing.Queue.join_thread() does nothing if created and use in the same process In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499679554.29.0.730296608098.issue30886@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I would like to really make sure that a Queue object doesn't "leak" a thread when I close .close() + .join_thread(). I don't understand how this happens. The Finalize object only acts as an atexit handler. When called as a regular finalize, `self._thread` is dead and therefore `_finalize_join()` doesn't do anything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 05:40:20 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 10 Jul 2017 09:40:20 +0000 Subject: [issue30886] multiprocessing.Queue.join_thread() does nothing if created and use in the same process In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499679620.92.0.0994751137899.issue30886@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Oh, that's because you're calling join_thread() explicitly. I see. I agree that the fix looks desirable then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 05:40:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 09:40:30 +0000 Subject: [issue30886] multiprocessing.Queue.join_thread() does nothing if created and use in the same process In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499679630.2.0.145681370505.issue30886@psf.upfronthosting.co.za> STINNER Victor added the comment: > I don't understand how this happens. If you run "./python -m test --fail-env-changed -m test_handle_called_with_mp_queue test_logging" with attached test_handle_called_with_mp_queue-bug.patch, no finalizer is registered: .join_thread() does nothing, because created_by_this_process is true. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 05:44:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 09:44:24 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 Message-ID: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> New submission from STINNER Victor: 1:36:32 [224/405/1] test_import failed -- running: test_mmap (2236 sec), test_io (2529 sec), test_venv (1437 sec) beginning 6 repetitions 123456 .....test test_import failed -- Traceback (most recent call last): File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\test_import\__init__.py", line 377, in test_concurrency raise exc File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\test_import\__init__.py", line 362, in run import package File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\test_import\data\package\__init__.py", line 2, in package.submodule AttributeError: module 'package' has no attribute 'submodule' ---------- components: Tests, Windows messages: 298044 nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 05:50:21 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 10 Jul 2017 09:50:21 +0000 Subject: [issue30171] Emit ResourceWarning in multiprocessing Queue destructor In-Reply-To: <1493214770.49.0.943228970697.issue30171@psf.upfronthosting.co.za> Message-ID: <1499680221.75.0.921706179932.issue30171@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think a ResourceWarning should be emitted. There is no risk of data loss or resource leak if you don't close a multiprocessing Queue explicitly. Actually, in the real world, I don't think I've ever seen code that closes queues explicitly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 05:56:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 09:56:36 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499680596.67.0.613165872484.issue30891@psf.upfronthosting.co.za> STINNER Victor added the comment: I was able to *easily* (100% failure rate) reproduce the failure with Python 3.6 and 3.7 (master) on Windows using this command: ./python -m test -R 3:100 -m test_concurrency test_import ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 05:59:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 09:59:54 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499680794.15.0.182719867882.issue30891@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't understand if a test_concurrency() failure is a bug in importlib, or a bug in the test :-) ---------- nosy: +brett.cannon, eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 06:02:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 10:02:10 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499680930.97.0.867654971447.issue30891@psf.upfronthosting.co.za> STINNER Victor added the comment: Note: "./python -m test -R 3:100 -m test_concurrency test_import" is just a convenient way to run test_concurrency() "in a loop", in the same process, 100 times. I'm unable to reproduce the bug on Linux, even when I write 3 into /proc/sys/vm/drop_caches while the test is running to drop filesystem caches. I also tried to use a temporary directory in my home (TMPDIR=$HOME/tmp) to use temporary files in ext4 rather than tmpfs. But I don't know if importlib uses temporary files or not :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 06:05:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 10:05:00 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499681100.05.0.665848243246.issue30891@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, the unit test was added 4 days ago: commit b4baacee1adc06edbe30ac7574d17a8cd168e2e0 Author: Serhiy Storchaka Date: Thu Jul 6 08:09:03 2017 +0300 bpo-30814: Fixed a race condition when import a submodule from a package. (#2580) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 06:05:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 10:05:38 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1499681138.1.0.127016434849.issue30814@psf.upfronthosting.co.za> STINNER Victor added the comment: test_concurrency() of test_import fails randomly on Windows: see bpo-30891. ---------- nosy: +haypo resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 06:21:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 10:21:47 +0000 Subject: [issue30886] multiprocessing.Queue.join_thread() does nothing if created and use in the same process In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499682107.75.0.164342636986.issue30886@psf.upfronthosting.co.za> STINNER Victor added the comment: > Oh, that's because you're calling join_thread() explicitly. I see. I agree that the fix looks desirable then. FYI I added join_thread() in my first attempt to fix "Warning -- threading._dangling was modified by test_logging": bpo-30131, commit 8ca2f2faefa8dba323a2e4c4b86efb633d7a53cf. I expected that join_thread() would... join the thread :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 06:22:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 10:22:06 +0000 Subject: [issue30886] multiprocessing.Queue.join_thread() does nothing if created and use in the same process In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499682126.28.0.832317450397.issue30886@psf.upfronthosting.co.za> STINNER Victor added the comment: I suggest to backport the fix up to Python 3.5. ---------- versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 06:40:24 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 10 Jul 2017 10:40:24 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499683224.08.0.767911256283.issue30891@psf.upfronthosting.co.za> Nick Coghlan added the comment: Indeed, Serhiy's been stress-testing some bits of the import system, and finding a few holes made possible by the shift away from a single global import lock to per-module locks. (Issue 30876 is another example of that) Nothing immediately comes to mind as a platform-dependent code path that could explain why that error is showing up on Windows and not on Linux, though. ---------- stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 06:45:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 10:45:25 +0000 Subject: [issue30886] multiprocessing.Queue.join_thread() does nothing if created and use in the same process In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499683525.78.0.379007670991.issue30886@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3b69d911c57ef591ac0c0f47a66dbcad8337f33a by Victor Stinner in branch 'master': bpo-30886: Fix multiprocessing.Queue.join_thread() (#2642) https://github.com/python/cpython/commit/3b69d911c57ef591ac0c0f47a66dbcad8337f33a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 06:46:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 10:46:38 +0000 Subject: [issue30886] multiprocessing.Queue.join_thread() does nothing if created and use in the same process In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499683598.3.0.856965031556.issue30886@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2708 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 06:47:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 10:47:07 +0000 Subject: [issue30886] multiprocessing.Queue.join_thread() does nothing if created and use in the same process In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499683627.12.0.797328200635.issue30886@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2709 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 07:43:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 11:43:19 +0000 Subject: [issue30886] multiprocessing.Queue.join_thread() does nothing if created and use in the same process In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499686999.61.0.74344629969.issue30886@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 69e41807f0851ff1107f949dcdc94dbb0af32acd by Victor Stinner in branch '3.5': bpo-30886: Fix multiprocessing.Queue.join_thread() (#2642) (#2644) https://github.com/python/cpython/commit/69e41807f0851ff1107f949dcdc94dbb0af32acd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 07:43:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 11:43:22 +0000 Subject: [issue30886] multiprocessing.Queue.join_thread() does nothing if created and use in the same process In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499687002.27.0.162275218525.issue30886@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 7f3d65d6e4f8bebaaf996efb1c1adb67eb1724cb by Victor Stinner in branch '3.6': bpo-30886: Fix multiprocessing.Queue.join_thread() (#2642) (#2643) https://github.com/python/cpython/commit/7f3d65d6e4f8bebaaf996efb1c1adb67eb1724cb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 07:49:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 11:49:09 +0000 Subject: [issue30886] multiprocessing.Queue.join_thread() does nothing if created and use in the same process In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499687349.07.0.351709598593.issue30886@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, I applied my fix to 3.5, 3.6 and master branches. Thanks for the review Antoine. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 08:02:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jul 2017 12:02:13 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499688133.06.0.75711987376.issue30891@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Some parts of import machinery are platform depended (see issue30873). I don't have idea what is wrong on Windows. I'm puzzled. test_concurrency itself runs a test in a loop. The only difference between one and several consequent runs of test_concurrency is running setUp() and tearDown() between tests. Victor, try to add importlib.invalidate_caches() inside a loop. Does it cause a failure in a single test_concurrency? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 08:37:31 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jul 2017 12:37:31 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1499690251.22.0.496554487475.issue30822@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If testing with -u tzdata is such expensive, tzdata can be excluded from all resources. There is a precedence with the extralargefile resource (see test_zipfile64). Actually this means that these test will never run until you request this specially. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 08:37:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 12:37:51 +0000 Subject: [issue30866] Add _testcapi.stack_pointer() to measure the C stack consumption In-Reply-To: <1499338279.97.0.650027004501.issue30866@psf.upfronthosting.co.za> Message-ID: <1499690271.72.0.898747848565.issue30866@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 64fa449f559b0e7b0480a177000419a78ebcf3ff by Victor Stinner in branch 'master': bpo-30866: Add _testcapi.stack_pointer() (#2601) https://github.com/python/cpython/commit/64fa449f559b0e7b0480a177000419a78ebcf3ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 08:51:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jul 2017 12:51:42 +0000 Subject: [issue29464] Specialize FASTCALL for functions with positional-only parameters In-Reply-To: <1486394565.83.0.903919283463.issue29464@psf.upfronthosting.co.za> Message-ID: <1499691102.61.0.72560170905.issue29464@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Removed _PyArg_NoStackKeywords() (7e60192fe0dfd763b0d458cf0898ba4f7ac7d81a). ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 08:52:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 12:52:47 +0000 Subject: [issue30873] `SystemError: returned NULL without setting an error` from importing _pickle on Windows In-Reply-To: <1499480964.67.0.223894670164.issue30873@psf.upfronthosting.co.za> Message-ID: <1499691167.93.0.843504792483.issue30873@psf.upfronthosting.co.za> STINNER Victor added the comment: ppperry: First, please create a Python script and attach it to the issue, it would make it easier to reproduce the bug. Second, which Python version did you test? I tested 3.6 and master Git branches on Windows, and I'm unable to reproduce the bug. I'm able to reproduce the bug on Windows using Python 3.6.1, but this version still contains issue30626 bug. I'm unable to reproduce the bug using 3.6.2rc2, so to be, this bug is just a duplicate of issue30626. Please try: https://www.python.org/downloads/release/python-362rc2/ ---------- nosy: +haypo resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> "SystemError: returned NULL without setting an error" from open function _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 09:09:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 13:09:31 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499692171.99.0.835201065788.issue30891@psf.upfronthosting.co.za> STINNER Victor added the comment: > Victor, try to add importlib.invalidate_caches() inside a loop. Does it cause a failure in a single test_concurrency? I added a "importlib.invalidate_caches()" call in the "for i in range(10):" loop. With this change, a single run doesn't fail. It doesn't fix the test neither: with -R 3:100, the command still fails. > Some parts of import machinery are platform depended (see issue30873). I don't think that this issue30873 or issue30626 is platform dependent. > I don't have idea what is wrong on Windows. IMHO it's just that my Windows VM is slow. It's a race condition. If I run "./python -m test -m test_concurrency test_import test_import": the command pass, but when again, it fails. It's pure random :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 09:54:38 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 10 Jul 2017 13:54:38 +0000 Subject: [issue30882] Built-in list disappeared from Python 2.7 intersphinx inventory In-Reply-To: <1499622808.04.0.381858845257.issue30882@psf.upfronthosting.co.za> Message-ID: <1499694878.94.0.283602336095.issue30882@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- assignee: docs at python -> Mariatta nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 09:59:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 13:59:46 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499695186.19.0.0575292245907.issue30891@psf.upfronthosting.co.za> STINNER Victor added the comment: I added print(id(package)) in Lib/test/test_import/data/package/__init__.py: when the bug occurs on my Windows VM, I see two print with two different identifiers. Moreover, when the bug occurs, first id(sys.modules['package']) is the first identifier, and then package is replaced with the new 'package' package in sys.modules (new identifier). I don't understand something: sys.modules isn't supposed to be protected by a lock? I checked if _installed_safely.__enter__() if the _imp is held: it isn't held when _bootstrap._setup() is called, nor when _imp._install_external_importers() is called. But even if I patch these two functions to acquire the lock, Python startup fails on importing a codec module, because the _imp lock is not held in _installed_safely.__enter__(). So maybe sys.modules dict is supposed to be protected by a different lock, maybe indirectly? I hack _bootstrap._find_and_load_unlocked() to sleep 10 ms if name == 'package'. With this change, test_concurrency() fails immediatly on my Linux box. * Apply attached importlib_sleep.patch (written for the current master branch) * Recompile: make regen-importlib && make * Run test_concurrency() just once: ./python -m test -m test_concurrency -v test_import * You get the bug By the way, importlib_sleep.patch changes test_concurrency() to run the test exactly once (it changes to loop to a single iteration, instead of 10). Is it normal that a sleep makes import failing? Imports are not supposed to be atomic? -- I tried to similar hack before the commit b4baacee1adc06edbe30ac7574d17a8cd168e2e0: * add a sleep in importlib * copy test_concurrency() from master * Run test_concurrency() * The test pass While I'm not sure of my hack, it *seems* like sys.modules was somehow atomic before this commit? ---------- keywords: +patch Added file: http://bugs.python.org/file47000/importlib_sleep.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 10:21:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jul 2017 14:21:50 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1499696510.12.0.887952543373.issue30814@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2710 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 10:23:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jul 2017 14:23:52 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1499696632.92.0.356903892443.issue30814@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is worth to backport the test to older versions. Just to be sure that this is a 3.6 regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 10:25:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 14:25:32 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499696732.45.0.886544950189.issue30891@psf.upfronthosting.co.za> STINNER Victor added the comment: FYI test_concurrency() added by commit b4baacee1adc06edbe30ac7574d17a8cd168e2e0 doesn't really test bpo-30814. I backported the unit test on 1ccbad9c95cf5782a1329eeaecba6e3eb0c37cb8 (commit before b4baacee1adc06edbe30ac7574d17a8cd168e2e0), and the test pass, whereas I expected it to fail before the fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 10:44:11 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 10 Jul 2017 14:44:11 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499697851.82.0.77599907618.issue30891@psf.upfronthosting.co.za> Nick Coghlan added the comment: No, there's no global lock on the import system these days. Instead, imports are supposed to be atomic on a per-module basis, but issue 30814 showed that some of the accesses to the shared state management (which *is* still supposed to be protected by the import lock) could get into trouble given concurrent imports from different threads. However, the new test exercises an interesting sequence of per-module lock acquisition, since each thread effectively runs through this sequence: - import package # Test case - import package.submodule # Package init - import package # Parent package import That moves back-and-forth between C & Python in a few different places, and hence may have been relying on the GIL to keep the parts executed in C atomic. So now I'm wondering whether or not this new problem might be due to moving the _imp.acquire_lock() calls into Python code as part of issue 30814, as that creates a window near the start of _find_and_load() where the thread may end up holding neither the GIL *nor* the import lock. By contrast, when the import lock was acquired in C, then by the time the Python code starts running (potentially releasing the GIL), the import lock has already been acquired. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 10:47:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 14:47:33 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499698053.95.0.113905950148.issue30891@psf.upfronthosting.co.za> STINNER Victor added the comment: > FYI test_concurrency() added by commit b4baacee1adc06edbe30ac7574d17a8cd168e2e0 doesn't really test bpo-30814. I backported the unit test on 1ccbad9c95cf5782a1329eeaecba6e3eb0c37cb8 (commit before b4baacee1adc06edbe30ac7574d17a8cd168e2e0), and the test pass, whereas I expected it to fail before the fix. Oops, please ignore this comment, it was a mistake. After clearing my repository (removing __pycache__ directories), the test failed. I forgot to copy the Lib/test/test_import/data/package/ directory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 10:52:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jul 2017 14:52:56 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499698376.61.0.990900294428.issue30891@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: test_concurrency is failed before b4baacee1adc06edbe30ac7574d17a8cd168e2e0 on my computer. I think it tests the issue30814 bug even if it doesn't fail on all computers. At the end, this is a race condition, and the failure is probabilistic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 11:09:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 15:09:27 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499699367.15.0.953713520885.issue30891@psf.upfronthosting.co.za> STINNER Victor added the comment: Using attached importlib_sleep.patch, you can *see* the race condition with: diff --git a/Lib/test/test_import/data/package/__init__.py b/Lib/test/test_import/data/package/__init__.py index a4f2bc3..f07eb11 100644 --- a/Lib/test/test_import/data/package/__init__.py +++ b/Lib/test/test_import/data/package/__init__.py @@ -1,2 +1,3 @@ import package.submodule +print("package: id=%#x" % id(package)) package.submodule Example of output: --- haypo at selma$ ./python -m test -m test_concurrency -v test_import package: id=0x7fb497400d58 package: id=0x7fb49744d458 test test_import failed -- (...) --- Lib/test/test_import/data/package/__init__.py is run twice instead of being run once. A lock is missing somewhere on the package module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 11:12:21 2017 From: report at bugs.python.org (DelTos) Date: Mon, 10 Jul 2017 15:12:21 +0000 Subject: [issue30890] Comment error in Korean language In-Reply-To: <1499668419.76.0.67681471989.issue30890@psf.upfronthosting.co.za> Message-ID: <1499699541.96.0.0046688538546.issue30890@psf.upfronthosting.co.za> Changes by DelTos : ---------- versions: +Python 3.6 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 11:13:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jul 2017 15:13:34 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499699614.31.0.515452422043.issue30891@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2711 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 11:17:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jul 2017 15:17:44 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499699864.19.0.6216812134.issue30891@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Victor tested test_concurrency on 3.5, and it is failed on slow Windows VM. Therefore the bug exists on 3.5 and is not related to recent changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 11:28:52 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 10 Jul 2017 15:28:52 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499700532.06.0.543256565081.issue30891@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm about to head to bed so I'll get back to this discussion tomorrow, but in the meantime: Victor, maybe it would make sense to reformulate your reproducer as a monkeypatch for _find_and_load_unlocked() that injects the 10 ms sleep from the test case if it finds _frozen_importlib in sys.modules? That is, temporarily replacing it with something like: orig_find_and_load_unlocked = _frozen_importlib._find_and_load_unlocked def _slow_find_and_load_unlocked(name, import_): time.sleep(0.010) return orig_find_and_load_unlocked(name, import_) That way, we'd hopefully be able to reproduce the failure independently of the slower buildbot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 12:12:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 16:12:05 +0000 Subject: [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499703125.4.0.900518363268.issue30891@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2712 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 12:24:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 16:24:05 +0000 Subject: [issue30891] importlib: _find_and_load() race condition on sys.modules[name] check In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499703845.95.0.273199935193.issue30891@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 -> importlib: _find_and_load() race condition on sys.modules[name] check versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 12:24:45 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 10 Jul 2017 16:24:45 +0000 Subject: [issue30183] [HPUX] compilation error in pytime.c with cc compiler In-Reply-To: <1493267090.1.0.00115311377195.issue30183@psf.upfronthosting.co.za> Message-ID: <1499703885.33.0.488401606604.issue30183@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 12:47:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 16:47:29 +0000 Subject: [issue30892] _elementtree: assertion error if stdlib copy module is overriden Message-ID: <1499705249.36.0.609429772513.issue30892@psf.upfronthosting.co.za> New submission from STINNER Victor: The _elementtree fails with an assertion error if the stdlib copy module is overriden by the user. haypo at selma$ mkdir copy/ haypo at selma$ touch copy/__init__.py haypo at selma$ ./python -c 'import _elementtree' python: Objects/abstract.c:153: PyObject_GetItem: Assertion `(item != NULL) ^ (PyErr_Occurred() != NULL)' failed. Aborted (core dumped) ---------- messages: 298073 nosy: haypo priority: normal severity: normal status: open title: _elementtree: assertion error if stdlib copy module is overriden versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 12:49:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 16:49:04 +0000 Subject: [issue30892] _elementtree: assertion error if stdlib copy module is overriden In-Reply-To: <1499705249.36.0.609429772513.issue30892@psf.upfronthosting.co.za> Message-ID: <1499705344.12.0.977496263014.issue30892@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2713 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 13:50:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jul 2017 17:50:48 +0000 Subject: [issue30851] IDLE: configdialog -- fix tkinter Variables In-Reply-To: <1499217939.06.0.00487588238252.issue30851@psf.upfronthosting.co.za> Message-ID: <1499709048.77.0.572133114215.issue30851@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset aa8d0a24694bea05061f1920ec3f944a9e6799d5 by terryjreedy (csabella) in branch 'master': bpo-30851: IDLE: Remove unused tk variables in configdialog. (#2626) https://github.com/python/cpython/commit/aa8d0a24694bea05061f1920ec3f944a9e6799d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 13:53:24 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jul 2017 17:53:24 +0000 Subject: [issue30851] IDLE: configdialog -- fix tkinter Variables In-Reply-To: <1499217939.06.0.00487588238252.issue30851@psf.upfronthosting.co.za> Message-ID: <1499709204.92.0.830608889938.issue30851@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2714 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 14:00:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jul 2017 18:00:32 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499709632.01.0.0105902462498.issue30870@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Serhiy, I tried tkinter.test.support.simulate_mouse_click to test this patch but it seems not to work. Code at end of previous message. Any idea on how to fix? ---------- nosy: +serhiy.storchaka stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 14:47:55 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jul 2017 18:47:55 +0000 Subject: [issue30780] IDLE: configdialog - add tests for ConfigDialog GUI. In-Reply-To: <1498516711.25.0.892352273971.issue30780@psf.upfronthosting.co.za> Message-ID: <1499712475.83.0.0641744777879.issue30780@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- dependencies: +IDLE: configdialog/fonts: change font when select by key up/down _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 14:49:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jul 2017 18:49:22 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499712562.76.0.923026847563.issue30870@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It isn't my. It was added by Guilherme in r69050. I'll take a look at code tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 15:11:21 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 10 Jul 2017 19:11:21 +0000 Subject: [issue30893] Expose importlib._bootstrap._ModuleLockManager in importlib.machinery Message-ID: <1499713881.32.0.331223835576.issue30893@psf.upfronthosting.co.za> New submission from Brett Cannon: Based on all the work currently going into fixing the locking situation for imports, it's probably a good idea to expose it publicly so others can use it. ---------- components: Library (Lib) messages: 298077 nosy: brett.cannon priority: normal severity: normal status: open title: Expose importlib._bootstrap._ModuleLockManager in importlib.machinery type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 15:11:26 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 10 Jul 2017 19:11:26 +0000 Subject: [issue30893] Expose importlib._bootstrap._ModuleLockManager in importlib.machinery In-Reply-To: <1499713881.32.0.331223835576.issue30893@psf.upfronthosting.co.za> Message-ID: <1499713886.15.0.106800130376.issue30893@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +importlib: _find_and_load() race condition on sys.modules[name] check _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 15:11:35 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 10 Jul 2017 19:11:35 +0000 Subject: [issue30893] Expose importlib._bootstrap._ModuleLockManager in importlib.machinery In-Reply-To: <1499713881.32.0.331223835576.issue30893@psf.upfronthosting.co.za> Message-ID: <1499713895.44.0.0448608093602.issue30893@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 15:11:49 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jul 2017 19:11:49 +0000 Subject: [issue30851] IDLE: configdialog -- fix tkinter Variables In-Reply-To: <1499217939.06.0.00487588238252.issue30851@psf.upfronthosting.co.za> Message-ID: <1499713909.72.0.611782220963.issue30851@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 8e3f73e5499a5bc575a5e7ad4ee0f16b1aaae829 by terryjreedy in branch '3.6': [3.6] bpo-30851: IDLE: Remove unused tk variables in configdialog. (GH-2626) (#2648) https://github.com/python/cpython/commit/8e3f73e5499a5bc575a5e7ad4ee0f16b1aaae829 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 15:15:04 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jul 2017 19:15:04 +0000 Subject: [issue30851] IDLE: configdialog -- fix tkinter Variables In-Reply-To: <1499217939.06.0.00487588238252.issue30851@psf.upfronthosting.co.za> Message-ID: <1499714104.54.0.150397078651.issue30851@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- dependencies: -IDLE: configdialog - add tests for ConfigDialog GUI. resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 15:58:18 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jul 2017 19:58:18 +0000 Subject: [issue20917] Idle: Enhance font change notification system In-Reply-To: <1394741097.69.0.88319958865.issue20917@psf.upfronthosting.co.za> Message-ID: <1499716698.58.0.367769188187.issue20917@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I believe I saw somewhere that the 'somehow' in the opening post is looping through the windows listed under the Window tab. This issue was inspired by #17642, which allows hotkeys (^-, ^+) and wheel to change font size in editor window. If the size change only applies to the current window, then only the CodeContext for that window should be notified. If CodeContext becomes a feature rather than extension, #27099, then code editor windows could know they have a code context and notify it when they get notified. That will not help external extensions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 16:28:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 20:28:06 +0000 Subject: [issue30892] _elementtree: assertion error if stdlib copy module is overriden In-Reply-To: <1499705249.36.0.609429772513.issue30892@psf.upfronthosting.co.za> Message-ID: <1499718486.4.0.529420822095.issue30892@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b136f11f3a51f9282ae992bac68f170ca5563b55 by Victor Stinner in branch 'master': bpo-30892: Fix _elementtree module initialization (#2647) https://github.com/python/cpython/commit/b136f11f3a51f9282ae992bac68f170ca5563b55 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 16:30:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 20:30:16 +0000 Subject: [issue30892] _elementtree: assertion error if stdlib copy module is overriden In-Reply-To: <1499705249.36.0.609429772513.issue30892@psf.upfronthosting.co.za> Message-ID: <1499718616.11.0.8309881812.issue30892@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2715 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 16:31:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 20:31:28 +0000 Subject: [issue30892] _elementtree: assertion error if stdlib copy module is overriden In-Reply-To: <1499705249.36.0.609429772513.issue30892@psf.upfronthosting.co.za> Message-ID: <1499718688.59.0.169100008081.issue30892@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2716 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 16:52:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 20:52:34 +0000 Subject: [issue30891] importlib: _find_and_load() race condition on sys.modules[name] check In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499719954.32.0.70650409861.issue30891@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4f9a446f3fb42f800e73cd9414dd1eccb3ca4fa7 by Victor Stinner in branch 'master': bpo-30891: Fix importlib _find_and_load() race condition (#2646) https://github.com/python/cpython/commit/4f9a446f3fb42f800e73cd9414dd1eccb3ca4fa7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 16:56:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 20:56:36 +0000 Subject: [issue30891] importlib: _find_and_load() race condition on sys.modules[name] check In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499720196.98.0.764534002956.issue30891@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2717 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 17:06:59 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 10 Jul 2017 21:06:59 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499720819.8.0.721609640092.issue29854@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset bfa4fe4f39dd8b5ce1a0b649cedd36857859081a by Berker Peksag (Nir Soffer) in branch '2.7': [2.7] bpo-29854: Fix segfault in call_readline() (GH-728) https://github.com/python/cpython/commit/bfa4fe4f39dd8b5ce1a0b649cedd36857859081a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 17:07:26 2017 From: report at bugs.python.org (George Gillan) Date: Mon, 10 Jul 2017 21:07:26 +0000 Subject: [issue30894] Python 3.6.1 String Literal Error Not Going to sys.stderr Message-ID: <1499720846.63.0.81780429971.issue30894@psf.upfronthosting.co.za> New submission from George Gillan: Python 3.6.1 String Literal Error Not Going to sys.stderr Using Windows 7 and Python 3.6.1. Attempting to redirect sys.stderr to a file. The application will be deployed via .pyw file instead of .py so the GUI application runs without a console window. Is this fixable or 'as-is' due to the nature of the way the interpreter scans the code? The following code worked as intended. #!/usr/bin/env python3.6 errfile = 'test_err.txt' import sys errorlog = open(errfile, 'w') sys.stderr = errorlog 1/0 The code above produced a file called test_err.txt with the following contents: Traceback (most recent call last): File "C:\Users\George\Coding\Python\test\mintest.py", line 8, in 1/0 ZeroDivisionError: division by zero The following code did not work as intended. #!/usr/bin/env python3.6 errfile = 'test_err.txt' import sys errorlog = open(errfile, 'w') sys.stderr = errorlog print("test) The code above did not create the file test_err.txt with the error going to the console window instead. Copy-paste from the Windows console. The successful test (first) showed nothing in the console window; the error was logged to the file as noted above. The unsuccessful test (second) did not create the file, instead the error was sent to the console. C:\Users\George\Coding\Python\test>mintest C:\Users\George\Coding\Python\test>mintest File "C:\Users\George\Coding\Python\test\mintest.py", line 8 print("test) ^ SyntaxError: EOL while scanning string literal C:\Users\George\Coding\Python\test> PS: This is my first bug/issue submission here. Please coach me as needed if I messed it up. ---------- components: Interpreter Core files: Python361_bug.txt messages: 298083 nosy: George Gillan priority: normal severity: normal status: open title: Python 3.6.1 String Literal Error Not Going to sys.stderr type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47001/Python361_bug.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 17:09:39 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 10 Jul 2017 21:09:39 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1499720979.08.0.634622176515.issue29854@psf.upfronthosting.co.za> Berker Peksag added the comment: Ok, I think we can finally close this one :) Thank you, everyone! ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 17:12:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 21:12:39 +0000 Subject: [issue30892] _elementtree: assertion error if stdlib copy module is overriden In-Reply-To: <1499705249.36.0.609429772513.issue30892@psf.upfronthosting.co.za> Message-ID: <1499721159.78.0.160649064331.issue30892@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 044e156426825acac8b6c6d1ce14d5b7bcb20bc9 by Victor Stinner in branch '3.6': bpo-30892: Fix _elementtree module initialization (#2647) (#2649) https://github.com/python/cpython/commit/044e156426825acac8b6c6d1ce14d5b7bcb20bc9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 17:13:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 21:13:51 +0000 Subject: [issue30892] _elementtree: assertion error if stdlib copy module is overriden In-Reply-To: <1499705249.36.0.609429772513.issue30892@psf.upfronthosting.co.za> Message-ID: <1499721231.55.0.73223132469.issue30892@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 7f567e7472dd6c3d066eec1c204301df251484b5 by Victor Stinner in branch '3.5': bpo-30892: Fix _elementtree module initialization (#2647) (#2650) https://github.com/python/cpython/commit/7f567e7472dd6c3d066eec1c204301df251484b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 17:15:32 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Mon, 10 Jul 2017 21:15:32 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1499721332.19.0.0758868620888.issue27099@psf.upfronthosting.co.za> Changes by Charles Wohlganger : ---------- pull_requests: +2718 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 17:16:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 21:16:29 +0000 Subject: [issue30891] importlib: _find_and_load() race condition on sys.modules[name] check In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499721389.52.0.402021946769.issue30891@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fe6e686c27ce3a3ecdf03803cff7e230dee5530d by Victor Stinner in branch '3.6': bpo-30891: Fix importlib _find_and_load() race condition (#2646) (#2651) https://github.com/python/cpython/commit/fe6e686c27ce3a3ecdf03803cff7e230dee5530d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 17:23:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 21:23:57 +0000 Subject: [issue30891] importlib: _find_and_load() race condition on sys.modules[name] check In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499721837.75.0.782030510365.issue30891@psf.upfronthosting.co.za> STINNER Victor added the comment: Backporting the fix ot Python 3.5 doesn't seem trivial, 3.5 lacks many changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 17:40:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 21:40:03 +0000 Subject: [issue30886] multiprocessing.Queue.join_thread() does nothing if created and use in the same process In-Reply-To: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> Message-ID: <1499722803.75.0.78668168923.issue30886@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not sure that the bug is fully fixed, I still saw a warning on: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/561/ This build tested the commit aa8d0a24694bea05061f1920ec3f944a9e6799d5 which is more recent than commit 3b69d911c57ef591ac0c0f47a66dbcad8337f33a. test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest) ... Warning -- threading_cleanup() failed to cleanup -1 threads after 5 sec (count: 0, dangling: 1) ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 17:46:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 21:46:12 +0000 Subject: [issue30714] test_ssl fails with openssl 1.1.0f In-Reply-To: <1497972401.5.0.807136343886.issue30714@psf.upfronthosting.co.za> Message-ID: <1499723172.3.0.510130911273.issue30714@psf.upfronthosting.co.za> STINNER Victor added the comment: The test now fails on AMD64 Debian PGO 3.x: http://buildbot.python.org/all/builders/AMD64%20Debian%20PGO%203.x/builds/985/steps/test/logs/stdio FAIL: test_alpn_protocols (test.test_ssl.ThreadedTests) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 17:50:21 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jul 2017 21:50:21 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox In-Reply-To: <1471117947.7.0.659308305751.issue27755@psf.upfronthosting.co.za> Message-ID: <1499723421.69.0.747822817742.issue27755@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I did more experiments with DOM (DynamicOptionMenu) and Combobox (CB). This was partly to evaluate CB as replacement for DOM for font size; partly to consider CB for the font list. At least by default, both start closed. Font list should start open. CB has an Entry area, DOM does not. They get focus by clicking. Both open with Down or click on Down button. DOM also opens on Up, not essential. CB adds scrollbar if needed. DOM? Needed for font list. Up and Down move the selection highlight but do not select. Selection by click and close the box and generate <> This is unlike Listbox where moving highlight generates <>. #30870 fixed code so that Up and Down, in addition to click, caused sample change. I want to keep this for font choice and add it for size choice. For CB, click on Down button closes without changing selection. For DOM, it does not, a deficiency. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 18:05:15 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jul 2017 22:05:15 +0000 Subject: [issue24776] IDLE: Improve config dialog font change user interface In-Reply-To: <1438463567.56.0.28070163335.issue24776@psf.upfronthosting.co.za> Message-ID: <1499724315.12.0.518274209278.issue24776@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Make this the master issue for improving the font tab user interface by improving components and rearranging them. With basic tests done, I am moving this up in priority. Related issues currently open. #30870 (dependency) made Up/Down change font selection; unit test needed. #27755 replaces IDLE's custom DynOptionMenu with ttk.Combobox. Comboboxes allow key entry of a value and the arrow toggles. See msg298091 for comparison and evaluation for font page. #13802 (dependency) is about the improving the sample display. #17642 is about font resizing by hot key and wheel in editor. #20917 is about the font change notification system. Additional changes for this issue or new related issues. * Selecting a font by name (as well as a font size by number) can be done with an entry box with a validator linked to the listbox. If a ttk Combobox can be locked open, I would try that. See #27755. For a demo of another alternative, run the tk fontchooser. import tkinter root = tkinter.Tk() root.tk.call('tk', 'fontchooser', 'show') For IDLE, I like some parts, not others. I view it as an alternate mockup for ideas to build on. * Mark's mockup removes "Base Editor Font". If an editor window can have its font individually resized, then the settings on the font page define just that. 'Font Size' would then have to be 'Starting [or Default] Font Size'. * Font size a slider? I am not convinced. It would have to be vertical to go up to 40. (I added larger sizes by request for classroom projector use.) On the other hand, it would allow any size in the given range. A spinbox that could be spun by mousewheel would also and stay compact. Or use a ttk Combobox. * See #13802 for discussion of sample display. * Indent. I don't understand "cries out to be moved (usually when people are intending to increase their font size)." But I think it take too much space and should be shrunk to a spin box or drop box. Reduced to a single line, I am thinking of moving it to the General tab, or perhaps a new Editor tab. It does not particularly belong with font selection. * Factor the Font page, with associated Variables and their tracers, other attributes, and methods, into a FontPage class. ---------- dependencies: +IDLE Prefernces/Fonts: use multiple alphabets in examples, IDLE: configdialog/fonts: change font when select by key up/down, Retire DynOptionMenu with a ttk Combobox priority: low -> normal title: Improve Fonts/Tabs UX for IDLE -> IDLE: Improve config dialog font change user interface versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 18:26:02 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 10 Jul 2017 22:26:02 +0000 Subject: [issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address In-Reply-To: <1499633339.94.0.136665886268.issue30883@psf.upfronthosting.co.za> Message-ID: <1499725562.82.0.525483555738.issue30883@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: -> needs patch type: -> behavior versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 18:27:50 2017 From: report at bugs.python.org (Yelson Chevarrias Huaman) Date: Mon, 10 Jul 2017 22:27:50 +0000 Subject: [issue30895] Decimal arithmetic sum error Message-ID: <1499725670.5.0.432041397966.issue30895@psf.upfronthosting.co.za> New submission from Yelson Chevarrias Huaman: Decimal arithmetic sum error ---------- components: Interpreter Core files: csm.png messages: 298093 nosy: Yelson Chevarrias Huaman priority: normal severity: normal status: open title: Decimal arithmetic sum error type: performance versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file47002/csm.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 18:30:29 2017 From: report at bugs.python.org (Yelson Chevarrias Huaman) Date: Mon, 10 Jul 2017 22:30:29 +0000 Subject: [issue30895] Decimal arithmetic sum error In-Reply-To: <1499725670.5.0.432041397966.issue30895@psf.upfronthosting.co.za> Message-ID: <1499725829.92.0.351557571906.issue30895@psf.upfronthosting.co.za> Changes by Yelson Chevarrias Huaman : ---------- type: performance -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 18:44:31 2017 From: report at bugs.python.org (Yelson Chevarrias Huaman) Date: Mon, 10 Jul 2017 22:44:31 +0000 Subject: [issue30895] Decimal arithmetic sum error In-Reply-To: <1499725670.5.0.432041397966.issue30895@psf.upfronthosting.co.za> Message-ID: <1499726670.99.0.46728467862.issue30895@psf.upfronthosting.co.za> Changes by Yelson Chevarrias Huaman : ---------- versions: +Python 3.3, Python 3.4, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 18:50:02 2017 From: report at bugs.python.org (Zachary Ware) Date: Mon, 10 Jul 2017 22:50:02 +0000 Subject: [issue30895] Decimal arithmetic sum error In-Reply-To: <1499725670.5.0.432041397966.issue30895@psf.upfronthosting.co.za> Message-ID: <1499727002.72.0.900835399332.issue30895@psf.upfronthosting.co.za> Zachary Ware added the comment: https://docs.python.org/3/tutorial/floatingpoint.html ---------- nosy: +zach.ware resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 19:27:55 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Mon, 10 Jul 2017 23:27:55 +0000 Subject: [issue30896] BytesWarning in re module when compiling certain bytes patterns Message-ID: <1499729275.42.0.384122493933.issue30896@psf.upfronthosting.co.za> New submission from Jelle Zijlstra: This code in sre_parse (line 738 and down): warnings.warn( 'Flags not at the start of the expression %s%s' % ( source.string[:20], # truncate long regexes ' (truncated)' if len(source.string) > 20 else '', ), DeprecationWarning, stacklevel=7 ) triggers a BytesWarning if you do `_line_re = re.compile(br'^(.*?)$(?m)')`. The fix should be simple; I can try to get a PR in over the next few days. ---------- components: Library (Lib) messages: 298095 nosy: Jelle Zijlstra, ezio.melotti, serhiy.storchaka priority: normal severity: normal status: open title: BytesWarning in re module when compiling certain bytes patterns versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 19:35:24 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 10 Jul 2017 23:35:24 +0000 Subject: [issue12910] urrlib.quote quotes too many chars, e.g., '()' In-Reply-To: <1315304798.98.0.174203108938.issue12910@psf.upfronthosting.co.za> Message-ID: <1499729724.68.0.466991917253.issue12910@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 20:46:41 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 11 Jul 2017 00:46:41 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1499734001.59.0.781640866137.issue30781@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +2719 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 21:16:40 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 11 Jul 2017 01:16:40 +0000 Subject: [issue30894] Python 3.6.1 String Literal Error Not Going to sys.stderr In-Reply-To: <1499720846.63.0.81780429971.issue30894@psf.upfronthosting.co.za> Message-ID: <1499735800.63.0.899225940023.issue30894@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Before Python runs your code, it compiles it to byte-code. A SyntaxError means that the code cannot be compiled, and so it does not run. So the SyntaxError is raised *before* any of the code runs, and standard error is not re-directed. This is expected behaviour, not a bug. You cannot catch compile-time errors at run-time. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 21:20:14 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 11 Jul 2017 01:20:14 +0000 Subject: [issue30895] Decimal arithmetic sum error In-Reply-To: <1499725670.5.0.432041397966.issue30895@psf.upfronthosting.co.za> Message-ID: <1499736014.65.0.777959538096.issue30895@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Also, for the future, please do not post screen shots of text. Copy and Paste the text from the console. Thank you. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 21:22:17 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 11 Jul 2017 01:22:17 +0000 Subject: [issue30893] Expose importlib._bootstrap._ModuleLockManager in importlib.machinery In-Reply-To: <1499713881.32.0.331223835576.issue30893@psf.upfronthosting.co.za> Message-ID: <1499736137.19.0.973776620292.issue30893@psf.upfronthosting.co.za> Nick Coghlan added the comment: Based on https://github.com/python/cpython/pull/2646/files#r126574323, I'm actually thinking along different lines: I'm starting to think we should move the current sys.modules to sys._modules, and make sys.modules a synchronised wrapper that does the following for all get/set/delete operations: # Acquires the global import lock # Acquires the relevant module lock # Releases the global import lock # Mutates sys._modules # Releases the module lock That said, I'm not sure that would be sufficient to give the desired level of atomicity, so exposing ModuleLockManager may actually be a better approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 22:03:20 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 02:03:20 +0000 Subject: [issue30803] Truth value of sets not properly documented In-Reply-To: <1498743378.1.0.0570911503542.issue30803@psf.upfronthosting.co.za> Message-ID: <1499738600.99.0.800176443434.issue30803@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Responding here to Peter's PR comment. Peter opened this issue with the claim that the doc failed a specific test case-- document the truth value of set(). Since mappings are (or can be viewed as) a specialized type of set, I always considered that the empty mapping line implicitly covered sets. But I acknowledge that this is not clear for everyone. The simplest fix to make the test pass would be: "any unordered collection, for example, set(), {}". This should also cover frozenset and a possible frozendict. Raymond noted that 'user-defined' in the last bullet point is wrong (it implies that built-in functions are different) and should be deleted. He then combined the corrected rule for false with the default rule in the next sentence to produce a succinct statement of the actual rule. (In CPython, 'default' is literally true. Class 'object' has neither __bool__ nor __len__; ditto for all subclasses that do not add one.) With a minor change, I like this statement and agree that it should be moved above the examples. But I think the bullet points should be reduced to just 3, rewritten, and single spaced, but not smashed into running text. I suggest replacing everything between the first sentence (ending with 'below.') and the last two (beginning with 'Operations') with: "By default, an object is considered true unless its class defines either a __bool__ method that returns False or __len__ method that returns zero, when called with the object. Here are most of the built-in objects considered false. * constants defined to be false: None and False. * numeric 0 of any type: 0, 0.0, Decimal(0), Fractions(0, 1) * empty sequences and collections: '', (), [], {}, set(), range(0) " Before writing the above, I checked that an instance attribute __bool__ = lambda: False is not consulted by bool(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 22:11:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 02:11:08 +0000 Subject: [issue30896] BytesWarning in re module when compiling certain bytes patterns In-Reply-To: <1499729275.42.0.384122493933.issue30896@psf.upfronthosting.co.za> Message-ID: <1499739068.74.0.784316075881.issue30896@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report Jelle, but this was fixed in issue30605. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 22:14:47 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 11 Jul 2017 02:14:47 +0000 Subject: [issue28879] smtplib send_message should add Date header if it is missing, per RFC5322 In-Reply-To: <1480952895.22.0.418354723664.issue28879@psf.upfronthosting.co.za> Message-ID: <1499739287.95.0.19153207205.issue28879@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +2720 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 22:25:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 02:25:27 +0000 Subject: [issue30890] Comment error in Korean language In-Reply-To: <1499668419.76.0.67681471989.issue30890@psf.upfronthosting.co.za> Message-ID: <1499739927.56.0.880402059794.issue30890@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Did you actually test on 3.7? If you did, and got different results, then this is not an IDLE issue, as it is unchanged in 3.7. This might be a tcl/tk issue rather than IDLE issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 22:27:33 2017 From: report at bugs.python.org (DelTos) Date: Tue, 11 Jul 2017 02:27:33 +0000 Subject: [issue30890] Comment error in Korean language In-Reply-To: <1499668419.76.0.67681471989.issue30890@psf.upfronthosting.co.za> Message-ID: <1499740053.62.0.640856479493.issue30890@psf.upfronthosting.co.za> DelTos added the comment: It was my mistake. I tested it on IDLE 3.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 22:31:54 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 02:31:54 +0000 Subject: [issue30890] Comment error in Korean language In-Reply-To: <1499668419.76.0.67681471989.issue30890@psf.upfronthosting.co.za> Message-ID: <1499740314.44.0.49394522808.issue30890@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I can seen that the last char is not colored correctly, but not that it is small. The white pixels seems to comprise a character that is about as big as the others. But I don't know Hangul chars. What version of Tk (see Help => About IDLE), and what OS? Please upload your main.py so I can load it into my IDLE on Win10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 22:35:10 2017 From: report at bugs.python.org (Cooper Lees) Date: Tue, 11 Jul 2017 02:35:10 +0000 Subject: [issue30897] Add a ismount() to pathlib Message-ID: <1499740510.8.0.375940091685.issue30897@psf.upfronthosting.co.za> New submission from Cooper Lees: It would be nice to have pathlib.Path objects to have a ismount() function to return a bool if it is a POSIX mount point, similar to `os.path.ismount(path)` ---------- components: Library (Lib) messages: 298104 nosy: cooperlees priority: normal severity: normal status: open title: Add a ismount() to pathlib type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 22:35:23 2017 From: report at bugs.python.org (DelTos) Date: Tue, 11 Jul 2017 02:35:23 +0000 Subject: [issue30890] Comment error in Korean language In-Reply-To: <1499668419.76.0.67681471989.issue30890@psf.upfronthosting.co.za> Message-ID: <1499740523.8.0.955718792302.issue30890@psf.upfronthosting.co.za> DelTos added the comment: I attched simple main.py file. TK version is 8.6.6 and OS is Windows 10. ---------- Added file: http://bugs.python.org/file47003/main.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 23:07:33 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 03:07:33 +0000 Subject: [issue30890] Comment error in Korean language In-Reply-To: <1499668419.76.0.67681471989.issue30890@psf.upfronthosting.co.za> Message-ID: <1499742453.46.0.880895566533.issue30890@psf.upfronthosting.co.za> Terry J. Reedy added the comment: File loads normally for me. What happens when you load it as is? If you need to type something, can you produce effect with entering numbers with keypad, without using any special Korean entry method that I would not have? If so, give exact directions and since we both have win10, I will try. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 23:16:10 2017 From: report at bugs.python.org (Cooper Lees) Date: Tue, 11 Jul 2017 03:16:10 +0000 Subject: [issue30897] Add a is_mount() to pathlib In-Reply-To: <1499740510.8.0.375940091685.issue30897@psf.upfronthosting.co.za> Message-ID: <1499742970.83.0.208408406755.issue30897@psf.upfronthosting.co.za> Changes by Cooper Lees : ---------- title: Add a ismount() to pathlib -> Add a is_mount() to pathlib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 23:20:38 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 11 Jul 2017 03:20:38 +0000 Subject: [issue30890] Comment error in Korean language In-Reply-To: <1499668419.76.0.67681471989.issue30890@psf.upfronthosting.co.za> Message-ID: <1499743238.04.0.519834394059.issue30890@psf.upfronthosting.co.za> Louie Lu added the comment: I'm using Arch Linux with HIME input method, and using 3.7a0 Python. But I can't reproduce your problem in Korean input. Could you provide how to type in the sentence in your picture? (Roman or the stroke maybe) and your environment? thanks. ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 23:20:53 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 11 Jul 2017 03:20:53 +0000 Subject: [issue30890] Comment error in Korean language In-Reply-To: <1499668419.76.0.67681471989.issue30890@psf.upfronthosting.co.za> Message-ID: <1499743253.23.0.629209409497.issue30890@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 23:21:43 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 11 Jul 2017 03:21:43 +0000 Subject: [issue30890] IDLE: Input method error in comment with Korean language In-Reply-To: <1499668419.76.0.67681471989.issue30890@psf.upfronthosting.co.za> Message-ID: <1499743303.64.0.249804437404.issue30890@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- title: Comment error in Korean language -> IDLE: Input method error in comment with Korean language _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 23:21:54 2017 From: report at bugs.python.org (DelTos) Date: Tue, 11 Jul 2017 03:21:54 +0000 Subject: [issue30890] IDLE: Input method error in comment with Korean language In-Reply-To: <1499668419.76.0.67681471989.issue30890@psf.upfronthosting.co.za> Message-ID: <1499743314.7.0.199388410042.issue30890@psf.upfronthosting.co.za> DelTos added the comment: It doesn't occur when I'm typing comments with numbers or English. It only occurs in Korean comments. Plus, I changed the font and another problem has occured. The letters are printed in vertically.(Attached file) It seems there is a problem only in the Korean language. I gave up typing comments with Korean and changed it into English. ---------- Added file: http://bugs.python.org/file47004/comparison.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 23:23:15 2017 From: report at bugs.python.org (DelTos) Date: Tue, 11 Jul 2017 03:23:15 +0000 Subject: [issue30890] IDLE: Input method error in comment with Korean language In-Reply-To: <1499668419.76.0.67681471989.issue30890@psf.upfronthosting.co.za> Message-ID: <1499743395.91.0.708738834063.issue30890@psf.upfronthosting.co.za> DelTos added the comment: Or it may be a problem that only happens on my PC. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 23:28:28 2017 From: report at bugs.python.org (Cooper Lees) Date: Tue, 11 Jul 2017 03:28:28 +0000 Subject: [issue30897] Add a is_mount() to pathlib In-Reply-To: <1499740510.8.0.375940091685.issue30897@psf.upfronthosting.co.za> Message-ID: <1499743708.91.0.815663183665.issue30897@psf.upfronthosting.co.za> Cooper Lees added the comment: Mocked up a concept PR. Will try teach myself how to test + see if I need to add Windows support etc. https://github.com/cooperlees/cpython/commit/master ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 23:36:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 03:36:48 +0000 Subject: [issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes In-Reply-To: <1499531265.54.0.318966689253.issue30879@psf.upfronthosting.co.za> Message-ID: <1499744208.79.0.865745627806.issue30879@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 1180e5a51871fa53ca6892e83fd2e69dc2600447 by Serhiy Storchaka in branch 'master': bpo-30879: os.listdir() and os.scandir() now emit bytes names when (#2634) https://github.com/python/cpython/commit/1180e5a51871fa53ca6892e83fd2e69dc2600447 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 23:39:49 2017 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 11 Jul 2017 03:39:49 +0000 Subject: [issue27364] Deprecate invalid escape sequences in str/bytes In-Reply-To: <1466541260.02.0.320668077341.issue27364@psf.upfronthosting.co.za> Message-ID: <1499744389.65.0.0807228798242.issue27364@psf.upfronthosting.co.za> Jason R. Coombs added the comment: One consequence of this change is that now any string that has a backslash needs to be escaped or raw, leading to changes like this on (https://github.com/cherrypy/cherrypy/pull/1610/commits/1d8c03ea8c5fe90f29bbea267300b97c78391c24#diff-be33a4f55d59dfc70fc6452482f3a7a4) where the diagram in the docstring is the culprit. An escaped backslash is not viable in this case, so a raw string is required. This particular example strikes me as counter-intuitive, though maybe I just need to adjust my intuition. Was the intention for a docstring like above to use raw strings? ---------- nosy: +jason.coombs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 23:45:18 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 03:45:18 +0000 Subject: [issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes In-Reply-To: <1499531265.54.0.318966689253.issue30879@psf.upfronthosting.co.za> Message-ID: <1499744718.22.0.456997797433.issue30879@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2721 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 23:52:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 03:52:49 +0000 Subject: [issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes In-Reply-To: <1499531265.54.0.318966689253.issue30879@psf.upfronthosting.co.za> Message-ID: <1499745169.1.0.15587702988.issue30879@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2722 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 23:55:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 03:55:27 +0000 Subject: [issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t In-Reply-To: <1408140199.72.0.115939936455.issue22207@psf.upfronthosting.co.za> Message-ID: <1499745327.3.0.38368706182.issue22207@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 64e461be09e23705ecbab43a8b01722186641f71 by Serhiy Storchaka in branch 'master': bpo-22207: Add checks for possible integer overflows in unicodeobject.c. (#2623) https://github.com/python/cpython/commit/64e461be09e23705ecbab43a8b01722186641f71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 23:57:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 03:57:13 +0000 Subject: [issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t In-Reply-To: <1408140199.72.0.115939936455.issue22207@psf.upfronthosting.co.za> Message-ID: <1499745433.77.0.860070221799.issue22207@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2723 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 00:00:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 04:00:29 +0000 Subject: [issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t In-Reply-To: <1408140199.72.0.115939936455.issue22207@psf.upfronthosting.co.za> Message-ID: <1499745629.68.0.390559589968.issue22207@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2724 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 00:14:52 2017 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 11 Jul 2017 04:14:52 +0000 Subject: [issue27364] Deprecate invalid escape sequences in str/bytes In-Reply-To: <1466541260.02.0.320668077341.issue27364@psf.upfronthosting.co.za> Message-ID: <1499746492.68.0.613353614156.issue27364@psf.upfronthosting.co.za> Guido van Rossum added the comment: Yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 00:15:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 04:15:13 +0000 Subject: [issue27364] Deprecate invalid escape sequences in str/bytes In-Reply-To: <1466541260.02.0.320668077341.issue27364@psf.upfronthosting.co.za> Message-ID: <1499746513.92.0.140492172326.issue27364@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, this was the intention. One of often errors is using "\n" in non-raw docstrings. This change doesn't prevent this error, but increases chances of catching it when there are other backslashes in the docstring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 00:16:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 04:16:13 +0000 Subject: [issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes In-Reply-To: <1499531265.54.0.318966689253.issue30879@psf.upfronthosting.co.za> Message-ID: <1499746573.17.0.581584263849.issue30879@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ecfe4f678bfb0e3c19c90fd7db79c5f3c76023e4 by Serhiy Storchaka in branch '3.6': [3.6] bpo-30879: os.listdir() and os.scandir() now emit bytes names when (GH-2634) (#2656) https://github.com/python/cpython/commit/ecfe4f678bfb0e3c19c90fd7db79c5f3c76023e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 00:27:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 04:27:58 +0000 Subject: [issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t In-Reply-To: <1408140199.72.0.115939936455.issue22207@psf.upfronthosting.co.za> Message-ID: <1499747278.91.0.129767979396.issue22207@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 82a907560011c7b784badccc78082cef70ea7128 by Serhiy Storchaka in branch '3.6': [3.6] bpo-22207: Add checks for possible integer overflows in unicodeobject.c. (GH-2623) (#2658) https://github.com/python/cpython/commit/82a907560011c7b784badccc78082cef70ea7128 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 00:43:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 04:43:16 +0000 Subject: [issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes In-Reply-To: <1499531265.54.0.318966689253.issue30879@psf.upfronthosting.co.za> Message-ID: <1499748196.26.0.334138602522.issue30879@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7527c32f5fedc3260d767900f1014495c0a1b7a5 by Serhiy Storchaka in branch '3.5': [3.5] bpo-30879: os.listdir() and os.scandir() now emit bytes names when (GH-2634) (#2657) https://github.com/python/cpython/commit/7527c32f5fedc3260d767900f1014495c0a1b7a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 00:43:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 04:43:38 +0000 Subject: [issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t In-Reply-To: <1408140199.72.0.115939936455.issue22207@psf.upfronthosting.co.za> Message-ID: <1499748218.33.0.896763841015.issue22207@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 44eb51e6fcf45f3c2bf21c16e18c4da48a23d2d3 by Serhiy Storchaka in branch '3.5': [3.5] bpo-22207: Add checks for possible integer overflows in unicodeobject.c. (GH-2623) (#2659) https://github.com/python/cpython/commit/44eb51e6fcf45f3c2bf21c16e18c4da48a23d2d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 00:44:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 04:44:12 +0000 Subject: [issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes In-Reply-To: <1499531265.54.0.318966689253.issue30879@psf.upfronthosting.co.za> Message-ID: <1499748252.87.0.471904260261.issue30879@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 Tue Jul 11 00:44:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 04:44:29 +0000 Subject: [issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t In-Reply-To: <1408140199.72.0.115939936455.issue22207@psf.upfronthosting.co.za> Message-ID: <1499748269.61.0.34944618416.issue22207@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 01:02:51 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 11 Jul 2017 05:02:51 +0000 Subject: [issue30714] test_ssl fails with openssl 1.1.0f In-Reply-To: <1497972401.5.0.807136343886.issue30714@psf.upfronthosting.co.za> Message-ID: <1499749371.92.0.801014379376.issue30714@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I updated to PGO buildbot from Debian 8 "jessie" to Debian 9 "stretch" which revealed the failures. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 01:17:59 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 11 Jul 2017 05:17:59 +0000 Subject: [issue30881] IDLE: add docstrings to browser.py In-Reply-To: <1499558289.01.0.144008987806.issue30881@psf.upfronthosting.co.za> Message-ID: <1499750279.76.0.862162188034.issue30881@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 01:32:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 05:32:11 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499751131.08.0.948534538857.issue30870@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't know how to make the testing code working. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 01:39:06 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 05:39:06 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499751546.53.0.213850622478.issue30870@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2725 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 01:42:13 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 05:42:13 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499751733.46.0.495442675715.issue30870@psf.upfronthosting.co.za> Terry J. Reedy added the comment: My manual test procedure was faulty. Without a unit test, I should have asked for another person to verify. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 01:51:11 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 05:51:11 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499752271.66.0.729702441935.issue30870@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I believe I read somewhere (SO?) that root.withdraw sometimes affects the effectiveness of event_generate. I will try de-iconifying for just this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 01:58:06 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 05:58:06 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499752686.87.0.00670584683751.issue30870@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 5b62b35e6fcba488da2f809965a5f349a4170b02 by terryjreedy in branch 'master': bpo-30870: IDLE -- fix logic error in eae2537. (#2660) https://github.com/python/cpython/commit/5b62b35e6fcba488da2f809965a5f349a4170b02 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 01:59:47 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 05:59:47 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499752787.39.0.502067028421.issue30870@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2726 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 02:02:02 2017 From: report at bugs.python.org (Ben Johnston) Date: Tue, 11 Jul 2017 06:02:02 +0000 Subject: [issue30898] SSL cert failure running make test during Python 3.6 install Message-ID: <1499752922.62.0.288067889565.issue30898@psf.upfronthosting.co.za> New submission from Ben Johnston: Installing Python 3.6.1 from Python-3.6.1.tar.xz on Ubuntu 16.04.2 LTS, the following tests are failing: ERROR: test_logincapa_with_client_certfile (test.test_imaplib.RemoteIMAP_SSLTest) ERROR: test_logincapa_with_client_ssl_context (test.test_imaplib.RemoteIMAP_SSLTest) ./configure make make test I also tried running ./configure --enable-optimizations, however the tests still failed with identical results. I have uploaded the stdout of the test process, verbose mode during testing also didnt work and reported this error ModuleNotFoundError: No module named 'test.test_that_failed' 1 test failed again: test_that_failed Total duration: 131 ms Tests result: FAILURE make: *** [test] Error 1 Makefile:1018: recipe for target 'test' failed ---------- components: Tests files: test_log.log messages: 298125 nosy: Ben Johnston priority: normal severity: normal status: open title: SSL cert failure running make test during Python 3.6 install type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47005/test_log.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 02:12:54 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 11 Jul 2017 06:12:54 +0000 Subject: [issue30899] IDLE: Add idle config parser unittest Message-ID: <1499753574.2.0.472414190179.issue30899@psf.upfronthosting.co.za> New submission from Louie Lu: Add IdleConfParser and IdleUserConfParser unittest. ---------- assignee: terry.reedy components: IDLE messages: 298126 nosy: louielu, terry.reedy priority: normal severity: normal status: open title: IDLE: Add idle config parser unittest versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 02:13:39 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 11 Jul 2017 06:13:39 +0000 Subject: [issue30899] IDLE: Add idle config parser unittest In-Reply-To: <1499753574.2.0.472414190179.issue30899@psf.upfronthosting.co.za> Message-ID: <1499753619.61.0.10854746648.issue30899@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +2727 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 02:16:43 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 06:16:43 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499753803.34.0.610073239016.issue30870@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 953e527763f5af293668135acdf5f0a20c3f6f4f by terryjreedy in branch '3.6': [3.6] bpo-30870: IDLE -- fix logic error in eae2537. (GH-2660) (#2661) https://github.com/python/cpython/commit/953e527763f5af293668135acdf5f0a20c3f6f4f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 02:20:36 2017 From: report at bugs.python.org (=?utf-8?q?P=C3=A1draig_Brady?=) Date: Tue, 11 Jul 2017 06:20:36 +0000 Subject: [issue28812] Deadlock between GIL and pystate head_mutex. In-Reply-To: <1480241598.29.0.901358230906.issue28812@psf.upfronthosting.co.za> Message-ID: <1499754036.97.0.153160467604.issue28812@psf.upfronthosting.co.za> P?draig Brady added the comment: This can probably closed as a dupe of #30395 ---------- nosy: +pixelbeat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 02:30:16 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 06:30:16 +0000 Subject: [issue30899] IDLE: Add idle config parser unittest In-Reply-To: <1499753574.2.0.472414190179.issue30899@psf.upfronthosting.co.za> Message-ID: <1499754616.98.0.0620723736814.issue30899@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I plan to review tomorrow afternoon. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 02:30:38 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 06:30:38 +0000 Subject: [issue30899] IDLE: Add idle config parser unittest In-Reply-To: <1499753574.2.0.472414190179.issue30899@psf.upfronthosting.co.za> Message-ID: <1499754638.63.0.216157835456.issue30899@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> patch review type: -> enhancement versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 02:33:11 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 11 Jul 2017 06:33:11 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499754791.9.0.527960821348.issue30870@psf.upfronthosting.co.za> Louie Lu added the comment: It just get wierd, I can't do event_generate with Terry, too. Attach poc.py that should print out a 'testing', but it didn't. ---------- Added file: http://bugs.python.org/file47006/tests.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 02:34:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 06:34:03 +0000 Subject: [issue30881] IDLE: add docstrings to browser.py In-Reply-To: <1499558289.01.0.144008987806.issue30881@psf.upfronthosting.co.za> Message-ID: <1499754843.26.0.3745759227.issue30881@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset ba352270b724d67fc938c335c605acdee7474308 by terryjreedy (csabella) in branch 'master': bpo-30881: IDLE: add docstrings to browser.py (#2638) https://github.com/python/cpython/commit/ba352270b724d67fc938c335c605acdee7474308 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 02:36:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 06:36:48 +0000 Subject: [issue30881] IDLE: add docstrings to browser.py In-Reply-To: <1499558289.01.0.144008987806.issue30881@psf.upfronthosting.co.za> Message-ID: <1499755008.95.0.816837184462.issue30881@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2728 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 02:40:25 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 06:40:25 +0000 Subject: [issue30881] IDLE: add docstrings to browser.py In-Reply-To: <1499558289.01.0.144008987806.issue30881@psf.upfronthosting.co.za> Message-ID: <1499755225.23.0.804619513667.issue30881@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 02:49:53 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 11 Jul 2017 06:49:53 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499755793.48.0.5975757112.issue30870@psf.upfronthosting.co.za> Louie Lu added the comment: It seem setUpModule will smash out the test, I've add a trust-will-work test inside the test_configdialog.py: class Test(unittest.TestCase): def setUp(self): self.root = tkinter.Tk() def test_test(self): self.root.bind('', lambda x: print('testing')) self.root.update() self.root.event_generate('') This will print out `testing` when commet out setUpModule's `root = Tk()` line. But if this line is running, then the trust-test won't print out `testing` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 02:53:34 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 06:53:34 +0000 Subject: [issue30881] IDLE: add docstrings to browser.py In-Reply-To: <1499558289.01.0.144008987806.issue30881@psf.upfronthosting.co.za> Message-ID: <1499756014.41.0.218975421533.issue30881@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 675c1adfe5c87573e81fb295ccad7b6cfa03a3ee by terryjreedy in branch '3.6': [3.6] bpo-30881: IDLE: add docstrings to browser.py (GH-2638) (#2663) https://github.com/python/cpython/commit/675c1adfe5c87573e81fb295ccad7b6cfa03a3ee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 03:03:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 07:03:41 +0000 Subject: [issue30813] test_unittest fails when hunting reference leaks In-Reply-To: <1498816228.35.0.729692699149.issue30813@psf.upfronthosting.co.za> Message-ID: <1499756621.85.0.952903283084.issue30813@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, this fixed issue25746! ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 03:04:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 07:04:23 +0000 Subject: [issue25746] test_unittest failure in leaks searching mode In-Reply-To: <1448647651.46.0.84768072047.issue25746@psf.upfronthosting.co.za> Message-ID: <1499756663.1.0.130021191125.issue25746@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Fixed in duplicate issue30813. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed superseder: -> test_unittest fails when hunting reference leaks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 03:05:27 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 11 Jul 2017 07:05:27 +0000 Subject: [issue30900] IDLE: Fix configdialog should use wm_withdraw Message-ID: <1499756727.57.0.0640134785598.issue30900@psf.upfronthosting.co.za> New submission from Louie Lu: Introduce in #30728, commit bac7d3363b099d, `self.wm_withdraw` has been changed into `self.withdraw`. This make #30870 un-testable since it using `self.withdraw` will block out `event_generate`. This issue revert `self.widthdraw` to `self.wm_withdraw`. ---------- assignee: terry.reedy components: IDLE messages: 298136 nosy: csabella, louielu, terry.reedy priority: normal severity: normal status: open title: IDLE: Fix configdialog should use wm_withdraw versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 03:06:50 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 11 Jul 2017 07:06:50 +0000 Subject: [issue30900] IDLE: Fix configdialog should use wm_withdraw In-Reply-To: <1499756727.57.0.0640134785598.issue30900@psf.upfronthosting.co.za> Message-ID: <1499756810.19.0.564558494867.issue30900@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +2729 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 03:07:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 07:07:27 +0000 Subject: [issue22607] find by dichotomy the failing test In-Reply-To: <1413016289.65.0.402088984068.issue22607@psf.upfronthosting.co.za> Message-ID: <1499756847.58.0.177297813687.issue22607@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Wasn't the similar feature implemented in issue29512? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 03:08:26 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 11 Jul 2017 07:08:26 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499756906.45.0.302842367354.issue30870@psf.upfronthosting.co.za> Louie Lu added the comment: configdialog misuse `self.withdraw` at init, it should be `self.wm_withdraw`, #30900 fix this problem. After that, it should be a success to use event_generate in configdialog unittest with no `self.withdraw`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 03:23:15 2017 From: report at bugs.python.org (Alexander Kamyanskiy) Date: Tue, 11 Jul 2017 07:23:15 +0000 Subject: [issue30901] "503 HTTP ERROR" on attempt to access some points of python library documentation Message-ID: <1499757795.27.0.716846714623.issue30901@psf.upfronthosting.co.za> New submission from Alexander Kamyanskiy: I found that some points in Python Library reference documentation are not accessible, I got 503 http error. The problem starts from this link and some points below the 29.14 point of doc list: https://docs.python.org/3/library/fpectl.html Also now I got 503: https://docs.python.org/3/library/custominterp.html https://docs.python.org/3/library/zipimport.html https://docs.python.org/3/library/pkgutil.html https://docs.python.org/3/library/symbol.html https://docs.python.org/3/library/token.html ... In fact I can't say for example that "31. Importing Modules" all inaccessible - I can't access 31.3. modulefinder ? Find modules used by a script 31.4. runpy ? Locating and executing Python modules 31.5. importlib ? The implementation of import but cannot (I got 503 http response): 31.1. zipimport ? Import modules from Zip archives 31.2. pkgutil ? Package extension utility P.S. I've tried to access documentation from absolutely another place and I'm sure it's not my local settings in browser or local firewall or smth like this. ---------- assignee: docs at python components: Documentation messages: 298139 nosy: Alexander Kamyanskiy, docs at python priority: normal severity: normal status: open title: "503 HTTP ERROR" on attempt to access some points of python library documentation type: resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 03:28:28 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 11 Jul 2017 07:28:28 +0000 Subject: [issue30901] "503 HTTP ERROR" on attempt to access some points of python library documentation In-Reply-To: <1499757795.27.0.716846714623.issue30901@psf.upfronthosting.co.za> Message-ID: <1499758108.86.0.983360232279.issue30901@psf.upfronthosting.co.za> Louie Lu added the comment: Can reproduce this problem in Chromium 59.0.3071, it seems affect every selectable version in docs.python.org. Also, devguide has some page down, too. * devguide: https://docs.python.org/devguide/triaging.html ---------- nosy: +louielu type: resource usage -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 03:41:50 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 07:41:50 +0000 Subject: [issue30900] IDLE: Fix configdialog should use wm_withdraw In-Reply-To: <1499756727.57.0.0640134785598.issue30900@psf.upfronthosting.co.za> Message-ID: <1499758910.56.0.0403623886314.issue30900@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Color me dubious ;-). The change was made because tkinter.__init__, line 1990 has this line withdraw = wm_withdraw There is a similar line for all of the around 30 wm_xyz functions. Prefixing the names of methods of class Wm is an unusual redundancy. I cannot think of any sane way for tk to know which python synonym was used to call the Python wrapper. What code using event_generate led you to this conclusion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 03:50:23 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 11 Jul 2017 07:50:23 +0000 Subject: [issue30900] IDLE: Fix configdialog should use wm_withdraw In-Reply-To: <1499756727.57.0.0640134785598.issue30900@psf.upfronthosting.co.za> Message-ID: <1499759423.46.0.952734394886.issue30900@psf.upfronthosting.co.za> Louie Lu added the comment: Hmmm, I think it is a mistake of my test, it is something inside configdialog __init__ make unittest can't do event_generate, but not this one `self.withdraw`. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 03:56:46 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 07:56:46 +0000 Subject: [issue30900] IDLE: Fix configdialog should use wm_withdraw In-Reply-To: <1499756727.57.0.0640134785598.issue30900@psf.upfronthosting.co.za> Message-ID: <1499759806.31.0.0214850932459.issue30900@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I first beat my head against event_generate two or three years ago. So I appreciate you taking a whack at it. It is nice that Variable.set and invoke can be used for tests, but it would really be nice to have e_v work too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 04:03:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jul 2017 08:03:34 +0000 Subject: [issue30891] importlib: _find_and_load() race condition on sys.modules[name] check In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499760214.93.0.459751168321.issue30891@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2730 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 04:19:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jul 2017 08:19:37 +0000 Subject: [issue22607] find by dichotomy the failing test In-Reply-To: <1413016289.65.0.402088984068.issue22607@psf.upfronthosting.co.za> Message-ID: <1499761177.08.0.805682612454.issue22607@psf.upfronthosting.co.za> STINNER Victor added the comment: > See message 228968 for the rationale: http://bugs.python.org/issue22588#msg228968 Ok, this use case is now well supported by the new test.bisect tool. Yes, this issue is a duplicate of the issue #29512. I forgot this old issue! ---------- resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> regrtest refleak: implement bisection feature _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 04:37:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jul 2017 08:37:48 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499762268.27.0.618958610439.issue30876@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2731 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 04:49:17 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 11 Jul 2017 08:49:17 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499762956.99.0.425864844527.issue30870@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +2732 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 06:02:57 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 11 Jul 2017 10:02:57 +0000 Subject: [issue30730] [security] Injecting environment variable in subprocess on Windows In-Reply-To: <1498118820.13.0.596038385019.issue30730@psf.upfronthosting.co.za> Message-ID: <1499767377.45.0.994974507119.issue30730@psf.upfronthosting.co.za> Larry Hastings added the comment: Serhiy, I don't see where you got a full review of this change. Eryksun reviewed the code and asked for changes; you made the he asked for changes but didn't get any further review. Nor did you get a full review / "looks good to me" from anybody. As a matter of policy I do want to see reviews for security changes on Windows. I've asked Steve Dower to give it a quick review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 06:18:10 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 11 Jul 2017 10:18:10 +0000 Subject: [issue30730] [security] Injecting environment variable in subprocess on Windows In-Reply-To: <1498118820.13.0.596038385019.issue30730@psf.upfronthosting.co.za> Message-ID: <1499768290.48.0.48071005959.issue30730@psf.upfronthosting.co.za> Larry Hastings added the comment: It seems that os.execve() still permits this, even on Windows. Shouldn't we solve it there too? (Thanks to Steve Dower for realizing this.) -- import os cmdline=["/usr/bin/printenv"] env={'a=b': 'c'} os.execve(cmdline[0], cmdline, env) # this prints a=b=c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 06:22:45 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 11 Jul 2017 10:22:45 +0000 Subject: [issue30730] [security] Injecting environment variable in subprocess on Windows In-Reply-To: <1498118820.13.0.596038385019.issue30730@psf.upfronthosting.co.za> Message-ID: <1499768565.4.0.0355247918858.issue30730@psf.upfronthosting.co.za> Larry Hastings added the comment: (never-mind, 3.6.1 still permits this, but I see that it's been fixed in trunk) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 06:24:12 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 11 Jul 2017 10:24:12 +0000 Subject: [issue30730] [security] Injecting environment variable in subprocess on Windows In-Reply-To: <1498118820.13.0.596038385019.issue30730@psf.upfronthosting.co.za> Message-ID: <1499768652.88.0.903079141372.issue30730@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset fe82c46327effc124ff166e1fa1e611579e1176b by larryhastings (Serhiy Storchaka) in branch '3.4': [security][3.4] bpo-30730: Prevent environment variables injection in subprocess on Windows. (GH-2325) (#2362) https://github.com/python/cpython/commit/fe82c46327effc124ff166e1fa1e611579e1176b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 07:06:26 2017 From: report at bugs.python.org (Joshua) Date: Tue, 11 Jul 2017 11:06:26 +0000 Subject: [issue30902] Python-Redmine plugin not seeing python install MacOS Message-ID: <1499771186.94.0.447036971017.issue30902@psf.upfronthosting.co.za> New submission from Joshua: trying to install the following on macos sierra 10.12.5. I am trying to install the python-redmine module. i ran the following: sudo easy_install pip pip install python-redmine i get the following output when trying to run a python script: Joshuas-MacBook-Pro:~ joshuaayes$ ./changelog.py Traceback (most recent call last): File "./changelog.py", line 2, in from redmine import Redmine ImportError: No module named redmine Joshuas-MacBook-Pro:~ joshuaayes$ pip install python-redmine Requirement already satisfied: python-redmine in /Library/Python/2.7/site-packages Joshuas-MacBook-Pro:~ joshuaayes$ anyone have any insight why this is not working? ---------- components: Extension Modules messages: 298149 nosy: ayesjm priority: normal severity: normal status: open title: Python-Redmine plugin not seeing python install MacOS versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 07:15:05 2017 From: report at bugs.python.org (Berker Peksag) Date: Tue, 11 Jul 2017 11:15:05 +0000 Subject: [issue30902] Python-Redmine plugin not seeing python install MacOS In-Reply-To: <1499771186.94.0.447036971017.issue30902@psf.upfronthosting.co.za> Message-ID: <1499771705.46.0.157834944623.issue30902@psf.upfronthosting.co.za> Berker Peksag added the comment: python-redmine is not part of the Python standard library. https://github.com/maxtepkeev/python-redmine/issues is a better place to ask usage questions like this, thank you! ---------- nosy: +berker.peksag resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 07:44:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jul 2017 11:44:14 +0000 Subject: [issue30730] [security] Injecting environment variable in subprocess on Windows In-Reply-To: <1498118820.13.0.596038385019.issue30730@psf.upfronthosting.co.za> Message-ID: <1499773454.46.0.56824914371.issue30730@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, actually the patch fixed two bugs. The one of them is a security issue, the other is much more severe. They look similar, are related to the same code (on Windows) and are tested with similar tests. os.execve() was not vulnerable to the first issue, it suffered only from the less severe bug. It was fixed in the separate issue (see issue30746). I don't think that should be backported to 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 08:28:34 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 11 Jul 2017 12:28:34 +0000 Subject: [issue28812] Deadlock between GIL and pystate head_mutex. In-Reply-To: <1480241598.29.0.901358230906.issue28812@psf.upfronthosting.co.za> Message-ID: <1499776114.15.0.658810244127.issue28812@psf.upfronthosting.co.za> INADA Naoki added the comment: #30395 is about forking, but this is about multi threading. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 08:39:42 2017 From: report at bugs.python.org (Abhijit Mamarde) Date: Tue, 11 Jul 2017 12:39:42 +0000 Subject: [issue30903] IPv4Network's hostmask attribute doesn't returns string value as mentioned in Documentation. Message-ID: <1499776782.68.0.13911603646.issue30903@psf.upfronthosting.co.za> New submission from Abhijit Mamarde: documentation mentions hostmask attribute of IPv4Network class returns a `string`, but in actual it is returning the object of class IPv4Address URL to official doc: https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Network.hostmask PFA program file to show the actual issue. ---------- assignee: docs at python components: Documentation files: ipaddress_doc_bug.py messages: 298153 nosy: Abhijit Mamarde, docs at python priority: normal severity: normal status: open title: IPv4Network's hostmask attribute doesn't returns string value as mentioned in Documentation. type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47007/ipaddress_doc_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 08:49:41 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 11 Jul 2017 12:49:41 +0000 Subject: [issue30801] shoutdown process error with python 3.4 and pyqt/PySide In-Reply-To: <1498723003.06.0.480156754664.issue30801@psf.upfronthosting.co.za> Message-ID: <1499777381.02.0.397274883908.issue30801@psf.upfronthosting.co.za> Larry Hastings added the comment: Python 3.4 no longer accepts bug fixes; it is in "security fixes only" mode. Since this is not a security fix, it will not be accepted into Python 3.4. If this bug affects other versions of Python, please file a new bug. Although, unless you move *very* quickly, this fix won't be accepted into 3.5 either, as it's going to move into "security fixes only" mode later this month. Finally, your submitted patch (PR 2413) does not apply to the 3.4 branch, it applies to master. I have no opinion about whether or not this code should be accepted into master. But the PR talks about fixing a bug in 3.4, which is wrong. ---------- nosy: +larry resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 08:55:59 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 11 Jul 2017 12:55:59 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499777759.13.0.971987647744.issue30779@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +2733 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 08:58:03 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 11 Jul 2017 12:58:03 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499777883.86.0.349706768904.issue30779@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I had an error when trying to delete a custom theme. Sorry for not catching this before. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 08:59:03 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 11 Jul 2017 12:59:03 +0000 Subject: [issue26657] Directory traversal with http.server and SimpleHTTPServer on windows In-Reply-To: <1459179015.77.0.509336394494.issue26657@psf.upfronthosting.co.za> Message-ID: <1499777943.95.0.418898560636.issue26657@psf.upfronthosting.co.za> Larry Hastings added the comment: Will this be backported to 3.3 or 3.6? I don't see a PR or checkin for either of those versions on this issue, and both those versions are open for security fixes.b ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 09:18:53 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 11 Jul 2017 13:18:53 +0000 Subject: [issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472) In-Reply-To: <1487345979.72.0.358826213221.issue29591@psf.upfronthosting.co.za> Message-ID: <1499779133.71.0.810842849152.issue29591@psf.upfronthosting.co.za> Larry Hastings added the comment: I don't quite understand what's happening on this issue. I see that master, 3.6, 3.6, and 2.7 have been upgraded to expat 2.2.0. This issue was created to upgrade CPython to 2.2.0. But the PR against 3.3 and 3.4 upgrade expat to 2.2.1?! I'm not against this change in principle, I'm just trying to understand why a) it doesn't match the issue, b) why 3.3 and 3.4 are special, c) why we don't upgrade master & 3.6 & 3.5 & 2.7 to expat 2.2.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 09:29:54 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 11 Jul 2017 13:29:54 +0000 Subject: [issue30484] Garbage Collector can cause Segfault whilst iterating dictionary items In-Reply-To: <1495802890.31.0.92287761621.issue30484@psf.upfronthosting.co.za> Message-ID: <1499779794.61.0.905323235972.issue30484@psf.upfronthosting.co.za> Larry Hastings added the comment: Yes, and thank you for submitting the PR to backport it to 3.4! (And thank you for backporting it to 3.3, too!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 09:30:23 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 11 Jul 2017 13:30:23 +0000 Subject: [issue27945] Various segfaults with dict In-Reply-To: <1472852008.61.0.354257945943.issue27945@psf.upfronthosting.co.za> Message-ID: <1499779823.92.0.837353521495.issue27945@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset f7344798e57da6b9c4ed9372e8eaecde80989c86 by larryhastings (Serhiy Storchaka) in branch '3.4': [3.4] [3.5] bpo-27945: Fixed various segfaults with dict. (GH-1657) (GH-1678) (#2248) https://github.com/python/cpython/commit/f7344798e57da6b9c4ed9372e8eaecde80989c86 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 09:48:44 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Tue, 11 Jul 2017 13:48:44 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1499780924.91.0.0695166968049.issue27099@psf.upfronthosting.co.za> Charles Wohlganger added the comment: Pull request won't pass build test, but passes the full idle test on my workstation. Primary cause seems to be: ImportError: cannot import name 'EditorWindow' from 'idlelib.editor' I can also import EditorWindow by itself on my workstation. None of the changes to EditorWindow seem like they should be causing this error. Any ideas? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 10:11:00 2017 From: report at bugs.python.org (Leon Helwerda) Date: Tue, 11 Jul 2017 14:11:00 +0000 Subject: [issue30904] Python 3 logging HTTPHandler sends duplicate Host header Message-ID: <1499782260.84.0.538162652134.issue30904@psf.upfronthosting.co.za> New submission from Leon Helwerda: The logging HTTPHandler sends two Host headers which confuses certain servers. Tested versions: Python 3.6.1 lighttpd/1.4.45 Steps to reproduce (MWE): 1) Set up a lighttpd server which is to act as the logging host (we do not actually implement anything that accepts the input here). Optionally enable the debug settings from https://redmine.lighttpd.net/projects/1/wiki/DebugVariables (specifically, add debug.log-condition-handling = "enable" to /etc/lighttpd/lighttpd.conf) to follow what is happening inside the server. 2) In python3: import logging import logging.handlers handler = logging.handlers.HTTPHandler('localhost', '/') logging.getLogger().setLevel(logging.INFO) logging.getLogger().addHandler(handler) logging.info('hello world') 3) Notice that the access logs in /var/log/lighttpd/access.log show a 400 response for the request (in Python, the response is ignored). If the debugging from 1) is enabled, then /var/log/lighttpd/error.log contains a line "duplicate Host-header -> 400". This is not a bug in lighttpd. The server adheres to RFC7320 (sec. 5.4, p. 44): "A server MUST respond with a 400 (Bad Request) status code [...] to any request message that contains more than one Host header field". A workaround is to put the full URL in the second argument of HTTPRequest: handler = logging.handlers.HTTPHandler('localhost', 'http://localhost/') Then lighttpd follows RFC2616 (sec. 5.2, p. 37): "If Request-URI is an absoluteURI, the host is part of the Request-URI. Any Host header field value in the request MUST be ignored." The origin of this issue is that the http.client.HTTPConnection.putrequest method (called by HTTPHandler.emit) already adds a Host header unless skip_host=True is given. Thus the manual addition of a Host header is duplicate. Other versions like Python 2.7 might also be affected but I did not test. ---------- components: Library (Lib) messages: 298161 nosy: lhelwerd priority: normal severity: normal status: open title: Python 3 logging HTTPHandler sends duplicate Host header type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 10:34:17 2017 From: report at bugs.python.org (Stephen Kelly) Date: Tue, 11 Jul 2017 14:34:17 +0000 Subject: [issue30905] Embedding should have public API for interactive mode Message-ID: <1499783657.19.0.814858997931.issue30905@psf.upfronthosting.co.za> New submission from Stephen Kelly: Consider the following three snippets: 1) const char* sourceCode = "a = 9\n" "a"; // This is OK! Python runs both lines. // BUT: The value of 'a' is not printed PyRun_StringFlags(sourceCode, Py_file_input, localDictionary, localDictionary, 0); 2) // This is OK! We run one statement at a time: PyRun_StringFlags("a = 9", Py_single_input, localDictionary, localDictionary, 0); // Python prints the value of 'a' because we use Py_single_input! PyRun_StringFlags("a", Py_single_input, localDictionary, localDictionary, 0); 3) const char* sourceCode = "a = 9\n" "a"; // This is NOT OK! Python throws a SyntaxError because we used Py_single_input. PyRun_StringFlags(sourceCode, Py_single_input, localDictionary, localDictionary, 0); The intention is to be able to run script code in an interpreter built into an application, and to maintain two user features: 1) The behavior is the same as the standard python interpreter with regard to printing values automatically without requiring the print() statement. 2) It is allowed to copy/paste possibly multiple lines/statements and execute them These two requirements are in conflict, because while Py_single_input enables the first, it forbids the second. I have worked around this by using internal API in Python-ast.h and setting `mod->kind = Interactive_kind;` before calling `PyAST_CompileEx`, but that should not be needed. ---------- components: Interpreter Core messages: 298162 nosy: steveire priority: normal severity: normal status: open title: Embedding should have public API for interactive mode versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 12:03:17 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 11 Jul 2017 16:03:17 +0000 Subject: [issue30901] "503 HTTP ERROR" on attempt to access some points of python library documentation In-Reply-To: <1499757795.27.0.716846714623.issue30901@psf.upfronthosting.co.za> Message-ID: <1499788997.0.0.237791488422.issue30901@psf.upfronthosting.co.za> Brett Cannon added the comment: Those pages all work for me. May have been transient. ---------- nosy: +brett.cannon resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 12:17:25 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 11 Jul 2017 16:17:25 +0000 Subject: [issue30901] "503 HTTP ERROR" on attempt to access some points of python library documentation In-Reply-To: <1499757795.27.0.716846714623.issue30901@psf.upfronthosting.co.za> Message-ID: <1499789845.28.0.743601783172.issue30901@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: There was partial outage. See post mortem report: https://status.python.org/incidents/cc622spyl26l ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 12:27:05 2017 From: report at bugs.python.org (Cooper Lees) Date: Tue, 11 Jul 2017 16:27:05 +0000 Subject: [issue30891] importlib: _find_and_load() race condition on sys.modules[name] check In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499790425.69.0.115780110134.issue30891@psf.upfronthosting.co.za> Changes by Cooper Lees : ---------- pull_requests: +2734 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 12:27:40 2017 From: report at bugs.python.org (Cooper Lees) Date: Tue, 11 Jul 2017 16:27:40 +0000 Subject: [issue30897] Add a is_mount() to pathlib In-Reply-To: <1499740510.8.0.375940091685.issue30897@psf.upfronthosting.co.za> Message-ID: <1499790460.52.0.79105199711.issue30897@psf.upfronthosting.co.za> Changes by Cooper Lees : ---------- pull_requests: +2735 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 13:13:23 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 11 Jul 2017 17:13:23 +0000 Subject: [issue30897] Add a is_mount() to pathlib In-Reply-To: <1499740510.8.0.375940091685.issue30897@psf.upfronthosting.co.za> Message-ID: <1499793203.54.0.75404969325.issue30897@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 13:29:34 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 11 Jul 2017 17:29:34 +0000 Subject: [issue27584] New addition of vSockets to the python socket module In-Reply-To: <1469115390.74.0.838831983223.issue27584@psf.upfronthosting.co.za> Message-ID: <1499794174.6.0.364442189748.issue27584@psf.upfronthosting.co.za> R. David Murray added the comment: I think we are waiting on confirmation that we have a buildbot that has the necessary headers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 13:31:54 2017 From: report at bugs.python.org (Cathy Avery) Date: Tue, 11 Jul 2017 17:31:54 +0000 Subject: [issue27584] New addition of vSockets to the python socket module In-Reply-To: <1469115390.74.0.838831983223.issue27584@psf.upfronthosting.co.za> Message-ID: <1499794314.16.0.812718393082.issue27584@psf.upfronthosting.co.za> Cathy Avery added the comment: OK thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 13:35:58 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 11 Jul 2017 17:35:58 +0000 Subject: [issue27584] New addition of vSockets to the python socket module In-Reply-To: <1469115390.74.0.838831983223.issue27584@psf.upfronthosting.co.za> Message-ID: <1499794558.1.0.799917876543.issue27584@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I updated my PGO buildbot to Debian 9 which should have them. http://buildbot.python.org/all/builders/AMD64%20Debian%20PGO%203.x ~$ grep AF_VSOCK /usr/include/*/*/* /usr/include/x86_64-linux-gnu/bits/socket.h:#define AF_VSOCK PF_VSOCK ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 13:44:29 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 11 Jul 2017 17:44:29 +0000 Subject: [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1499795069.7.0.0147743855031.issue10438@psf.upfronthosting.co.za> R. David Murray added the comment: Given a choice between catering for Python programmers and catering for Java/C++ programmers, the Python docs obviously ought to chose to cater to Python programmers. To a python programmer, calling C.f() is intuitive. I would myself definitely *not* encourage the __class__.f() idiom. Maybe we should just drop the reference to Java and C++ static methods. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 13:50:21 2017 From: report at bugs.python.org (Cathy Avery) Date: Tue, 11 Jul 2017 17:50:21 +0000 Subject: [issue27584] New addition of vSockets to the python socket module In-Reply-To: <1469115390.74.0.838831983223.issue27584@psf.upfronthosting.co.za> Message-ID: <1499795421.8.0.528301175043.issue27584@psf.upfronthosting.co.za> Cathy Avery added the comment: You will also need linux/vm_sockets.h in order to build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 13:53:19 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 11 Jul 2017 17:53:19 +0000 Subject: [issue27364] Deprecate invalid escape sequences in str/bytes In-Reply-To: <1466541260.02.0.320668077341.issue27364@psf.upfronthosting.co.za> Message-ID: <1499795599.2.0.0303133062483.issue27364@psf.upfronthosting.co.za> R. David Murray added the comment: Also note that we have fixed a number of bugs in the stdlib code where a raw string was not used for a docstring when it should have been. And when I say bugs, I mean both formatting problems in pydoc, and doctest bugs. There may even have been a case where it produced a code bug, but I'm not sure I'm recalling that correctly :) So yes, requiring that a docstring containing backslashes be marked as a raw string is very intentional. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 13:59:05 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 11 Jul 2017 17:59:05 +0000 Subject: [issue27584] New addition of vSockets to the python socket module In-Reply-To: <1469115390.74.0.838831983223.issue27584@psf.upfronthosting.co.za> Message-ID: <1499795945.91.0.145867540832.issue27584@psf.upfronthosting.co.za> Gregory P. Smith added the comment: yep, linux/vm_sockets.h exists. I believe it's kernel headers are from 4.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 14:00:20 2017 From: report at bugs.python.org (Segev Finer) Date: Tue, 11 Jul 2017 18:00:20 +0000 Subject: [issue30797] ./pyconfig.h:1438:0: warning: "_GNU_SOURCE" redefined [enabled by default] In-Reply-To: <1498688645.93.0.221276689872.issue30797@psf.upfronthosting.co.za> Message-ID: <1499796020.75.0.811589147239.issue30797@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2736 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 14:02:54 2017 From: report at bugs.python.org (Ian) Date: Tue, 11 Jul 2017 18:02:54 +0000 Subject: [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1499796174.62.0.35816132248.issue10438@psf.upfronthosting.co.za> Ian added the comment: I would hope that the docs would cater to people who aren't sure how the language works (and who want to confirm that they are using proper patterns). If people already know how the language works, they won't need the docs. Whether or not you refer to Java and C++, you should state the best practices for both internal and external calling of static methods in Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 14:12:07 2017 From: report at bugs.python.org (Cathy Avery) Date: Tue, 11 Jul 2017 18:12:07 +0000 Subject: [issue27584] New addition of vSockets to the python socket module In-Reply-To: <1469115390.74.0.838831983223.issue27584@psf.upfronthosting.co.za> Message-ID: <1499796727.66.0.251159273042.issue27584@psf.upfronthosting.co.za> Cathy Avery added the comment: That should do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 14:14:09 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 11 Jul 2017 18:14:09 +0000 Subject: [issue27584] New addition of vSockets to the python socket module In-Reply-To: <1469115390.74.0.838831983223.issue27584@psf.upfronthosting.co.za> Message-ID: <1499796849.38.0.00443404222312.issue27584@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Everything compiles successfully on this host - configure detects the header has HAVE_LINUX_VM_SOCKETS_H set to 1. test_socket passes on this host. However since i'm not running with a /dev/vsock, the unittests (correctly) skip the new tests. testCreateSocket (test.test_socket.BasicVSOCKTest) ... skipped 'VSOCK sockets required for this test.' testCrucialConstants (test.test_socket.BasicVSOCKTest) ... skipped 'VSOCK sockets required for this test.' testSocketBufferSize (test.test_socket.BasicVSOCKTest) ... skipped 'VSOCK sockets required for this test.' testVSOCKConstants (test.test_socket.BasicVSOCKTest) ... skipped 'VSOCK sockets required for this test.' testStream (test.test_socket.ThreadedVSOCKSocketStreamTest) ... skipped 'VSOCK sockets required for this test.' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 14:36:42 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 11 Jul 2017 18:36:42 +0000 Subject: [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1499798202.69.0.46060735981.issue10438@psf.upfronthosting.co.za> R. David Murray added the comment: I'm not sure there's a "best practice" choice between the two calling forms that are documented. Although obviously when you don't have an instance you can't use the instance calling form. I think it is *common* practice to use the instance form when you can, but I'm not sure it is either superior or inferior to using the class form. It partly depends on how you have structured your code and why you are using static methods in the first place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 14:54:31 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 11 Jul 2017 18:54:31 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1499799271.12.0.733609401298.issue27099@psf.upfronthosting.co.za> Cheryl Sabella added the comment: When I download the patch and run the tests, I get a lot of warnings (mostly on custom themes and custom keysets). I also get errors in test_parenmatch like this one: ERROR: test_paren_styles (idlelib.idle_test.test_parenmatch.ParenMatchTest) (style='expression') ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cheryl/cpython/Lib/idlelib/idle_test/test_parenmatch.py", line 64, in test_paren_styles pm.flash_paren_event('event') File "/home/cheryl/cpython/Lib/idlelib/parenmatch.py", line 98, in flash_paren_event self.create_tag(indices) File "/home/cheryl/cpython/Lib/idlelib/parenmatch.py", line 154, in create_tag_expression self.text.tag_config("paren", self.HILITE_CONFIG) File "/home/cheryl/cpython/Lib/tkinter/__init__.py", line 3364, in tag_configure return self._configure(('tag', 'configure', tagName), cnf, kw) File "/home/cheryl/cpython/Lib/tkinter/__init__.py", line 1470, in _configure self.tk.call(_flatten((self._w, cmd)) + self._options(cnf)) _tkinter.TclError: unknown color name "000000" ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 15:04:51 2017 From: report at bugs.python.org (Michael Foord) Date: Tue, 11 Jul 2017 19:04:51 +0000 Subject: [issue30821] unittest.mock.Mocks with specs aren't aware of default arguments In-Reply-To: <1498842809.59.0.716482523297.issue30821@psf.upfronthosting.co.za> Message-ID: <1499799891.86.0.476722409403.issue30821@psf.upfronthosting.co.za> Michael Foord added the comment: Generally the called with asserts can only be used to match the *actual call*, and they don't determine "equivalence". To do it cleanly would be tricky, and adding complex code is a maintenance burden. I'm not convinced there's a massive use case - generally you want to make asserts about what your code actually does - not just check if it does something equivalent to your assert. So I'm not enthusiastic about this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 15:51:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jul 2017 19:51:10 +0000 Subject: [issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472) In-Reply-To: <1487345979.72.0.358826213221.issue29591@psf.upfronthosting.co.za> Message-ID: <1499802670.21.0.828595584184.issue29591@psf.upfronthosting.co.za> STINNER Victor added the comment: > I don't quite understand what's happening on this issue. I see that master, 3.6, 3.6, and 2.7 have been upgraded to expat 2.2.0. This issue was created to upgrade CPython to 2.2.0. But the PR against 3.3 and 3.4 upgrade expat to 2.2.1?! > > I'm not against this change in principle, I'm just trying to understand why a) it doesn't match the issue, b) why 3.3 and 3.4 are special, c) why we don't upgrade master & 3.6 & 3.5 & 2.7 to expat 2.2.1. I upgraded libexpat to 2.2.0 in this issue, and then to libexpat 2.2.1 in bpo-30694. For 3.3 and 3.4 pull requests, I chose to use this bpo number. 3.3: https://github.com/python/cpython/pull/2204 3.4: https://github.com/python/cpython/pull/2203 So these pull requests upgrade directly to 2.2.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 15:53:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jul 2017 19:53:47 +0000 Subject: [issue30891] importlib: _find_and_load() race condition on sys.modules[name] check In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1499802827.21.0.504950643067.issue30891@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: -2734 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 16:06:42 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 11 Jul 2017 20:06:42 +0000 Subject: [issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472) In-Reply-To: <1487345979.72.0.358826213221.issue29591@psf.upfronthosting.co.za> Message-ID: <1499803602.55.0.690988501419.issue29591@psf.upfronthosting.co.za> Larry Hastings added the comment: Please instead choose to use bpo-30694 for the upgrades of 3.3 and 3.4 to expat 2.2.1. I guess there are historical reasons why the PRs are here, but bpo stands as a historical record; let's not confuse posterity by upgrading to 2.2.1 using a bpo issue talking about--and upgrading four branches to--2.2.0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 16:34:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jul 2017 20:34:42 +0000 Subject: [issue30694] Update embedded copy of expat to 2.2.1 In-Reply-To: <1497754887.58.0.724129384272.issue30694@psf.upfronthosting.co.za> Message-ID: <1499805282.77.0.186949975193.issue30694@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2737 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 16:41:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jul 2017 20:41:19 +0000 Subject: [issue30694] Update embedded copy of expat to 2.2.1 In-Reply-To: <1497754887.58.0.724129384272.issue30694@psf.upfronthosting.co.za> Message-ID: <1499805679.9.0.358981337624.issue30694@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2738 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 16:43:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jul 2017 20:43:26 +0000 Subject: [issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472) In-Reply-To: <1487345979.72.0.358826213221.issue29591@psf.upfronthosting.co.za> Message-ID: <1499805806.34.0.848403948126.issue29591@psf.upfronthosting.co.za> STINNER Victor added the comment: Larry: "Please instead choose to use bpo-30694 for the upgrades of 3.3 and 3.4 to expat 2.2.1. I guess there are historical reasons why the PRs are here, but bpo stands as a historical record; let's not confuse posterity by upgrading to 2.2.1 using a bpo issue talking about--and upgrading four branches to--2.2.0." I just updated the 3.4 PR. In fact, the PR backports the libexpat 2.2.0 commit *and* then the libexpat 2.2.1 commit. Since it's not possible to create a "patch serie" (in GitHub, it would mean a PR which depends on another PR), I chose to stack the two commits in the same PR and reuse the existing PR to not loose context. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 16:43:54 2017 From: report at bugs.python.org (mesheb82) Date: Tue, 11 Jul 2017 20:43:54 +0000 Subject: [issue30906] os.path.join misjoins paths Message-ID: <1499805834.64.0.51742284415.issue30906@psf.upfronthosting.co.za> New submission from mesheb82: I'm trying to join paths on Windows with data taken from a user generated file. In doing so, I came across: >>> os.path.join('dir1', '/dir2') '/dir2' I'd expect an error or: 'dir1\\dir2' This has been tested and is consistent with Python 2.7.13 and 3.6.1. ---------- components: Library (Lib), Windows messages: 298181 nosy: mesheb82, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: os.path.join misjoins paths versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 16:44:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jul 2017 20:44:18 +0000 Subject: [issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472) In-Reply-To: <1499805806.34.0.848403948126.issue29591@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: I changed the PR title to mention the two bpo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 16:57:21 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Tue, 11 Jul 2017 20:57:21 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1499806641.61.0.641275023219.issue27099@psf.upfronthosting.co.za> Charles Wohlganger added the comment: Thank you, Cheryl Sabella. I think I've found which tests I've missed running. Now to fix all the bugs... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 17:56:31 2017 From: report at bugs.python.org (Segev Finer) Date: Tue, 11 Jul 2017 21:56:31 +0000 Subject: [issue30797] ./pyconfig.h:1438:0: warning: "_GNU_SOURCE" redefined [enabled by default] In-Reply-To: <1498688645.93.0.221276689872.issue30797@psf.upfronthosting.co.za> Message-ID: <1499810191.93.0.490913904362.issue30797@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2739 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 17:57:25 2017 From: report at bugs.python.org (Segev Finer) Date: Tue, 11 Jul 2017 21:57:25 +0000 Subject: [issue30797] ./pyconfig.h:1438:0: warning: "_GNU_SOURCE" redefined [enabled by default] In-Reply-To: <1498688645.93.0.221276689872.issue30797@psf.upfronthosting.co.za> Message-ID: <1499810245.2.0.350271208538.issue30797@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2740 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 17:59:18 2017 From: report at bugs.python.org (Paul Moore) Date: Tue, 11 Jul 2017 21:59:18 +0000 Subject: [issue30906] os.path.join misjoins paths In-Reply-To: <1499805834.64.0.51742284415.issue30906@psf.upfronthosting.co.za> Message-ID: <1499810358.02.0.726522961288.issue30906@psf.upfronthosting.co.za> Paul Moore added the comment: This is as documented - see https://docs.python.org/3.6/library/os.path.html#os.path.join (" If a component is an absolute path, all previous components are thrown away and joining continues from the absolute path component"). In this case, "/dir2" is an absolute path as it starts with a slash. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 18:16:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jul 2017 22:16:30 +0000 Subject: [issue30797] ./pyconfig.h:1438:0: warning: "_GNU_SOURCE" redefined [enabled by default] In-Reply-To: <1498688645.93.0.221276689872.issue30797@psf.upfronthosting.co.za> Message-ID: <1499811390.95.0.759296596795.issue30797@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 884c4ca33ab84b9fc57338cf59f79e0436d3da43 by Victor Stinner (Segev Finer) in branch '2.7': [2.7] bpo-30797: Avoid _GNU_SOURCE redefined warning in xmlparse.c (GH-2670) (#2672) https://github.com/python/cpython/commit/884c4ca33ab84b9fc57338cf59f79e0436d3da43 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 18:27:04 2017 From: report at bugs.python.org (Eryk Sun) Date: Tue, 11 Jul 2017 22:27:04 +0000 Subject: [issue30906] os.path.join misjoins paths In-Reply-To: <1499805834.64.0.51742284415.issue30906@psf.upfronthosting.co.za> Message-ID: <1499812024.36.0.393743012788.issue30906@psf.upfronthosting.co.za> Eryk Sun added the comment: This differs slightly from WinAPI PathCchCombineEx, which fails the example case as an invalid parameter. If the second path is rooted but without a drive or UNC share, then if the first path is relative it must be at least drive relative (e.g. "C:dir1"). Should Python's documented behavior change in 3.7 to match PathCchCombineEx in this case? ---------- nosy: +eryksun status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 18:55:07 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 22:55:07 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499813707.56.0.885780718733.issue30779@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Eventually, we will have tests that would have caught this. I took the opportunity to improve the test for the call. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 19:09:46 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 23:09:46 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499814586.62.0.534513264718.issue30779@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 6d13b22e3ab262c6b1f068259aebd705e7da316c by terryjreedy (csabella) in branch 'master': bpo-30779: IDLE: fix changes.delete_section calls in configdialog (#2667) https://github.com/python/cpython/commit/6d13b22e3ab262c6b1f068259aebd705e7da316c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 19:14:06 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 11 Jul 2017 23:14:06 +0000 Subject: [issue30717] str.center() is not unicode aware In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1499814846.63.0.0823266610847.issue30717@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +2741 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 19:20:39 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 23:20:39 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499815239.78.0.283831882303.issue30779@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2742 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 19:25:15 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 23:25:15 +0000 Subject: [issue30890] IDLE: Input method error in comment with Korean language In-Reply-To: <1499668419.76.0.67681471989.issue30890@psf.upfronthosting.co.za> Message-ID: <1499815515.87.0.382457157734.issue30890@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am thinking that this is a artifact of the combination of monitor pixel and subpixel type, size, and arrangement; font type and size; particular character; and character generation software. When I load the file in IDLE, the Korean comment chars are a nice uniform red. But the l in color is tinged green while in 'for x in range', the vertical parts of first r, i, and n are gray instead of keyword orange. Range is spotty because builtin purple uses red and blue subpixels while green is off. The spacebar bit through me off and still puzzles me, but overall color glitches are not limited to Korean. Bottom line: IDLE can tell tk 'color this substring red', but has no control after that as to what happens. So I am 99.9% sure this is not an IDLE bug. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 19:43:00 2017 From: report at bugs.python.org (Guillaume Sanchez) Date: Tue, 11 Jul 2017 23:43:00 +0000 Subject: [issue30717] str.center() is not unicode aware In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1499816580.87.0.0622786518184.issue30717@psf.upfronthosting.co.za> Guillaume Sanchez added the comment: Hello to all of you, sorry for the delay. Been busy. I added the base code needed to built the grapheme cluster break algorithm. We now have the GraphemeBreakProperty available via unicodedata.grapheme_cluster_break() Can you check that the implementation correctly fits the design? I was not sure about adding that prop to unicodedata_db ou unicodectype_db, tbh. If it's all correct, I'll move forward with the automaton and the grapheme cluster breaking algorithm. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 19:50:12 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jul 2017 23:50:12 +0000 Subject: [issue30779] IDLE: configdialog -- factor out Changes class In-Reply-To: <1498516456.91.0.038376204652.issue30779@psf.upfronthosting.co.za> Message-ID: <1499817012.78.0.672963363629.issue30779@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset c0179483f13be81910ed73889dcad92528e20ef2 by terryjreedy in branch '3.6': [3.6] bpo-30779: IDLE: fix changes.delete_section calls in configdialog (GH-2667) (#2674) https://github.com/python/cpython/commit/c0179483f13be81910ed73889dcad92528e20ef2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 22:22:57 2017 From: report at bugs.python.org (Ammar Askar) Date: Wed, 12 Jul 2017 02:22:57 +0000 Subject: [issue29812] test for token.py, and consistency tests for tokenize.py In-Reply-To: <1489532621.9.0.449448187774.issue29812@psf.upfronthosting.co.za> Message-ID: <1499826177.5.0.35268741088.issue29812@psf.upfronthosting.co.za> Ammar Askar added the comment: No problem, closing this in favor of issue 30455. ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 23:50:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Jul 2017 03:50:05 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499831405.41.0.849056094508.issue30876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8a9cd20edca7d01b68292036029ae3735ce65edd by Serhiy Storchaka in branch 'master': bpo-30876: Relative import from unloaded package now reimports the package (#2639) https://github.com/python/cpython/commit/8a9cd20edca7d01b68292036029ae3735ce65edd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 23:54:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Jul 2017 03:54:43 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499831683.13.0.116791594739.issue30876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What about other branches? Should we backport this change to them? I think that even if not backport this change we should change SystemError to more appropriate exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 00:09:53 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 12 Jul 2017 04:09:53 +0000 Subject: [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1499832593.48.0.760981508394.issue10438@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Ian, the docs mostly serve to tell what a tool does. Best practices then emerge from actual practices and are determined by users. I don't see any bug here that needs to be solved and think it is time to close this tracker item. It has been consuming developer clock cycles without addressing any real, known issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 01:44:34 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 12 Jul 2017 05:44:34 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499838274.79.0.593330135337.issue30876@psf.upfronthosting.co.za> Nick Coghlan added the comment: The fix is unintrusive enough that I'm +1 for also fixing it in 3.6 and 3.5. Trying to fix it in 2.7 would likely be more trouble than it's worth, but I also wouldn't be opposed to fixing it there if you or anyone else wanted to do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 01:58:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Jul 2017 05:58:09 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499839089.62.0.451256050224.issue30876@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2743 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 02:24:19 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Jul 2017 06:24:19 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499840659.58.0.140825749542.issue30870@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The new gui tests passed on Travis (linux), which I strongly suspect does not run gui tests. The generate key test failed on Appveyor (Windows), which means is does run gui tests. It also failed on my machine: generate key release did not work. The generate click test does pass on both Appveyor and my machine, which is progress. Adding config.fontlist.focus_force() before the key event worked. Louie, I will push that along with other edits tomorrow. I will try exposing the window just for the tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 02:38:29 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 12 Jul 2017 06:38:29 +0000 Subject: [issue30906] os.path.join misjoins paths In-Reply-To: <1499805834.64.0.51742284415.issue30906@psf.upfronthosting.co.za> Message-ID: <1499841509.0.0.621632495432.issue30906@psf.upfronthosting.co.za> Steve Dower added the comment: Arguably it isn't even against the documented behavior, since a component starting with a slash an absolute path. I'd be in favor of preserving the drive when encountering a component starting with a separator. Not sure of the value in changing the behavior in older versions - apparently I've never encountered this before, and I feel like I should have. ---------- resolution: not a bug -> stage: resolved -> test needed type: -> behavior versions: +Python 3.7 -Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 02:39:19 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 12 Jul 2017 06:39:19 +0000 Subject: [issue30906] os.path.join misjoins paths In-Reply-To: <1499805834.64.0.51742284415.issue30906@psf.upfronthosting.co.za> Message-ID: <1499841559.47.0.334554392396.issue30906@psf.upfronthosting.co.za> Steve Dower added the comment: > since a component starting with a slash *is not* an absolute path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 02:56:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Jul 2017 06:56:24 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499842584.92.0.616886913537.issue30876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: When backported issue30876 to 3.5 I found that the lines elif not package: raise ImportError('attempted relative import with no known parent ' 'package') don't exist in 3.5. They where added in issue26367, but only in the 3.6 branch. The original example in issue26367 still returns a module with a wrong name in 3.5. Why issue26367 changes were applied to 3.5 only partially? I afraid that the absence of this check may interfere with removing SystemError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 03:18:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Jul 2017 07:18:03 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499843883.68.0.613975722064.issue30876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, this is because issue18018 was fixed only in 3.6. Issue18018 is similar to this issue, it is about confusing SystemError. As a side effect it solved an example from issue26367 in C builtin __import__. I think that both raising SystemError and returning a module with a wrong name are bugs that worth to be fixed in 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 03:25:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Jul 2017 07:25:45 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1499844345.68.0.963509019111.issue30876@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2744 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 04:01:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Jul 2017 08:01:38 +0000 Subject: [issue30906] os.path.join misjoins paths In-Reply-To: <1499805834.64.0.51742284415.issue30906@psf.upfronthosting.co.za> Message-ID: <1499846498.89.0.180010371838.issue30906@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I afraid that failing on os.path.join('', '/path') or os.path.join('.', '/path') can break a lot of code. > I'd be in favor of preserving the drive when encountering a component starting with a separator. Already done (issue19456). >>> import ntpath >>> ntpath.join('c:foo', '/bar') 'c:/bar' ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 05:43:35 2017 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 12 Jul 2017 09:43:35 +0000 Subject: [issue26415] Excessive peak memory consumption by the Python parser In-Reply-To: <1456182380.09.0.81920177296.issue26415@psf.upfronthosting.co.za> Message-ID: <1499852615.36.0.90650590187.issue26415@psf.upfronthosting.co.za> Changes by Petr Viktorin : ---------- nosy: +encukou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 07:44:02 2017 From: report at bugs.python.org (Antoni Szych) Date: Wed, 12 Jul 2017 11:44:02 +0000 Subject: [issue21600] mock.patch.stopall doesn't work with patch.dict to sys.modules In-Reply-To: <1401334528.48.0.358693350259.issue21600@psf.upfronthosting.co.za> Message-ID: <1499859842.87.0.71340441295.issue21600@psf.upfronthosting.co.za> Antoni Szych added the comment: Hi, It's been 3 years now since this issue was first raised. We bumped upon this issue while using code like following: def tearDown(): patch.stopall() def test123(): p=patch.dict(...) p.start() assert False p.stop() While `patch.stopall()` is run, it doesn't stop anything. This is because `p.start()` in fact executes `mock._patch_dict._patch_dict()`, which does not execute `self._active_patches.append(self)` (like ordinary `p=patch(...).start()` would). I could understand that this is just a design choice (which may seem unintuitive for me, but possibly perfectly good for others), however the official documentation [1] states: >**All** the patchers have start() and stop() methods. And few lines below [2], we have: >patch.stopall() Stop all active patches. Only stops patches started with start. The above is not true for `patch.dict()`, so the documentation is unfortunatelly misleading. Is there a possibility to fix this in some 3.5 maintenance release (preferably code, not docs :) )? If anyone else will have the same issue: for now a workaround would be to use `patch.dict()` either as a decorator, or as a context manager (`with patch.dict()`). [1] https://docs.python.org/3/library/unittest.mock.html#patch-methods-start-and-stop [2] https://docs.python.org/3/library/unittest.mock.html#unittest.mock.patch.stopall ---------- nosy: +Antoni Szych _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 08:08:13 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 12 Jul 2017 12:08:13 +0000 Subject: [issue30760] configparse module in python3 can not write '%' to config file In-Reply-To: <1498470490.58.0.585332868378.issue30760@psf.upfronthosting.co.za> Message-ID: <1499861293.34.0.680199050694.issue30760@psf.upfronthosting.co.za> ?ukasz Langa added the comment: With the default ConfigParser, we're using basic interpolation, as covered by: https://docs.python.org/3/library/configparser.html#configparser.BasicInterpolation To not have it, set interpolation to None in the ConfigParser constructor: config = configparser.ConfigParser(interpolation=None) Then percent signs will be treated like any other character. Let me know if you have further questions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 08:16:12 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 12 Jul 2017 12:16:12 +0000 Subject: [issue23835] configparser does not convert defaults to strings In-Reply-To: <1427862188.44.0.00358189102447.issue23835@psf.upfronthosting.co.za> Message-ID: <1499861772.23.0.836760155365.issue23835@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Responded on the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 08:35:46 2017 From: report at bugs.python.org (Larry Hastings) Date: Wed, 12 Jul 2017 12:35:46 +0000 Subject: [issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472) In-Reply-To: <1487345979.72.0.358826213221.issue29591@psf.upfronthosting.co.za> Message-ID: <1499862946.65.0.978678052933.issue29591@psf.upfronthosting.co.za> Larry Hastings added the comment: Okay. Closing this bug, because all the branches that are being upgraded to expat 2.2.*0* have already gotten their upgrades. Job done. The discussions for PRs 2203 and 2204 should move to Issue #30694, which is for the upgrade to expat 2.2.*1*. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 08:41:36 2017 From: report at bugs.python.org (Larry Hastings) Date: Wed, 12 Jul 2017 12:41:36 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1499863296.4.0.614072818783.issue30726@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset 71572bbe82aa0836c036d44d41c8269ba6a321be by larryhastings (Victor Stinner) in branch '3.4': [3.4] bpo-29591, bpo-30694: Upgrade Modules/expat to libexpat 2.2.1 (#2164) (#2203) https://github.com/python/cpython/commit/71572bbe82aa0836c036d44d41c8269ba6a321be ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 08:41:36 2017 From: report at bugs.python.org (Larry Hastings) Date: Wed, 12 Jul 2017 12:41:36 +0000 Subject: [issue30694] Update embedded copy of expat to 2.2.1 In-Reply-To: <1497754887.58.0.724129384272.issue30694@psf.upfronthosting.co.za> Message-ID: <1499863296.5.0.917916154229.issue30694@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset 71572bbe82aa0836c036d44d41c8269ba6a321be by larryhastings (Victor Stinner) in branch '3.4': [3.4] bpo-29591, bpo-30694: Upgrade Modules/expat to libexpat 2.2.1 (#2164) (#2203) https://github.com/python/cpython/commit/71572bbe82aa0836c036d44d41c8269ba6a321be ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 08:41:36 2017 From: report at bugs.python.org (Larry Hastings) Date: Wed, 12 Jul 2017 12:41:36 +0000 Subject: [issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472) In-Reply-To: <1487345979.72.0.358826213221.issue29591@psf.upfronthosting.co.za> Message-ID: <1499863296.67.0.907257514034.issue29591@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset 71572bbe82aa0836c036d44d41c8269ba6a321be by larryhastings (Victor Stinner) in branch '3.4': [3.4] bpo-29591, bpo-30694: Upgrade Modules/expat to libexpat 2.2.1 (#2164) (#2203) https://github.com/python/cpython/commit/71572bbe82aa0836c036d44d41c8269ba6a321be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 08:46:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jul 2017 12:46:40 +0000 Subject: [issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472) In-Reply-To: <1487345979.72.0.358826213221.issue29591@psf.upfronthosting.co.za> Message-ID: <1499863600.35.0.118482041345.issue29591@psf.upfronthosting.co.za> STINNER Victor added the comment: > Okay. Closing this bug, because all the branches that are being upgraded to expat 2.2.*0* have already gotten their upgrades. Job done. Well, technically 3.3 wasn't upgraded yet: https://github.com/python/cpython/pull/2204 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 08:51:48 2017 From: report at bugs.python.org (Larry Hastings) Date: Wed, 12 Jul 2017 12:51:48 +0000 Subject: [issue30500] [security] urllib connects to a wrong host In-Reply-To: <1496030652.64.0.90102082916.issue30500@psf.upfronthosting.co.za> Message-ID: <1499863908.27.0.182935916912.issue30500@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset cc54c1c0d2d05fe7404ba64c53df4b1352ed2262 by larryhastings (Victor Stinner) in branch '3.4': bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) (#2291) https://github.com/python/cpython/commit/cc54c1c0d2d05fe7404ba64c53df4b1352ed2262 ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 08:52:07 2017 From: report at bugs.python.org (Larry Hastings) Date: Wed, 12 Jul 2017 12:52:07 +0000 Subject: [issue26657] Directory traversal with http.server and SimpleHTTPServer on windows In-Reply-To: <1459179015.77.0.509336394494.issue26657@psf.upfronthosting.co.za> Message-ID: <1499863927.14.0.833028253876.issue26657@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset 6f6bc1da8aaae52664e7747e328d26eb59c0e74f by larryhastings (Victor Stinner) in branch '3.4': bpo-26657: Fix Windows directory traversal vulnerability with http.server (#782) https://github.com/python/cpython/commit/6f6bc1da8aaae52664e7747e328d26eb59c0e74f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 09:15:31 2017 From: report at bugs.python.org (Wouter Bolsterlee) Date: Wed, 12 Jul 2017 13:15:31 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers Message-ID: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> New submission from Wouter Bolsterlee: when comparing instances of the built-in container types (dict, list, and others) python assumes that "identity implies equality". this is documented (and assumed) behaviour: "In enforcing reflexivity of elements, the comparison of collections assumes that for a collection element x, x == x is always true. Based on that assumption, element identity is compared first, and element comparison is performed only for distinct elements." https://docs.python.org/3/reference/expressions.html#value-comparisons because of this, various operations such as rich comparison of lists can be sped up by checking for identity first, and only falling back to (possibly) much slower rich comparisons on container elements when two elements are not identical (i.e. id(a) == id(b)). because identity implies equality, comparing a container instance to itself is guaranteed to be true. currently, comparing a list to itself takes O(n) time, which can be measured easily: >>> x = list(range(1000)) >>> %timeit x == x 2.95 ?s ? 19.2 ns per loop (mean ? std. dev. of 7 runs, 100000 loops each) >>> y = list(range(100000)) >>> %timeit y == y 293 ?s ? 3.35 ?s per loop (mean ? std. dev. of 7 runs, 1000 loops each) the second example is 100 times as slow. i will shortly submit a few pull request to make "compare to self" run in O(1) time instead for a few of the built-in containers. ---------- components: Interpreter Core messages: 298213 nosy: wbolster priority: normal severity: normal status: open title: speed up comparisons to self for built-in containers versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 09:20:33 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 12 Jul 2017 13:20:33 +0000 Subject: [issue30826] More details in reference 'Looping through a list in Python and modifying it' In-Reply-To: <1498969328.51.0.74139016573.issue30826@psf.upfronthosting.co.za> Message-ID: <1499865633.66.0.00727172991005.issue30826@psf.upfronthosting.co.za> R. David Murray added the comment: I don't think that helps. The issue here is that *sequences* are iterated over by incrementing an integer index. If you change the size of the list, you are potentially changing which value any given index points to. Presumably the tutorial writer thought this was intuitive, and indeed after years of Python programming I find it so. I can see how a beginner might not, though :) What if we replaced: If you need to modify the sequence you are iterating over while inside the loop (for example to duplicate selected items), it is recommended that you first make a copy. Iterating over a sequence does not implicitly make a copy. The slice notation makes this especially convenient: With: Sequence iteration is preformed by incrementing an implicit integer index until there are no more items in the sequence. The sequence is *not* copied before iteration, so if you modify the sequence during iteration the value that is affected by the next iteration of the loop may not be the one you are expecting. You can avoid this problem by iterating over a copy of the sequence, and the slice notation makes this especially convenient: However, this section has a deeper problem. It is introducing the 'for' statement, but explains what the for statement does in terms of sequences, when in fact the for statement now operates on any iterable, not just sequences. (Many Python programmers probably do not remember the time before the iteration protocol was added to the language :) Fixing that problem not only requires rewriting the section, but also figuring out the best place to introduce the concept of the iteration protocol (which *might* be in this section, but it's been so long since I've looked over the tutorial that I can't say). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 09:21:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Jul 2017 13:21:42 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers In-Reply-To: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> Message-ID: <1499865702.27.0.100508064578.issue30907@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 09:22:39 2017 From: report at bugs.python.org (Larry Hastings) Date: Wed, 12 Jul 2017 13:22:39 +0000 Subject: [issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472) In-Reply-To: <1487345979.72.0.358826213221.issue29591@psf.upfronthosting.co.za> Message-ID: <1499865759.76.0.321650981547.issue29591@psf.upfronthosting.co.za> Larry Hastings added the comment: Correct. But technically 3.3 is being upgraded to 2.2.*1*, which is being tracked on--repeating myself here--Issue #30694. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 09:23:13 2017 From: report at bugs.python.org (Larry Hastings) Date: Wed, 12 Jul 2017 13:23:13 +0000 Subject: [issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472) In-Reply-To: <1487345979.72.0.358826213221.issue29591@psf.upfronthosting.co.za> Message-ID: <1499865793.69.0.518211302336.issue29591@psf.upfronthosting.co.za> Larry Hastings added the comment: Here, I'll remove 3.4 and 3.5 from the versions affected. Now everybody can be pedantic! ---------- versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 09:26:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jul 2017 13:26:16 +0000 Subject: [issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads Message-ID: <1499865976.69.0.386624022037.issue30908@psf.upfronthosting.co.za> New submission from STINNER Victor: The test_keywords() test of test_os.TestSendfile emits a warning about dangling threads: haypo at selma$ ./python -m test --fail-env-changed -R 3:3 test_os -m test.test_os.TestSendfile.test_keywords Run tests sequentially 0:00:00 load avg: 0.53 [1/1] test_os Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) beginning 6 repetitions 123456 Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) .Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) .Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) .Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) .Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) .Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) . test_os failed (env changed) 1 test altered the execution environment: test_os Total duration: 21 sec Tests result: ENV CHANGED ---------- components: Tests messages: 298217 nosy: haypo priority: normal severity: normal status: open title: test_os.TestSendfile.test_keywords() leaks dangling threads type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 09:29:47 2017 From: report at bugs.python.org (Wouter Bolsterlee) Date: Wed, 12 Jul 2017 13:29:47 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers In-Reply-To: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> Message-ID: <1499866187.47.0.523386117738.issue30907@psf.upfronthosting.co.za> Changes by Wouter Bolsterlee : ---------- pull_requests: +2745 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 09:36:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jul 2017 13:36:34 +0000 Subject: [issue30730] [security] Injecting environment variable in subprocess on Windows In-Reply-To: <1498118820.13.0.596038385019.issue30730@psf.upfronthosting.co.za> Message-ID: <1499866594.88.0.707856199175.issue30730@psf.upfronthosting.co.za> STINNER Victor added the comment: I rebased my "[3.4] Backport CI config from master" PR #2475 on top of 3.4 to test the new security fixes, but a few test_subprocess tests failed: https://github.com/python/cpython/pull/2475 https://travis-ci.org/python/cpython/jobs/252804589 ====================================================================== ERROR: test_invalid_cmd (test.test_subprocess.ProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/test_subprocess.py", line 613, in test_invalid_cmd subprocess.Popen([cmd, "-c", "pass"]) File "/home/travis/build/python/cpython/Lib/subprocess.py", line 856, in __init__ restore_signals, start_new_session) File "/home/travis/build/python/cpython/Lib/subprocess.py", line 1402, in _execute_child restore_signals, start_new_session, preexec_fn) TypeError: expected bytes with no null ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 09:42:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jul 2017 13:42:06 +0000 Subject: [issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads In-Reply-To: <1499865976.69.0.386624022037.issue30908@psf.upfronthosting.co.za> Message-ID: <1499866926.25.0.509593408626.issue30908@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2746 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 09:46:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Jul 2017 13:46:22 +0000 Subject: [issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads In-Reply-To: <1499865976.69.0.386624022037.issue30908@psf.upfronthosting.co.za> Message-ID: <1499867182.48.0.49107507354.issue30908@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This isn't specific to test_keywords. Dangling threads occurred even if replace the test body with just "return". This is caused by setUp/tearDown or setUpClass/tearDownClass. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 09:47:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jul 2017 13:47:50 +0000 Subject: [issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads In-Reply-To: <1499865976.69.0.386624022037.issue30908@psf.upfronthosting.co.za> Message-ID: <1499867270.29.0.739652196205.issue30908@psf.upfronthosting.co.za> STINNER Victor added the comment: > This isn't specific to test_keywords. Dangling threads occurred even if replace the test body with just "return". This is caused by setUp/tearDown or setUpClass/tearDownClass. Right, see my PR #2680. The general problem is that tearDownClass() seems to be called while the test case instance is still alive and so didn't clear its attributes. But I wrote a single line fix instead of trying to fix unittest or regrtest :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 10:05:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jul 2017 14:05:45 +0000 Subject: [issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads In-Reply-To: <1499865976.69.0.386624022037.issue30908@psf.upfronthosting.co.za> Message-ID: <1499868345.31.0.413538770959.issue30908@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d1cc037d1442cc35d1b194ec8e50901514360949 by Victor Stinner in branch 'master': bpo-30908: Fix dangling thread in test_os.TestSendfile (#2680) https://github.com/python/cpython/commit/d1cc037d1442cc35d1b194ec8e50901514360949 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 10:41:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Jul 2017 14:41:57 +0000 Subject: [issue30730] [security] Injecting environment variable in subprocess on Windows In-Reply-To: <1498118820.13.0.596038385019.issue30730@psf.upfronthosting.co.za> Message-ID: <1499870517.94.0.033610852371.issue30730@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, I forgot that null character/byte errors were of type TypeError before 3.5. The simplest fix is changing corresponding ValueError in self.assertRaises() to the tuple (ValueError, TypeError). I have updated the PR for 3.5. You can include the fix in your "[3.4] Backport CI config from master" PR or I can create a separate PR for 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 11:02:31 2017 From: report at bugs.python.org (Max Rothman) Date: Wed, 12 Jul 2017 15:02:31 +0000 Subject: [issue30821] unittest.mock.Mocks with specs aren't aware of default arguments In-Reply-To: <1498842809.59.0.716482523297.issue30821@psf.upfronthosting.co.za> Message-ID: <1499871751.47.0.865106683947.issue30821@psf.upfronthosting.co.za> Max Rothman added the comment: > Generally the called with asserts can only be used to match the *actual call*, and they don't determine "equivalence". That's fair, but as unittest.mock stands now, it *does* check equivalence, but only partially, which is more confusing to users than either checking equivalence or not. > I'm not convinced there's a massive use case - generally you want to make asserts about what your code actually does - not just check if it does something equivalent to your assert. To me, making asserts about what your code actually does means not having tests fail because a function call switches to a set of equivalent but different arguments. As a developer, I care about the state in the parent and the state in the child, and I trust Python to work out the details in between. If Python treats two forms as equivalent, why shouldn't our tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 11:12:18 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Jul 2017 15:12:18 +0000 Subject: [issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads In-Reply-To: <1499865976.69.0.386624022037.issue30908@psf.upfronthosting.co.za> Message-ID: <1499872338.98.0.0168433367311.issue30908@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The alternate solution is to remove all references to test instances before calling tearDownClass(). Interesting, that this warning is occurred only in the leak hunting mode. In normal cases test instances are removed from a testsuite, but regrtest hacks unittest and disables this in the leak hunting mode (see the line "unittest.BaseTestSuite._cleanup = False" in Lib/test/libregrtest/setup.py). See issue11798. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 11:17:25 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Wed, 12 Jul 2017 15:17:25 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1499872645.42.0.721665896477.issue27099@psf.upfronthosting.co.za> Charles Wohlganger added the comment: Pull Request is passing build tests. Please check for pushing to master at your convenience. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 11:22:13 2017 From: report at bugs.python.org (Alex Corcoles) Date: Wed, 12 Jul 2017 15:22:13 +0000 Subject: [issue30909] ServerProxy should not make requests with malformed XML Message-ID: <1499872933.79.0.21578188594.issue30909@psf.upfronthosting.co.za> New submission from Alex Corcoles: https://docs.python.org/3.7/library/xmlrpc.client.html says: """ When passing strings, characters special to XML such as <, >, and & will be automatically escaped. However, it?s the caller?s responsibility to ensure that the string is free of characters that aren?t allowed in XML, such as the control characters with ASCII values between 0 and 31 (except, of course, tab, newline and carriage return); failing to do this will result in an XML-RPC request that isn?t well-formed XML. If you have to pass arbitrary bytes via XML-RPC, use bytes or bytearray classes or the Binary wrapper class described below. """ The XML-RPC spec at http://xmlrpc.scripting.com/spec.html says: """ What characters are allowed in strings? Non-printable characters? Null characters? Can a "string" be used to hold an arbitrary chunk of binary data? Any characters are allowed in a string except < and &, which are encoded as < and &. A string can be used to encode binary data. """ I believe strings should be XML-escaped correctly or at the very least, an assertion should be made to ensure no malformed XML is ever generated. ---------- components: XML messages: 298226 nosy: Alex Corcoles priority: normal severity: normal status: open title: ServerProxy should not make requests with malformed XML type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 11:41:29 2017 From: report at bugs.python.org (Tim Graham) Date: Wed, 12 Jul 2017 15:41:29 +0000 Subject: [issue29464] Specialize FASTCALL for functions with positional-only parameters In-Reply-To: <1486394565.83.0.903919283463.issue29464@psf.upfronthosting.co.za> Message-ID: <1499874089.52.0.274087131386.issue29464@psf.upfronthosting.co.za> Tim Graham added the comment: Hi, I observed an error while trying to install numpy after 6969eaf4682beb01bc95eeb14f5ce6c01312e297. gcc: numpy/random/mtrand/mtrand.c numpy/random/mtrand/mtrand.c: In function ?__Pyx_PyCFunction_FastCall?: numpy/random/mtrand/mtrand.c:44374:5: error: too many arguments to function ?(struct PyObject * (*)(struct PyObject *, struct PyObject **, Py_ssize_t))meth? return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL); ^ Is this a bug in Python or does it need to be fixed in numpy? ---------- nosy: +Tim.Graham _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 11:43:18 2017 From: report at bugs.python.org (Nir Soffer) Date: Wed, 12 Jul 2017 15:43:18 +0000 Subject: [issue25516] threading.Condition._is_owned() is wrong when using threading.Lock In-Reply-To: <1446165392.31.0.717642417411.issue25516@psf.upfronthosting.co.za> Message-ID: <1499874198.0.0.836230385947.issue25516@psf.upfronthosting.co.za> Changes by Nir Soffer : ---------- pull_requests: +2747 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 11:48:48 2017 From: report at bugs.python.org (Ian) Date: Wed, 12 Jul 2017 15:48:48 +0000 Subject: [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1499874528.95.0.917712644147.issue10438@psf.upfronthosting.co.za> Ian added the comment: As indicated earlier, I would prefer to see clear instructions on how to call a class's static method from another static method within the same class. Currently, it's only clear how to call from outside the class. If that's not going to happen, then I agree that this issue should be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 11:56:53 2017 From: report at bugs.python.org (Nir Soffer) Date: Wed, 12 Jul 2017 15:56:53 +0000 Subject: [issue25516] threading.Condition._is_owned() is wrong when using threading.Lock In-Reply-To: <1446165392.31.0.717642417411.issue25516@psf.upfronthosting.co.za> Message-ID: <1499875013.16.0.457269369567.issue25516@psf.upfronthosting.co.za> Nir Soffer added the comment: I rebased the patch on master (it was created against the legacy git tree in github), and sent a pull request. ---------- nosy: +Nir Soffer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 12:10:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Jul 2017 16:10:49 +0000 Subject: [issue29464] Specialize FASTCALL for functions with positional-only parameters In-Reply-To: <1486394565.83.0.903919283463.issue29464@psf.upfronthosting.co.za> Message-ID: <1499875849.6.0.664426119741.issue29464@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think you need to update Cython to a version that supports new FASTCALL call convention in 3.7. If the support of FASTCALL in Cython is optional try to disable it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 12:13:57 2017 From: report at bugs.python.org (Bruno Rosa) Date: Wed, 12 Jul 2017 16:13:57 +0000 Subject: [issue30910] Add -fexception to ppc64le build Message-ID: <1499876037.27.0.944341854308.issue30910@psf.upfronthosting.co.za> New submission from Bruno Rosa: To correctly throw and catch exceptions in code that is written in both C and C++, the -fexception is needed. This issue was also reported downstream on Debian and Ubuntu: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=862925 ---------- messages: 298231 nosy: brunoalr priority: normal severity: normal status: open title: Add -fexception to ppc64le build versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 12:16:10 2017 From: report at bugs.python.org (Bruno Rosa) Date: Wed, 12 Jul 2017 16:16:10 +0000 Subject: [issue30910] Add -fexception to ppc64le build In-Reply-To: <1499876037.27.0.944341854308.issue30910@psf.upfronthosting.co.za> Message-ID: <1499876170.27.0.679134426862.issue30910@psf.upfronthosting.co.za> Changes by Bruno Rosa : ---------- pull_requests: +2748 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 12:18:16 2017 From: report at bugs.python.org (Tim Graham) Date: Wed, 12 Jul 2017 16:18:16 +0000 Subject: [issue29464] Specialize FASTCALL for functions with positional-only parameters In-Reply-To: <1486394565.83.0.903919283463.issue29464@psf.upfronthosting.co.za> Message-ID: <1499876296.14.0.595266043641.issue29464@psf.upfronthosting.co.za> Tim Graham added the comment: Thanks, I'm not sure what that means exactly but I added the note to https://github.com/numpy/numpy/issues/9391. Perhaps a note in the Python release notes is warranted? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 12:34:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Jul 2017 16:34:07 +0000 Subject: [issue30909] ServerProxy should not make requests with malformed XML In-Reply-To: <1499872933.79.0.21578188594.issue30909@psf.upfronthosting.co.za> Message-ID: <1499877247.71.0.755636612945.issue30909@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This looks like a duplicate of issue7727. ---------- nosy: +serhiy.storchaka resolution: -> duplicate superseder: -> xmlrpc library returns string which contain null ( \x00 ) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 12:50:50 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 12 Jul 2017 16:50:50 +0000 Subject: [issue23835] configparser does not convert defaults to strings In-Reply-To: <1427862188.44.0.00358189102447.issue23835@psf.upfronthosting.co.za> Message-ID: <1499878250.89.0.5279173468.issue23835@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks. OK, so you agree a fix is appropriate. What about the question of backport/backward compatibility? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 13:03:29 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 12 Jul 2017 17:03:29 +0000 Subject: [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1499879009.7.0.983535488754.issue10438@psf.upfronthosting.co.za> R. David Murray added the comment: It is documented how to call a static method when you don't have an instance. So when you don't (for example, inside a static method on the same class) you use that form (call the method on the class name). I realize you don't find this clear, but as Raymond says it is time to stop arguing about it; our rule is that the status quo wins when agreement is not reached for a change. Closing. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 13:11:11 2017 From: report at bugs.python.org (Segev Finer) Date: Wed, 12 Jul 2017 17:11:11 +0000 Subject: [issue30797] ./pyconfig.h:1438:0: warning: "_GNU_SOURCE" redefined [enabled by default] In-Reply-To: <1498688645.93.0.221276689872.issue30797@psf.upfronthosting.co.za> Message-ID: <1499879471.45.0.676847212457.issue30797@psf.upfronthosting.co.za> Segev Finer added the comment: The fix is now in 3.5-3.7 and 2.7, unless you intend to also back port to 3.4 and 3.3, this can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 13:21:09 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 12 Jul 2017 17:21:09 +0000 Subject: [issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb' In-Reply-To: <1330513271.31.0.437438851478.issue14156@psf.upfronthosting.co.za> Message-ID: <1499880069.51.0.0217236679552.issue14156@psf.upfronthosting.co.za> R. David Murray added the comment: The biggest problem, as paul.j3 says, is to get someone from core to review the argparse issues. I am currently planning to make argparse one of my foci in a sprint we are doing at the beginning of September, so there is some hope.... Any reviews/testing people do on argparse patches between now and then will be helpful. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 13:22:02 2017 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 12 Jul 2017 17:22:02 +0000 Subject: [issue30906] os.path.join misjoins paths In-Reply-To: <1499805834.64.0.51742284415.issue30906@psf.upfronthosting.co.za> Message-ID: <1499880122.45.0.198682503836.issue30906@psf.upfronthosting.co.za> Eric V. Smith added the comment: We absolutely cannot change this to give an error if the second or subsequent parameters is absolute. I have code that reads user-named config files. If the path is relative, it's relative to a config directory, but it's allowed to be absolute: config_filename = os.path.join(config_dir, user_supplied_name) ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 13:28:06 2017 From: report at bugs.python.org (Segev Finer) Date: Wed, 12 Jul 2017 17:28:06 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned Message-ID: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> New submission from Segev Finer: Shows in buildbots: /home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Modules/_json.c: In function ?scanner_new?: /home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Modules/_json.c:1212:5: warning: comparison is always false due to limited range of data type [-Wtype-limits] if (s->strict < 0) ^ This means that the error check doesn't work right. ---------- components: Extension Modules messages: 298239 nosy: Segev Finer priority: normal severity: normal status: open title: Warning in _json.c on platforms where char is unsigned type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 13:28:22 2017 From: report at bugs.python.org (Segev Finer) Date: Wed, 12 Jul 2017 17:28:22 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1499880502.49.0.119078230166.issue30911@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2749 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 13:44:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Jul 2017 17:44:16 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1499881456.6.0.496194782591.issue30911@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 14:05:35 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Jul 2017 18:05:35 +0000 Subject: [issue30899] IDLE: Add idle config parser unittest In-Reply-To: <1499753574.2.0.472414190179.issue30899@psf.upfronthosting.co.za> Message-ID: <1499882735.0.0.921979862528.issue30899@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 50c9435c9b73b39fcf79cc3e58edc58bb943d0ed by terryjreedy (Louie Lu) in branch 'master': bpo-30899: Add unittests, 100% coverage, for IDLE's two ConfigParser subclasses. (#2662) https://github.com/python/cpython/commit/50c9435c9b73b39fcf79cc3e58edc58bb943d0ed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 14:16:31 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Jul 2017 18:16:31 +0000 Subject: [issue30899] IDLE: Add idle config parser unittest In-Reply-To: <1499753574.2.0.472414190179.issue30899@psf.upfronthosting.co.za> Message-ID: <1499883391.48.0.782737887162.issue30899@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2750 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 14:17:41 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Jul 2017 18:17:41 +0000 Subject: [issue30899] IDLE: Add idle config parser unittest In-Reply-To: <1499753574.2.0.472414190179.issue30899@psf.upfronthosting.co.za> Message-ID: <1499883461.55.0.405278200386.issue30899@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 14:38:27 2017 From: report at bugs.python.org (mesheb82) Date: Wed, 12 Jul 2017 18:38:27 +0000 Subject: [issue30906] os.path.join misjoins paths In-Reply-To: <1499805834.64.0.51742284415.issue30906@psf.upfronthosting.co.za> Message-ID: <1499884707.99.0.777098299949.issue30906@psf.upfronthosting.co.za> mesheb82 added the comment: Testing on Python 2.7.12 on through Windows 10 bash (so Linux), I find an inconsistency with the documented statement "If a component is an absolute path, all previous components are thrown away and joining continues from the absolute path component" >>> os.path.join('dir', 'C:/dir2') 'dir/C:/dir2' To me, the is very similar to the original problem (Windows 10 Python 2.7.13 and 3.6.1): >>> os.path.join('dir1', '/dir2') '/dir2' I would argue that on Windows, '/dir2' is not an absolute path. Testing from cmd and powershell on Windows 10 from `C:` >>> cd /dir2 C:/dir2 I do agree though that is a terrible idea to not respect the second parameter in: os.path.join(absolute_path_or_local_path, absolute_path) I think the question is what is considered an absolute path and does that change depending on the OS? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 14:42:42 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Jul 2017 18:42:42 +0000 Subject: [issue30899] IDLE: Add idle config parser unittest In-Reply-To: <1499753574.2.0.472414190179.issue30899@psf.upfronthosting.co.za> Message-ID: <1499884962.29.0.496186291989.issue30899@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset a9bf62cadf6ccd55b84a8d4f353529b02a537830 by terryjreedy in branch '3.6': [3.6] bpo-30899: Add unittests, 100% coverage, for IDLE's two ConfigParser subclasses. (GH-2662) (#2685) https://github.com/python/cpython/commit/a9bf62cadf6ccd55b84a8d4f353529b02a537830 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 15:51:39 2017 From: report at bugs.python.org (Shlomi Fish) Date: Wed, 12 Jul 2017 19:51:39 +0000 Subject: [issue30912] python 3 git master fails to find libffi and build _ctypes on Mageia v6 x86-64 Message-ID: <1499889099.43.0.350164863962.issue30912@psf.upfronthosting.co.za> New submission from Shlomi Fish: Running "make" in cpython git master on mageia linux v6 x86-64 gives me this problem with ffi: <<<<<<<< running build running build_ext Header file /usr/include/ffi.h does not define LIBFFI_H or ffi_wrapper_h INFO: Could not locate ffi libs and/or headers The following modules found by detect_modules() in setup.py, have been built by the Makefile instead, as configured by the Setup files: atexit pwd time Failed to build these modules: _ctypes running build_scripts copying and adjusting /home/shlomif/Download/unpack/prog/python/cpython/Tools/scripts/pydoc3 -> build/scripts-3.7 copying and adjusting /home/shlomif/Download/unpack/prog/python/cpython/Tools/scripts/idle3 -> build/scripts-3.7 copying and adjusting /home/shlomif/Download/unpack/prog/python/cpython/Tools/scripts/2to3 -> build/scripts-3.7 copying and adjusting /home/shlomif/Download/unpack/prog/python/cpython/Tools/scripts/pyvenv -> build/scripts-3.7 changing mode of build/scripts-3.7/pydoc3 from 644 to 755 changing mode of build/scripts-3.7/idle3 from 644 to 755 changing mode of build/scripts-3.7/2to3 from 644 to 755 changing mode of build/scripts-3.7/pyvenv from 644 to 755 renaming build/scripts-3.7/pydoc3 to build/scripts-3.7/pydoc3.7 renaming build/scripts-3.7/idle3 to build/scripts-3.7/idle3.7 renaming build/scripts-3.7/2to3 to build/scripts-3.7/2to3-3.7 renaming build/scripts-3.7/pyvenv to build/scripts-3.7/pyvenv-3.7 >>>>>>> <<<<<< commit d1cc037d1442cc35d1b194ec8e50901514360949 Author: Victor Stinner Date: Wed Jul 12 16:05:43 2017 +0200 bpo-30908: Fix dangling thread in test_os.TestSendfile (#2680) tearDown() now clears explicitly the self.server variable to make sure that the thread is completely cleared when tearDownClass() checks if all threads have been cleaned up. Fix the following warning: $ ./python -m test --fail-env-changed -m test.test_os.TestSendfile.test_keywords -R 3:1 test_os (...) Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) (...) Tests result: ENV CHANGED >>>>> The problem is that my /usr/include/ffi.h looks like this: <<<< #define _MULTIARCH_HEADER ffi.h #include >>>> ---------- components: Build messages: 298243 nosy: shlomif, zach.ware priority: normal severity: normal status: open title: python 3 git master fails to find libffi and build _ctypes on Mageia v6 x86-64 type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 16:07:31 2017 From: report at bugs.python.org (Naman Bhalla) Date: Wed, 12 Jul 2017 20:07:31 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1499890051.06.0.336469312738.issue29571@psf.upfronthosting.co.za> Changes by Naman Bhalla : ---------- pull_requests: +2751 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 16:10:51 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Jul 2017 20:10:51 +0000 Subject: [issue30913] IDLE: Document tk Vars, attributes, methods by tab page Message-ID: <1499890251.06.0.648387967688.issue30913@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Among other things, #30777 added docstrings to configdialog. Those for create_page_x methods included a list of 'Configuration attributes' (Tk Variables) with an annotation as to what the Var represents. The list for the font tab already helped when writing tests for the tab. Although the list is redundant with the code, and creates a slight maintenance problem if names are changed, I want to add more lists. The information collected together will be helpful even if not 100% perfect. Beside tests, it will help with configdialog maintenance and refactoring, including extracting more classes from ConfigDialog. Rename 'Configuration attributes' to 'Tk Variables'. For each page, add 'Data attributes' (other than the Vars). The annotation can briefly say what it is. Add 'Methods' (other than the tk var trace methods) related to that one page and if needed, *briefly* what it does (not the whole first line of its docstring). Add 'Widgets bound to self' and the widget class. Most widget names are not bound to self; the ones that are should be the ones that need to be referenced elsewhere, whether in other methods or tests. Expand the single line docstring for create_action_buttons as appropriate. Date attributes include globals help_common and help_pages. Methods include the click handlers. I would like a note on what outside data structure is accessed by the click handlers. Expand the single line create_widgets docstring to include multi-page information. 'Page interactions' would have things like "Font vars trigger redrawing of highlights sample text." Such interactions will have to be accounted for if we create page classes. 'Tracer Methods' would include the methods that affect all tracer methods. 'Other methods' should include anything else, unless addition methods groups are defined. ConfigDialog currently has 71 methods defined by def statements. (There is 1 nested def in ConfigDialog and 4 other defs at the end of the file for 76 total in the file.) I would like all 64 methods other than __init__ and the 6 create_ methods to be accounted for in 1 of the 6 create_ docstrings. I expect this issue to have multiple PRs. ---------- assignee: terry.reedy components: IDLE messages: 298244 nosy: csabella, louielu, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Document tk Vars, attributes, methods by tab page type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 16:12:29 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Jul 2017 20:12:29 +0000 Subject: [issue30913] IDLE: Document tk Vars, attributes, methods by tab page In-Reply-To: <1499890251.06.0.648387967688.issue30913@psf.upfronthosting.co.za> Message-ID: <1499890349.53.0.147521997915.issue30913@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 16:21:09 2017 From: report at bugs.python.org (Nir Soffer) Date: Wed, 12 Jul 2017 20:21:09 +0000 Subject: [issue30914] test_alpn_protocols (test.test_ssl.ThreadedTests) fails on Fedora 26 Message-ID: <1499890869.88.0.0921166346405.issue30914@psf.upfronthosting.co.za> New submission from Nir Soffer: To reproduce: checkout https://github.com/nirs/cpython/commit/9648088e6ccd6d0cc04f450f55628fd8eda3784c mkdir debug cd debug ../configure --with-pydebug make make test ... ====================================================================== FAIL: test_alpn_protocols (test.test_ssl.ThreadedTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nsoffer/buildbot/worker/fedora26_py36/build/Lib/test/test_ssl.py", line 3272, in test_alpn_protocols self.assertIsInstance(stats, ssl.SSLError) AssertionError: {'compression': None, 'cipher': ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256), 'peercert': {}, 'client_alpn_protocol': None, 'client_npn_protocol': None, 'version': 'TLSv1.2', 'session_reused': False, 'session': <_ssl.Session object at 0x7f8f65a191f8>, 'server_alpn_protocols': [None], 'server_npn_protocols': [None], 'server_shared_ciphers': [[('ECDHE-ECDSA-AES256-GCM-SHA384', 'TLSv1.2', 256), ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES128-GCM-SHA256', 'TLSv1.2', 128), ('ECDHE-RSA-AES128-GCM-SHA256', 'TLSv1.2', 128), ('ECDHE-ECDSA-CHACHA20-POLY1305', 'TLSv1.2', 256), ('ECDHE-RSA-CHACHA20-POLY1305', 'TLSv1.2', 256), ('DHE-DSS-AES256-GCM-SHA384', 'TLSv1.2', 256), ('DHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256), ('DHE-DSS-AES128-GCM-SHA256', 'TLSv1.2', 128), ('DHE-RSA-AES128-GCM-SHA256', 'TLSv1.2', 128), ('DHE-RSA-CHACHA20-POLY1305', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES256-CCM8', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES256-CCM', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES256-SHA384', 'TLSv1.2', 256), ('ECDHE-RSA-AES256-SHA384', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES256-SHA', 'TLSv1.0', 256), ('ECDHE-RSA-AES256-SHA', 'TLSv1.0', 256), ('DHE-RSA-AES256-CCM8', 'TLSv1.2', 256), ('DHE-RSA-AES256-CCM', 'TLSv1.2', 256), ('DHE-RSA-AES256-SHA256', 'TLSv1.2', 256), ('DHE-DSS-AES256-SHA256', 'TLSv1.2', 256), ('DHE-RSA-AES256-SHA', 'SSLv3', 256), ('DHE-DSS-AES256-SHA', 'SSLv3', 256), ('ECDHE-ECDSA-AES128-CCM8', 'TLSv1.2', 128), ('ECDHE-ECDSA-AES128-CCM', 'TLSv1.2', 128), ('ECDHE-ECDSA-AES128-SHA256', 'TLSv1.2', 128), ('ECDHE-RSA-AES128-SHA256', 'TLSv1.2', 128), ('ECDHE-ECDSA-AES128-SHA', 'TLSv1.0', 128), ('ECDHE-RSA-AES128-SHA', 'TLSv1.0', 128), ('DHE-RSA-AES128-CCM8', 'TLSv1.2', 128), ('DHE-RSA-AES128-CCM', 'TLSv1.2', 128), ('DHE-RSA-AES128-SHA256', 'TLSv1.2', 128), ('DHE-DSS-AES128-SHA256', 'TLSv1.2', 128), ('DHE-RSA-AES128-SHA', 'SSLv3', 128), ('DHE-DSS-AES128-SHA', 'SSLv3', 128), ('ECDHE-ECDSA-CAMELLIA256-SHA384', 'TLSv1.2', 256), ('ECDHE-RSA-CAMELLIA256-SHA384', 'TLSv1.2', 256), ('ECDHE-ECDSA-CAMELLIA128-SHA256', 'TLSv1.2', 128), ('ECDHE-RSA-CAMELLIA128-SHA256', 'TLSv1.2', 128), ('DHE-RSA-CAMELLIA256-SHA256', 'TLSv1.2', 256), ('DHE-DSS-CAMELLIA256-SHA256', 'TLSv1.2', 256), ('DHE-RSA-CAMELLIA128-SHA256', 'TLSv1.2', 128), ('DHE-DSS-CAMELLIA128-SHA256', 'TLSv1.2', 128), ('DHE-RSA-CAMELLIA256-SHA', 'SSLv3', 256), ('DHE-DSS-CAMELLIA256-SHA', 'SSLv3', 256), ('DHE-RSA-CAMELLIA128-SHA', 'SSLv3', 128), ('DHE-DSS-CAMELLIA128-SHA', 'SSLv3', 128), ('AES256-GCM-SHA384', 'TLSv1.2', 256), ('AES128-GCM-SHA256', 'TLSv1.2', 128), ('AES256-CCM8', 'TLSv1.2', 256), ('AES256-CCM', 'TLSv1.2', 256), ('AES128-CCM8', 'TLSv1.2', 128), ('AES128-CCM', 'TLSv1.2', 128), ('AES256-SHA256', 'TLSv1.2', 256), ('AES128-SHA256', 'TLSv1.2', 128), ('AES256-SHA', 'SSLv3', 256), ('AES128-SHA', 'SSLv3', 128), ('CAMELLIA256-SHA256', 'TLSv1.2', 256), ('CAMELLIA128-SHA256', 'TLSv1.2', 128), ('CAMELLIA256-SHA', 'SSLv3', 256), ('CAMELLIA128-SHA', 'SSLv3', 128)]]} is not an instance of Not sure if this is a python issue or Fedora, posting here for now. ---------- components: Tests messages: 298245 nosy: Nir Soffer priority: normal severity: normal status: open title: test_alpn_protocols (test.test_ssl.ThreadedTests) fails on Fedora 26 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 16:47:49 2017 From: report at bugs.python.org (Luke) Date: Wed, 12 Jul 2017 20:47:49 +0000 Subject: [issue27487] -m switch regression in Python 3.5.2 (under rare circumstances) In-Reply-To: <1468268291.19.0.631980361837.issue27487@psf.upfronthosting.co.za> Message-ID: <1499892469.14.0.484509481771.issue27487@psf.upfronthosting.co.za> Luke added the comment: I recently started getting this warning message (see bottom) that seems to be due to the changes from this issue. I'm running a submodule as main using the `-m` flag, but I'm not doing any modification to `sys.modules`, or even `sys.path`... I've taken a look at [The double-import trap](http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html#the-double-import-trap), but it doesn't really seem to apply. I really have no idea how to go about debugging this. 1) Would it be possible for the warning to include information about how/where the double import is happening? 2) Are there other, common ways of this occurring when the `sys` module isn't being messed with? The issue on stackexchange (https://stackoverflow.com/questions/43393764/python-3-6-project-structure-leads-to-runtimewarning) seems similar, although this one in particular isn't reproducible. Any help would be greatly appreciated. Thanks! File "/n/home00/lkelley/.conda/envs/py35/lib/python3.6/runpy.py", line 183, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/n/home00/lkelley/.conda/envs/py35/lib/python3.6/runpy.py", line 125, in _get_module_details warn(RuntimeWarning(msg)) File "/n/home00/lkelley/.conda/envs/py35/lib/python3.6/warnings.py", line 99, in _showwarnmsg msg.file, msg.line) File "/n/home00/lkelley/zcode/zcode/inout/inout_core.py", line 835, in warn_with_traceback traceback.print_stack() /n/home00/lkelley/.conda/envs/py35/lib/python3.6/runpy.py:125: RuntimeWarning: 'mbhmergers.gwb.deterministic.grid_calc' found in sys.modules after import of package 'mbhmergers.gwb.deterministic', but prior to execution of 'mbhmergers.gwb.deterministic.grid_calc'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) ---------- nosy: +lzkelley _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 16:50:29 2017 From: report at bugs.python.org (Roundup Robot) Date: Wed, 12 Jul 2017 20:50:29 +0000 Subject: [issue30912] python 3 git master fails to find libffi and build _ctypes on Mageia v6 x86-64 In-Reply-To: <1499889099.43.0.350164863962.issue30912@psf.upfronthosting.co.za> Message-ID: <1499892629.89.0.0668857934359.issue30912@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +2752 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 17:03:59 2017 From: report at bugs.python.org (Naman Bhalla) Date: Wed, 12 Jul 2017 21:03:59 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1499893439.6.0.808374466299.issue29571@psf.upfronthosting.co.za> Changes by Naman Bhalla : ---------- nosy: +Naman-Bhalla _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 17:12:23 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 12 Jul 2017 21:12:23 +0000 Subject: [issue30913] IDLE: Document tk Vars, attributes, methods by tab page In-Reply-To: <1499890251.06.0.648387967688.issue30913@psf.upfronthosting.co.za> Message-ID: <1499893943.72.0.109099689975.issue30913@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I had actually started doing this a little in the original docstrings and then was worried that it was too redundant with the code. Thanks for mentioning the multiple PRs. I'll take a look at it and make one change at a time for easier review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 17:43:23 2017 From: report at bugs.python.org (moxian) Date: Wed, 12 Jul 2017 21:43:23 +0000 Subject: [issue30915] distutils sometimes assumes wrong C compiler Message-ID: <1499895803.65.0.564820520089.issue30915@psf.upfronthosting.co.za> New submission from moxian: https://github.com/python/cpython/blob/2.7/Lib/distutils/unixccompiler.py#L229 In unixcompiler.py runtime_library_dir_option() function, we get the name of active C compiler the following way: `compiler = os.path.basename(sysconfig.get_config_var("CC"))` This works fine usually, but this gets the compiler that was used while building python itself, which might be different from the one used to build python extension right now. I.e. if we've built the cpython with clang, but want to build some other extension with gcc, we would run `CC=gcc python setup.py build`, passing gcc as the environment variable. The environment variable would be picked up, and override the ones used for compilation of cpython here: https://github.com/python/cpython/blob/2.7/Lib/distutils/sysconfig.py#L179 , so that the compiler binary will be set to "gcc". But the options passed to the compiler will still assume it to be clang, and, e.g. runtime_library_dir_option() mentioned above would fall back to returning catch-all `"-R" + dir` option, since `compiler` is not overriden by environment vars. This breaks compilation, since gcc does not understand how to treat "-R" flag. Example from trying to build bsddb3: gcc-5.4.0 -shared -Wl,-O1 -Wl,--as-needed -O2 -pipe -march=native -ggdb -fno-strict-aliasing /var/tmp/portage/dev-python/bsddb3-6.1.1/work/bsddb3-6.1.1-python2_7/build/temp.linux-x86_64-2.7/Modules/_bsddb.o -L/usr/lib64 -L/usr/lib64 -R/usr/lib64 -ldb-5.3 -lpython2.7 -o /var/tmp/portage/dev-python/bsddb3-6.1.1/work/bsddb3-6.1.1-python2_7/build/lib/bsddb3/_pybsddb.so gcc-5.4.0: error: unrecognized command line option ?-R? I've personally only encountered it with runtime_library_dir_option(), but I presume there are other occurences that get overriden by environment variables only in sysconfig.py, but not in other places. The problem is present in 2.7 and *I think* in 3.6 as well. I think the correct fix would be for get_config_vars() to always respect environment variables, but I don't know enough about the code to feel confident about that. ---------- messages: 298248 nosy: moxian priority: normal severity: normal status: open title: distutils sometimes assumes wrong C compiler versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 18:37:45 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 12 Jul 2017 22:37:45 +0000 Subject: [issue30916] Pre-build OpenSSL and Tcl/Tk for Windows Message-ID: <1499899065.59.0.916676241363.issue30916@psf.upfronthosting.co.za> New submission from Steve Dower: To save time and improve reliability while building CPython, we should pre-build and sign OpenSSL and Tcl/Tk binaries and make it a binary dependency. Our slightly-patched sources will still be available, and it will be relatively easy for people to download and rebuild them, but for most cases (particularly CI/buildbots) we will be able to reuse prebuilt binaries. Since they need to be signed, this basically means it's my responsibility to update the GitHub repo whenever we update Tcl, Tk, Tix or OpenSSL versions. As is usual whenever I get a job, I promise to find a way to mostly automate it :) ---------- assignee: steve.dower components: Build, Windows messages: 298249 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Pre-build OpenSSL and Tcl/Tk for Windows type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 18:39:45 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 12 Jul 2017 22:39:45 +0000 Subject: [issue30916] Pre-build OpenSSL and Tcl/Tk for Windows In-Reply-To: <1499899065.59.0.916676241363.issue30916@psf.upfronthosting.co.za> Message-ID: <1499899185.52.0.084122727343.issue30916@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- pull_requests: +2753 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 18:54:58 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Jul 2017 22:54:58 +0000 Subject: [issue30913] IDLE: Document tk Vars, attributes, methods by tab page In-Reply-To: <1499890251.06.0.648387967688.issue30913@psf.upfronthosting.co.za> Message-ID: <1499900098.45.0.233459769914.issue30913@psf.upfronthosting.co.za> Terry J. Reedy added the comment: You put one non-tk name in the font page 'Configuration attributes'. I removed it as not belonging with the tk Vars, but it got me thinking that more would be useful. In the ConfigChanges docstring we included a list of methods, which I believe is recommended even if not always done. If we turn the check_ functions into classes, their docstrings become the class docstrings. The check_ body would be turned into and __init__ body and the list of methods would the methods that need to be moved into the new class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 19:50:43 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 12 Jul 2017 23:50:43 +0000 Subject: [issue30914] test_alpn_protocols (test.test_ssl.ThreadedTests) fails on Fedora 26 In-Reply-To: <1499890869.88.0.0921166346405.issue30914@psf.upfronthosting.co.za> Message-ID: <1499903443.43.0.19504413775.issue30914@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report. This problem has already been reported in bpo-30714. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_ssl fails with openssl 1.1.0f _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 20:16:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Jul 2017 00:16:56 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499905016.38.0.904385636131.issue30870@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Serhiy: question about tkinter.wantobjects. ConfigDialog sets the font options of label font_sample and text text_highlight_sample with a font tuple such as font=('courier', 12, ''). In the test, I expected retrieval of the font option with sample_font = dialog.font_sample['font'] hilight_font = dialog.text_highlight_sample['font'] to return tuples, but I get a string: '{courier new} 10 normal'. I checked and root.wantobjects() is returning the default True. Should not the options be returned as tuples? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 21:05:46 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Jul 2017 01:05:46 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1499907946.53.0.261816450064.issue27099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I will look at the patch after doing more with config and configdialog. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 21:18:42 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 13 Jul 2017 01:18:42 +0000 Subject: [issue30913] IDLE: Document tk Vars, attributes, methods by tab page In-Reply-To: <1499890251.06.0.648387967688.issue30913@psf.upfronthosting.co.za> Message-ID: <1499908722.94.0.453416721457.issue30913@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I did a first draft of the four create_page_* methods. I did one additional section called 'Widget Structure' which has the names of the widgets indented under the parent widget they are attached to. I don't know if that would be helpful. The order of the code already mostly follows the structure. ---------- Added file: http://bugs.python.org/file47008/docstrings1.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 22:30:40 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 13 Jul 2017 02:30:40 +0000 Subject: [issue30466] Tutorial doesn't explain the use of classes In-Reply-To: <1495666720.41.0.650692797283.issue30466@psf.upfronthosting.co.za> Message-ID: <1499913040.86.0.341957279959.issue30466@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 3fbd70018f835edd33250de2f79b7a7ef45f8359 by Mariatta (Trey Hunner) in branch 'master': bpo-30466: Add brief explanation of classes to tutorial (GH-1804) https://github.com/python/cpython/commit/3fbd70018f835edd33250de2f79b7a7ef45f8359 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 22:32:14 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 13 Jul 2017 02:32:14 +0000 Subject: [issue30466] Tutorial doesn't explain the use of classes In-Reply-To: <1495666720.41.0.650692797283.issue30466@psf.upfronthosting.co.za> Message-ID: <1499913134.11.0.135628469897.issue30466@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 22:50:13 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 13 Jul 2017 02:50:13 +0000 Subject: [issue27487] -m switch regression in Python 3.5.2 (under rare circumstances) In-Reply-To: <1468268291.19.0.631980361837.issue27487@psf.upfronthosting.co.za> Message-ID: <1499914213.35.0.311343749559.issue27487@psf.upfronthosting.co.za> Nick Coghlan added the comment: I've added a second answer to the referenced Stack Overflow issue that attempts to more clearly explain what is going on: https://stackoverflow.com/questions/43393764/python-3-6-project-structure-leads-to-runtimewarning/45070583#45070583 (The problem there is that proj.__init__ implicitly imports the module being executed by -m) If that answer is still insufficient to diagnose the problem you're seeing, then I'd suggest submitting a new SO question explaining how the behaviour in your case differs from that one, and then providing a link to it as a comment on my answer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 00:44:59 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 13 Jul 2017 04:44:59 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers In-Reply-To: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> Message-ID: <1499921099.72.0.477285419277.issue30907@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 00:58:33 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 13 Jul 2017 04:58:33 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers In-Reply-To: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> Message-ID: <1499921913.4.0.933851064383.issue30907@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This seems like it optimizes an irrelevant use case, comparing a container to itself. I don't think this is likely to benefit any existing code, so it would be better not to add more code clutter/complexity with another special case code path unless we're pretty sure that special case actually arises in practice. FWIW, the note about identity-implies-equality is a statement about how containers implement element comparison rather than about how two containers are compared to one another (as implemented in PyObject_RichCompareBool()). Also, it isn't just an optimization, it is necessary to help us reason about containers (i.e. preserving the invariant: all(x in c for x in c)). ---------- type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 00:59:54 2017 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 13 Jul 2017 04:59:54 +0000 Subject: [issue29464] Specialize FASTCALL for functions with positional-only parameters In-Reply-To: <1486394565.83.0.903919283463.issue29464@psf.upfronthosting.co.za> Message-ID: <1499921994.93.0.775455139153.issue29464@psf.upfronthosting.co.za> Stefan Behnel added the comment: For future reference, this change is supported by Cython 0.26 (which is currently close to release). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 01:15:50 2017 From: report at bugs.python.org (Tim Peters) Date: Thu, 13 Jul 2017 05:15:50 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers In-Reply-To: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> Message-ID: <1499922950.94.0.126983841613.issue30907@psf.upfronthosting.co.za> Tim Peters added the comment: Just noting that every special code path "at the start" doesn't just speed the case it's aiming at, it also _slows_ every case that doesn't pass the new tests. It takes time to fail the new tests. So it usually makes things slower overall, unless the new thing being tested for is in fact common enough to more than make up for marginally slowing everything else. It's hard to believe that "container1 is container2" happens in container comparison often enough that special-casing it wouldn't be an overall loss. I'm pretty sure it never occurs in any of my code ;-) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 01:30:58 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Jul 2017 05:30:58 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499923858.07.0.223852880752.issue30870@psf.upfronthosting.co.za> Terry J. Reedy added the comment: PR2666 adds 4% test coverage. 40% left to go. I expect some tests will cover more lines with less code. I am working on a test for set_font_sample. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 01:49:18 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Jul 2017 05:49:18 +0000 Subject: [issue30913] IDLE: Document tk Vars, attributes, methods by tab page In-Reply-To: <1499890251.06.0.648387967688.issue30913@psf.upfronthosting.co.za> Message-ID: <1499924958.26.0.28845573136.issue30913@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 16 methods so far, + 17 var_changed_x is 35, leaving another 29. If you are going to give the whole widget structure, then an '*' before bound names would be sufficient and avoid the duplication. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 01:52:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 05:52:10 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1499925130.79.0.681065870622.issue30911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 541bd28941af407f2329e6a540d6367e5625b115 by Serhiy Storchaka (Segev Finer) in branch 'master': bpo-30911: Fix a crash in json on platforms with unsigned char (#2684) https://github.com/python/cpython/commit/541bd28941af407f2329e6a540d6367e5625b115 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 01:57:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 05:57:47 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1499925467.79.0.816788554.issue30911@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2754 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 02:02:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 06:02:11 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1499925731.92.0.861274321821.issue30911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for noticing this warning Segev. Actually the issue was more serious. This caused a crash when pass the strict argument that raises an exception when converted to bool. PR 2690 adds test for this (actually it just ports recently added tests from simplejson). ---------- type: compile error -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 02:06:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 06:06:01 +0000 Subject: [issue29464] Specialize FASTCALL for functions with positional-only parameters In-Reply-To: <1486394565.83.0.903919283463.issue29464@psf.upfronthosting.co.za> Message-ID: <1499925961.72.0.0128851247834.issue29464@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Great! Are all uses of internal CPython details optional? I would disable them by default for alpha versions of CPython. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 02:28:23 2017 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 13 Jul 2017 06:28:23 +0000 Subject: [issue29464] Specialize FASTCALL for functions with positional-only parameters In-Reply-To: <1486394565.83.0.903919283463.issue29464@psf.upfronthosting.co.za> Message-ID: <1499927302.99.0.51198417121.issue29464@psf.upfronthosting.co.za> Stefan Behnel added the comment: > Are all uses of internal CPython details optional? Well, what classifies as a "CPython detail" sometimes just becomes clear when other implementations don't have it. ;-) But yes, the C code that Cython generates selects alternative implementations based on some more or less generic C defines, e.g. CYTHON_COMPILING_IN_CPYTHON or CYTHON_USE_PYLONG_INTERNALS or CYTHON_ASSUME_SAFE_MACROS. We enable them based on the Python implementation and even users can disable them at need. Well, and then there are obviously tons of PY_VERSION_HEX specific special cases, such as this one. > I would disable them by default for alpha versions of CPython. I don't see why. We track the CPython development via travis-CI and alpha versions make us aware of changes that we need to incorporate (or sometimes fight against ;-) ). These internals very rarely change across CPython releases (e.g. the PyLong type didn't really change since 3.0/2.7.0), and this one is really an exception. Excluding alpha versions would probably reduce our response time to these changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 02:39:44 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 13 Jul 2017 06:39:44 +0000 Subject: [issue30251] Windows Visual Studio solution does not have an install target In-Reply-To: <1493805308.24.0.584899845977.issue30251@psf.upfronthosting.co.za> Message-ID: <1499927984.87.0.725718938405.issue30251@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 02:40:58 2017 From: report at bugs.python.org (Louie Lu) Date: Thu, 13 Jul 2017 06:40:58 +0000 Subject: [issue30917] IDLE: Add idlelib.config.IdleConf unittest Message-ID: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> New submission from Louie Lu: Add idlelib.config.IdleConf unittest. ---------- assignee: terry.reedy components: IDLE messages: 298266 nosy: louielu, terry.reedy priority: normal severity: normal status: open title: IDLE: Add idlelib.config.IdleConf unittest versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 02:43:12 2017 From: report at bugs.python.org (Louie Lu) Date: Thu, 13 Jul 2017 06:43:12 +0000 Subject: [issue30917] IDLE: Add idlelib.config.IdleConf unittest In-Reply-To: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> Message-ID: <1499928192.52.0.773207899137.issue30917@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +2755 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 02:43:54 2017 From: report at bugs.python.org (Louie Lu) Date: Thu, 13 Jul 2017 06:43:54 +0000 Subject: [issue30917] IDLE: Add idlelib.config.IdleConf unittest In-Reply-To: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> Message-ID: <1499928234.79.0.262294855965.issue30917@psf.upfronthosting.co.za> Louie Lu added the comment: After this unittest is merged, I would like to first cleanup config.py source code, then modify it more general way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 02:47:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jul 2017 06:47:00 +0000 Subject: [issue29464] Specialize FASTCALL for functions with positional-only parameters In-Reply-To: <1499927302.99.0.51198417121.issue29464@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: When I worked on FASTCALL, I wasn't sure that the whole project was worth it. Now I am more confident that it makes function calls faster: https://haypo.github.io/fastcall-microbenchmarks.html Stefan, Serhiy: would it be a good idea to make _PyObject_FastCall() and _PyObject_FastCallKeywords(), or also _PyObject_FastCallDict(), public? I expect complains from PyPy who will have to support METH_FASTCALL as well :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 02:51:10 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 13 Jul 2017 06:51:10 +0000 Subject: [issue30916] Pre-build OpenSSL and Tcl/Tk for Windows In-Reply-To: <1499899065.59.0.916676241363.issue30916@psf.upfronthosting.co.za> Message-ID: <1499928670.35.0.623433415421.issue30916@psf.upfronthosting.co.za> Steve Dower added the comment: @Zach - FYI, this will make it unnecessary to run prepare_ssl.bat when checking in updated sources. Rather, this script now requires Perl to do the entire build, so we don't have to have any difference between our source bundle and the original OpenSSL one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 02:55:09 2017 From: report at bugs.python.org (Stephen Kelly) Date: Thu, 13 Jul 2017 06:55:09 +0000 Subject: [issue30251] Windows Visual Studio solution does not have an install target In-Reply-To: <1493805308.24.0.584899845977.issue30251@psf.upfronthosting.co.za> Message-ID: <1499928909.42.0.900942359775.issue30251@psf.upfronthosting.co.za> Stephen Kelly added the comment: This is resolved as not a bug. Is there a way to convert it to a feature request? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 03:14:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 07:14:13 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1499930053.91.0.744669335216.issue30911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d3aaa2f1496aae0809c9ec9623fa528d3a2c16c2 by Serhiy Storchaka in branch 'master': bpo-30911: Add tests for bad boolean arguments for accelerated json (#2690) https://github.com/python/cpython/commit/d3aaa2f1496aae0809c9ec9623fa528d3a2c16c2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 03:22:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jul 2017 07:22:00 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1499930520.07.0.274122255617.issue30911@psf.upfronthosting.co.za> STINNER Victor added the comment: > Actually the issue was more serious. If the bug is serious, it deserves a NEWS entry, no? Moreover, the fix+test should be backported to 2.7, 3.5 and 3.6, no? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 04:17:45 2017 From: report at bugs.python.org (Segev Finer) Date: Thu, 13 Jul 2017 08:17:45 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1499933865.07.0.522769616634.issue30911@psf.upfronthosting.co.za> Segev Finer added the comment: Introduced in https://github.com/python/cpython/commit/ac5bbd43bc7b769c13ae0412cb28a3521f4d4ff1 which is only in 3.7 that means this wasn't ever released. I can send a PR with a NEWS entry if it still needs one? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 04:26:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jul 2017 08:26:39 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1499934399.22.0.0537469388048.issue30911@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh ok. If it's a regression in the master branch, the code was never released with the bug. In this case, there is no need to document such fix. Thank you :-) I close the issue. Thanks for the fix Sergev, thanks for the test Serhiy ;-) ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 04:27:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 08:27:41 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1499934461.34.0.645469463636.issue30911@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2756 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 04:28:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 08:28:50 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1499934530.82.0.708615957062.issue30911@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2757 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 04:38:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 08:38:07 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1499935087.73.0.723212767725.issue30911@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2758 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 04:40:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 08:40:27 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1499935227.97.0.797713881706.issue30911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7d0a99582050ccac2e7126484d23072be342f317 by Serhiy Storchaka in branch '3.6': [3.6] bpo-30911: Add tests for bad boolean arguments for accelerated json (GH-2690) (#2692) https://github.com/python/cpython/commit/7d0a99582050ccac2e7126484d23072be342f317 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 04:45:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 08:45:24 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1499935524.9.0.0813076038291.issue30911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The tests are backported to other branches. This is a one of reasons why I created a separate PR for tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 04:57:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 08:57:34 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1499936254.42.0.724789734385.issue30911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2ec2c5f0b05efdcb7919c477591f1cb48bfb0aa9 by Serhiy Storchaka in branch '3.5': [3.5] bpo-30911: Add tests for bad boolean arguments for accelerated json (GH-2690) (#2693) https://github.com/python/cpython/commit/2ec2c5f0b05efdcb7919c477591f1cb48bfb0aa9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 05:03:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 09:03:20 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1499936600.5.0.0100895492981.issue30911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b6dae2e40d14436d77d3f0bfe6a5b4ae73c83c6e by Serhiy Storchaka in branch '2.7': [2.7] bpo-30911: Add tests for bad boolean arguments for accelerated json (GH-2690) (#2694) https://github.com/python/cpython/commit/b6dae2e40d14436d77d3f0bfe6a5b4ae73c83c6e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 06:21:36 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 13 Jul 2017 10:21:36 +0000 Subject: [issue23835] configparser does not convert defaults to strings In-Reply-To: <1427862188.44.0.00358189102447.issue23835@psf.upfronthosting.co.za> Message-ID: <1499941296.1.0.0923822475851.issue23835@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Backwards compatibility will be considered when the patch is ready. I'm not overly worried about fixing a case that currently raises exceptions all over the place. There's few compatibility concerns that we need to consider in this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 08:29:26 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 13 Jul 2017 12:29:26 +0000 Subject: [issue26415] Excessive peak memory consumption by the Python parser In-Reply-To: <1456182380.09.0.81920177296.issue26415@psf.upfronthosting.co.za> Message-ID: <1499948966.76.0.900408305739.issue26415@psf.upfronthosting.co.za> Changes by Charalampos Stratakis : ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 08:29:41 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 13 Jul 2017 12:29:41 +0000 Subject: =?utf-8?q?=5Bissue8376=5D_Tutorial_offers_dangerous_advice_about_iterator?= =?utf-8?b?czog4oCcX19pdGVyX18oKSBjYW4ganVzdCByZXR1cm4gc2VsZuKAnQ==?= In-Reply-To: <1271054158.9.0.672918640444.issue8376@psf.upfronthosting.co.za> Message-ID: <1499948981.83.0.151554502042.issue8376@psf.upfronthosting.co.za> R. David Murray added the comment: I just had a colleague get confused about the container returning self, and he was referring to the iterator protocol docs at https://docs.python.org/3.6/library/stdtypes.html#iterator.__iter__. If you don't read that section with your thinking cap firmly in place it is easy to get confused about what "the iterator itself" means there. I think it would be beneficial to add a sentence about the iterator state needing to be independent for each iterator returned by the *container's* __iter__. A similar sentence in the tutorial might be all that is needed as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 08:38:03 2017 From: report at bugs.python.org (Larry Hastings) Date: Thu, 13 Jul 2017 12:38:03 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1499949483.66.0.0394198265552.issue26617@psf.upfronthosting.co.za> Larry Hastings added the comment: I'll accept this as a backport for 3.4. I'm convinced that, although the sample programs don't crash in release builds, the behavior is wrong and could be exploited. Will someone have time to create the PR in the next day or two? (It's not that it's necessary, but it seems that Victor and Serhiy are very quick, which is nice. And adding it sooner will make it more comfortable to tag and release 3.4.7rc1 next weekend, which I think I'm going to do.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 08:42:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 12:42:40 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1499949760.78.0.314707660447.issue26617@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'll do this. ---------- nosy: +serhiy.storchaka status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 08:43:33 2017 From: report at bugs.python.org (Larry Hastings) Date: Thu, 13 Jul 2017 12:43:33 +0000 Subject: [issue28427] WeakValueDictionary next bug (with multithreading) In-Reply-To: <1476354989.22.0.575160455599.issue28427@psf.upfronthosting.co.za> Message-ID: <1499949813.54.0.934319593335.issue28427@psf.upfronthosting.co.za> Larry Hastings added the comment: I tested this in a freshly-built 3.4.6. Although it reproduced the behavior you're complaining about--it threw the assert in Armin's test.py, and Serhiy's issue28427.py prints an admonishing FAIL--neither test *crashes* CPython. So I'm not convinced either of these is a *security* risk. This is a bug, and 3.4 isn't open for bugfixes, so I don't plan to accept a backport for this in 3.4. If this is a crashing bug, please tell me how to reproduce the crashing bug with 3.4.6. ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 08:52:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 12:52:46 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1499950366.51.0.183209603922.issue26617@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2759 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 09:01:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 13:01:59 +0000 Subject: [issue28427] WeakValueDictionary next bug (with multithreading) In-Reply-To: <1476354989.22.0.575160455599.issue28427@psf.upfronthosting.co.za> Message-ID: <1499950919.05.0.287611120737.issue28427@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: -849 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 09:49:20 2017 From: report at bugs.python.org (dongdong) Date: Thu, 13 Jul 2017 13:49:20 +0000 Subject: [issue30918] Unable to launch IDLE in windows 7 Message-ID: <1499953760.37.0.96893907451.issue30918@psf.upfronthosting.co.za> New submission from dongdong: "unable to create user config directory Z:\.idlerc check path and permisssion" It through out this error, when I try to launch the IDLE not as an adminnistrator acount. There is an networed disk memory Z: on my computer this error is caused by configHandler.py script in the Lib/idlelib directory. Here is a solution: https://www.experts-exchange.com/questions/24006687/Invalid-Python-config-directory.html ---------- messages: 298284 nosy: trencyclo priority: normal severity: normal status: open title: Unable to launch IDLE in windows 7 type: crash versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 10:03:22 2017 From: report at bugs.python.org (Dimitar Tasev) Date: Thu, 13 Jul 2017 14:03:22 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression Message-ID: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> New submission from Dimitar Tasev: Hello, I have noticed a significant performance regression when allocating a large shared array in Python 3.x versus Python 2.7. The affected module seems to be `multiprocessing`. The function I used for benchmarking: from timeit import timeit timeit('sharedctypes.Array(ctypes.c_float, 500*2048*2048)', 'from multiprocessing import sharedctypes; import ctypes', number=1) And the results from executing it: Python 3.5.2 Out[2]: 182.68500420999771 ------------------- Python 2.7.12 Out[6]: 2.124835968017578 I will try to provide any information you need. Right now I am looking at callgrind/cachegrind without Debug symbols, and can post that, in the meantime I am building Python with Debug and will re-run the callgrind/cachegrind. Allocating the same-size array with numpy doesn't seem to have a difference between Python versions. The numpy command used was `numpy.full((500,2048,2048), 5.0)`. Allocating the same number of list members also doesn't have a difference - `arr = [5.0]*(500*2048*2048)` ---------- files: shared_array_alloc.py messages: 298285 nosy: dtasev priority: normal severity: normal status: open title: Shared Array Memory Allocation Regression type: performance versions: Python 2.7, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file47009/shared_array_alloc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 10:15:21 2017 From: report at bugs.python.org (Wouter Bolsterlee) Date: Thu, 13 Jul 2017 14:15:21 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers In-Reply-To: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> Message-ID: <1499955321.16.0.699293671477.issue30907@psf.upfronthosting.co.za> Wouter Bolsterlee added the comment: fwiw, "if (PyDict_CheckExact(a) && a == b)" amounts to two pointer comparisons, the overhead of which is too small to measure. (i tried.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 11:05:55 2017 From: report at bugs.python.org (Syam) Date: Thu, 13 Jul 2017 15:05:55 +0000 Subject: [issue30920] Sequence Matcher from diff lib is not implementing longest common substring problem correctly Message-ID: <1499958355.33.0.434945478304.issue30920@psf.upfronthosting.co.za> New submission from Syam: Was seeing this lib from difflib import SequenceMatcher not returning the biggest common substring always.. try the example from attachment.. it is returning wrong value, not the biggest substring ---------- components: Build files: script.py messages: 298287 nosy: Syam Mohan priority: normal severity: normal status: open title: Sequence Matcher from diff lib is not implementing longest common substring problem correctly type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file47010/script.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 11:20:19 2017 From: report at bugs.python.org (Sanket) Date: Thu, 13 Jul 2017 15:20:19 +0000 Subject: [issue30921] Process in not get killed using subprocess.call() in python thread Message-ID: <1499959219.01.0.510047470999.issue30921@psf.upfronthosting.co.za> New submission from Sanket: import threading import subprocess def B(): while True: break cmd="ps -ef | grep 'shell' | awk '{print $2}' | xargs kill -9" subprocess.call(cmd, shell=True) def A(): th = threading.Thread(target=B) th.start() In above code, process with name "shell" have to killed, but its not working. While same when I do in simple without thread, its working ---------- components: Library (Lib) messages: 298288 nosy: sanky8793 priority: normal severity: normal status: open title: Process in not get killed using subprocess.call() in python thread type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 11:23:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 15:23:34 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1499959414.68.0.575290170362.issue30919@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is because instantiating new Arena is much slower in Python 3. ./python -m timeit -r1 -s 'from multiprocessing.heap import Arena' 'Arena(2**26)' Python 3.7: 1 loop, best of 1: 1.18 sec per loop Python 2.7: 100000 loops, best of 1: 9.19 usec per loop May be the regression was introduced by issue8713. ---------- nosy: +davin, sbt, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 11:29:56 2017 From: report at bugs.python.org (Sanket) Date: Thu, 13 Jul 2017 15:29:56 +0000 Subject: [issue30921] Process in not get killed using subprocess.call() in python thread In-Reply-To: <1499959219.01.0.510047470999.issue30921@psf.upfronthosting.co.za> Message-ID: <1499959796.75.0.669088177072.issue30921@psf.upfronthosting.co.za> Changes by Sanket : ---------- nosy: +djc, gvanrossum -sanky8793 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 11:31:21 2017 From: report at bugs.python.org (Sanket) Date: Thu, 13 Jul 2017 15:31:21 +0000 Subject: [issue30921] Process in not get killed using subprocess.call() in python thread In-Reply-To: <1499959219.01.0.510047470999.issue30921@psf.upfronthosting.co.za> Message-ID: <1499959881.2.0.412455216652.issue30921@psf.upfronthosting.co.za> Changes by Sanket : ---------- nosy: +lars.gustaebel, lemburg, pedronis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 11:34:18 2017 From: report at bugs.python.org (Sanket) Date: Thu, 13 Jul 2017 15:34:18 +0000 Subject: [issue30921] Process in not get killed using subprocess.call() in python thread In-Reply-To: <1499959219.01.0.510047470999.issue30921@psf.upfronthosting.co.za> Message-ID: <1499960058.71.0.760443269643.issue30921@psf.upfronthosting.co.za> Changes by Sanket : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 11:36:03 2017 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 13 Jul 2017 15:36:03 +0000 Subject: [issue30921] Process in not get killed using subprocess.call() in python thread In-Reply-To: <1499959219.01.0.510047470999.issue30921@psf.upfronthosting.co.za> Message-ID: <1499960163.48.0.888797063224.issue30921@psf.upfronthosting.co.za> Guido van Rossum added the comment: Please find a list like python-list (comp.lang.python) to ask for help with your problem. Also please stop adding people to the nosy list. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 11:43:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 15:43:27 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1499960607.8.0.26985650288.issue30919@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It can be significantly sped up if replace the writing loop with if size: os.lseek(self.fd, size, 0) os.write(self.fd, b'') os.lseek(self.fd, 0, 0) or just with os.truncate(self.fd, size) (not sure the latter always works). But instantiating an open Arena will still be slower than in 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 11:43:43 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Thu, 13 Jul 2017 15:43:43 +0000 Subject: [issue9262] IDLE: Use tabbed shell and edit windows In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1499960623.75.0.862136063263.issue9262@psf.upfronthosting.co.za> Charles Wohlganger added the comment: I modified Mark Rosen's newTabExtension to work with more recent versions of IDLE, as it wasn't working when I tried it on mine. It's not clear if it ever could when it was originally working, but I can't get it to move tabs between multiple window instances. ---------- nosy: +wohlganger Added file: http://bugs.python.org/file47011/TabExtension.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 11:46:08 2017 From: report at bugs.python.org (Sanket) Date: Thu, 13 Jul 2017 15:46:08 +0000 Subject: [issue30922] Process in not get killed using subprocess.call() in python thread Message-ID: <1499960768.83.0.441889883415.issue30922@psf.upfronthosting.co.za> New submission from Sanket: import threading import subprocess def B(): while True: break cmd="ps -ef | grep 'shell' | awk '{print $2}' | xargs kill -9" subprocess.call(cmd, shell=True) def A(): th = threading.Thread(target=B) th.start() In above code, process with name "shell" has to be killed, but its not working. While same when I do in simple without thread, its working Why you are not answering here,at last I just had to deal with answer whether its getting here or else where ---------- components: Library (Lib) messages: 298293 nosy: gvanrossum, sanky8793 priority: normal severity: normal status: open title: Process in not get killed using subprocess.call() in python thread type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 11:59:56 2017 From: report at bugs.python.org (Gareth Rees) Date: Thu, 13 Jul 2017 15:59:56 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1499961596.11.0.572897975158.issue30919@psf.upfronthosting.co.za> Gareth Rees added the comment: In Python 2.7, multiprocessing.heap.Arena uses an anonymous memory mapping on Unix. Anonymous memory mappings can be shared between processes but only via fork(). But Python 3 supports other ways of starting subprocesses (see issue 8713 [1]) and so an anonymous memory mapping no longer works. So instead a temporary file is created, filled with zeros to the given size, and mapped into memory (see changeset 3b82e0d83bf9 [2]). It is the zero-filling of the temporary file that takes the time, because this forces the operating system to allocate space on the disk. But why not use ftruncate() (instead of write()) to quickly create a file with holes? POSIX says [3], "If the file size is increased, the extended area shall appear as if it were zero-filled" which would seem to satisfy the requirement. [1] https://bugs.python.org/issue8713 [2] https://hg.python.org/cpython/rev/3b82e0d83bf9 [3] http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html ---------- nosy: +gdr at garethrees.org _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 12:02:55 2017 From: report at bugs.python.org (Tim Peters) Date: Thu, 13 Jul 2017 16:02:55 +0000 Subject: [issue30920] Sequence Matcher from diff lib is not implementing longest common substring problem correctly In-Reply-To: <1499958355.33.0.434945478304.issue30920@psf.upfronthosting.co.za> Message-ID: <1499961775.11.0.564707097768.issue30920@psf.upfronthosting.co.za> Tim Peters added the comment: This is an unfortunate consequence of the default "autojunk" feature. You can turn that off by passing `autojunk=False`, like so: match = SequenceMatcher(None, string1, string2, autojunk=False)... ^^^^^^^^^^^^^^^^ Then it returns a match of size 534. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 12:03:13 2017 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 13 Jul 2017 16:03:13 +0000 Subject: [issue30922] Process in not get killed using subprocess.call() in python thread In-Reply-To: <1499960768.83.0.441889883415.issue30922@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: So top ope in tickets about this issue or you will be banned. On Jul 13, 2017 8:46 AM, "Sanket" wrote: > > New submission from Sanket: > > import threading > import subprocess > > def B(): > while True: > break > cmd="ps -ef | grep 'shell' | awk '{print $2}' | xargs kill -9" > subprocess.call(cmd, shell=True) > > > def A(): > th = threading.Thread(target=B) > th.start() > > > > > In above code, process with name "shell" has to be killed, but its not > working. While same when I do in simple without thread, its working > > > Why you are not answering here,at last I just had to deal with answer > whether its getting here or else where > > ---------- > components: Library (Lib) > messages: 298293 > nosy: gvanrossum, sanky8793 > priority: normal > severity: normal > status: open > title: Process in not get killed using subprocess.call() in python thread > type: behavior > versions: Python 2.7, Python 3.3 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 12:05:03 2017 From: report at bugs.python.org (Sanket) Date: Thu, 13 Jul 2017 16:05:03 +0000 Subject: [issue30922] Process in not get killed using subprocess.call() in python thread In-Reply-To: <1499960768.83.0.441889883415.issue30922@psf.upfronthosting.co.za> Message-ID: <1499961903.4.0.341816049547.issue30922@psf.upfronthosting.co.za> Sanket added the comment: Can i get solution here ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 12:18:13 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 13 Jul 2017 16:18:13 +0000 Subject: [issue30922] Process in not get killed using subprocess.call() in python thread In-Reply-To: <1499960768.83.0.441889883415.issue30922@psf.upfronthosting.co.za> Message-ID: <1499962693.36.0.35037783347.issue30922@psf.upfronthosting.co.za> St?phane Wirtel added the comment: @sanky8793 please, use the python-list for that https://mail.python.org/mailman/listinfo/python-list Thank you ---------- nosy: +matrixise -gvanrossum priority: normal -> low stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 12:36:01 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 13 Jul 2017 16:36:01 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? Message-ID: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> New submission from St?phane Wirtel: Hi all, Since I use the last version of Fedora 26 with gcc-7.1.1, I have these warnings (see output.txt file) We could add -Wimplicit-fallthrough=0 to Makefile ? it will disable the fallthrough of the coed. What do you think about that ? What's your feedback on this option and can we use it in the case of CPython ? Thank you ---------- files: output.txt messages: 298299 nosy: matrixise priority: normal severity: normal status: open title: Add -Wimplicit-fallthrough=0 to Makefile ? versions: Python 3.7 Added file: http://bugs.python.org/file47012/output.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 13:15:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Jul 2017 17:15:51 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1499966151.37.0.705219729403.issue30923@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It seems to me that by default the compiler recognizes a wide variety of "falls through" comments. Thus we need just add missed comments. There are warnings emitted when compile imported third-party code. We should ask Stefan for adding "falls through" comments in his libmpdec. And either compile expat with -Wimplicit-fallthrough=0, or wait until warnings will be fixed in upstream, or remove the bundled copy of expat. ---------- nosy: +serhiy.storchaka, skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 13:16:36 2017 From: report at bugs.python.org (Shlomi Fish) Date: Thu, 13 Jul 2017 17:16:36 +0000 Subject: [issue1464444] ctypes should be able to link with installed libffi Message-ID: <1499966196.07.0.0450747587578.issue1464444@psf.upfronthosting.co.za> Changes by Shlomi Fish : ---------- pull_requests: +2760 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 13:50:00 2017 From: report at bugs.python.org (John 'Warthog9' Hawley) Date: Thu, 13 Jul 2017 17:50:00 +0000 Subject: [issue30924] RPM build doc_files needs files separated into separate lines Message-ID: <1499968200.32.0.508510692032.issue30924@psf.upfronthosting.co.za> New submission from John 'Warthog9' Hawley: doc-files should break files up into multiple lines, as per RPM expectation when using %doc section of the RPM spec, it expects multiple files to be listed each on their own line. Currently what gets passed in is: %doc file1 file2 file3 which throws: error: More than one file on a line: file1 error: More than one file on a line: file2 error: More than one file on a line: file3 Expectation is to break the files up into separate lines: %doc file1 file2 file3 which then works as expected with multiple files. ---------- messages: 298301 nosy: warthog9 priority: normal pull_requests: 2761 severity: normal status: open title: RPM build doc_files needs files separated into separate lines versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 13:50:23 2017 From: report at bugs.python.org (John 'Warthog9' Hawley) Date: Thu, 13 Jul 2017 17:50:23 +0000 Subject: [issue30924] RPM build doc_files needs files separated into separate lines In-Reply-To: <1499968200.32.0.508510692032.issue30924@psf.upfronthosting.co.za> Message-ID: <1499968223.71.0.35119251879.issue30924@psf.upfronthosting.co.za> Changes by John 'Warthog9' Hawley : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 13:52:15 2017 From: report at bugs.python.org (Stefan Krah) Date: Thu, 13 Jul 2017 17:52:15 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1499968335.8.0.150557111085.issue30923@psf.upfronthosting.co.za> Stefan Krah added the comment: It's a useful warning, but I find it annoying to add 20 "fall through" comments. I may add a pragma at some point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 13:58:48 2017 From: report at bugs.python.org (John 'Warthog9' Hawley) Date: Thu, 13 Jul 2017 17:58:48 +0000 Subject: [issue30925] RPM build lacks ability to include other files similar to doc_files Message-ID: <1499968728.03.0.295292899472.issue30925@psf.upfronthosting.co.za> New submission from John 'Warthog9' Hawley: Duplicate doc-files functionality, to inject files into bdist_rpm Enhancement to allow for files that are built outside of what's expected in setup.py to be injected into the bdist files_rpm listing so they are included in the resulting RPM. This effectively duplicates the doc-files functionality, but adds it as additional files to be included. ---------- messages: 298303 nosy: warthog9 priority: normal pull_requests: 2762 severity: normal status: open title: RPM build lacks ability to include other files similar to doc_files type: enhancement versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 13:58:54 2017 From: report at bugs.python.org (Zachary Ware) Date: Thu, 13 Jul 2017 17:58:54 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1499968734.23.0.370752301951.issue30923@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 14:13:00 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 13 Jul 2017 18:13:00 +0000 Subject: [issue30251] Windows Visual Studio solution does not have an install target In-Reply-To: <1493805308.24.0.584899845977.issue30251@psf.upfronthosting.co.za> Message-ID: <1499969580.18.0.420617440827.issue30251@psf.upfronthosting.co.za> Steve Dower added the comment: Sure, but then I'll resolve it as rejected :) The solution does not need an install target. That's not the point - we have separate projects and scripts for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 14:13:14 2017 From: report at bugs.python.org (Gareth Rees) Date: Thu, 13 Jul 2017 18:13:14 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1499969594.06.0.375189123275.issue30919@psf.upfronthosting.co.za> Gareth Rees added the comment: Note that some filesystems (e.g. HFS+) don't support sparse files, so creating a large Arena will still be slow on these filesystems even if the file is created using ftruncate(). (This could be fixed, for the "fork" start method only, by using anonymous maps in that case.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 14:33:34 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 13 Jul 2017 18:33:34 +0000 Subject: [issue30913] IDLE: Document tk Vars, attributes, methods by tab page In-Reply-To: <1499890251.06.0.648387967688.issue30913@psf.upfronthosting.co.za> Message-ID: <1499970814.1.0.0850682436891.issue30913@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +2763 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 14:33:41 2017 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Jul 2017 18:33:41 +0000 Subject: [issue30925] RPM build lacks ability to include other files similar to doc_files In-Reply-To: <1499968728.03.0.295292899472.issue30925@psf.upfronthosting.co.za> Message-ID: <1499970821.18.0.720291435545.issue30925@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- components: +Distutils nosy: +dstufft, merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 14:33:56 2017 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Jul 2017 18:33:56 +0000 Subject: [issue30925] RPM build lacks ability to include other files similar to doc_files In-Reply-To: <1499968728.03.0.295292899472.issue30925@psf.upfronthosting.co.za> Message-ID: <1499970836.64.0.300681306597.issue30925@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 14:42:43 2017 From: report at bugs.python.org (Stefan Krah) Date: Thu, 13 Jul 2017 18:42:43 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1499971363.92.0.00461398475435.issue30923@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- pull_requests: +2764 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 14:54:22 2017 From: report at bugs.python.org (Stefan Krah) Date: Thu, 13 Jul 2017 18:54:22 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1499972062.76.0.191207178182.issue30923@psf.upfronthosting.co.za> Stefan Krah added the comment: New changeset 72b543308ee3087e3fa247981f5cb4be1138c515 by Stefan Krah in branch 'master': bpo-30923: Suppress fall-through warnings in libmpdec. (#2698) https://github.com/python/cpython/commit/72b543308ee3087e3fa247981f5cb4be1138c515 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 14:58:49 2017 From: report at bugs.python.org (Stefan Krah) Date: Thu, 13 Jul 2017 18:58:49 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1499972329.79.0.132307275072.issue30923@psf.upfronthosting.co.za> Stefan Krah added the comment: Hmm, that took about 20 min to commit a 3 line diff. Now I'm watching the buildbots... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 15:04:06 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 13 Jul 2017 19:04:06 +0000 Subject: [issue30906] os.path.join misjoins paths In-Reply-To: <1499805834.64.0.51742284415.issue30906@psf.upfronthosting.co.za> Message-ID: <1499972646.55.0.283090117936.issue30906@psf.upfronthosting.co.za> Steve Dower added the comment: There's absolutely no risk of ignoring later parameters or raising a ValueError here, so please don't let those cloud the discussion. The behaviour of Python 3.6 seems to be correct for every case except: >>> os.path.join("C:\\dir1", "D:dir2") D:dir2 (expected D:\dir1\dir2) However, that's an incredible edge case that virtually nobody relies on and I'm sure nobody expects. The other combinations of relative and absolute paths seem to be correct. I'm not convinced that changing the behaviour of Python 2.7 significantly improves either the maintainability or security of that release, so unless someone wants to argue about that I'm closing this as not a bug. (And if someone *does* want to argue about it, don't bother arguing with me :) ) ---------- resolution: -> not a bug stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 15:34:44 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 13 Jul 2017 19:34:44 +0000 Subject: [issue30731] Use correct executable manifest for windows In-Reply-To: <1498124022.5.0.932969179032.issue30731@psf.upfronthosting.co.za> Message-ID: <1499974484.84.0.844400673668.issue30731@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset c40ad03bf2693b4af539978f1274e57b85367547 by Steve Dower (Segev Finer) in branch 'master': bpo-30731: python.manifest fix (#2328) https://github.com/python/cpython/commit/c40ad03bf2693b4af539978f1274e57b85367547 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 15:38:05 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 13 Jul 2017 19:38:05 +0000 Subject: [issue30731] Use correct executable manifest for windows In-Reply-To: <1498124022.5.0.932969179032.issue30731@psf.upfronthosting.co.za> Message-ID: <1499974685.76.0.477906965674.issue30731@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- pull_requests: +2765 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 15:51:52 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 13 Jul 2017 19:51:52 +0000 Subject: [issue30731] Use correct executable manifest for windows In-Reply-To: <1498124022.5.0.932969179032.issue30731@psf.upfronthosting.co.za> Message-ID: <1499975512.08.0.518931519766.issue30731@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset d8e522f7cf8d59993acae9409b6af0ee9a35038f by Steve Dower in branch '3.6': bpo-30731: python.manifest fix (#2328) (#2699) https://github.com/python/cpython/commit/d8e522f7cf8d59993acae9409b6af0ee9a35038f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 15:52:27 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 13 Jul 2017 19:52:27 +0000 Subject: [issue30731] Use correct executable manifest for windows In-Reply-To: <1498124022.5.0.932969179032.issue30731@psf.upfronthosting.co.za> Message-ID: <1499975547.16.0.150356604252.issue30731@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- assignee: -> steve.dower resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 16:04:12 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 13 Jul 2017 20:04:12 +0000 Subject: [issue9262] IDLE: Use tabbed shell and edit windows In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1499976252.66.0.795365886439.issue9262@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: OMG no! Please reconsider. First, analogy with web browsers is bogus. The modes of usage is very different. We don't look at multiple tabs simultaneously very often, but we do look at multiple files at once using IDLE (at least I do). And I'm not the only one. Please see how Raymond masterfully uses IDLE in https://www.youtube.com/watch?v=nO78ECRighw. Will this be as easy (or possible at all) with the tabbed interface? Crowding of the taskbar is eliminated by various other techniques: Windows 10 has virtual desktops, Linux has had them for a long time already. Please don't introduce real problems while solving a nonproblem. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 16:16:06 2017 From: report at bugs.python.org (Stefan Krah) Date: Thu, 13 Jul 2017 20:16:06 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1499976966.49.0.93357415283.issue30923@psf.upfronthosting.co.za> Stefan Krah added the comment: St?phane, if you want the libmpdec change cherry picked and are willing to do the (significant) work of backporting, I'll merge it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 16:16:14 2017 From: report at bugs.python.org (Eryk Sun) Date: Thu, 13 Jul 2017 20:16:14 +0000 Subject: [issue30906] os.path.join misjoins paths In-Reply-To: <1499805834.64.0.51742284415.issue30906@psf.upfronthosting.co.za> Message-ID: <1499976974.85.0.66678407476.issue30906@psf.upfronthosting.co.za> Eryk Sun added the comment: The difference compared to PathCchCombineEx stems from the following snippet in ntpath.join: if p_path and p_path[0] in seps: # Second path is absolute if p_drive or not result_drive: result_drive = p_drive result_path = p_path The case that PathCchCombineEx fails is that the second path is rooted [*] but neither UNC nor drive-absolute (i.e. p_drive is empty) and the first path is relative but neither rooted nor drive-relative. When the second path is rooted but not absolute, PathCchCombineEx requires the joined path to use the root of the first path as determined by PathCchStripToRoot. The latter fails for a completely relative path (i.e. no root or drive), as it rightly should. The question is whether the join operation itself should fail because the first path has no root. Python makes a different choice, but it isn't necessarily wrong. [*] Path Type | Example ==================================== Relative | file ---------------|-------------------- Rooted | \file Drive-Relative | C:file ==================================== Drive-Absolute | C:\file UNC | \\server\share\file ==================================== Extended | \\?\C:\file Device | \\.\C: In Windows, rooted paths are relative to the current drive or network share, but Python still classifies them as absolute. In contrast, C++ path::is_absolute() requires both has_root_name and has_root_directory in Windows, so L"\\dir" is classified as a relative path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 16:41:40 2017 From: report at bugs.python.org (Trey Hunner) Date: Thu, 13 Jul 2017 20:41:40 +0000 Subject: [issue30466] Tutorial doesn't explain the use of classes In-Reply-To: <1495666720.41.0.650692797283.issue30466@psf.upfronthosting.co.za> Message-ID: <1499978500.72.0.0789424621773.issue30466@psf.upfronthosting.co.za> Changes by Trey Hunner : ---------- pull_requests: +2766 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 16:46:43 2017 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 13 Jul 2017 20:46:43 +0000 Subject: [issue30926] KeyError with cgitb inspecting exception in generator expression Message-ID: <1499978803.4.0.623875729197.issue30926@psf.upfronthosting.co.za> New submission from Jason R. Coombs: Consider this script, which runs successfully on Python 3: import cgitb import sys def fiter(): assert False yield 1, 1 yield 2, 2 yield 3, 3 try: x = set(id_ for id_, _ in fiter()) except: print cgitb.html(sys.exc_info()) Run the same script on Python 2.7.13 and you get this error: Traceback (most recent call last): File "test.py", line 15, in print(cgitb.html(sys.exc_info())) File ".../cgitb.py", line 130, in html formatvalue=lambda value: '=' + pydoc.html.repr(value)) File ".../inspect.py", line 887, in formatargvalues specs.append(strseq(args[i], convert, join)) File ".../inspect.py", line 840, in strseq return join(map(lambda o, c=convert, j=join: strseq(o, c, j), object)) File ".../inspect.py", line 840, in return join(map(lambda o, c=convert, j=join: strseq(o, c, j), object)) File ".../inspect.py", line 842, in strseq return convert(object) File ".../inspect.py", line 884, in convert return formatarg(name) + formatvalue(locals[name]) KeyError: 'id_' Wrap the generator expression in [] and it also succeeds. Given that the issue only exists on Python 2.7, it may not need to be addressed, but I wanted to log the issue nonetheless. ---------- components: Interpreter Core, Library (Lib) messages: 298314 nosy: jason.coombs priority: normal severity: normal status: open title: KeyError with cgitb inspecting exception in generator expression versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 17:15:48 2017 From: report at bugs.python.org (Tim Peters) Date: Thu, 13 Jul 2017 21:15:48 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers In-Reply-To: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> Message-ID: <1499980548.41.0.176979246143.issue30907@psf.upfronthosting.co.za> Tim Peters added the comment: Measuring in isolation (like with, e.g., timeit) isn't really interesting. Then everything is in L1 cache, branches are 100% predictable (because they take the same branch over & over for the duration of the test), and second-order effects on _other_ code are invisible. For example, the 100% branch prediction comes at a hidden cost: finite hardware branch-prediction tables had to kick out info about _other_ branches to make room for the branches in the code being tested. Likewise other code is kicked out of instruction caches to make room for the new tests, and similarly for whatever data the test uses. Those limited hardware resources are consumed by the new code whether or not it's run in the context of a micro-benchmark. I'm not claiming the new special cases would slow code down "a lot", or even significantly, or even measurably. That's not the point. The point is that we avoid adding special cases unless there's _clear_ expected actual benefit, because when we multiply hundreds of code paths with "this could theoretically speed things up in some cases!" special tests, slowdowns _do_ become significant. They all fight each other, and with expected-case code, for limited hardware acceleration gimmicks. For a very simple example, we don't special-case integer division by 1. `n // m`, when m=1, takes time proportional to the number of (internal) digits in `n`, despite that we _could_ simply return a pointer to `n` in constant time. For the same reasons: it's rare for code to divide by 1, and checking for anything isn't free (even if a micro-benchmark can't demonstrate it). However, if someone had a way to divide by _any_ odd integer 5x faster than what we do now, _that_ may be worth the extra test. That's why Raymond and I are looking for a reason to even suspect that special-casing container identity would pay off in _some_ plausibly realistic use case(s). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 17:27:56 2017 From: report at bugs.python.org (Robert) Date: Thu, 13 Jul 2017 21:27:56 +0000 Subject: [issue30927] re.sub() does not work correctly on '.' pattern and \n Message-ID: <1499981276.43.0.226905822671.issue30927@psf.upfronthosting.co.za> New submission from Robert: When running the command re.sub(r'X.', '+', '-X\n-', re.DOTALL) you get '-X\n-' instead of '-+-'. Curiously findall works correctly: re.findall(r'X.', '-X\n-', re.DOTALL) => ['X\n'] ---------- components: Regular Expressions messages: 298316 nosy: ezio.melotti, mrabarnett, mrh1997 priority: normal severity: normal status: open title: re.sub() does not work correctly on '.' pattern and \n type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 18:06:41 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Jul 2017 22:06:41 +0000 Subject: [issue9262] IDLE: Use tabbed shell and edit windows In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1499983601.84.0.388966129596.issue9262@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Hi Cedric, I have been 'considering' for at least 7 years, since the core devs who then cared about IDLE agreed that tabbed windows would be a good idea. The direst analogy with programming editors with tabs. Notepad++ is the one I have used. My impression is that this is pretty standard. One thing I would not copy from Notepad++ is allowing only one process at a time, and apparently only one tabbed window in the one process. In intend that IDLE continue to allow multiple processes with multiple windows. I expect that 'New file' will be replaced with 'New tab' and 'New window', as with FireFox. I intend that a single window to able to have at least 2 panes. Look at turtledemo to see what this means. ('python -m turtledemo' or Help => Turtledemo in IDLE.) Mentally replace the text and canvas with sets of tabbed pages, side by side. In fact, for my large widescreen monitor, I want 3 panes so I can have Shell, file, and test_file visible at once. I have not yet really considered whether we should use an improved version of IDLE's tabbedpageset, used for configdialog, Mark's replacement, or ttk Notebook. Also see the discussion on #24826. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 18:48:45 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Jul 2017 22:48:45 +0000 Subject: [issue24826] ability to integrate editor, shell, debugger in one window In-Reply-To: <1438957748.57.0.555891700476.issue24826@psf.upfronthosting.co.za> Message-ID: <1499986125.2.0.730208371854.issue24826@psf.upfronthosting.co.za> Terry J. Reedy added the comment: https://www.youtube.com/watch?v=nO78ECRighw shows IDLE on Mac with a shell and editor window. Because Mac pulls the menu off of each window and puts one above both, which are side by side, it looks like an example of what we want to have on all systems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 18:58:44 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Jul 2017 22:58:44 +0000 Subject: [issue9262] IDLE: Use tabbed shell and edit windows In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1499986724.55.0.251208351066.issue9262@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Vedran, thank you for the link. The way IDLE looks on Mac is what we want on all systems. I added a note to #24826. Do you regularly work on Mac? It would be help if someone were to test PRs on OSX, especially patches intended to change what users see. Even a weekly test of a fresh download from the repository would be helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 19:10:20 2017 From: report at bugs.python.org (Malcolm Smith) Date: Thu, 13 Jul 2017 23:10:20 +0000 Subject: [issue15360] Behavior of assigning to __dict__ is not documented In-Reply-To: <1342373106.65.0.0254375505566.issue15360@psf.upfronthosting.co.za> Message-ID: <1499987420.73.0.697560116979.issue15360@psf.upfronthosting.co.za> Changes by Malcolm Smith : ---------- nosy: +Malcolm Smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 19:14:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jul 2017 23:14:04 +0000 Subject: [issue30758] test_pydoc hangs sometimes on 3.6 and master branches In-Reply-To: <1498469994.85.0.367724213837.issue30758@psf.upfronthosting.co.za> Message-ID: <1499987644.48.0.754595582812.issue30758@psf.upfronthosting.co.za> STINNER Victor added the comment: Another fail, so I reopen the issue: http://buildbot.python.org/all/builders/ARMv7%20Ubuntu%203.6/builds/563 ... 0:11:30 load avg: 4.45 [403/405] test_lib2to3 passed (248 sec) -- running: test_tools (274 sec), test_pydoc (411 sec) running: test_tools (304 sec), test_pydoc (441 sec) running: test_tools (334 sec), test_pydoc (471 sec) 0:12:34 load avg: 2.83 [404/405] test_tools passed (338 sec) -- running: test_pydoc (476 sec) command timed out: 1200 seconds without output ... ---------- resolution: fixed -> status: closed -> open title: regrtest hangs sometimes on the master branch (test_pydoc? test_subprocess?) -> test_pydoc hangs sometimes on 3.6 and master branches versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 19:42:08 2017 From: report at bugs.python.org (Guillaume Sanchez) Date: Thu, 13 Jul 2017 23:42:08 +0000 Subject: [issue30717] str.center() is not unicode aware In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1499989328.62.0.810954165738.issue30717@psf.upfronthosting.co.za> Guillaume Sanchez added the comment: Hello, I implemented unicodedata.break_graphemes() that returns an iterators that spits consecutive graphemes. This is a "test" implementation meant to see what doesn't fits Python's style and design, to discuss naming and implementation details. https://github.com/python/cpython/pull/2673 Thanks for your time and interest ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 19:47:06 2017 From: report at bugs.python.org (Guillaume Sanchez) Date: Thu, 13 Jul 2017 23:47:06 +0000 Subject: [issue12568] Add functions to get the width in columns of a character In-Reply-To: <1310683436.9.0.375403702242.issue12568@psf.upfronthosting.co.za> Message-ID: <1499989626.46.0.535744055477.issue12568@psf.upfronthosting.co.za> Guillaume Sanchez added the comment: Hello, I come from bugs.python.org/issue30717 . I have a pending PR that needs review ( https://github.com/python/cpython/pull/2673 ) adding a function that breaks unicode strings into grapheme clusters (aka what one would intuitively call "a character"). It's based on the grapheme cluster breaking algorithm from TR29. Let me know if this is of any relevance. Quick demo: >>> a=unicodedata.break_graphemes("lol") >>> list(a) ['l', 'o', 'l'] >>> list(unicodedata.break_graphemes("lo\u0309l")) ['l', 'o?', 'l'] >>> list(unicodedata.break_graphemes("lo\u0309\u0301l")) ['l', 'o??', 'l'] >>> list(unicodedata.break_graphemes("lo\u0301l")) ['l', 'o?', 'l'] >>> list(unicodedata.break_graphemes("")) [] ---------- nosy: +Guillaume Sanchez _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 19:58:25 2017 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 13 Jul 2017 23:58:25 +0000 Subject: [issue30927] re.sub() does not work correctly on '.' pattern and \n In-Reply-To: <1499981276.43.0.226905822671.issue30927@psf.upfronthosting.co.za> Message-ID: <1499990305.73.0.12063192606.issue30927@psf.upfronthosting.co.za> Matthew Barnett added the comment: The 4th parameter is the count, not the flags: sub(pattern, repl, string, count=0, flags=0) >>> re.sub(r'X.', '+', '-X\n-', flags=re.DOTALL) '-+-' ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 20:35:51 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 00:35:51 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499992551.15.0.741831508068.issue30870@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 9b622fb90331f259894e6edb29b5c64b9366491a by terryjreedy (Louie Lu) in branch 'master': bpo-30870: IDLE: Add configdialog fontlist selection unittest (#2666) https://github.com/python/cpython/commit/9b622fb90331f259894e6edb29b5c64b9366491a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 20:36:45 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 14 Jul 2017 00:36:45 +0000 Subject: [issue30717] str.center() is not unicode aware In-Reply-To: <1499989328.62.0.810954165738.issue30717@psf.upfronthosting.co.za> Message-ID: <20170714003637.GT3149@ando.pearwood.info> Steven D'Aprano added the comment: Thank you, but I cannot review your C code. Can you start by telling us what the two functions: unicodedata.grapheme_cluster_break() unicodedata.break_graphemes() take as arguments, and what they return? If we were to call help(function), what would we see? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 20:38:34 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 00:38:34 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499992714.38.0.0593517754527.issue30870@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2767 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 20:43:37 2017 From: report at bugs.python.org (Guillaume Sanchez) Date: Fri, 14 Jul 2017 00:43:37 +0000 Subject: [issue30717] str.center() is not unicode aware In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1499993016.99.0.544446632019.issue30717@psf.upfronthosting.co.za> Guillaume Sanchez added the comment: Hello Steven! Thanks for your reactivity! unicodedata.grapheme_cluster_break() takes a unicode code point as an argument and return its GraphemeBreakProperty as a string. Possible values are listed here: http://www.unicode.org/reports/tr29/#CR help(unicodedata.grapheme_cluster_break) says: grapheme_cluster_break(chr, /) Returns the GraphemeBreakProperty assigned to the character chr as string. ==== unicodedata.break_graphemes() takes a unicode string as argument and returns an GraphemeClusterIterator that spits consecutive graphemes clusters. help(unicodedata.break_graphemes) says: break_graphemes(unistr, /) Returns an iterator to iterate over grapheme clusters in unistr. It uses extended grapheme cluster rules from TR29. Is there anything else you would like to know? Don't hesitate to ask :) Thank you for your time! ---------- assignee: -> christian.heimes components: +SSL, Tests, Tkinter -Library (Lib) nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 21:13:23 2017 From: report at bugs.python.org (Peter Thomassen) Date: Fri, 14 Jul 2017 01:13:23 +0000 Subject: [issue30803] Truth value of sets not properly documented In-Reply-To: <1498743378.1.0.0570911503542.issue30803@psf.upfronthosting.co.za> Message-ID: <1499994803.54.0.0990102743358.issue30803@psf.upfronthosting.co.za> Peter Thomassen added the comment: I like your most recent suggestion, and updated the PR after fixing a typo ('Fractions') and making it more complete (complex numbers). Let me know if anything else is needed. (A mapping is not a specialized set, at least as far as typing is concerned: `isinstance({}, set)` is false. Semantically, they may be related, but the question here is whether the types are actually related.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 22:24:58 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 02:24:58 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1499999098.09.0.0404356189611.issue30870@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 42abf7f9737f78a5da311a42945d781dfcd6c6c0 by terryjreedy in branch '3.6': [3.6] bpo-30870: IDLE: Add configdialog fontlist selection unittest (GH-2666) (#2701) https://github.com/python/cpython/commit/42abf7f9737f78a5da311a42945d781dfcd6c6c0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 22:58:38 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 02:58:38 +0000 Subject: [issue30913] IDLE: Document tk Vars, attributes, methods by tab page In-Reply-To: <1499890251.06.0.648387967688.issue30913@psf.upfronthosting.co.za> Message-ID: <1500001118.61.0.0875102375923.issue30913@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I added missing functions and created attached list with help of Find in (1) Files. ---------- Added file: http://bugs.python.org/file47013/configdialog_funcs.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 23:27:41 2017 From: report at bugs.python.org (Eryk Sun) Date: Fri, 14 Jul 2017 03:27:41 +0000 Subject: [issue30906] os.path.join misjoins paths In-Reply-To: <1499805834.64.0.51742284415.issue30906@psf.upfronthosting.co.za> Message-ID: <1500002861.63.0.956411070234.issue30906@psf.upfronthosting.co.za> Eryk Sun added the comment: BTW, I don't see why one would expect join(r"C:\dir1", "D:dir2") to return r"D:\dir1\dir2" instead of "D:dir2". Python's result is in agreement with Windows PathCchCombineEx. Paths on different drives should not be combined. The first path has to be ignored: elif p_drive and p_drive != result_drive: if p_drive.lower() != result_drive.lower(): # Different drives => ignore the first path entirely result_drive = p_drive result_path = p_path continue ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 23:32:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 03:32:03 +0000 Subject: [issue30913] IDLE: Document tk Vars, attributes, methods by tab page In-Reply-To: <1499890251.06.0.648387967688.issue30913@psf.upfronthosting.co.za> Message-ID: <1500003123.77.0.0748668427311.issue30913@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 36329a4dd85c03e2060a306e86ac5ddec6fd2549 by terryjreedy (csabella) in branch 'master': bpo-30913: IDLE: Document tk vars, attributes, and methods for ConfigDialog (#2697) https://github.com/python/cpython/commit/36329a4dd85c03e2060a306e86ac5ddec6fd2549 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 23:33:51 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 03:33:51 +0000 Subject: [issue30913] IDLE: Document tk Vars, attributes, methods by tab page In-Reply-To: <1499890251.06.0.648387967688.issue30913@psf.upfronthosting.co.za> Message-ID: <1500003231.65.0.399795844907.issue30913@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2768 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 23:36:34 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 03:36:34 +0000 Subject: [issue30913] IDLE: Document tk Vars, attributes, methods by tab page In-Reply-To: <1499890251.06.0.648387967688.issue30913@psf.upfronthosting.co.za> Message-ID: <1500003394.68.0.477002425171.issue30913@psf.upfronthosting.co.za> Terry J. Reedy added the comment: We can edit details as we examine functions to test and change or refactor. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 23:51:28 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 03:51:28 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt Message-ID: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> New submission from Terry J. Reedy: As I prepare blurbs, I copy to a private file, replacing 'IDLE' with bpo-nnnnn. And maybe edit a bit more, maybe not. I occasionally copy batches to idlelib/NEWS.txt. The first 2 times with git, I marked PR as trivial, but decided to open this continuing issue to record merges. A script could be written to do this automatically, but it would have to be run just before the blurbs are moved into Python's NEWS. ---------- assignee: terry.reedy components: IDLE messages: 298333 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Copy modified blurbs to idlelib/NEWS.txt type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 23:53:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 03:53:32 +0000 Subject: [issue30913] IDLE: Document tk Vars, attributes, methods by tab page In-Reply-To: <1499890251.06.0.648387967688.issue30913@psf.upfronthosting.co.za> Message-ID: <1500004412.23.0.779381212959.issue30913@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 9a09c667cf133e722a3e7ed2185f3e9e5af25a99 by terryjreedy in branch '3.6': [3.6] bpo-30913: IDLE: Document tk vars, attributes, and methods for ConfigDialog (GH-2697) (#2702) https://github.com/python/cpython/commit/9a09c667cf133e722a3e7ed2185f3e9e5af25a99 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 23:54:14 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 14 Jul 2017 03:54:14 +0000 Subject: [issue30925] RPM build lacks ability to include other files similar to doc_files In-Reply-To: <1499968728.03.0.295292899472.issue30925@psf.upfronthosting.co.za> Message-ID: <1500004454.76.0.199885192599.issue30925@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +kushal.das _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 23:54:34 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 14 Jul 2017 03:54:34 +0000 Subject: [issue30924] RPM build doc_files needs files separated into separate lines In-Reply-To: <1499968200.32.0.508510692032.issue30924@psf.upfronthosting.co.za> Message-ID: <1500004474.86.0.959944217554.issue30924@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +kushal.das, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 23:57:29 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 03:57:29 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1500004649.61.0.452440153743.issue30928@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2769 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 00:13:39 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 04:13:39 +0000 Subject: [issue30803] Truth value of sets not properly documented In-Reply-To: <1498743378.1.0.0570911503542.issue30803@psf.upfronthosting.co.za> Message-ID: <1500005619.52.0.053360334223.issue30803@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Raymond, if you either unassign yourself or approve the current PR, I will merge and backport to 3.6 (but not 3.5). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 00:25:14 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 04:25:14 +0000 Subject: [issue30717] str.center() is not unicode aware In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1500006314.54.0.0461099488651.issue30717@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think it at least plausible that we should add implementations of some of the unicode standard's algorithms. Victor and Serhiy, as two of the active core devs most involved with unicode issues, what do you think? ---------- nosy: +haypo, serhiy.storchaka, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 00:50:55 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 04:50:55 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1500007855.68.0.324630139921.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Backport of 2703 is 2704, which has been merged. Somehow bpo# on title got stripped and I did not notice until merged, and merge was allowed without trivial tag. NOTE: THE DOUBLE SPACING AFTER THE SEPARATOR LINE IS INTENTIONAL, to avoid backport merge conflicts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 01:00:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Jul 2017 05:00:57 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers In-Reply-To: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> Message-ID: <1500008457.6.0.632724647423.issue30907@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: First, few comments about the code. 1) The condition "a == b" is enough. No need to test "PyDict_CheckExact(a)" and like. 2) This fast path can be used only for Py_EQ and Py_NE. For other operations it can change the behavior. This is common approach of implementing operator== on C++. Unless comparing objects is trivial the implementation of operator== almost always starts with comparing pointers. In Python the overhead of calling methods and comparing objects is larger than in C++ and I expect that the relative overhead of one additional pointer comparison is smaller. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 01:21:32 2017 From: report at bugs.python.org (=?utf-8?b?5p6X6Ieq5Z2H?=) Date: Fri, 14 Jul 2017 05:21:32 +0000 Subject: [issue22253] ConfigParser does not handle files without sections In-Reply-To: <1408731768.17.0.221948826268.issue22253@psf.upfronthosting.co.za> Message-ID: <1500009692.96.0.749073942979.issue22253@psf.upfronthosting.co.za> ??? added the comment: Hi Pedro Lacerda, I think you should submit your patch as a GitHub pull request. Please correct me if I'm wrong. Thanks. ---------- nosy: +??? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 01:31:36 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Fri, 14 Jul 2017 05:31:36 +0000 Subject: [issue16487] Allow ssl certificates to be specified from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1500010296.45.0.594797069771.issue16487@psf.upfronthosting.co.za> Changes by Nathaniel Smith : ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 01:56:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Jul 2017 05:56:00 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers In-Reply-To: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> Message-ID: <1500011760.11.0.484878706457.issue30907@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The main drawback of this optimization perhaps is not tiny runtime overhead in common case, but the complication of the code. It adds at least 6 or 8 lines to every rich compare implementation. On other hand, this optimization already is implemented for integers, strings, bytes and slices. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 01:58:23 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 14 Jul 2017 05:58:23 +0000 Subject: [issue30906] os.path.join misjoins paths In-Reply-To: <1499805834.64.0.51742284415.issue30906@psf.upfronthosting.co.za> Message-ID: <1500011903.91.0.203209885897.issue30906@psf.upfronthosting.co.za> Steve Dower added the comment: Fair point. I was thinking of how chdir handles it, but of course that's relative to the cwd on D, so the rest of the path on C is ignored. D:dir2 is correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 04:34:03 2017 From: report at bugs.python.org (Masayuki Yamamoto) Date: Fri, 14 Jul 2017 08:34:03 +0000 Subject: [issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX In-Reply-To: <1447861816.88.0.632584646231.issue25658@psf.upfronthosting.co.za> Message-ID: <1500021243.48.0.132736268663.issue25658@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: Hi, I attempted Nick's proposal and removed unused codes from TLS implementation (bpo-30279, bpo-30832). This change looks good to me (PR 1362). As the result, I think ready to be more slim API because the own implementation for TLS was removed. Therefore, additional proposal to two API functions: * Omit PyThread_ReInitTSS function * Omit PyThread_tss_delete_value function These functions have handled memory deallocation to key-value storage on the own implementation, but above said, currently the own implementation is gone. It means: 1. PyThread_ReInitTSS makes to be no-op for all supported platforms (Windows and pthreads) 2. likewise PyThread_tss_delete_value just does to empty the storage (i.e. "PyThread_tss_delete_value(key)" makes to be equal to "PyThread_tss_set(key, NULL)"). We (or at least I) won't get back to the own implementation, therefore, I suggest to omit these functions for new TSS API. See proposed updates https://github.com/ma8ma/cpython/pull/1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 04:50:59 2017 From: report at bugs.python.org (Dimitar Tasev) Date: Fri, 14 Jul 2017 08:50:59 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500022259.0.0.0311394295533.issue30919@psf.upfronthosting.co.za> Dimitar Tasev added the comment: If I understand correctly, there is no way to force the old behaviour in Python 3.5, i.e. to use an anonymous memory mapping in multiprocessing.heap.Arena so that the memory can be shared between the processes instead of writing to a shared file? The data sizes usually are, on average, 20 GB, and writing it out to a file is not desirable. As I understand from Gareth Rees' comment, ftruncate() will speed up initialisation, however any processing afterwards would be IO capped. To shed more light to the processing going on, the data is handled as a 3D array, so each process gets a 2D array to operate on, and no information needs to be shared between processes. If the anonymous memory mapping cannot be forced, then the multiprocessing module with a shared array becomes unusable for me. Are you aware of any way to use the multiprocessing module to run execution in parallel, that somehow doesn't use a shared array? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 05:53:31 2017 From: report at bugs.python.org (Gareth Rees) Date: Fri, 14 Jul 2017 09:53:31 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500026011.55.0.916700998032.issue30919@psf.upfronthosting.co.za> Gareth Rees added the comment: If you need the 2.7 behaviour (anonymous mappings) in 3.5 then you can still do it, with some effort. I think the approach that requires the smallest amount of work would be to ensure that subprocesses are started using fork(), by calling multiprocessing.set_start_method('fork'), and then monkey-patch multiprocessing.heap.Arena.__init__ so that it creates anonymous mappings using mmap.mmap(-1, size). (I suggested above that Python could be modified to create anonymous mappings in the 'fork' case, but now that I look at the code in detail, I see that it would be tricky, because the Arena class has no idea about the Context in which it is going to be used -- at the moment you can create one shared object and then pass it to subprocesses under different Contexts, so the shared objects have to support the lowest common denominator.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 06:00:34 2017 From: report at bugs.python.org (Gareth Rees) Date: Fri, 14 Jul 2017 10:00:34 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500026434.82.0.541426552999.issue30919@psf.upfronthosting.co.za> Gareth Rees added the comment: Nonetheless this is bound to be a nasty performance for many people doing big data processing with NumPy/SciPy/Pandas and multiprocessing and moving from 2 to 3, so even if it can't be fixed, the documentation ought to warn about the problem and explain how to work around it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 07:30:33 2017 From: report at bugs.python.org (Dimitar Tasev) Date: Fri, 14 Jul 2017 11:30:33 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500031833.96.0.667514610141.issue30919@psf.upfronthosting.co.za> Dimitar Tasev added the comment: I have looked into your advice of changing multiprocessing.heap.Arena.__init__, I have removed the code that allocated the file and reverted to the old behaviour. I have done some brief runs and it seems to bring back the old behaviour which is allocating the space in RAM, rather than with IO. I am not sure what things this might break, and it might make the other usages of multiprocessing unstable! Can anyone think of anything this change might break? The Arena.__init__ code is the one from Python 2.7: class Arena(object): def __init__(self, size, fd=-1): self.size = size self.fd = fd # still kept but is not used ! self.buffer = mmap.mmap(-1, self.size) There does not seem to be a difference regardless of the start method setting multiprocessing.set_start_method('fork') to be 'fork'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 07:38:36 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 14 Jul 2017 11:38:36 +0000 Subject: [issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX In-Reply-To: <1447861816.88.0.632584646231.issue25658@psf.upfronthosting.co.za> Message-ID: <1500032316.57.0.847431130934.issue25658@psf.upfronthosting.co.za> Nick Coghlan added the comment: Nice :) With the legacy code cleanups merged, I'd say the next step would be to update the PEP with the simplified API and the explanation for why the removed functions are no longer needed (i.e. we're making native TSS support a hard dependency for 3.7+). I'm also thinking we may want to update PEP 11, akin to the entry for the legacy ASCII-only C locale: https://www.python.org/dev/peps/pep-0011/#legacy-c-locale I'll handle the PEP 11 update after PEP 539 is approved, the PEP itself would just need a new Platform Support Changes section like the one in PEP 538: https://www.python.org/dev/peps/pep-0538/#platform-support-changes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 07:49:41 2017 From: report at bugs.python.org (Gareth Rees) Date: Fri, 14 Jul 2017 11:49:41 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500032981.12.0.621587893891.issue30919@psf.upfronthosting.co.za> Gareth Rees added the comment: I see now that the default start method is 'fork' (except on Windows), so calling set_start_method is unnecessary. Note that you don't have to edit multiprocessing/heap.py, you can "monkey-patch" it in the program that needs the anonymous mapping: from multiprocessing.heap import Arena def anonymous_arena_init(self, size, fd=-1): "Create Arena using an anonymous memory mapping." self.size = size self.fd = fd # still kept but is not used ! self.buffer = mmap.mmap(-1, self.size) Arena.__init__ = anonymous_arena_init As for what it will break ? any code that uses the 'spawn' or 'forkserver' start methods. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 08:05:10 2017 From: report at bugs.python.org (Evgeny Boytsov) Date: Fri, 14 Jul 2017 12:05:10 +0000 Subject: [issue30929] AttributeErrors after import in multithreaded environment Message-ID: <1500033910.01.0.46976407762.issue30929@psf.upfronthosting.co.za> New submission from Evgeny Boytsov: Hello everybody! We are using Python 3.4 running at CentOS 7 x64 and experiencing some problems with simulatenous import of modules from different threads of execution. The attached archive contains simple example, which demonstrates the issue. There is python package called "mod". It contains two sub-packages called "foo" and "bar". They, in turn, contain modules "foo" and "bar" respectively. Another package called "threader" contains function "run_threads()", which runs two threads of execution (using threading) and joins them. First thread of execution imports "mod.foo.foo" from "mod" and calls its function. The second thread does the same, but for module "mod.bar.bar". Finally, there is module "test.py" which calls "threader.run_threads()" and when it returns, tries to import "mod.foo.foo" and call its function. To reproduce the bug you need to run "test.py" for several times. Most of the launches complete successfully. But sometimes we encounter AttributeError during import like that: 'module' object has no attribute 'foo' We've done some investigation in order to clarify this behaviour and added import hook (you can see it in test.py), which logs all import that take place. When the launch completes successfully, the order of imports looks like that: $ python3 test.py [py][import] threader [py][import] threading [py][import] time [py][import] traceback [py][import] linecache [py][import] tokenize [py][import] collections [py][import] _collections [py][import] operator [py][import] _operator [py][import] keyword [py][import] heapq [py][import] itertools [py][import] _heapq [py][import] reprlib [py][import] re [py][import] sre_compile [py][import] _sre [py][import] sre_parse [py][import] sre_constants [py][import] _locale [py][import] copyreg [py][import] token [py][import] mod [py][import] mod.foo [py][import] mod.bar [py][import] mod.foo.foo [py][import] mod.bar.bar print from foo print from bar When the issue arises we see the following: $ python3 test.py [py][import] threader [py][import] threading [py][import] time [py][import] traceback [py][import] linecache [py][import] tokenize [py][import] collections [py][import] _collections [py][import] operator [py][import] _operator [py][import] keyword [py][import] heapq [py][import] itertools [py][import] _heapq [py][import] reprlib [py][import] re [py][import] sre_compile [py][import] _sre [py][import] sre_parse [py][import] sre_constants [py][import] _locale [py][import] copyreg [py][import] token [py][import] mod [py][import] mod.foo [py][import] mod [py][import] mod.bar [py][import] mod.foo.foo [py][import] mod.bar.bar thread of foo: import error 'module' object has no attribute 'foo' print from bar That is when the issue arises there are two imports of package "mod". And the most confusing thing about this scenario is that even after completion of "run_threads()" interpreter can not import "mod.foo.foo" and gives the same AttributeErrors in for-loop inside test.py. ---------- components: Interpreter Core files: mod.zip messages: 298349 nosy: boytsovea priority: normal severity: normal status: open title: AttributeErrors after import in multithreaded environment type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file47014/mod.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 08:14:45 2017 From: report at bugs.python.org (Andrey Kislyuk) Date: Fri, 14 Jul 2017 12:14:45 +0000 Subject: [issue11771] hashlib object cannot be pickled In-Reply-To: <1302004182.5.0.155912208324.issue11771@psf.upfronthosting.co.za> Message-ID: <1500034485.4.0.283271633448.issue11771@psf.upfronthosting.co.za> Andrey Kislyuk added the comment: For anyone else looking for a solution to this, I wrote a library: https://github.com/kislyuk/rehash ---------- nosy: +Andrey.Kislyuk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 08:33:52 2017 From: report at bugs.python.org (Arnon Sela) Date: Fri, 14 Jul 2017 12:33:52 +0000 Subject: [issue30842] pyenv activate for bash and tcsh In-Reply-To: <1499110607.19.0.325548288138.issue30842@psf.upfronthosting.co.za> Message-ID: <1500035632.53.0.753296756719.issue30842@psf.upfronthosting.co.za> Arnon Sela added the comment: Additional information: This suggestion will make pyenv much better. To emphasize the need, there are many places that due to security you cannot build virtualenv. Rather you have to push a virtualenv with your python code. Often enough, you also don't have control on where the code will be stationed on the installation server. Hence the mobility of virtualenv is important for Python code to be migratable. Many times I find myself and other edit activate shell scripts correcting their path to a relative one. In fact, virtualenv has --relocatable flag but it doesn't do anything to the batch and shell activate files. Python programs in Scripts, however, are already built with a relative path. There is no reason not to do that to the shell and batch programs. The only thing is that there will need to be more particular shell activate scripts (tcsh, ksh, csh, etc) as they may have different characteristics for relativity. Progress is not defined by how things are, but how they can be. ---------- versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 08:55:58 2017 From: report at bugs.python.org (Dimitar Tasev) Date: Fri, 14 Jul 2017 12:55:58 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500036958.34.0.970586225614.issue30919@psf.upfronthosting.co.za> Dimitar Tasev added the comment: Thank you, that is indeed the solution I ended up with, along with a large explanation of why it was necessary. Do you think that it's worth updating the `multiprocessing` documentation to make users aware of that behaviour? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 09:18:16 2017 From: report at bugs.python.org (Hanno Schlichting) Date: Fri, 14 Jul 2017 13:18:16 +0000 Subject: [issue29766] --with-lto still implied by --enable-optimizations in Python 2.7 In-Reply-To: <1489022104.7.0.601332376307.issue29766@psf.upfronthosting.co.za> Message-ID: <1500038296.25.0.260403617938.issue29766@psf.upfronthosting.co.za> Changes by Hanno Schlichting : ---------- pull_requests: +2770 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 09:21:15 2017 From: report at bugs.python.org (Ivan Marroquin) Date: Fri, 14 Jul 2017 13:21:15 +0000 Subject: [issue30930] Element wise multiplication issue Message-ID: <1500038475.92.0.561127078607.issue30930@psf.upfronthosting.co.za> New submission from Ivan Marroquin: Hi all, I am using an anaconda 4.3.18 64 bits installation on windows 7. the version of python is 3.6.1 and numpy version is 1.12.1 In Python, I have this element wise multiplication: import numpy as np #read the input data from an ascii file into the attributes_data #variable def rankorder(attribute): sorted_items= np.sort(attribute, axis= 0, kind= 'mergesort') sorted_ids= np.argsort(attribute,axis= 0, kind= 'mergesort') # Find where are repetitions repeat_ids= (np.diff(sorted_items) == 0).astype(int) t_repeat_ids= [0] t_repeat_ids.extend(repeat_ids) # Rank with tieds with/withou skipping rankNoSkip= np.logical_not(t_repeat_ids).astype(int) rankNoSkip= np.cumsum(rankNoSkip) # Pre-allocate rank rank= np.arange(1, len(attribute) + 1) # Adjust for tieds (and skips) for i in range(0, len(rank)): if (t_repeat_ids[i] == 1): rank[i]= rankNoSkip[i] new_rank= np.zeros((len(attribute),1), np.int) for i in range(0, len(rank)): new_rank[sorted_ids[i]]= rank[i] return new_rank rows= np.shape(attributes_data)[0] R= rankorder(attributes_data[:,0]) S= rankorder(attributes_data[:,1]) A= np.zeros((rows), np.float64) A= (R - 1) * (R - 2) * (S - 1) * (S - 2) which for the first 20 and last 20 lines, I get: [[ -490512836 -2014671888 45454500 88877908 168997500 -999033092 234376500 -1459172492 274758300 -1621798592 302597100 -1745619092 323687100 -1807113092 337229100 -1843876292 345487500 -1819378592 339970800 -1782548792]] [[ 269791376 -882944896 -1010138236 -969282796 -132998296 -2128999336 62900136 25346184 1914059608 -1246247072 -2047681696 357533664 -1795623696 1896988000 767556900 757120 2046171488 365504 360674604 499699800 41184000]] In Octave, I have the equivalent script. However, the computed values right at this command line: A= (R - 1) .* (R - 2) .* (S - 1) .* (S - 2) I get these results: Columns 1 through 8: 1.6272e+011 1.0870e+010 4.5454e+007 8.6788e+009 1.6900e+008 7.5909e+009 2.3438e+008 7.1308e+009 Columns 9 through 16: 2.7476e+008 6.9681e+009 3.0260e+008 6.8443e+009 3.2369e+008 6.7828e+009 3.3723e+008 6.7461e+009 Columns 17 through 20: 3.4549e+008 6.7706e+009 3.3997e+008 6.8074e+009 ans = Columns 1 through 8: 4.5648e+009 3.4120e+009 3.2848e+009 3.3257e+009 4.1620e+009 2.1660e+009 6.2900e+007 2.5346e+007 Columns 9 through 16: 1.0504e+010 7.3437e+009 2.2473e+009 3.5753e+008 2.4993e+009 1.8970e+009 7.6756e+008 7.5712e+005 Columns 17 through 21: 6.3411e+009 4.2953e+009 4.6556e+009 4.9970e+008 4.1184e+007 For some reason the computed values in Python are wrong. Any suggestions? In the attached file, the first column corresponds to R variable and the second column corresponds to S variable. Many thanks, Ivan ---------- components: Interpreter Core files: Python_Multiplication.zip messages: 298353 nosy: ivan-marroquin priority: normal severity: normal status: open title: Element wise multiplication issue type: performance versions: Python 3.6 Added file: http://bugs.python.org/file47015/Python_Multiplication.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 09:35:49 2017 From: report at bugs.python.org (Gareth Rees) Date: Fri, 14 Jul 2017 13:35:49 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500039349.03.0.279441401792.issue30919@psf.upfronthosting.co.za> Gareth Rees added the comment: I propose: 1. Ask Richard Oudkerk why in changeset 3b82e0d83bf9 the temporary file is zero-filled and not truncated. Perhaps there's some file system where this is necessary? (I tested HFS+ which doesn't support sparse files, and zero-filling seems not to be necessary, but maybe there's some other file system where it is?) 2. If there's no good reason for zero-filling the temporary file, replace it with a call to os.ftruncate(fd, size). 3. Update the documentation to mention the performance issue when porting multiprocessing code from 2 to 3. Unfortunately, I don't think there's any advice that the documentation can give that will help work around it -- monkey-patching works but is not supported. 4. Consider writing a fix, or at least a supported workaround. Here's a suggestion: update multiprocessing.sharedctypes and multiprocessing.heap so that they use anonymous maps in the 'fork' context. The idea is to update the RawArray and RawValue functions so that they take the context, and then pass the context down to _new_value, BufferWrapper.__init__ and thence to Heap.malloc where it can be used to determine what kind of Arena (file-backed or anonymous) should be used to satisfy the allocation request. The Heap class would have to have to segregate its blocks according to what kind of Arena they come from. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 09:50:30 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 14 Jul 2017 13:50:30 +0000 Subject: [issue30913] IDLE: Document tk Vars, attributes, methods by tab page In-Reply-To: <1499890251.06.0.648387967688.issue30913@psf.upfronthosting.co.za> Message-ID: <1500040230.93.0.462131484384.issue30913@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Did you want me to do other PRs for this? I had intended that one to be the first and I would complete more information on a subsequent PR, but you've added a lot of info. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 10:03:36 2017 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 14 Jul 2017 14:03:36 +0000 Subject: [issue30930] Element wise multiplication issue In-Reply-To: <1500038475.92.0.561127078607.issue30930@psf.upfronthosting.co.za> Message-ID: <1500041016.17.0.244895853607.issue30930@psf.upfronthosting.co.za> Mark Dickinson added the comment: This is really a question for a NumPy mailing list, not for the Python bug tracker. But the answer is that you're doing computations using 32-bit integers, and those computations overflow, leading to the odd results you're seeing. It looks as though your Octave computation is performed using floats, hence the different results. Closing here: this isn't a bug (not even a NumPy bug, I'm afraid), and it's unrelated to core Python. ---------- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 10:19:37 2017 From: report at bugs.python.org (Matthias Kievernagel) Date: Fri, 14 Jul 2017 14:19:37 +0000 Subject: [issue22810] tkinter: "alloc: invalid block:" after askopenfilename In-Reply-To: <1415316246.92.0.943780326563.issue22810@psf.upfronthosting.co.za> Message-ID: <1500041977.27.0.122519438424.issue22810@psf.upfronthosting.co.za> Changes by Matthias Kievernagel : ---------- nosy: +mkiever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 11:20:59 2017 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 14 Jul 2017 15:20:59 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers In-Reply-To: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> Message-ID: <1500045659.02.0.813359318141.issue30907@psf.upfronthosting.co.za> Mark Dickinson added the comment: > On other hand, this optimization already is implemented for integers, strings, bytes and slices. Probably for good reasons, though, that don't necessarily apply to general containers / other objects. I can see the possible value for strings and bytes, where filtering on a particular value might involve a good number of `s == s` comparisons (especially given string interning). Similarly, I could believe that small integer caching means that `0 == 0` or `1 == 1` comparisons happen often enough to make the 'is' optimisation worth it. I'm a bit bemused by the slice case, though. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 12:09:07 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 14 Jul 2017 16:09:07 +0000 Subject: [issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously In-Reply-To: <1474986403.83.0.165864194914.issue28287@psf.upfronthosting.co.za> Message-ID: <1500048547.9.0.761533490091.issue28287@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Is the main goal to just make Popen.__init__ non-blocking? If not, #1191964 aims at providing non-blocking reads/writes (including on Windows). ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 12:44:08 2017 From: report at bugs.python.org (Jaume) Date: Fri, 14 Jul 2017 16:44:08 +0000 Subject: [issue30931] Race condition in asyncore wrongly closes channel Message-ID: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> New submission from Jaume: If a socket is closed and polled here https://github.com/python/cpython/blob/0d0a32fb91cdfea1626e6c6b77a9bc44e15a2b8a/Lib/asyncore.py#L183 the flag returned will be select.POLLNVAL (note that this can happen despite dispatcher.close() being called). This wouldn't be a problem but before here https://github.com/python/cpython/blob/0d0a32fb91cdfea1626e6c6b77a9bc44e15a2b8a/Lib/asyncore.py#L185 a new socket may be created with the same fd (which wouldn't be strange since that fd is now available), so the retrieved socket will be the newly created one instead of the old one and the new one will be close. This is regularly happening to us, I could try to explain better, but that's really it. ---------- messages: 298359 nosy: walkhour priority: normal severity: normal status: open title: Race condition in asyncore wrongly closes channel versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 12:44:47 2017 From: report at bugs.python.org (Jaume) Date: Fri, 14 Jul 2017 16:44:47 +0000 Subject: [issue30931] Race condition in asyncore wrongly closes channel In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1500050687.31.0.362366458526.issue30931@psf.upfronthosting.co.za> Changes by Jaume : ---------- type: -> resource usage versions: +Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 12:44:48 2017 From: report at bugs.python.org (Tim Peters) Date: Fri, 14 Jul 2017 16:44:48 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers In-Reply-To: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> Message-ID: <1500050688.09.0.687082073595.issue30907@psf.upfronthosting.co.za> Tim Peters added the comment: Ya, prior to now ;-) there's generally been some cost-benefit thought given to these things. Strings and ints are immutable and some values of each are uniquely interned, so the case of identity is more than just plausible. It happens often. I'd guess that the bytes object inherited the identity check when old string code was edited to create the bytes type. The case there is dubious: as I recall, the only bytes object that's interned is the empty bytes object. The `slice` object is a hoot. They may never be compared outside of unit tests ;-) The code itself is baffled by what it's doing: """ static PyObject * slice_richcompare(PyObject *v, PyObject *w, int op) { ... if (v == w) { /* XXX Do we really need this shortcut? There's a unit test for it, but is that fair? */ ... """ It doesn't really care about speed: if v != w, the code goes on to allocate two temporary 3-tuples, copy the slices' data into them, call PyObject_RichCompare() to compare the tuples, then free the temporary 3-tuples. Slow. Its advantage is that it's "obviously correct". A related example: for lists, there's an early special case for EQ and NE when the lengths of the lists differ (if lists aren't the same length, they can't be equal). However, tuple comparison deliberately omits that special case: while tuple comparison is quite common in some programs (e.g., lots of programs sort large lists of tuples, or index large mappings by tuples), I never found real code that compared tuples of different lengths. So long as that's so, checking for that case is a pure waste of code, time, and HW resources. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 12:48:25 2017 From: report at bugs.python.org (Jaume) Date: Fri, 14 Jul 2017 16:48:25 +0000 Subject: [issue30931] Race condition in asyncore wrongly closes channel In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1500050905.69.0.389649564878.issue30931@psf.upfronthosting.co.za> Changes by Jaume : ---------- pull_requests: +2771 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 12:50:29 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 16:50:29 +0000 Subject: [issue30913] IDLE: Document tk Vars, attributes, methods by tab page In-Reply-To: <1499890251.06.0.648387967688.issue30913@psf.upfronthosting.co.za> Message-ID: <1500051029.61.0.860079877702.issue30913@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If you have more annotations to add now, go ahead and I will review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 13:17:04 2017 From: report at bugs.python.org (Nir Soffer) Date: Fri, 14 Jul 2017 17:17:04 +0000 Subject: [issue30931] Race condition in asyncore wrongly closes channel In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1500052624.56.0.0184250374857.issue30931@psf.upfronthosting.co.za> Nir Soffer added the comment: Can you provide a minimal reproducer, or best add a failing test? ---------- nosy: +Nir Soffer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 13:33:35 2017 From: report at bugs.python.org (ethn) Date: Fri, 14 Jul 2017 17:33:35 +0000 Subject: [issue30932] Identity comparison ("is") fails for floats in Python3 but works in Python2 Message-ID: <1500053615.55.0.91386955415.issue30932@psf.upfronthosting.co.za> New submission from ethn: The identity comparison fails in floats in Python3. >>> -7.3 is -7.3 False While in Python2 >>> -7.3 is -7.3 True ---------- components: Interpreter Core messages: 298363 nosy: ethn priority: normal severity: normal status: open title: Identity comparison ("is") fails for floats in Python3 but works in Python2 type: behavior versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 13:40:38 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 14 Jul 2017 17:40:38 +0000 Subject: [issue30932] Identity comparison ("is") fails for floats in Python3 but works in Python2 In-Reply-To: <1500053615.55.0.91386955415.issue30932@psf.upfronthosting.co.za> Message-ID: <1500054038.51.0.0345178499527.issue30932@psf.upfronthosting.co.za> Steven D'Aprano added the comment: This is not a bug. Whether Python allocates one, or two, float objects for a particular floating point value is dependent on the implementation and not a language guarantee. The language does not promise that two floats with the value 7.3 will be the same object, only that they are equal. In Python 3.5 on Linux, I can see: py> 7.3 is 7.3 True py> x = 7.3 py> y = 7.3 py> x is y False *but your results may be different*. There is no language promise here, except that `x is x` must be true. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 13:53:05 2017 From: report at bugs.python.org (Malcolm Smith) Date: Fri, 14 Jul 2017 17:53:05 +0000 Subject: [issue23674] super() documentation isn't very clear In-Reply-To: <1426448451.56.0.492486239807.issue23674@psf.upfronthosting.co.za> Message-ID: <1500054785.5.0.118273225768.issue23674@psf.upfronthosting.co.za> Malcolm Smith added the comment: I agree that the first two paragraphs are confusing. It's clearly not true to say "The search order is same as that used by getattr() except that the type itself is skipped", because as noted above, everything *earlier* than the type in the MRO is also skipped. The second paragraph then goes on to imply that super() uses the MRO of its first argument, which contradicts the first paragraph, and apparently isn't true either. Raymond explained the actual behavior quite clearly in his comment of 2015-03-15 21:34, and that's what the documentation should do as well. ---------- nosy: +Malcolm Smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 14:06:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 18:06:56 +0000 Subject: [issue30874] unittest execute tests twice in some conditions In-Reply-To: <1499483029.13.0.269254590088.issue30874@psf.upfronthosting.co.za> Message-ID: <1500055616.51.0.677708016506.issue30874@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What invocation conditions? If this only happens with Travis, then this may be a Travis issue. If it only happens with Travis coverage runs, then it might be intentional, or a coverage issue. ---------- nosy: +ezio.melotti, michael.foord, rbcollins, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 14:24:28 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 14 Jul 2017 18:24:28 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500056668.93.0.893298714806.issue30919@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The original changeset in Richard's repository is https://hg.python.org/sandbox/sbt/rev/6c8554a7d068. Unless Richard answers otherwise, I think it's likely the performance degradation was an oversight. Given the code we're talking about is POSIX-specific, truncate() (or its sibling os.ftruncate()) is specified to always zero-fill. So it should be safe to use. Another related point is that the arena file is created inside get_temp_dir(), which allocates something in /tmp. On modern Linux systems at least, /tmp is usually backed by persistent storage. Instead, we could use /run/user/{os.getuid()}, which uses a tmpfs and would therefore save on I/O when later accessing the shared array. ---------- nosy: +pitrou stage: -> needs patch versions: +Python 3.7 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 14:25:23 2017 From: report at bugs.python.org (Bobblehead) Date: Fri, 14 Jul 2017 18:25:23 +0000 Subject: [issue30933] Python not IEEE 754 float compliant for various zero results Message-ID: <1500056723.71.0.547389061619.issue30933@psf.upfronthosting.co.za> New submission from Bobblehead: >>> (-0)**.5 0.0 Should return -0.0 "Except that squareRoot(?0) shall be ?0", IEEE 754-2008, Section 5.4.1 >>> 1/(-0.0) Traceback (most recent call last): File "", line 1, in ZeroDivisionError: float division by zero >>> 1/(0.0) Traceback (most recent call last): File "", line 1, in ZeroDivisionError: float division by zero Should return -inf, and inf respectively. "For division, when the divisor is zero and the dividend is a finite non-zero number, the sign of the infinity is the exclusive OR of the operands? signs", IEEE 754-2008, Section 7.3 ---------- components: Interpreter Core messages: 298368 nosy: Bobblehead priority: normal severity: normal status: open title: Python not IEEE 754 float compliant for various zero results type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 14:32:33 2017 From: report at bugs.python.org (Bobblehead) Date: Fri, 14 Jul 2017 18:32:33 +0000 Subject: [issue30933] Python not IEEE 754 float compliant for various zero operations In-Reply-To: <1500056723.71.0.547389061619.issue30933@psf.upfronthosting.co.za> Message-ID: <1500057153.7.0.648889701788.issue30933@psf.upfronthosting.co.za> Changes by Bobblehead : ---------- title: Python not IEEE 754 float compliant for various zero results -> Python not IEEE 754 float compliant for various zero operations _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 14:56:02 2017 From: report at bugs.python.org (Will S) Date: Fri, 14 Jul 2017 18:56:02 +0000 Subject: [issue28053] parameterize what serialization is used in multiprocessing In-Reply-To: <1473454734.41.0.810069156927.issue28053@psf.upfronthosting.co.za> Message-ID: <1500058562.79.0.750573968736.issue28053@psf.upfronthosting.co.za> Will S added the comment: Documentation would be appreciated. I have a project that uses BaseManager, Client, and Listener to create some servers and clients. I would like to update the project to work with Python 3 and would prefer to update the clients and the servers separately (i.e. switch the client to Python 3 while the server is run with Python 2.7). However, BaseManager uses connection.Client which uses connection._ConnectionBase which uses reduction.ForkingPickler without a protocol argument. It seems the default protocol is 3 on Python 3.6 and 2 on Python 2.7 (contrary to the comment above about v2 being used). I just want to set the protocol version to 2 in Python 3.6. Can I do that with the changes added by this patch? I tried creating pickle2reducer.py like this: from multiprocessing.reduction import ForkingPickler, AbstractReducer class ForkingPickler2(ForkingPickler): def __init__(self, *args): if len(args) > 1: args[1] = 2 else: args.append(2) super().__init__(*args) @classmethod def dumps(cls, obj, protocol=2): return ForkingPickler.dumps(obj, protocol) def dump(obj, file, protocol=2): ForkingPickler2(file, protocol).dump(obj) class Pickle2Reducer(AbstractReducer): ForkingPickler = ForkingPickler2 register = ForkingPickler2.register dump = dump and then putting import pickle2reducer multiprocessing.reducer = pickle2reducer.Pickle2Reducer() at the top of my module before import multiprocessing.connection but I still see "ValueError: unsupported pickle protocol: 3" on the server when I connect with a Python 3.6 client. ---------- nosy: +Will S _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 15:00:47 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 14 Jul 2017 19:00:47 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500058847.25.0.421230868864.issue30919@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +2774 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 15:07:41 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 14 Jul 2017 19:07:41 +0000 Subject: [issue30933] Python not IEEE 754 float compliant for various zero operations In-Reply-To: <1500056723.71.0.547389061619.issue30933@psf.upfronthosting.co.za> Message-ID: <1500059261.76.0.730716944628.issue30933@psf.upfronthosting.co.za> R. David Murray added the comment: If I remember correctly, the exceptions adhere to the standard because it gives the option of "signaling" in those cases (but in any case it is the behavior we want). 0.5 is a float, so x**.5 is not the square root. >>> math.sqrt(-0.0) -0.0 I'm closing this but nosying Mark Dickinson, who will correct me if I got anything wrong :) ---------- nosy: +mark.dickinson, r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 15:20:08 2017 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 14 Jul 2017 19:20:08 +0000 Subject: [issue30933] Python not IEEE 754 float compliant for various zero operations In-Reply-To: <1500056723.71.0.547389061619.issue30933@psf.upfronthosting.co.za> Message-ID: <1500060008.11.0.634393782508.issue30933@psf.upfronthosting.co.za> Mark Dickinson added the comment: (-0) ** 0.5 is a power operation, not a square root operation. As such, the relevant part of IEEE 754-2008 is section 9.2.1, "Special values", which says: > pow (?0, y) is +0 for finite y > 0 and not an odd integer For the other cases, in general the philosophy is that we should raise exceptions where an FPE would be signalled, in preference to returning infinities and NaNs. So for example `math.sqrt(-1)` raises a ValueError rather than giving a NaN, and 1.0 / 0.0 raises ZeroDivisionError similarly. Unfortunately we don't have complete consistency here: for example 1e300 * 1e300 gives an infinity instead of raising. But that behaviour has been in the language for a looong time, and it's hard to change without breaking existing code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 15:24:25 2017 From: report at bugs.python.org (Gareth Rees) Date: Fri, 14 Jul 2017 19:24:25 +0000 Subject: [issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes In-Reply-To: <1386241984.18.0.408310965726.issue19896@psf.upfronthosting.co.za> Message-ID: <1500060265.52.0.928296802775.issue19896@psf.upfronthosting.co.za> Gareth Rees added the comment: Patch looks good to me. The test cases are not very systematic (why only int, double, and long long?), but that's not the fault of the patch and shouldn't prevent its being applied. ---------- nosy: +gdr at garethrees.org _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 15:31:21 2017 From: report at bugs.python.org (Antony Lee) Date: Fri, 14 Jul 2017 19:31:21 +0000 Subject: [issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes In-Reply-To: <1386241984.18.0.408310965726.issue19896@psf.upfronthosting.co.za> Message-ID: <1500060681.92.0.742487350522.issue19896@psf.upfronthosting.co.za> Changes by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 16:05:12 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 20:05:12 +0000 Subject: [issue30918] Unable to launch IDLE in windows 7 In-Reply-To: <1499953760.37.0.96893907451.issue30918@psf.upfronthosting.co.za> Message-ID: <1500062712.31.0.432374996928.issue30918@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is a duplicate of #8231. But before I close this, when you do > set in the console (command prompt), what HOME* variables are set and is USERPROFILE? In python, what does >>> from os.path import expanduser >>> expanduser('~') show? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 16:05:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 20:05:48 +0000 Subject: [issue30918] Unable to launch IDLE in windows 7 In-Reply-To: <1499953760.37.0.96893907451.issue30918@psf.upfronthosting.co.za> Message-ID: <1500062748.51.0.429888855555.issue30918@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: -> terry.reedy components: +IDLE type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 16:12:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 20:12:32 +0000 Subject: [issue30920] Sequence Matcher from diff lib is not implementing longest common substring problem correctly In-Reply-To: <1499958355.33.0.434945478304.issue30920@psf.upfronthosting.co.za> Message-ID: <1500063152.19.0.366890606462.issue30920@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- components: +Library (Lib) -Build resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 16:58:07 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 14 Jul 2017 20:58:07 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500065887.19.0.752798579819.issue30919@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Gareth, Dimitar, you may want to take a look at https://github.com/python/cpython/pull/2708 ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 17:59:01 2017 From: report at bugs.python.org (Tiago Filipe Silva) Date: Fri, 14 Jul 2017 21:59:01 +0000 Subject: [issue30660] Lossless Optimization of PNG files In-Reply-To: <1497395488.74.0.644428672228.issue30660@psf.upfronthosting.co.za> Message-ID: <1500069541.06.0.209063274583.issue30660@psf.upfronthosting.co.za> Tiago Filipe Silva added the comment: Sorry for the late reply. I had to deal with stuff. serhiy.storchaka: > What tools did you use, optipng, advpng, pngcrush, pngnq, pngquant, or other? How much space is saved? I had half a crate of whiskey that day so I'm going to say optipng and pngcrush were used and if my recollection is good the saved space was ? 5 to 50 % depending on the file. > Note that some tools remove an information about palette that makes files displaying differently on different platforms and output devises. I am aware of that. But if I understood correctly these files are rendered in documentation, and I don't think they're going to do this in a PlayStation 2. There may be complaints with Windows XP users because I remember for sure that optimized PNG files could not render very well back in those days. haypo: > I suggest to work on Sphinx to propose to implement this optimization on the HTML rendering, maybe with optional external tools. What do you think? Like you I'm very fond of a long-term proper solution and that is, by the way, the solution you deserve. Unfortunately, I do not have the skills for provide that. I can only give the solution you need (which is smaller files). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 18:07:10 2017 From: report at bugs.python.org (ale5000) Date: Fri, 14 Jul 2017 22:07:10 +0000 Subject: [issue30874] unittest execute tests twice in some conditions In-Reply-To: <1499483029.13.0.269254590088.issue30874@psf.upfronthosting.co.za> Message-ID: <1500070030.01.0.957579765016.issue30874@psf.upfronthosting.co.za> ale5000 added the comment: I have setup a simpler one here: https://github.com/ale5000-git/test/tree/master/unittest-1 Just run manually "setup.py test" and you will se the bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 19:14:10 2017 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 14 Jul 2017 23:14:10 +0000 Subject: [issue30842] pyenv activate for bash and tcsh In-Reply-To: <1499110607.19.0.325548288138.issue30842@psf.upfronthosting.co.za> Message-ID: <1500074050.59.0.649596803717.issue30842@psf.upfronthosting.co.za> Vinay Sajip added the comment: This seems reasonable, but scripts written to venvs by e.g. pip hard-code the path to the venv, and this is a stumbling block to relocatability. There is no reason to use the activate scripts except under interactive use - a script installed in a venv should be directly runnable from its bin directory, but that currently won't work if the venv is moved to a new location. Outside of Python I maintain the distlib library which pip uses under the covers to write installed scripts, and I will try to consider a solution which solves the wider problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 19:19:14 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 14 Jul 2017 23:19:14 +0000 Subject: [issue30916] Pre-build OpenSSL and Tcl/Tk for Windows In-Reply-To: <1499899065.59.0.916676241363.issue30916@psf.upfronthosting.co.za> Message-ID: <1500074354.41.0.586185950836.issue30916@psf.upfronthosting.co.za> Steve Dower added the comment: Zach opted out of reviewing right now, so I went ahead and pushed my builds to the GitHub repos so that AppVeyor can run. It built and ran fine (which I'm not surprised about), but it was only 1-2 minutes faster on AppVeyor (which I _am_ surprised about). Tcl/tk/tix take longer than that to build on my dev machine, as does OpenSSL, so I'm not sure how AppVeyor was getting them to build so quickly. But in any case, it is definitely faster now, and I suspect more for our devs than our CI. OpenSSL can also be more easily upgraded, and the entire library is now available via ctypes, so all up I think it's a win (+ssl and hashlib experts in case they disagree). Anyone want to take a look at the change before I merge? ---------- nosy: +alex, christian.heimes, dstufft, gregory.p.smith, janssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 21:19:45 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Jul 2017 01:19:45 +0000 Subject: [issue30934] Document how to run coverage for repository idlelib files. Message-ID: <1500081585.35.0.923637622202.issue30934@psf.upfronthosting.co.za> New submission from Terry J. Reedy: I have been using coverage for a few years. Now that I am (again) not the only one writing IDLE tests (others did 3 and 4 years ago), I should document what I do and in particular the policy decision -- test with 'branch=True' -- and the IDLE-specific excludes: .*# htest # if not _utest: if _htest: ---------- assignee: terry.reedy components: IDLE messages: 298379 nosy: csabella, louielu, terry.reedy, wohlganger priority: normal severity: normal stage: needs patch status: open title: Document how to run coverage for repository idlelib files. type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 22:03:41 2017 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 15 Jul 2017 02:03:41 +0000 Subject: [issue30935] document the new behavior of get_event_loop() Python 3.6 Message-ID: <1500084221.73.0.556830879215.issue30935@psf.upfronthosting.co.za> New submission from Chris Jerdonek: Currently, the Python asyncio.get_event_loop() docs don't say that get_event_loop() returns the currently running event loop when it is called from a coroutine: https://docs.python.org/3/library/asyncio-eventloops.html#asyncio.get_event_loop https://docs.python.org/3/library/asyncio-eventloops.html#asyncio.AbstractEventLoopPolicy.get_event_loop This is new behavior that was introduced in Python 3.6 in this issue: https://github.com/python/asyncio/pull/452 Without this, the docs make it seem like get_event_loop() should return the loop that was last passed to set_event_loop(). This could be added with a "Changed in version 3.6" note. ---------- assignee: docs at python components: Documentation messages: 298380 nosy: chris.jerdonek, docs at python priority: normal severity: normal status: open title: document the new behavior of get_event_loop() Python 3.6 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 22:10:34 2017 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 15 Jul 2017 02:10:34 +0000 Subject: [issue30935] document the new behavior of get_event_loop() in Python 3.6 In-Reply-To: <1500084221.73.0.556830879215.issue30935@psf.upfronthosting.co.za> Message-ID: <1500084634.9.0.606142523907.issue30935@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- title: document the new behavior of get_event_loop() Python 3.6 -> document the new behavior of get_event_loop() in Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 22:11:44 2017 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 15 Jul 2017 02:11:44 +0000 Subject: [issue30935] document the new behavior of get_event_loop() in Python 3.6 In-Reply-To: <1500084221.73.0.556830879215.issue30935@psf.upfronthosting.co.za> Message-ID: <1500084704.02.0.333092741495.issue30935@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- components: +asyncio nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 22:27:18 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Jul 2017 02:27:18 +0000 Subject: [issue30934] Document how to run coverage for repository idlelib files. In-Reply-To: <1500081585.35.0.923637622202.issue30934@psf.upfronthosting.co.za> Message-ID: <1500085638.12.0.423749511355.issue30934@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2775 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 23:50:26 2017 From: report at bugs.python.org (Justin Foo) Date: Sat, 15 Jul 2017 03:50:26 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox In-Reply-To: <1471117947.7.0.659308305751.issue27755@psf.upfronthosting.co.za> Message-ID: <1500090626.21.0.695235909928.issue27755@psf.upfronthosting.co.za> Justin Foo added the comment: Thanks for analysing further, Terry. My original goal was a drop-in replacement for an aspect of IDLE I found quite annoying (on Windows). Unfortunately, my limited playing with tkinter didn't inspire me to go beyond this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 00:28:48 2017 From: report at bugs.python.org (Arnon Sela) Date: Sat, 15 Jul 2017 04:28:48 +0000 Subject: [issue30842] pyenv activate for bash and tcsh In-Reply-To: <1500074050.59.0.649596803717.issue30842@psf.upfronthosting.co.za> Message-ID: Arnon Sela added the comment: Thank you so much for considering this. Both windows and linux based systems provides mechanisms to be dynamic and relative to the path. I wish there would be a way to add such behavior to Python development manifesto and to check in pypi that packages are aligned *Arnon Sela* 214-205-2151 <%2B1-214-205-2151> arnon at acrisel.com www.acrisel.com IT Solutions and Ab Initio Experts -- Notice: from Acrisel: If received in error, please destroy and notify sender, and make no further use, disclosure, or distribution. This email (including attachments) may contain information subject to confidentiality obligations, and sender does not waive confidentiality or privilege. On Fri, Jul 14, 2017 at 6:14 PM, Vinay Sajip wrote: > > Vinay Sajip added the comment: > > This seems reasonable, but scripts written to venvs by e.g. pip hard-code > the path to the venv, and this is a stumbling block to relocatability. > There is no reason to use the activate scripts except under interactive use > - a script installed in a venv should be directly runnable from its bin > directory, but that currently won't work if the venv is moved to a new > location. > > Outside of Python I maintain the distlib library which pip uses under the > covers to write installed scripts, and I will try to consider a solution > which solves the wider problem. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 00:45:55 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 15 Jul 2017 04:45:55 +0000 Subject: [issue30935] document the new behavior of get_event_loop() in Python 3.6 In-Reply-To: <1500084221.73.0.556830879215.issue30935@psf.upfronthosting.co.za> Message-ID: <1500093955.42.0.154172578995.issue30935@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> needs patch versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 01:12:07 2017 From: report at bugs.python.org (Louie Lu) Date: Sat, 15 Jul 2017 05:12:07 +0000 Subject: [issue30874] unittest execute tests twice in some conditions In-Reply-To: <1499483029.13.0.269254590088.issue30874@psf.upfronthosting.co.za> Message-ID: <1500095527.75.0.380513676475.issue30874@psf.upfronthosting.co.za> Louie Lu added the comment: On my MacOS with python 3.5.2 get this result: ? unittest-1 git:(master) ? python3 setup.py test running test running egg_info writing dependency_links to Test_1.egg-info/dependency_links.txt writing top-level names to Test_1.egg-info/top_level.txt writing Test_1.egg-info/PKG-INFO reading manifest file 'Test_1.egg-info/SOURCES.txt' writing manifest file 'Test_1.egg-info/SOURCES.txt' running build_ext running test running egg_info writing dependency_links to Test_1.egg-info/dependency_links.txt writing top-level names to Test_1.egg-info/top_level.txt writing Test_1.egg-info/PKG-INFO reading manifest file 'Test_1.egg-info/SOURCES.txt' writing manifest file 'Test_1.egg-info/SOURCES.txt' running build_ext test_fix_all (test_main.MainTestCase) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.000s with Python 3.7.a0 got this result: ? unittest-1 git:(master) ? /Users/louielu/Python/cpython/python.exe -m unittest . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK I think it will be more like a setting issue, not unittest problem. ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 01:22:38 2017 From: report at bugs.python.org (Louie Lu) Date: Sat, 15 Jul 2017 05:22:38 +0000 Subject: [issue30934] Document how to run coverage for repository idlelib files. In-Reply-To: <1500081585.35.0.923637622202.issue30934@psf.upfronthosting.co.za> Message-ID: <1500096158.13.0.792500422441.issue30934@psf.upfronthosting.co.za> Louie Lu added the comment: After merging this one, I can provide the version of Linux and MacOS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 01:46:31 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Jul 2017 05:46:31 +0000 Subject: [issue30917] IDLE: Add idlelib.config.IdleConf unittest In-Reply-To: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> Message-ID: <1500097591.46.0.244853484066.issue30917@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes, go ahead next with name changes and use of modern features such as sets and comprehensions. Please discuss 'general changes before coding. When we added Linux Modern keys a year ago, I combined two functions into IdleConf.current_colors_and_keys. I suspect that there are other duplications to remove. Except for extensions, current values in default configs should not change, as doing so will break past versions. So using them in tests is good, as it will detect unwanted changes to those files. I hope the list of extensions goes down, but when it does, we can change the tests. ---------- stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 01:52:30 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Jul 2017 05:52:30 +0000 Subject: [issue30934] Document how to run coverage for repository idlelib files. In-Reply-To: <1500081585.35.0.923637622202.issue30934@psf.upfronthosting.co.za> Message-ID: <1500097950.84.0.98849167485.issue30934@psf.upfronthosting.co.za> Terry J. Reedy added the comment: That would be good; I might need to know someday;-). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 02:37:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Jul 2017 06:37:33 +0000 Subject: [issue30929] AttributeErrors after import in multithreaded environment In-Reply-To: <1500033910.01.0.46976407762.issue30929@psf.upfronthosting.co.za> Message-ID: <1500100653.42.0.455073875592.issue30929@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This may be a duplicate of issue30891. But 3.4 is in security fixes only mode. And this issue doesn't look like a security issue. ---------- nosy: +brett.cannon, eric.snow, haypo, larry, ncoghlan, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 04:21:47 2017 From: report at bugs.python.org (Rokas K. (rku)) Date: Sat, 15 Jul 2017 08:21:47 +0000 Subject: [issue22239] asyncio: nested event loop In-Reply-To: <1408557830.66.0.604610139339.issue22239@psf.upfronthosting.co.za> Message-ID: <1500106907.69.0.0486412919598.issue22239@psf.upfronthosting.co.za> Rokas K. (rku) added the comment: I understand rationale for rejection of this issue but i beg to reconsider. Unlike in traditional coroutines (windows fibers / setjmp|longjmp with stack switching) we can not yield from any point of execution. There must be full async-await chain preserved. This basically divides code into two islands - async and non-async. And there seems to be no way to schedule async call from non-async code and get a response. While suggestion to make custom `async def contains()` call is a valid one we can not always do that. Consider the case when we have to do some networking calls in a function that is invoked by non-async library. Naturally it would be simple non-awaited call from which we can not call a coroutine and get a response. And since it is a library calling into our code we can not easily change it. It might even be completely unsuitable change for library in question. I see two solutions to this problem (if i am missing something please point it out): 1. Reentrant loops as suggested in this issue. 2. Allow awaited calls from non-coroutines provided execution is invoked from a coroutine somewhere up the call stack. First one is certainly easier to implement. ---------- nosy: +Rokas K. (rku) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 05:44:14 2017 From: report at bugs.python.org (Alex Corcoles) Date: Sat, 15 Jul 2017 09:44:14 +0000 Subject: [issue7727] xmlrpc library returns string which contain null ( \x00 ) In-Reply-To: <1263758368.94.0.169057465263.issue7727@psf.upfronthosting.co.za> Message-ID: <1500111854.14.0.234165292549.issue7727@psf.upfronthosting.co.za> Changes by Alex Corcoles : ---------- nosy: +Alex Corcoles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 05:44:29 2017 From: report at bugs.python.org (Alex Corcoles) Date: Sat, 15 Jul 2017 09:44:29 +0000 Subject: [issue7727] xmlrpc library returns string which contain null ( \x00 ) In-Reply-To: <1263758368.94.0.169057465263.issue7727@psf.upfronthosting.co.za> Message-ID: <1500111869.34.0.658039910782.issue7727@psf.upfronthosting.co.za> Changes by Alex Corcoles : ---------- versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 05:56:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 15 Jul 2017 09:56:08 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499935227.97.0.797713881706.issue30911@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: It is possible that the change introduced a reference leak. See for example: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.5/builds/49 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 06:17:39 2017 From: report at bugs.python.org (Segev Finer) Date: Sat, 15 Jul 2017 10:17:39 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1500113859.72.0.728885556419.issue30911@psf.upfronthosting.co.za> Segev Finer added the comment: Serhiy's change added tests to test_json, so you can say this unearthed ref leaks rather than introduced them. Probably needs a separate bpo issue and fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 06:43:00 2017 From: report at bugs.python.org (Segev Finer) Date: Sat, 15 Jul 2017 10:43:00 +0000 Subject: [issue30936] json module ref leaks detected by test_json Message-ID: <1500115380.37.0.433383171828.issue30936@psf.upfronthosting.co.za> New submission from Segev Finer: >From builtbots: test_json leaked [4, 4, 4] references, sum=12 test_json leaked [3, 3, 3] memory blocks, sum=9 1 test failed again: test_json Probably unearthed by: https://github.com/python/cpython/pull/2692 https://github.com/python/cpython/pull/2693 ---------- components: Extension Modules messages: 298391 nosy: Segev Finer, haypo, serhiy.storchaka priority: normal severity: normal status: open title: json module ref leaks detected by test_json type: resource usage versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 06:43:26 2017 From: report at bugs.python.org (Segev Finer) Date: Sat, 15 Jul 2017 10:43:26 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1500115406.18.0.76919930507.issue30911@psf.upfronthosting.co.za> Segev Finer added the comment: Created http://bugs.python.org/issue30936 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 06:50:35 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Jul 2017 10:50:35 +0000 Subject: [issue30936] json module ref leaks detected by test_json In-Reply-To: <1500115380.37.0.433383171828.issue30936@psf.upfronthosting.co.za> Message-ID: <1500115835.57.0.661447605116.issue30936@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2776 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 06:52:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Jul 2017 10:52:00 +0000 Subject: [issue30936] json module ref leaks detected by test_json In-Reply-To: <1500115380.37.0.433383171828.issue30936@psf.upfronthosting.co.za> Message-ID: <1500115920.45.0.107472297118.issue30936@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> patch review versions: +Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 07:06:10 2017 From: report at bugs.python.org (Christian Heimes) Date: Sat, 15 Jul 2017 11:06:10 +0000 Subject: [issue30717] str.center() is not unicode aware In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1500116770.48.0.558084132106.issue30717@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: christian.heimes -> components: +Interpreter Core -SSL, Tests, Tkinter nosy: -christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 07:15:31 2017 From: report at bugs.python.org (Evgeny Boytsov) Date: Sat, 15 Jul 2017 11:15:31 +0000 Subject: [issue30929] AttributeErrors after import in multithreaded environment In-Reply-To: <1500033910.01.0.46976407762.issue30929@psf.upfronthosting.co.za> Message-ID: <1500117331.76.0.218213414929.issue30929@psf.upfronthosting.co.za> Evgeny Boytsov added the comment: The same behaviour is reprodusible at ubuntu 16.04 with python 3.5.2. And a colleague of mine said that he was able to reproduce the issue with python 3.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 07:28:57 2017 From: report at bugs.python.org (Larry Hastings) Date: Sat, 15 Jul 2017 11:28:57 +0000 Subject: [issue30929] AttributeErrors after import in multithreaded environment In-Reply-To: <1500033910.01.0.46976407762.issue30929@psf.upfronthosting.co.za> Message-ID: <1500118137.97.0.67738779291.issue30929@psf.upfronthosting.co.za> Larry Hastings added the comment: I'm closing this. It isn't a security issue, so it's not applicable for 3.4. 3.5 is about to close for bugfixes too, so you'd have to work very... quickly. If this applies to 3.6, figure out whether or not it's a duplicate of Issue #30891. If it isn't, please create a new issue, and only flag 3.6+. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 07:58:12 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 15 Jul 2017 11:58:12 +0000 Subject: [issue30836] test_c_locale_coercion fails on AIX In-Reply-To: <1499090256.88.0.435528352442.issue30836@psf.upfronthosting.co.za> Message-ID: <1500119892.51.0.310230680818.issue30836@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +2777 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 08:51:08 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 15 Jul 2017 12:51:08 +0000 Subject: [issue30836] test_c_locale_coercion fails on AIX In-Reply-To: <1499090256.88.0.435528352442.issue30836@psf.upfronthosting.co.za> Message-ID: <1500123068.01.0.547063979461.issue30836@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset f0b6a261bb8cbede42296e0cc70956fb3b9a6cf7 by Nick Coghlan in branch 'master': bpo-30836: fix test_c_locale_coercion on AIX (GH-2713) https://github.com/python/cpython/commit/f0b6a261bb8cbede42296e0cc70956fb3b9a6cf7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 08:52:43 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 15 Jul 2017 12:52:43 +0000 Subject: [issue30836] test_c_locale_coercion fails on AIX In-Reply-To: <1499090256.88.0.435528352442.issue30836@psf.upfronthosting.co.za> Message-ID: <1500123163.03.0.331933921412.issue30836@psf.upfronthosting.co.za> Nick Coghlan added the comment: This particular test passed on the custom AIX buildbot prior to merging (other tests still have issues on AIX, though, so that buildbot remains red overall). ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 10:48:05 2017 From: report at bugs.python.org (Pavel) Date: Sat, 15 Jul 2017 14:48:05 +0000 Subject: [issue30937] csv module examples miss newline='' when opening files Message-ID: <1500130085.47.0.354601054193.issue30937@psf.upfronthosting.co.za> New submission from Pavel: At the very beginning the csv module documentation (https://docs.python.org/3.7/library/csv.html) advises to open files passing newline='' parameter though three examples don't include it: Here are the examples: 1: >>> import csv >>> with open('names.csv') as csvfile: ... reader = csv.DictReader(csvfile) ... for row in reader: ... print(row['first_name'], row['last_name']) ... Eric Idle John Cleese >>> print(row) OrderedDict([('first_name', 'John'), ('last_name', 'Cleese')]) 2: import csv with open('names.csv', 'w') as csvfile: fieldnames = ['first_name', 'last_name'] writer = csv.DictWriter(csvfile, fieldnames=fieldnames) writer.writeheader() writer.writerow({'first_name': 'Baked', 'last_name': 'Beans'}) writer.writerow({'first_name': 'Lovely', 'last_name': 'Spam'}) writer.writerow({'first_name': 'Wonderful', 'last_name': 'Spam'}) 3: with open('example.csv') as csvfile: dialect = csv.Sniffer().sniff(csvfile.read(1024)) csvfile.seek(0) reader = csv.reader(csvfile, dialect) # ... process CSV file contents here ... ---------- assignee: docs at python components: Documentation messages: 298397 nosy: Pavel, docs at python priority: normal severity: normal status: open title: csv module examples miss newline='' when opening files versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 11:44:42 2017 From: report at bugs.python.org (David Rieger) Date: Sat, 15 Jul 2017 15:44:42 +0000 Subject: [issue30938] pdb lacks debugger command to list and show all user-defined variables Message-ID: <1500133482.03.0.381129247764.issue30938@psf.upfronthosting.co.za> New submission from David Rieger: IPython's "who" and "whos" command provide a way to list all user-defined variables and inspect them, respectively. At the moment, a way to work around this would be by either using e.g. "pp locals()" to list all local variables, this would however also display non-user-owned variables which makes the output less readable. Another option would be to open an ipython shell inside the pdb shell, this is however unintuitive, just to achieve such a simple task. pdb should offer a "who" command to list the names of all user-owned variables and a "whos" command to list all variables including their type and the assigned value, as known from ipython. ---------- components: Library (Lib) messages: 298398 nosy: David Rieger priority: normal severity: normal status: open title: pdb lacks debugger command to list and show all user-defined variables type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 11:46:43 2017 From: report at bugs.python.org (Ned Batchelder) Date: Sat, 15 Jul 2017 15:46:43 +0000 Subject: [issue11978] Report correct coverage.py data for tests that invoke subprocesses In-Reply-To: <1304343970.06.0.71963253791.issue11978@psf.upfronthosting.co.za> Message-ID: <1500133603.96.0.727244178629.issue11978@psf.upfronthosting.co.za> Ned Batchelder added the comment: Whoever takes this up next: let me know if I can help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 13:58:49 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Sat, 15 Jul 2017 17:58:49 +0000 Subject: [issue28638] Creating namedtuple is too slow to be used in common stdlib (e.g. functools) In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500141529.11.0.503800557643.issue28638@psf.upfronthosting.co.za> Jelle Zijlstra added the comment: I'm also concerned that the slowness of namedtuple creation is causing people to avoid using it. I can see why we wouldn't want a complicated solution like using Argument Clinic, but it's not clear to me why Serhiy's approach in namedtuple-no-compile.patch was rejected. This approach could provide a speedup for all namedtuple instantiations without complicating the implementation. I wrote a similar implementation in https://github.com/JelleZijlstra/cpython/commit/5634af4ccfd06a2fabc2cc2cfcc9c014caf6f389 and found that it speeds up namedtuple creation, uses less code, and creates only one necessary backwards compatibility break (we no longer have _source). ---------- nosy: +Jelle Zijlstra _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 15:00:48 2017 From: report at bugs.python.org (Daniel Himmelstein) Date: Sat, 15 Jul 2017 19:00:48 +0000 Subject: [issue29636] Specifying indent in the json.tool command In-Reply-To: <1487880356.98.0.87296874253.issue29636@psf.upfronthosting.co.za> Message-ID: <1500145248.74.0.551700446056.issue29636@psf.upfronthosting.co.za> Changes by Daniel Himmelstein : ---------- pull_requests: +2778 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 15:00:48 2017 From: report at bugs.python.org (Daniel Himmelstein) Date: Sat, 15 Jul 2017 19:00:48 +0000 Subject: [issue27413] Add an option to json.tool to bypass non-ASCII characters. In-Reply-To: <1467200969.47.0.983958211319.issue27413@psf.upfronthosting.co.za> Message-ID: <1500145248.88.0.133721883618.issue27413@psf.upfronthosting.co.za> Changes by Daniel Himmelstein : ---------- pull_requests: +2779 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 15:19:13 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 15 Jul 2017 19:19:13 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds Message-ID: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> New submission from Ned Deily: [..]/sphinx/util/compat.py:40: RemovedInSphinx17Warning: sphinx.util.compat.Directive is deprecated and will be removed in Sphinx 1.7, please use docutils' instead. RemovedInSphinx17Warning) The solution is to import Directive directly from docutils. PR to follow for master, needs to be cherrypicked to all maintenance branches and, ideally, all current security-only branches. ---------- assignee: docs at python components: Documentation messages: 298401 nosy: brett.cannon, docs at python, larry, ned.deily priority: normal severity: normal stage: patch review status: open title: Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 15:22:43 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 15 Jul 2017 19:22:43 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds In-Reply-To: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> Message-ID: <1500146563.19.0.83196164028.issue30939@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +2780 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 15:25:59 2017 From: report at bugs.python.org (Larry Hastings) Date: Sat, 15 Jul 2017 19:25:59 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds In-Reply-To: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> Message-ID: <1500146759.49.0.767687164074.issue30939@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +2781 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 15:28:04 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 15 Jul 2017 19:28:04 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds In-Reply-To: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> Message-ID: <1500146884.1.0.139602551593.issue30939@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 50f58163a69abe2f35e91044d1df165ee7bdbb42 by Ned Deily in branch 'master': bpo-30939: Avoid Sphinx deprecation warning in docs build. (#2721) https://github.com/python/cpython/commit/50f58163a69abe2f35e91044d1df165ee7bdbb42 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 16:14:50 2017 From: report at bugs.python.org (Mark Roseman) Date: Sat, 15 Jul 2017 20:14:50 +0000 Subject: [issue9262] IDLE: Use tabbed shell and edit windows In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1500149690.82.0.723222155118.issue9262@psf.upfronthosting.co.za> Mark Roseman added the comment: The ttk Notebook wouldn't be appropriate as it doesn't scale beyond a small (generally fixed) number of tabs, and is missing UI to easily add/delete tabs. There's some discussion of this in earlier comments here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 16:51:11 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 15 Jul 2017 20:51:11 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds In-Reply-To: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> Message-ID: <1500151871.7.0.743394707936.issue30939@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +2782 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 16:56:15 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 15 Jul 2017 20:56:15 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds In-Reply-To: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> Message-ID: <1500152175.79.0.869050445201.issue30939@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset bbd0f423d2a19c6a4a9cda6914fc60b87e17250b by Ned Deily in branch '3.6': bpo-30939: Avoid Sphinx deprecation warning in docs build. (#2721) (#2722) https://github.com/python/cpython/commit/bbd0f423d2a19c6a4a9cda6914fc60b87e17250b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 16:57:59 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 15 Jul 2017 20:57:59 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds In-Reply-To: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> Message-ID: <1500152279.17.0.339625257299.issue30939@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +2783 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 17:01:58 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 15 Jul 2017 21:01:58 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds In-Reply-To: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> Message-ID: <1500152518.37.0.538196209244.issue30939@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset ada3f31365d0634d0cd8eeacfacd98291e34a8cc by Ned Deily in branch '3.5': bpo-30939: Avoid Sphinx deprecation warning in docs build. (#2721) (#2723) https://github.com/python/cpython/commit/ada3f31365d0634d0cd8eeacfacd98291e34a8cc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 17:10:10 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 15 Jul 2017 21:10:10 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds In-Reply-To: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> Message-ID: <1500153010.08.0.933285125465.issue30939@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +2784 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 17:40:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 15 Jul 2017 21:40:30 +0000 Subject: [issue30936] json module ref leaks detected by test_json In-Reply-To: <1500115380.37.0.433383171828.issue30936@psf.upfronthosting.co.za> Message-ID: <1500154830.22.0.474444914814.issue30936@psf.upfronthosting.co.za> STINNER Victor added the comment: On Python 3.6, the leaking test is: test.test_json.test_speedups.TestEncode.test_bad_bool_args ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 18:26:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 15 Jul 2017 22:26:44 +0000 Subject: [issue30836] test_c_locale_coercion fails on AIX In-Reply-To: <1500123163.03.0.331933921412.issue30836@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Thanks for the fix :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 19:14:55 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Jul 2017 23:14:55 +0000 Subject: [issue13802] IDLE Prefernces/Fonts: use multiple alphabets in examples In-Reply-To: <1326756140.29.0.0714084996967.issue13802@psf.upfronthosting.co.za> Message-ID: <1500160495.24.0.208788688188.issue13802@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I made this issue a dependency of #24776, which is about redoing the whole font page. The fontchooser has good, inappropriate for IDLE, and bad points. I consider it an alternate mockup proposal for the font page. For this issue: displaying each font name in the font is cute, but I am not sure I want to imitate. I address the sample selection below. This issue is about making it evident that IDLE is a BMP unicode editor, not just an ASCII editor; and about showing the consequence of font choices on a particular OS and machine. Expanding the static sample with example of the top N scripts, with N about 10, will do this. When I looked at Francis's patch, I thought it deficient in that people would not know what chars were being replaced by boxes. Then I tried the patch and none of them were. At least not on Windows. Since I opened this, we added back the Help button. Added help text for this tab can list the scripts represented in the sample. If nothing else, I will use this patch, as it improves of the status quo. I should have done this years ago. An immediate improvement would be all chars from a script on one line and some (more?) hanji/kanji CJK chars. #24776 suggests putting the sample beside the font selection box. The font box only needs 75% of the width it has. With the frame around the sample label removed, there may be more width available. There will certainly be more lines. Louie, I understand your PR to be a suggestion about pangrams, expressed in code, to be 'pulled' into my mind, and possibly into my clone, and not a request to merge as is with only Chinese. Others have noted that submitting work-in-progess patches as PRs, rather than as diffs to the tracker, can be confusing. Yet it makes review easy. In considering the idea, I looked at https://en.wikipedia.org/wiki/Pangram and also found http://clagnut.com/blog/2380/, which lists pangrams in multiple languages that were once on wiki/List_of_Pangrams. I am rejecting the idea as is for multiple related reasons. The sample is about scripts, not languages. Long phrases mean fewer scripts. Many scripts are used for multiple dialects or even languages. Which one to choose? An innocent or poetic phrase in one language may be less innocent in another dialect/language, or if interpreted metaphorically, or one consider possible alternate meanings of words. One thing I would consider is script names written in the script. This would replace an arbitrary sample from the same script and could be done on a script-by-script basis. I believe 'devanagari' in Devanagari should be intelligible in all or most north Indian languages that use Devanagari or derivatives thereof, and offensive in none. But I would enquire. What do others think of this? Louie, I presume 'hanji' is a single char. How about using the stroke pangram ? (all basic strokes) in a phrase such as 'hanji character ?'? (I like the look of the char as well). Serhiy, is there one non-controversial pan-slavic way to write 'Cyrillic' in Cyrillic? Or controversy-engendering national variations? A separate issue could add a button and dropdown multiple selection list to print to an output window all or a selection of the 256 blocks of 256 codepoints in the BMP. This should eliminate any need for a configuration option. > likely most characters would not be rendered correctly with an arbitrary font A goal of this issue is to let people see such problems where they exist. The fontchooser sample awful. Only couple of ascii and script chars and a small sample of script that changes with each script. It has no knowledge of default characters. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 23:04:09 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Jul 2017 03:04:09 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds In-Reply-To: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> Message-ID: <1500174249.86.0.575428086017.issue30939@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +2785 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 23:06:59 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Jul 2017 03:06:59 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds In-Reply-To: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> Message-ID: <1500174419.66.0.106700563875.issue30939@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 64a9f3d961084819335ea011063eb8cb41733882 by Ned Deily in branch '2.7': bpo-30939: Avoid Sphinx deprecation warning in docs build. (#2721) (#2725) https://github.com/python/cpython/commit/64a9f3d961084819335ea011063eb8cb41733882 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 23:56:16 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jul 2017 03:56:16 +0000 Subject: [issue30784] IDLE: separate editor window and text In-Reply-To: <1498533700.74.0.75769354704.issue30784@psf.upfronthosting.co.za> Message-ID: <1500177376.72.0.624905193898.issue30784@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is at least partly a duplicate of #25036, but until I look at the approach in that patch, versus what I have been thinking of, I cannot tell if this should be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 00:02:09 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jul 2017 04:02:09 +0000 Subject: [issue9262] IDLE: Revise or replace tabbedpages for multi-editor window. In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1500177729.68.0.175655805182.issue9262@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I changed the title again to reflect the actual discussion. #25036 (and #30784) are about extracting an editor component that can be put on a tab. #25032 is about making a top-level with menu that is not tied to a single editor. This issue should stick to tabbed pages. It seems that Notebook would be more suited to the config dialog with a fixed small number of tabs (now 5, possibly 6). I will look at Notebook to see if it is worth using it for the dialog, so as to match ttk widgets on the tabs. For editor windows, this is not a concern. I will see, though, if there is anything worth copying for the main tabbed pages. To identify specific issues for designing a custom tabs set, I looked at Marks pngs, Firefox, Thunderbird, Notepad++, and TortoiseHg Workbench. * Tab shape: I seem to remember top rounded corners imitating standard American paper file folder tabs. This appears to have gone out of style. Rectangles are in. * Active versus Dormant: there should be a visually obvious difference. Bonus points is one can tell which is which when there are only two tabs. Typical choices are white versus gray or white verson color (such as blue). The two grays in the pngs are too close for me. Firefox themes can also make the difference too small. * Close button: Usually always present as X. Background can match tab background or not. Shape of background can be circle or square (possible rounded). On Windows, standard is right end of tab. Is it opposite on Mac? Notepad++ omits, I presume to avoid space wastage. Adding on mouseover is an interesting idea; I want to see how it feels in actual use. * Mouse over tab: Full tab name appears in tool tip. For editor, this is full path for file. Dormant tabs should change appearance. The result for the 'in-between state should look 'in-between' and not somehow look less like active. * Mouse over close: Background changes color, exposing shape if hidden. * Over-crowding: tabs may start same size or adjust for file name. Tabs may shrink horizontally to a minimum or not. When tabs collectively do not fit, a tab or tabs with < and > appearing seems normal. Firefox puts them at opposite ends of the tab bar. Notepad++ together to the right. This is better for scanning back and forth. A dropdown list is an interesting idea, again to be tried out. * Tab context menu: always different from that of the page. Contents of each vary. * New tab button: Open empty editor file. Possible enhancement after basic work is done: use the current ttk style to style the future tabbedpages widget. ---------- title: IDLE: Use tabbed shell and edit windows -> IDLE: Revise or replace tabbedpages for multi-editor window. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 00:07:38 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jul 2017 04:07:38 +0000 Subject: [issue30934] Document how to run coverage for repository idlelib files. In-Reply-To: <1500081585.35.0.923637622202.issue30934@psf.upfronthosting.co.za> Message-ID: <1500178058.62.0.648824914408.issue30934@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 95bebb7264afad88f31f7cdc3b28bacde7c46f93 by terryjreedy in branch 'master': bpo-30934: Document coverage details for idlelib tests (#2711) https://github.com/python/cpython/commit/95bebb7264afad88f31f7cdc3b28bacde7c46f93 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 00:09:38 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jul 2017 04:09:38 +0000 Subject: [issue30934] Document how to run coverage for repository idlelib files. In-Reply-To: <1500081585.35.0.923637622202.issue30934@psf.upfronthosting.co.za> Message-ID: <1500178178.66.0.170390951117.issue30934@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2786 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 00:27:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jul 2017 04:27:47 +0000 Subject: [issue13802] IDLE Prefernces/Fonts: use multiple alphabets in examples In-Reply-To: <1326756140.29.0.0714084996967.issue13802@psf.upfronthosting.co.za> Message-ID: <1500179267.62.0.034513829148.issue13802@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Serhiy, is there one non-controversial pan-slavic way to write 'Cyrillic' in Cyrillic? No. Even in very close east-slavic languages it is written differently: Ukrainian "????????", Russian "?????????", Belarusian "????????". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 00:29:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jul 2017 04:29:19 +0000 Subject: [issue30936] json module ref leaks detected by test_json In-Reply-To: <1500115380.37.0.433383171828.issue30936@psf.upfronthosting.co.za> Message-ID: <1500179359.04.0.480661622472.issue30936@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 49f6449ef4b81537c19b82329caaf60596c516c2 by Serhiy Storchaka in branch 'master': bpo-30936: Fix a reference leak in json when fail to sort keys. (#2712) https://github.com/python/cpython/commit/49f6449ef4b81537c19b82329caaf60596c516c2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 00:33:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jul 2017 04:33:07 +0000 Subject: [issue30936] json module ref leaks detected by test_json In-Reply-To: <1500115380.37.0.433383171828.issue30936@psf.upfronthosting.co.za> Message-ID: <1500179587.85.0.564923702986.issue30936@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2787 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 00:36:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jul 2017 04:36:36 +0000 Subject: [issue30936] json module ref leaks detected by test_json In-Reply-To: <1500115380.37.0.433383171828.issue30936@psf.upfronthosting.co.za> Message-ID: <1500179796.89.0.393197722409.issue30936@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2788 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 00:40:02 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jul 2017 04:40:02 +0000 Subject: [issue30934] Document how to run coverage for repository idlelib files. In-Reply-To: <1500081585.35.0.923637622202.issue30934@psf.upfronthosting.co.za> Message-ID: <1500180002.04.0.036381510659.issue30934@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 65de1f3672fd0a1e3ec34b654ef5213e15a03e26 by terryjreedy in branch '3.6': [3.6] bpo-30934: Document coverage details for idlelib tests (GH-2711) (#2726) https://github.com/python/cpython/commit/65de1f3672fd0a1e3ec34b654ef5213e15a03e26 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 00:41:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jul 2017 04:41:03 +0000 Subject: [issue30934] Document how to run coverage for repository idlelib files. In-Reply-To: <1500081585.35.0.923637622202.issue30934@psf.upfronthosting.co.za> Message-ID: <1500180063.92.0.668612005437.issue30934@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I generalized the first part so only the .bat file needs a *nix version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 00:42:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jul 2017 04:42:33 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1500180153.51.0.815785510799.issue30911@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2789 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 00:44:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jul 2017 04:44:27 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1500180267.33.0.624244158068.issue30876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 28343e3392ca7b1ec7151f68d4d92c90efb91e50 by Serhiy Storchaka in branch '3.6': [3.6] bpo-30876: Relative import from unloaded package now reimports the package (GH-2639) (#2676) https://github.com/python/cpython/commit/28343e3392ca7b1ec7151f68d4d92c90efb91e50 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 00:48:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jul 2017 04:48:10 +0000 Subject: [issue30936] json module ref leaks detected by test_json In-Reply-To: <1500115380.37.0.433383171828.issue30936@psf.upfronthosting.co.za> Message-ID: <1500180490.73.0.0694011571641.issue30936@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a819e5e1e66a1a5f9a7073c8a1ff3c3f304c917b by Serhiy Storchaka in branch '3.6': [3.6] bpo-30936: Fix a reference leak in json when fail to sort keys. (GH-2712). (#2727) https://github.com/python/cpython/commit/a819e5e1e66a1a5f9a7073c8a1ff3c3f304c917b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 00:50:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jul 2017 04:50:39 +0000 Subject: [issue30936] json module ref leaks detected by test_json In-Reply-To: <1500115380.37.0.433383171828.issue30936@psf.upfronthosting.co.za> Message-ID: <1500180639.45.0.172797302349.issue30936@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 45c471c04553d7e4cb5c328ea1ab02d6716f2bab by Serhiy Storchaka in branch '3.5': [3.5] bpo-30936: Fix a reference leak in json when fail to sort keys. (GH-2712). (#2728) https://github.com/python/cpython/commit/45c471c04553d7e4cb5c328ea1ab02d6716f2bab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 00:51:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jul 2017 04:51:05 +0000 Subject: [issue30911] Warning in _json.c on platforms where char is unsigned In-Reply-To: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> Message-ID: <1500180665.67.0.455613515493.issue30911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3dbe11a1219d148e4a133449a86ac5d157e35d35 by Serhiy Storchaka in branch '2.7': [2.7] bpo-30911: Add tests for bad boolean arguments for accelerated json (GH-2690) (#2729) https://github.com/python/cpython/commit/3dbe11a1219d148e4a133449a86ac5d157e35d35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 01:15:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jul 2017 05:15:26 +0000 Subject: [issue30936] json module ref leaks detected by test_json In-Reply-To: <1500115380.37.0.433383171828.issue30936@psf.upfronthosting.co.za> Message-ID: <1500182126.83.0.752819888537.issue30936@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for opening this issue Segev. Tests added in issue30911 exposed existing leak in 3.5 and 3.6. It was not exposed in 3.7 due to different code for sort_keys. But there was a leak when sorting keys is failed. I added a new test for this case. 2.7 is not affected because C speedup is not implemented for sort_keys in 2.7. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 01:49:40 2017 From: report at bugs.python.org (Ammar Askar) Date: Sun, 16 Jul 2017 05:49:40 +0000 Subject: [issue30937] csv module examples miss newline='' when opening files In-Reply-To: <1500130085.47.0.354601054193.issue30937@psf.upfronthosting.co.za> Message-ID: <1500184180.77.0.594955237841.issue30937@psf.upfronthosting.co.za> Changes by Ammar Askar : ---------- pull_requests: +2790 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 01:50:47 2017 From: report at bugs.python.org (Ammar Askar) Date: Sun, 16 Jul 2017 05:50:47 +0000 Subject: [issue30937] csv module examples miss newline='' when opening files In-Reply-To: <1500130085.47.0.354601054193.issue30937@psf.upfronthosting.co.za> Message-ID: <1500184247.87.0.345730818441.issue30937@psf.upfronthosting.co.za> Changes by Ammar Askar : ---------- keywords: +easy, patch stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 03:15:01 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 16 Jul 2017 07:15:01 +0000 Subject: [issue30466] Tutorial doesn't explain the use of classes In-Reply-To: <1495666720.41.0.650692797283.issue30466@psf.upfronthosting.co.za> Message-ID: <1500189301.41.0.694500704499.issue30466@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Apparently this was committed without my review. ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 03:49:04 2017 From: report at bugs.python.org (Mandeep Singh) Date: Sun, 16 Jul 2017 07:49:04 +0000 Subject: [issue30935] document the new behavior of get_event_loop() in Python 3.6 In-Reply-To: <1500084221.73.0.556830879215.issue30935@psf.upfronthosting.co.za> Message-ID: <1500191344.55.0.486478460631.issue30935@psf.upfronthosting.co.za> Changes by Mandeep Singh : ---------- pull_requests: +2791 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 03:58:14 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Jul 2017 07:58:14 +0000 Subject: [issue23844] test_ssl: fails on recent libressl version with BAD_DH_P_LENGTH In-Reply-To: <1427921613.92.0.742190312016.issue23844@psf.upfronthosting.co.za> Message-ID: <1500191894.6.0.932924500957.issue23844@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset b52c0075511f8330f57c81520ee0287241d3653f by Ned Deily in branch '3.3': bpo-23844: Fix test_dh_params failure https://github.com/python/cpython/commit/b52c0075511f8330f57c81520ee0287241d3653f ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 04:01:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jul 2017 08:01:06 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500192066.49.0.925831526938.issue30919@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The size of file system mounted on "/run/user/${uid}" is limited (only 200 MiB on my computer). get_temp_dir() will be successful, but this may be not enough for allocating large shared array. And it is harder to control by user, because the location is not specified by an environment variable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 04:35:52 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Jul 2017 08:35:52 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500194152.33.0.399556597034.issue30919@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The size of file system mounted on "/run/user/${uid}" is limited (only 200 MiB on my computer) Hmm, you're right. Is /dev/shm ok on your computer? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 04:48:07 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Jul 2017 08:48:07 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1500194887.25.0.759730832557.issue30726@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset ab90986600ba7dea2aa41e5c1773791070725453 by Ned Deily (Victor Stinner) in branch '3.3': [3.3] bpo-29591, bpo-30694: Upgrade Modules/expat to libexpat 2.2.1 (#2164) (#2204) https://github.com/python/cpython/commit/ab90986600ba7dea2aa41e5c1773791070725453 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 04:48:07 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Jul 2017 08:48:07 +0000 Subject: [issue30694] Update embedded copy of expat to 2.2.1 In-Reply-To: <1497754887.58.0.724129384272.issue30694@psf.upfronthosting.co.za> Message-ID: <1500194887.45.0.686341180306.issue30694@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset ab90986600ba7dea2aa41e5c1773791070725453 by Ned Deily (Victor Stinner) in branch '3.3': [3.3] bpo-29591, bpo-30694: Upgrade Modules/expat to libexpat 2.2.1 (#2164) (#2204) https://github.com/python/cpython/commit/ab90986600ba7dea2aa41e5c1773791070725453 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 04:48:07 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Jul 2017 08:48:07 +0000 Subject: [issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472) In-Reply-To: <1487345979.72.0.358826213221.issue29591@psf.upfronthosting.co.za> Message-ID: <1500194887.58.0.0894986465591.issue29591@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset ab90986600ba7dea2aa41e5c1773791070725453 by Ned Deily (Victor Stinner) in branch '3.3': [3.3] bpo-29591, bpo-30694: Upgrade Modules/expat to libexpat 2.2.1 (#2164) (#2204) https://github.com/python/cpython/commit/ab90986600ba7dea2aa41e5c1773791070725453 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 04:55:23 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Jul 2017 08:55:23 +0000 Subject: [issue30797] ./pyconfig.h:1438:0: warning: "_GNU_SOURCE" redefined [enabled by default] In-Reply-To: <1498688645.93.0.221276689872.issue30797@psf.upfronthosting.co.za> Message-ID: <1500195323.41.0.0716287823635.issue30797@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 04:58:34 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Jul 2017 08:58:34 +0000 Subject: [issue30694] Update embedded copy of expat to 2.2.1 In-Reply-To: <1497754887.58.0.724129384272.issue30694@psf.upfronthosting.co.za> Message-ID: <1500195514.96.0.166831614114.issue30694@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- priority: deferred blocker -> resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 05:11:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jul 2017 09:11:49 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500196309.62.0.547711153595.issue30919@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, /dev/shm is ok on my computer. But there is yet one drawback of this patch. Currently the size of shared array is limited by the free space on the file system for temporary files. If it isn't enough you can easy set TMPDIR to other path. In 2.7 and with hardcoded /dev/shm it is limited by the size of physical memory (maybe plus swap). It is not easy to increase it, especially for unprivileged user. The effect of hardcoding /dev/shm can be achieved by setting TMPDIR to /dev/shm. Using os.ftruncate() adds yet about 20% of speed up. This looks mainly as a documentation issue to me. The regression and the workaround should be documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 05:15:26 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Jul 2017 09:15:26 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500196526.64.0.849558861751.issue30919@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The main issue here is to restore performance of 2.7 version. Setting TMPDIR sounds too general and might have impact on other libraries. I think it's ok if shared array size is limited by virtual memory size on the computer, since the whole point is to expose a fast communication channel between processes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 05:24:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jul 2017 09:24:37 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500197077.68.0.486285442857.issue30919@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This can break Python 3 applications that work with shared arrays larger than the size of physical memory. If do this change, it should be optional. Setting TMPDIR=/dev/shm restores performance of 2.7 version even on versions that we will decide to not patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 05:37:31 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Jul 2017 09:37:31 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500197851.1.0.524659904409.issue30919@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Again, setting TMPDIR is a poor workaround as it will impact any library creating temporary files. I haven't found anyone complaining about limited shared array size on 2.7, so likely it's not a common concern. Right now, anyone creating a huge shared array on 3.x will be facing huge performance issues, as the array is backed by disk, so it doesn't sound realistic at all to assume people are doing that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 07:30:04 2017 From: report at bugs.python.org (Roundup Robot) Date: Sun, 16 Jul 2017 11:30:04 +0000 Subject: [issue30938] pdb lacks debugger command to list and show all user-defined variables In-Reply-To: <1500133482.03.0.381129247764.issue30938@psf.upfronthosting.co.za> Message-ID: <1500204604.05.0.125872429908.issue30938@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +2792 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 08:02:59 2017 From: report at bugs.python.org (David Roundy) Date: Sun, 16 Jul 2017 12:02:59 +0000 Subject: [issue23916] module importing performance regression In-Reply-To: <1428782854.88.0.072820618341.issue23916@psf.upfronthosting.co.za> Message-ID: <1500206579.69.0.263426254029.issue23916@psf.upfronthosting.co.za> David Roundy added the comment: Here is a little script to demonstrate the regression (which yes, is still bothering me). ---------- type: -> performance versions: +Python 3.5 Added file: http://bugs.python.org/file47016/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 08:25:45 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Jul 2017 12:25:45 +0000 Subject: [issue23916] module importing performance regression In-Reply-To: <1428782854.88.0.072820618341.issue23916@psf.upfronthosting.co.za> Message-ID: <1500207945.39.0.0423072102879.issue23916@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the reproducer. I haven't changed my mind on the resolution, as it is an extremely unlikely usecase (a directory with 1e8 files is painful to manage with standard command-line tools). I suggest you change your approach, for example you could use a directory hashing scheme to spread the files into smaller subdirectories. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 08:33:51 2017 From: report at bugs.python.org (George King) Date: Sun, 16 Jul 2017 12:33:51 +0000 Subject: [issue25571] Improve the lltrace feature with the Py_Debug mode In-Reply-To: <1446844426.01.0.118649403374.issue25571@psf.upfronthosting.co.za> Message-ID: <1500208431.58.0.429149107239.issue25571@psf.upfronthosting.co.za> George King added the comment: @matrixise, I'm the author of the alternative in issue29400, and I'm finally finding the time to get back into it. I'm going to make a push this week to clean it up; your feedback would be much appreciated! ---------- nosy: +gwk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 09:10:16 2017 From: report at bugs.python.org (Louie Lu) Date: Sun, 16 Jul 2017 13:10:16 +0000 Subject: [issue30934] Document how to run coverage for repository idlelib files. In-Reply-To: <1500081585.35.0.923637622202.issue30934@psf.upfronthosting.co.za> Message-ID: <1500210616.37.0.804044957067.issue30934@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +2794 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 09:11:04 2017 From: report at bugs.python.org (Louie Lu) Date: Sun, 16 Jul 2017 13:11:04 +0000 Subject: [issue30934] Document how to run coverage for repository idlelib files. In-Reply-To: <1500081585.35.0.923637622202.issue30934@psf.upfronthosting.co.za> Message-ID: <1500210664.59.0.235708693583.issue30934@psf.upfronthosting.co.za> Louie Lu added the comment: Upload the Linux/MacOS version of coverage usage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 10:13:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Jul 2017 14:13:30 +0000 Subject: [issue30694] Update embedded copy of expat to 2.2.1 In-Reply-To: <1497754887.58.0.724129384272.issue30694@psf.upfronthosting.co.za> Message-ID: <1500214410.35.0.504942017305.issue30694@psf.upfronthosting.co.za> STINNER Victor added the comment: Yeah! It's nice to see this issue now fixed in all branches! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 10:14:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Jul 2017 14:14:07 +0000 Subject: [issue25571] Improve the lltrace feature with the Py_Debug mode In-Reply-To: <1446844426.01.0.118649403374.issue25571@psf.upfronthosting.co.za> Message-ID: <1500214447.76.0.524123167862.issue25571@psf.upfronthosting.co.za> STINNER Victor added the comment: I still strongly prefer bpo-29400 over "lltrace", since it would be usable in release mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 10:14:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Jul 2017 14:14:47 +0000 Subject: [issue30936] json module ref leaks detected by test_json In-Reply-To: <1500115380.37.0.433383171828.issue30936@psf.upfronthosting.co.za> Message-ID: <1500214487.52.0.323737494383.issue30936@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for the fixes. I checked manually 2.7, 3.5, 3.6 and master branches with "./python -m test -R 3:3 test_json": no more leak! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 10:16:52 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sun, 16 Jul 2017 14:16:52 +0000 Subject: [issue9262] IDLE: Revise or replace tabbedpages for multi-editor window. In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1500214612.88.0.329184112651.issue9262@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: > The way IDLE looks on Mac is what we want on all systems. I added a note to #24826. I'm not sure I understand you. This is what I have on Windows today. Of course, the menu is replicated on each window, but that's an irrelevant detail - it doesn't take that much space, and I use keyboard to access it anyway. What I emphasized is something else: separate windows that can be independently opened, closed, moved and resized. When Raymond needs a few characters more in a line, he just temporarily resizes the window - everything else stays at the same place, ready for return to the previous state. I think it's essential, and I must say I have never seen it in a tabbed interface application. > Do you regularly work on Mac? It would be help if someone were to test PRs on OSX, especially patches intended to change what users see. Even a weekly test of a fresh download from the repository would be helpful. No, sorry. I use Windows at home and Linux at work, I have never worked on a Mac. As I said above, my point was not the position of the main menu, but the ability to position windows where I want them on the screen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 12:16:32 2017 From: report at bugs.python.org (George King) Date: Sun, 16 Jul 2017 16:16:32 +0000 Subject: [issue29400] Add instruction level tracing via sys.settrace In-Reply-To: <1485886852.16.0.854514177291.issue29400@psf.upfronthosting.co.za> Message-ID: <1500221792.36.0.0429121239836.issue29400@psf.upfronthosting.co.za> George King added the comment: After reviewing the thread, I'm reminded that the main design problem concerns preserving behavior of this idiom: "old=sys.gettrace(); ...; sys.settrace(old)" If we add more state, i.e. the `trace_instructions` bool, then the above idiom no longer correctly stores/reloads the full state. Here are the options that I see: 1. New APIs: * `gettrace() -> Callable # no change.` * `settrace(tracefunc: Callable) -> None # no change.` * `gettraceinst() -> Callable # new.` * `settraceinst(tracefunc: Callable) -> None # new.` Behavior: * `settrace()` raises if `gettraceinst()` is not None. * `settraceinst()` raises if `gettrace()` is not None. 2. Add keyword arg to `settrace`. * `gettrace() -> Callable # no change.` * `settrace(tracefunc: Callable, trace_instructions:Optional[bool]=False) -> None # added keyword.` * `gettracestate() -> Dict[str, Any] # new.` Behavior: * `gettracestate()` returns the complete trace-related state: currently, `tracefunc` and `trace_instructions` fields. * `gettrace()` raises an exception if any of the trace state does not match the old behavior, i.e. if `trace_instructions` is set. 3. New API, but with extensible keyword args: * `settracestate(tracefunc: Callable, trace_instructions:Optional[bool]=False) -> None # new.` * `gettracestate() -> Dict[str, Any] # new.` Behavior: * `settrace()` raises if `gettracestate()` is not None. * `settracestate()` raises if `gettrace()` is not None. As I see it: * approach #1 is more conservative because it does not modify the old API. * approach #2 is more extensible because all future features can be represented by the state dictionary. * approach #3 has both of these strengths, but is also the most work. Examples of possible future features via keywords: * branch-level tracing, as briefly disscussed above. * instruction filtering set, which could be a more general version of the branch tracing. I intend to prototype one or both of these, but I'm also feeling a bit of time pressure to get the basic feature on track for 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 12:49:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jul 2017 16:49:26 +0000 Subject: [issue25684] ttk.OptionMenu radiobuttons aren't unique between two instances of OptionMenu In-Reply-To: <1448040288.53.0.198369542776.issue25684@psf.upfronthosting.co.za> Message-ID: <1500223766.86.0.857433553023.issue25684@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 12:51:58 2017 From: report at bugs.python.org (George K) Date: Sun, 16 Jul 2017 16:51:58 +0000 Subject: [issue30940] Documentation for round() is incorrect. Message-ID: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> New submission from George K: The documentation for round states "The return value is an integer if called with one argument, otherwise of the same type as number." This is not the case if the second argument is None. ---------- assignee: docs at python components: Documentation messages: 298442 nosy: George K, docs at python priority: normal severity: normal status: open title: Documentation for round() is incorrect. versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 13:16:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jul 2017 17:16:36 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1500225396.87.0.892603389852.issue30940@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In 3.4 round() doesn't accept None as ndigits argument. The behavior was changed by issue19933 and issue27936. Wasn't this change a mistake? Seems Mark opposed to it. ---------- nosy: +mark.dickinson, rhettinger, serhiy.storchaka, steve.dower versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 13:52:53 2017 From: report at bugs.python.org (INADA Naoki) Date: Sun, 16 Jul 2017 17:52:53 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500227573.7.0.824978891096.issue28638@psf.upfronthosting.co.za> INADA Naoki added the comment: I like your idea. Would you make pull request? ---------- resolution: rejected -> status: closed -> open title: Creating namedtuple is too slow to be used in common stdlib (e.g. functools) -> Optimize namedtuple creation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 14:24:33 2017 From: report at bugs.python.org (=?utf-8?q?Luc_Boug=C3=A9?=) Date: Sun, 16 Jul 2017 18:24:33 +0000 Subject: [issue30941] Missing line in example program Message-ID: <1500229473.42.0.394287716986.issue30941@psf.upfronthosting.co.za> New submission from Luc Boug?: On page , the following program is listed. It raises a syntactic error. An empty line is missing after "... n += val" to close the loop body. >>> # iteration >>> n = 0 >>> for val in values: ... n += val >>> print(n) 504 ---------- assignee: docs at python components: Documentation messages: 298445 nosy: docs at python, lucbouge priority: normal severity: normal status: open title: Missing line in example program type: resource usage versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 15:23:05 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jul 2017 19:23:05 +0000 Subject: [issue30934] Document how to run coverage for repository idlelib files. In-Reply-To: <1500081585.35.0.923637622202.issue30934@psf.upfronthosting.co.za> Message-ID: <1500232985.94.0.229238992999.issue30934@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Cheryl, please try Louie's linux instructions and see if they work on Ubuntu. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 15:33:16 2017 From: report at bugs.python.org (R. David Murray) Date: Sun, 16 Jul 2017 19:33:16 +0000 Subject: [issue30941] Missing line in example program In-Reply-To: <1500229473.42.0.394287716986.issue30941@psf.upfronthosting.co.za> Message-ID: <1500233596.59.0.226457226159.issue30941@psf.upfronthosting.co.za> R. David Murray added the comment: This is the standard way that we write examples. Sprinkling in extra blank lines everywhere would make the examples less readable. One you've learned how the command interpreter works, the examples are clear, so you each beginner only has to learn this once (and I believe it is explained in the tutorial, though I haven't checked). ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed type: resource usage -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 15:38:49 2017 From: report at bugs.python.org (Roundup Robot) Date: Sun, 16 Jul 2017 19:38:49 +0000 Subject: [issue22253] ConfigParser does not handle files without sections In-Reply-To: <1408731768.17.0.221948826268.issue22253@psf.upfronthosting.co.za> Message-ID: <1500233929.08.0.559313459195.issue22253@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +2795 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 15:44:08 2017 From: report at bugs.python.org (Pedro Lacerda) Date: Sun, 16 Jul 2017 19:44:08 +0000 Subject: [issue22253] ConfigParser does not handle files without sections In-Reply-To: <1408731768.17.0.221948826268.issue22253@psf.upfronthosting.co.za> Message-ID: <1500234248.01.0.497883481691.issue22253@psf.upfronthosting.co.za> Pedro Lacerda added the comment: Thank you ???! I just made a pull-request with the relevant bits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 16:14:30 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jul 2017 20:14:30 +0000 Subject: [issue9262] IDLE: Revise or replace tabbedpages for multi-editor window. In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1500236070.17.0.409957320999.issue9262@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Vedran, reread "continue ... with multiple windows". What you describe as 'I have never seen' seems standard for tabbed windows applications. I just verified that FireFox and Edge allow "separate windows that can be independently opened, closed, moved and resized." (To repeat, I will NOT copy Notepad++ in restricting to one windows, which I regard as exceptional.) Firefox also has both features Tal requested in msg110906 "And if you can have several windows, each with several tabs, drag-n-drop moving of tabs between windows is really nice to have, not to mention drag-n-drop reordering of tabs." (Edge does not allow dropping on an existing window). I would like both for IDLE if tk drag-and-drop allows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 17:19:52 2017 From: report at bugs.python.org (Brett Cannon) Date: Sun, 16 Jul 2017 21:19:52 +0000 Subject: [issue23916] module importing performance regression In-Reply-To: <1500207945.39.0.0423072102879.issue23916@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: I agree with Antoine that this shouldn't change. Having said that, it wouldn't be hard to write your own finder using importlib that doesn't get the directory contents and instead checks for the file directly (and you could even set it just for your troublesome directory to get the performance benefit from the default finder). On Sun, Jul 16, 2017, 05:25 Antoine Pitrou, wrote: > > Antoine Pitrou added the comment: > > Thanks for the reproducer. I haven't changed my mind on the resolution, > as it is an extremely unlikely usecase (a directory with 1e8 files is > painful to manage with standard command-line tools). I suggest you change > your approach, for example you could use a directory hashing scheme to > spread the files into smaller subdirectories. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 17:23:52 2017 From: report at bugs.python.org (Brett Cannon) Date: Sun, 16 Jul 2017 21:23:52 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds In-Reply-To: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: I wonder if we should pin sphinx directly instead of the approximate pin we have now to prevent this sort of thing in the future? I had figured they wouldn't introduce a new warning in a bugfix release but I was wrong in that assumption. On Sat, Jul 15, 2017, 12:19 Ned Deily, wrote: > > New submission from Ned Deily: > > [..]/sphinx/util/compat.py:40: RemovedInSphinx17Warning: > sphinx.util.compat.Directive is deprecated and will be removed in Sphinx > 1.7, please use docutils' instead. > RemovedInSphinx17Warning) > > The solution is to import Directive directly from docutils. PR to follow > for master, needs to be cherrypicked to all maintenance branches and, > ideally, all current security-only branches. > > ---------- > assignee: docs at python > components: Documentation > messages: 298401 > nosy: brett.cannon, docs at python, larry, ned.deily > priority: normal > severity: normal > stage: patch review > status: open > title: Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive > in docs builds > versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, > Python 3.7 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 18:10:57 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Sun, 16 Jul 2017 22:10:57 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500243056.99.0.619774128784.issue28638@psf.upfronthosting.co.za> Changes by Jelle Zijlstra : ---------- pull_requests: +2796 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 19:16:36 2017 From: report at bugs.python.org (ale5000) Date: Sun, 16 Jul 2017 23:16:36 +0000 Subject: [issue30874] unittest execute tests twice in some conditions In-Reply-To: <1499483029.13.0.269254590088.issue30874@psf.upfronthosting.co.za> Message-ID: <1500246996.61.0.95514070145.issue30874@psf.upfronthosting.co.za> ale5000 added the comment: @louielu: I have the problem under Windows, and on Travis CI under Linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 20:54:08 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 17 Jul 2017 00:54:08 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500252848.44.0.481332821724.issue28638@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > creates only one necessary backwards compatibility break > (we no longer have _source). IMO, this is an essential feature. It allows people to easily build their own variants, to divorce the generated code from the generator, and to fully understand what named tuples do (that is in part why we get so few questions about how they work). You all seem to be in rush to redesign code that has been stable and well served the needs of users for a very long time. This all seems to be driven by a relentless desire for micro-optimizations regardless of actual need. BTW, none of the new contributors seem to be aware of named tuple's history. It was an amalgamation of many separate implementations that had sprung up in the wild (it was being reinvented many times). It was posted as ASPN recipe and went through a long period of maturation that incorporated the suggestions of over a dozen engineers based on use in the field. It went through further refinement when examined and discussed on the pythoh-dev incorporating reviews from Guido, Alex, and Tim. Since that time, the tools has been broadly deployed and met the needs of enormous numbers of users. Its use is considered a best practice. The code and API have maintained and improved an intentionally slow and careful pace. I really, really do not want to significantly revised the stable code and undermine the premise of its implementation so that you can save a few micro-seconds in the load of some module. That is contrary to our optimization philosophy for CPython. As is, the code is very understandable, easy to maintain, easy to understand, easy to create variants, easy to verify that it is bug free. It works great for CPython, IronPython, PyPy, and Jython without modification. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 23:00:24 2017 From: report at bugs.python.org (Andrew DiPrinzio) Date: Mon, 17 Jul 2017 03:00:24 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1500260424.41.0.511689769048.issue9216@psf.upfronthosting.co.za> Andrew DiPrinzio added the comment: I have been able to use this flag on RHEL and Centos. Is it possible that this has been completed? ---------- nosy: +Andrew DiPrinzio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 23:32:55 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 17 Jul 2017 03:32:55 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1500262375.25.0.722535835359.issue26617@psf.upfronthosting.co.za> Ned Deily added the comment: If it's also reproducible with 3.3, I'd take a 3.3 PR for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 00:42:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Jul 2017 04:42:21 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1500266541.89.0.270426104594.issue26617@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I wait merging PR 2695 for cherry-picking it to 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 01:21:39 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 17 Jul 2017 05:21:39 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500268899.49.0.438302042045.issue28638@psf.upfronthosting.co.za> Nick Coghlan added the comment: I agree with Raymond here - the standard library's startup benchmarks are *NOT* normal code execution paths, since normal code execution is dominated by the actual operation being performed, and hence startup micro-optimizations vanish into the noise. Accordingly, we should *not* be redesigning existing standard interfaces simply for the sake of allowing them to be used during startup without significantly slowing down the interpreter startup benchmark. By contrast, it *is* entirely OK to introduce specialised types specifically for internal use (including during startup), and only making them available at the Python level through the types module (e.g. types.MappingProxyType, types.SimpleNamespace). At the moment, the internal PyStructSequence type used to define sys.flags, sys.version_info, etc *isn't* exposed that way, so efforts to allow the use of namedtuple-style interfaces in modules that don't want to use namedtuple itself would likely be better directed towards making that established type available and usable through the types module, rather than towards altering namedtuple. That approach would have the potential to solve both the interpreter startup optimisation problem (as the "types" module mainly just exposes thing defined by the interpreter implementation, not new Python level classes), *and* provide an alternate option for folks that have pre-emptively decided that namedtuple is going to be "too slow" for their purposes without actually measuring the relative performance in the context of their application. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 01:26:45 2017 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9_Rossi_Korol?=) Date: Mon, 17 Jul 2017 05:26:45 +0000 Subject: [issue30942] Implement lwalk(levelwalk) function on os.py Message-ID: <1500269204.65.0.629378826366.issue30942@psf.upfronthosting.co.za> New submission from Andr? Rossi Korol: I forked cpython and implemented an lwalk function on os.py. The lwalk funtion behaves exactly like walk(), except that it recurses only to a certain level of depth that can be selected by the user. More information on the lwalk function can be found on "os.py" in my cpython fork. It worked fine when I tested the funtion in a local virtual environment, but when I installed Python 3.7 with my lwalk function implemented in os.py I get an error when I try to test it in my recent Python installation: "TypeError: 'NoneType' object is not iterable". I'd like to know where else I need to add info about my lwalk function so it can be correctly used in a fresh Python installation and so than I can send a Pull Request. ---------- components: Library (Lib) files: os.py hgrepos: 369 messages: 298458 nosy: andrekorol priority: normal severity: normal status: open title: Implement lwalk(levelwalk) function on os.py type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file47017/os.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 01:40:34 2017 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9_Rossi_Korol?=) Date: Mon, 17 Jul 2017 05:40:34 +0000 Subject: [issue30942] Implement lwalk(levelwalk) function on os.py In-Reply-To: <1500269204.65.0.629378826366.issue30942@psf.upfronthosting.co.za> Message-ID: <1500270034.22.0.720740428087.issue30942@psf.upfronthosting.co.za> Andr? Rossi Korol added the comment: I forked cpython and implemented an lwalk function on os.py. The lwalk funtion behaves exactly like walk(), except that it recurses only to a certain level of depth that can be selected by the user. More information on the lwalk function can be found on "os.py" in my cpython fork. I'd like to know what else I need to do in order to send a Pull Request. ---------- hgrepos: +370 Added file: http://bugs.python.org/file47018/os.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 01:40:57 2017 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9_Rossi_Korol?=) Date: Mon, 17 Jul 2017 05:40:57 +0000 Subject: [issue30942] Implement lwalk(levelwalk) function on os.py In-Reply-To: <1500269204.65.0.629378826366.issue30942@psf.upfronthosting.co.za> Message-ID: <1500270057.77.0.961179174095.issue30942@psf.upfronthosting.co.za> Changes by Andr? Rossi Korol : ---------- hgrepos: -369 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 01:46:15 2017 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9_Rossi_Korol?=) Date: Mon, 17 Jul 2017 05:46:15 +0000 Subject: [issue30942] Implement lwalk(levelwalk) function on os.py In-Reply-To: <1500269204.65.0.629378826366.issue30942@psf.upfronthosting.co.za> Message-ID: <1500270375.29.0.05479490663.issue30942@psf.upfronthosting.co.za> Andr? Rossi Korol added the comment: UPDATE: I already fixed the cause of the TypeError I mentioned earlier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 01:55:01 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 17 Jul 2017 05:55:01 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds In-Reply-To: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> Message-ID: <1500270901.55.0.428336159058.issue30939@psf.upfronthosting.co.za> Ned Deily added the comment: > I wonder if we should pin sphinx directly instead of the approximate pin we > have now to prevent this sort of thing in the future? Perhaps. OTOH, we will find out about Sphinx incompatibilities pretty quickly that way, rather than having doc builds potentially silently fail or only finding out about the problem at release time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 02:52:06 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 17 Jul 2017 06:52:06 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500274326.2.0.271528358982.issue28638@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 03:17:00 2017 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 17 Jul 2017 07:17:00 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1500275820.45.0.328303262358.issue30940@psf.upfronthosting.co.za> Mark Dickinson added the comment: [Serhiy] > Wasn't this change a mistake? Seems Mark opposed to it. Shrug. It seemed unnecessary to me to explicitly support `None` as a second argument, but it's done now; reverting the change at this point would do more harm than good. So indeed there's a minor inaccuracy in the docs here. I'd suggest replacing the sentence identified with: "The return value is an integer if *ndigits* is omitted or *None*. Otherwise the return value has the same type as *number*." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 03:54:46 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 17 Jul 2017 07:54:46 +0000 Subject: [issue9262] IDLE: Revise or replace tabbedpages for multi-editor window. In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1500278086.63.0.885218972772.issue9262@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: Hm, interesting. Yes, I admit I didn't even know Firefox behaved in such a way, and I have used Firefox for quite a long time. But I'd say it only proves my point. How will users know about it? Also: you probably want, when a user clicks on some file to say "Open with IDLE", for it to open in a new tab. There are experienced users (me included) that want it to open in a new window. Can we get a configuration option? Or at least a command line switch? (Like chrome --new-window.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 04:19:55 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 17 Jul 2017 08:19:55 +0000 Subject: [issue18558] Iterable glossary entry needs clarification In-Reply-To: <1374796651.89.0.668716719647.issue18558@psf.upfronthosting.co.za> Message-ID: <1500279595.27.0.106413871167.issue18558@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: I think this is backwards. "Refusing the temptation to guess" in this case can mean returning True for is_iterable. After all, we can always have something like class Deceptive: def __iter__(self): raise TypeError("I'm not really iterable") and it's not the business of instancecheck to actually iterate (either via __iter__, or __getitem__). Its task is to check whether it has a corresponding attribute (not set to None, per the new convention of explicitly disabling protocols). It could be different if the "old __getitem__ iteration" was deprecated, or at least scheduled to be deprecated, but as far as I can tell, it isn't. (It really should be documented if it were so.) _At least_, the documentation of https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable should be more precise in saying (instead of just "See also the definition of iterable.") something like "Note that the definition of iterable in the glossary is more general than what this method checks, by design / omission / backward compatibility / apathy / whatever." (Ok, the last part might be too much. But it's essential to point out the things are different, and whether it's meant to stay that way.) ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 04:34:41 2017 From: report at bugs.python.org (zaazbb) Date: Mon, 17 Jul 2017 08:34:41 +0000 Subject: [issue30943] printf-style Bytes Formatting sometimes do not worked. Message-ID: <1500280481.09.0.825798695797.issue30943@psf.upfronthosting.co.za> New submission from zaazbb: # works. >>> b'\x00\x08%(amount)b'% {b'amount':b'11111'} b'\x00\x0811111' # not work. >>> b'\x11\x00\x08%(amount)b'% {b'amount':b'11111'} b'\x11\x00\x08%(amount)b' # not work. >>> amount=bytearray(b'000000000010') >>> posnum=bytearray(b'423') >>> date_ =b'170717' >>> time_=b'160006' >>> b'\x02\x03\x13\x9f\x00\x00\x04NULL\x9f\x01\x00\x01\x02\x9f\x03\x00\x0c\xd6\xd0\xb9\xfa\xd2\xf8\xc1\xaa\xb2\xe2\xca\xd4\x9f\x04\x00\x0f307310083980007\x9f\x05\x00\x0814025520\x9f\x14\x00\x0200\x9f\x19\x00\x08\xbd\xbb\xd2\xd7\xb3\xc9\xb9\xa6\x9f\x07\x00\x0803072900\x9f\x08\x00\n0014243000\x9f\t\x00\x08\xbd\xf0\xbf\xa8\xd6\xd0\xd0\xc4\x9f\n\x00\x0800092900\x9f\r\x00\x06000145\x9f\x0e\x00\x06000081\x9f\x10\x00\x0c162246168268\x9f\x11\x00\x08%(date)s\x9f\x12\x00\x06%(time)s\x9f\x02\x00\x0c%(amount)s\x9f\x1b\x00\x040000\x9f\x0b\x00\x13622452*********2994\x9f\x0c\x00\x01S\x9f\x0f\x00\x00\x9f\x13\x00.FK:\xbb\xb7\xd3\xce\xd1\xc7\xcc\xab\xb3\xa9\xcf\xed\xd2\xf8\xc1\xaa\xd3\xc5\xbb\xdd\nZX:promo.unionpay.com\n\x9f\x1f\x00\x03%(posnum)s\x9f\x1a\x00\x00\x9f\xa1\x00\x01\x01\x9f\xa0\x00\x01\x01\x03\x00'% {b'amount': amount,b'date': date_,b'time': time_,b'posnum': posnum} b'\x02\x03\x13\x9f\x00\x00\x04NULL\x9f\x01\x00\x01\x02\x9f\x03\x00\x0c\xd6\xd0\xb9\xfa\xd2\xf8\xc1\xaa\xb2\xe2\xca\xd4\x9f\x04\x00\x0f307310083980007\x9f\x05\x00\x0814025520\x9f\x14\x00\x0200\x9f\x19\x00\x08\xbd\xbb\xd2\xd7\xb3\xc9\xb9\xa6\x9f\x07\x00\x0803072900\x9f\x08\x00\n0014243000\x9f\t\x00\x08\xbd\xf0\xbf\xa8\xd6\xd0\xd0\xc4\x9f\n\x00\x0800092900\x9f\r\x00\x06000145\x9f\x0e\x00\x06000081\x9f\x10\x00\x0c162246168268\x9f\x11\x00\x08%(date)s\x9f\x12\x00\x06%(time)s\x9f\x02\x00\x0c%(amount)s\x9f\x1b\x00\x040000\x9f\x0b\x00\x13622452*********2994\x9f\x0c\x00\x01S\x9f\x0f\x00\x00\x9f\x13\x00.FK:\xbb\xb7\xd3\xce\xd1\xc7\xcc\xab\xb3\xa9\xcf\xed\xd2\xf8\xc1\xaa\xd3\xc5\xbb\xdd\nZX:promo.unionpay.com\n\x9f\x1f\x00\x03%(posnum)s\x9f\x1a\x00\x00\x9f\xa1\x00\x01\x01\x9f\xa0\x00\x01\x01\x03\x00' Environment: Python 3.6.1 Windows 10 64bit. ---------- components: Library (Lib) messages: 298465 nosy: zaazbb priority: normal severity: normal status: open title: printf-style Bytes Formatting sometimes do not worked. type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 04:57:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jul 2017 08:57:11 +0000 Subject: [issue30850] [2.7] bsddb3: test01_basic_replication() of test_bsddb3 fails randomly on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1499181607.72.0.534776800166.issue30850@psf.upfronthosting.co.za> Message-ID: <1500281831.2.0.234205489392.issue30850@psf.upfronthosting.co.za> STINNER Victor added the comment: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%202.7/builds/50 ... test03_ThreadedTransactions (bsddb.test.test_thread.HashThreadedTransactions) ... ok test03_ThreadedTransactions (bsddb.test.test_thread.BTreeThreadedNoWaitTransactions) ... ok test03_ThreadedTransactions (bsddb.test.test_thread.HashThreadedNoWaitTransactions) ... ok testCheckElapsedTime (test.test_bsddb3.TimingCheck) ... beginning 6 repetitions 123456 ...... Berkeley DB 4.7.25: (May 15, 2008) Test path prefix: d:\temp\z-test_bsddb3-4292 XXX: timeout happened beforestartup was confirmed - see issue 3892 test test_bsddb3 failed -- Traceback (most recent call last): File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\bsddb\test\test_lock.py", line 132, in test04_lock_timeout2 self.assertGreaterEqual(end_time-start_time, 0.0999) AssertionError: 0.09599995613098145 not greater than or equal to 0.0999 ok ====================================================================== FAIL: test04_lock_timeout2 (bsddb.test.test_lock.LockingTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\bsddb\test\test_lock.py", line 132, in test04_lock_timeout2 self.assertGreaterEqual(end_time-start_time, 0.0999) AssertionError: 0.09599995613098145 not greater than or equal to 0.0999 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 05:15:52 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 09:15:52 +0000 Subject: [issue30916] Pre-build OpenSSL and Tcl/Tk for Windows In-Reply-To: <1499899065.59.0.916676241363.issue30916@psf.upfronthosting.co.za> Message-ID: <1500282952.78.0.963864161628.issue30916@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 68d663cf85d1ac5eaf83482eed39c0a6f8093601 by Steve Dower in branch 'master': [bpo-30916] Pre-build OpenSSL and Tcl/Tk for Windows (#2688) https://github.com/python/cpython/commit/68d663cf85d1ac5eaf83482eed39c0a6f8093601 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 05:22:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jul 2017 09:22:06 +0000 Subject: [issue30916] Pre-build OpenSSL and Tcl/Tk for Windows In-Reply-To: <1499899065.59.0.916676241363.issue30916@psf.upfronthosting.co.za> Message-ID: <1500283326.97.0.0633591112944.issue30916@psf.upfronthosting.co.za> STINNER Victor added the comment: Failure: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/750 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 05:25:36 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 09:25:36 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500283536.84.0.864612745231.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: The buildbot failures currently being blamed on issue30916 are actually due to this issue - we actually need Python 3.6 on these machines in order to download the new externals, and they don't have it and we can't get it via Powershell. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 05:26:20 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 09:26:20 +0000 Subject: [issue30916] Pre-build OpenSSL and Tcl/Tk for Windows In-Reply-To: <1499899065.59.0.916676241363.issue30916@psf.upfronthosting.co.za> Message-ID: <1500283580.64.0.163501124257.issue30916@psf.upfronthosting.co.za> Steve Dower added the comment: The buildbot failure blamed on this issue is actually due to issue30450 - it's the first time we've added a new external, and so the inability to download Python via Powershell on Windows 7 is the problem, not this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 05:26:35 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 09:26:35 +0000 Subject: [issue30916] Pre-build OpenSSL and Tcl/Tk for Windows In-Reply-To: <1499899065.59.0.916676241363.issue30916@psf.upfronthosting.co.za> Message-ID: <1500283595.21.0.173392190918.issue30916@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 05:44:24 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 09:44:24 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500284664.35.0.0798542018883.issue30450@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- pull_requests: +2797 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 05:45:53 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 09:45:53 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500284753.19.0.975548912381.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: My PR adds a small script to use requests.get/urlretrieve with any version of Python to get nuget.exe. Theoretically, we *could* use this to download everything, but I'd rather minimize our exposure to insecure downloads for machines that don't already have Python 3.6 available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 05:56:37 2017 From: report at bugs.python.org (Arie van Wingerden) Date: Mon, 17 Jul 2017 09:56:37 +0000 Subject: [issue30944] Python 32 bit install fails on Windows - BitDefender false positives Message-ID: <1500285397.03.0.674657550132.issue30944@psf.upfronthosting.co.za> New submission from Arie van Wingerden: I discovered that BitDefender somehow blocks part of the installation of Python 3.x on Windows, resulting in a completely broken installation. I found this after having turned my system inside out ... @!#$%^&^%$#@ So solving it is either: deinstall BitDefender exclude files from being marked as a virus Maybe this can be mentioned on the install page? ---------- components: Windows messages: 298472 nosy: Arie van Wingerden, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Python 32 bit install fails on Windows - BitDefender false positives type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 05:59:24 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 17 Jul 2017 09:59:24 +0000 Subject: [issue30944] Python 32 bit install fails on Windows - BitDefender false positives In-Reply-To: <1500285397.03.0.674657550132.issue30944@psf.upfronthosting.co.za> Message-ID: <1500285564.63.0.225681630663.issue30944@psf.upfronthosting.co.za> Louie Lu added the comment: I think BitDefender has some option like "disable 10 mins"? You may disable your antivirus when you are install something you be sure that is trustworthy. Or maybe BitDefender is right, you download a wrong .msi from other place that has been insert something bad, check about md5 about the installer ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 06:04:34 2017 From: report at bugs.python.org (Cecile Tonglet) Date: Mon, 17 Jul 2017 10:04:34 +0000 Subject: [issue30945] loop.create_server does not detect if the interface is IPv6 enabled Message-ID: <1500285874.65.0.183073718331.issue30945@psf.upfronthosting.co.za> New submission from Cecile Tonglet: The IPv6 detection in asyncio.base_events.create_server only detect if IPv6 is available instead of checking if the interface can actually support it. I noticed that by using Python in a Docker container (example code to reproduce in attachment): docker run -it --rm -v /tmp/test_ipv6.py:/src/test_ipv6.py python:3.6 python /src/test_ipv6.py Will result in: Traceback (most recent call last): File "/usr/local/lib/python3.6/asyncio/base_events.py", line 1043, in create_server sock.bind(sa) OSError: [Errno 99] Cannot assign requested address During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/src/test_ipv6.py", line 11, in server = loop.run_until_complete(server_creation) File "/usr/local/lib/python3.6/asyncio/base_events.py", line 466, in run_until_complete return future.result() File "/usr/local/lib/python3.6/asyncio/base_events.py", line 1047, in create_server % (sa, err.strerror.lower())) OSError: [Errno 99] error while attempting to bind on address ('::1', 27015, 0, 0): cannot assign requested address By default Docker containers have only IPv4 enabled: 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever 38: eth0 at if39: mtu 1500 qdisc noqueue state UP group default link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff inet 172.17.0.2/16 scope global eth0 valid_lft forever preferred_lft forever I believe this detection mechanism should rely on the interface requested. I found this on the web for Python 2 that manage to get the info per interface: https://pastebin.com/VEnhF1Ht but it's using an external library. However if you change the hostname to 127.0.0.1 it works normally. ---------- components: asyncio files: test_ipv6.py messages: 298474 nosy: cecton, yselivanov priority: normal severity: normal status: open title: loop.create_server does not detect if the interface is IPv6 enabled type: behavior versions: Python 3.4, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file47019/test_ipv6.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 06:12:51 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 17 Jul 2017 10:12:51 +0000 Subject: [issue9262] IDLE: Revise or replace tabbedpages for multi-editor window. In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1500286371.76.0.484028773535.issue9262@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I suspect that Edit with IDLE would open a new window as it does now, but I don't really know. I don't think that IDLE would have any control. I seldom start IDLE that way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 06:19:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jul 2017 10:19:08 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500286748.8.0.392477625546.issue30450@psf.upfronthosting.co.za> STINNER Victor added the comment: Compilation failed on: * http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/885 * http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/750 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 06:23:10 2017 From: report at bugs.python.org (Arie van Wingerden) Date: Mon, 17 Jul 2017 10:23:10 +0000 Subject: [issue30944] Python 32 bit install fails on Windows - BitDefender false positives In-Reply-To: <1500285564.63.0.225681630663.issue30944@psf.upfronthosting.co.za> Message-ID: Arie van Wingerden added the comment: Hi Louie, 1) no, I definitely used the right installer 2) BitDefender also interferes often when I compile Go programs So, in the end it is a real pain in the neck and I deinstalled it. Maybe other people can live with it, but it has cost me a lot of time in this case and also when developing / compiling other PL's. Still it would be nice if a warning could be placed on the download page (maybe in general to disable AV when installing). Thx! /Arie 2017-07-17 11:59 GMT+02:00 Louie Lu : > > Louie Lu added the comment: > > I think BitDefender has some option like "disable 10 mins"? You may > disable your antivirus when you are install something you be sure that is > trustworthy. > > Or maybe BitDefender is right, you download a wrong .msi from other place > that has been insert something bad, check about md5 about the installer > > ---------- > nosy: +louielu > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 06:25:21 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 10:25:21 +0000 Subject: [issue30808] Use _Py_atomic API for concurrency-sensitive signal state In-Reply-To: <1498766466.5.0.206048898577.issue30808@psf.upfronthosting.co.za> Message-ID: <1500287121.45.0.435657233827.issue30808@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 2c8a5e4c968217f9672340e520942c4ed788d8de by Antoine Pitrou in branch 'master': bpo-30808: Use _Py_atomic API for concurrency-sensitive signal state (#2417) https://github.com/python/cpython/commit/2c8a5e4c968217f9672340e520942c4ed788d8de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 06:25:40 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 10:25:40 +0000 Subject: [issue30808] Use _Py_atomic API for concurrency-sensitive signal state In-Reply-To: <1498766466.5.0.206048898577.issue30808@psf.upfronthosting.co.za> Message-ID: <1500287140.13.0.338101880916.issue30808@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 06:31:54 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 10:31:54 +0000 Subject: [issue30946] readline module has obsolete code Message-ID: <1500287514.28.0.548586494402.issue30946@psf.upfronthosting.co.za> New submission from Antoine Pitrou: The readline module has obsolete code for platforms where GNU readline is older than 2.1 or where select() is not available. ---------- components: Extension Modules messages: 298479 nosy: pitrou priority: low severity: normal stage: needs patch status: open title: readline module has obsolete code type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 06:33:48 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 10:33:48 +0000 Subject: [issue30946] readline module has obsolete code In-Reply-To: <1500287514.28.0.548586494402.issue30946@psf.upfronthosting.co.za> Message-ID: <1500287628.53.0.822948400171.issue30946@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +2798 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 06:53:16 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 10:53:16 +0000 Subject: [issue30946] readline module has obsolete code In-Reply-To: <1500287514.28.0.548586494402.issue30946@psf.upfronthosting.co.za> Message-ID: <1500288796.72.0.317610312939.issue30946@psf.upfronthosting.co.za> Antoine Pitrou added the comment: According to https://ftp.gnu.org/gnu/readline/, GNU readline 2.1 was released in 1997... We could probably even require 5.0 (released in 2004), but it raises the question of which functions are supported by third-party emulations such as libedit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 06:53:25 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 10:53:25 +0000 Subject: [issue30946] readline module has obsolete code In-Reply-To: <1500287514.28.0.548586494402.issue30946@psf.upfronthosting.co.za> Message-ID: <1500288805.97.0.880336225198.issue30946@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 07:33:11 2017 From: report at bugs.python.org (Gareth Rees) Date: Mon, 17 Jul 2017 11:33:11 +0000 Subject: [issue30943] printf-style Bytes Formatting sometimes do not worked. In-Reply-To: <1500280481.09.0.825798695797.issue30943@psf.upfronthosting.co.za> Message-ID: <1500291191.35.0.913346476165.issue30943@psf.upfronthosting.co.za> Gareth Rees added the comment: Test case minimization: Python 3.6.1 (default, Apr 24 2017, 06:18:27) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> b'a\x00%(a)s' % {b'a': b'a'} b'a\x00%(a)s' It seems that all formatting operations after a zero byte are ignored. This is because the code for parsing the format string (in _PyBytes_FormatEx in Objects/bytesobject.c) uses the following approach to find the next % character: while (--fmtcnt >= 0) { if (*fmt != '%') { Py_ssize_t len; char *pos; pos = strchr(fmt + 1, '%'); But strchr uses the C notion of strings, which are terminated by a zero byte. ---------- nosy: +gdr at garethrees.org _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 07:41:39 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 11:41:39 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500291699.69.0.694041559218.issue28638@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I disagree with the rejection of this request. The idea that "_source is an essential feature" should be backed by usage statistics instead of being hand-waved as rejection cause. ---------- nosy: +pitrou resolution: rejected -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 07:46:04 2017 From: report at bugs.python.org (Gareth Rees) Date: Mon, 17 Jul 2017 11:46:04 +0000 Subject: [issue30943] printf-style Bytes Formatting sometimes do not worked. In-Reply-To: <1500280481.09.0.825798695797.issue30943@psf.upfronthosting.co.za> Message-ID: <1500291964.54.0.971983533765.issue30943@psf.upfronthosting.co.za> Gareth Rees added the comment: This was already noted in issue29714 and fixed by Xiang Zhang in commit b76ad5121e2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 07:49:47 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 17 Jul 2017 11:49:47 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1500292187.64.0.598148207337.issue9216@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: @Andrew This has already been implemented downstream for RHEL and centos. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 08:14:45 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 17 Jul 2017 12:14:45 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500293685.4.0.73878591327.issue28638@psf.upfronthosting.co.za> Nick Coghlan added the comment: Folks, you're talking about removing a *public*, *documented* API from the standard library. The onus would thus be on you to prove *lack* of use, *and* provide adequate justification for the compatibility break, not on anyone else to prove that it's "sufficiently popular" to qualify for the standard backwards compatibility guarantees. Those guarantees apply by default and are only broken for compelling reasons - that's why we call them guarantees Don't be fooled by the leading underscore - that's an artifact of how namedtuple avoids colliding with arbitrary field names, not an indicator that this is a private API: https://docs.python.org/3/library/collections.html#collections.somenamedtuple._source "It would be faster" isn't adequate justification, since speed increases only matter in code that has been identified as a bottleneck, and startup time in general (let alone namedtuple definitions in particular) is rarely the bottleneck. So please, just stop, and find a more productive way of expending your energy (such as by making PyStructSequence available via the "types" module, since that also allows for C level micro-optimizations when *used*, not just at definition time). ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 08:19:03 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 12:19:03 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500293943.25.0.366423671207.issue28638@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Nick, can you stop closing an issue where the discussion hasn't been settled? This isn't civil. ---------- resolution: rejected -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 08:21:40 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 17 Jul 2017 12:21:40 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500294100.76.0.979614692717.issue28638@psf.upfronthosting.co.za> Nick Coghlan added the comment: There's a path for escalation when you disagree with the decision of a module/API maintainer (in this case, Raymond): bringing the issue closure up on python-dev for wider discussion. It *isn't* repeatedly reopening the issue after they have already made their decision and attempting to pester them into changing their mind. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 08:22:42 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 17 Jul 2017 12:22:42 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500294162.39.0.292397491736.issue28638@psf.upfronthosting.co.za> Nick Coghlan added the comment: So unless and until he gets overruled by Guido, Raymond's decision to reject the proposed change stands. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 08:23:04 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 12:23:04 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500294184.27.0.0163744370663.issue28638@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Just because I disagree with you doesn't mean I'm pestering anyone. Can you stop being so obnoxious? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 08:28:41 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 17 Jul 2017 12:28:41 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500294521.64.0.764217491824.issue28638@psf.upfronthosting.co.za> Nick Coghlan added the comment: Check the issue history - the issue has been rejected by Raymond, and then reopened for further debate by other core developers multiple times. That's not a reasonable approach to requesting reconsideration of a module/API maintainers design decision. I acknowledge that those earlier reopenings weren't by you, but the issue should still remain closed until *Raymond* agrees to reconsider it (and given the alternative option of instead making the lower overhead PyStructSequence visible at the Python level, I'd be surprised if he does). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 08:33:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jul 2017 12:33:51 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500294831.25.0.819011806412.issue28638@psf.upfronthosting.co.za> STINNER Victor added the comment: Sorry, I don't have much data at this point, but it's not the first time that I noticed that namedtuple is super slow. We have much more efficient code like structseq in C. Why not reusing it at least in our stdlib modules? About the _source attribute, honestly, I'm not aware of anyone using it. I don't think that the fact that a *private* attribute is document should prevent it to make Python faster. I already noticed the _source attribute when I studied the Python memory usage. See my old isuse #19640: "Drop _source attribute of namedtuple (waste memory)", I later changed the title to "Dynamically generate the _source attribute of namedtuple to save memory)". About "Python startup time doesn't matter", this is just plain wrong. Multiple core developers spent a lot of time on optimizing exactly that. Tell me if you really need a long rationale to work on that. While I'm not sure about Naoki's exact optimization, I agree about the issue title: "Optimize namedtuple creation", and I like the idea of keeping the issue open to find a solution. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 08:40:03 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 17 Jul 2017 12:40:03 +0000 Subject: [issue30942] Implement lwalk(levelwalk) function on os.py In-Reply-To: <1500269204.65.0.629378826366.issue30942@psf.upfronthosting.co.za> Message-ID: <1500295203.42.0.846252931279.issue30942@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for being interested in improving Python. Please join the discussion in the existing issue 26781, which proposes a max_depth parameter for walk. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> os.walk max_depth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 08:42:48 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 17 Jul 2017 12:42:48 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500295368.34.0.740886038778.issue28638@psf.upfronthosting.co.za> Nick Coghlan added the comment: Yes, I'm saying you need a really long justification to explain why you want to break backwards compatibility solely for a speed increase. For namedtuple instances, the leading underscore does *NOT* indicate a private attribute - it's just there to avoid colliding with field names. Speed isn't everything, and it certainly isn't adequate justification for breaking public APIs that have been around for years. Now, you can either escalate that argument to python-dev, and try to convince Guido to overrule Raymond on this point, *or* you can look at working out a Python level API to dynamically define PyStructSequence subclasses. That won't be entirely straightforward (as my recollection is that structseq is designed to build on static C structs), but if you're successful, it will give you something that should be faster than namedtuple in every way, not just at definition time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 08:47:37 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 17 Jul 2017 12:47:37 +0000 Subject: [issue30934] Document how to run coverage for repository idlelib files. In-Reply-To: <1500081585.35.0.923637622202.issue30934@psf.upfronthosting.co.za> Message-ID: <1500295657.96.0.714509163147.issue30934@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I tried out the instructions. I guess my first question is how stand alone these instructions are and how much you expect someone to already know about coverage. What I mean is, I needed to go to the devguide to read more about coverage in order to run the steps here. For example, the devguide suggests creating a venv before running pip install coverage. If I do that and go into the venv, then I could do (with python instead of ./python): python -m coverage run --source Lib/idlelib Lib/idlelib/idle_test/test_config.py python -m coverage report python -m coverage html Those steps seem to work. Without the venv, ./python -m coverage doesn't work without the pip install (I get the 'No module named coverage' error). At some point (as per the devguide), I had also downloaded the in-development version, so I am able to run ./python ../coveragepy run --source Lib/idlelib Lib/idlelib/idle_test/test_config.py At the time, the devguide suggested the in development version because it was more recent for 3.7 than the released version was, but it seems that the version on pip is the most current now. Just like everything else, it seems that there are a few ways to go with this, but the venv with pip install seems to be the most foolproof. I don't know if you'd also want to include instructions for running coverage over all of idle_test instead of just one module. (without the ./python) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 08:51:48 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 17 Jul 2017 12:51:48 +0000 Subject: [issue18558] Iterable glossary entry needs clarification In-Reply-To: <1374796651.89.0.668716719647.issue18558@psf.upfronthosting.co.za> Message-ID: <1500295908.3.0.045037365791.issue18558@psf.upfronthosting.co.za> R. David Murray added the comment: No, refusing to guess in this case is to believe the class's declaration that it is an iterable if (and only if) it defines __iter__, which is the modern definition of iterable. If that doesn't work when the object is iterated, that's a bug in the class claiming to be an iterable when it isn't. The confusion here is the existence of the older iteration protocol. As you say, the documentation can use some improvement. Eventually someone will submit a proposal in the form of a PR and we can hammer out the exact wording. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 08:55:04 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 17 Jul 2017 12:55:04 +0000 Subject: [issue30943] printf-style Bytes Formatting sometimes do not worked. In-Reply-To: <1500280481.09.0.825798695797.issue30943@psf.upfronthosting.co.za> Message-ID: <1500296104.7.0.460503138104.issue30943@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> out of date stage: -> resolved status: open -> closed superseder: -> can't interpolate byte string with \x00 before replacement identifier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 08:55:10 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 12:55:10 +0000 Subject: [issue30944] Python 32 bit install fails on Windows - BitDefender false positives In-Reply-To: <1500285397.03.0.674657550132.issue30944@psf.upfronthosting.co.za> Message-ID: <1500296110.88.0.753518071064.issue30944@psf.upfronthosting.co.za> Steve Dower added the comment: The best response is to notify Bitdefender so they can fix their signatures. Python is commonly used in malware, and so some parts of it are often misidentified as unique to some detected virus. By reporting the name of the virus and providing the actual file to Bitdefender, they can fix their signatures and provide an update. Most AV companies provide a specific email address for false positives. Feel free to email them, or provide enough information here (including their email address) and someone else can forward it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 08:55:30 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 12:55:30 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500296130.97.0.542023825436.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 588836d3e646c2bcb3473cda7c5f6a1e0ff2c2e9 by Steve Dower in branch 'master': bpo-30450: Adds alternate download approach for nuget.exe (#2737) https://github.com/python/cpython/commit/588836d3e646c2bcb3473cda7c5f6a1e0ff2c2e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:00:06 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 13:00:06 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500296406.43.0.916369259056.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: Compilation still fails, as some of the buildbots don't have py.exe either. At this stage, our choices are either to fix the buildbots, most easily by copying py.exe into PATH, or to check nuget.exe (4MB) into the source repository. (I guess we can cover a few more % of cases by checking in py.exe, but that still won't get us 100%) Any preferences? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:00:15 2017 From: report at bugs.python.org (Gareth Rees) Date: Mon, 17 Jul 2017 13:00:15 +0000 Subject: [issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes In-Reply-To: <1386241984.18.0.408310965726.issue19896@psf.upfronthosting.co.za> Message-ID: <1500296415.94.0.407875855553.issue19896@psf.upfronthosting.co.za> Changes by Gareth Rees : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:01:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jul 2017 13:01:03 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500296463.44.0.260677862524.issue28638@psf.upfronthosting.co.za> STINNER Victor added the comment: Benchmark comparing collections.namedtuple to structseq, to get an attribute: * Getting an attribute by name (obj.attr): Mean +- std dev: [name_structseq] 24.1 ns +- 0.5 ns -> [name_namedtuple] 45.7 ns +- 1.9 ns: 1.90x slower (+90%) * Getting an attribute by its integer index (obj[0]): (not significant) So structseq is 1.9x faster than namedtuple to get an attribute by name. haypo at speed-python$ ./bin/python3 -m perf timeit -s "from collections import namedtuple; Point=namedtuple('Point', 'x y'); p=Point(1,2)" "p.x" --duplicate=1024 -o name_namedtuple.json Mean +- std dev: 45.7 ns +- 1.9 ns haypo at speed-python$ ./bin/python3 -m perf timeit -s "from collections import namedtuple; Point=namedtuple('Point', 'x y'); p=Point(1,2)" "p[0]" --duplicate=1024 -o int_namedtuple.json Mean +- std dev: 17.6 ns +- 0.0 ns haypo at speed-python$ ./bin/python3 -m perf timeit -s "from sys import flags" "flags.debug" --duplicate=1024 -o name_structseq.json Mean +- std dev: 24.1 ns +- 0.5 ns haypo at speed-python$ ./bin/python3 -m perf timeit -s "from sys import flags" "flags[0]" --duplicate=1024 -o int_structseq.json Mean +- std dev: 17.6 ns +- 0.2 ns --- Getting an attribute by its integer index is as fast as tuple: haypo at speed-python$ ./bin/python3 -m perf timeit --inherit=PYTHONPATH -s "p=(1,2)" "p[0]" --duplicate=1024 -o int_tuple.json ..................... Mean +- std dev: 17.6 ns +- 0.0 ns ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:04:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jul 2017 13:04:28 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500296668.23.0.0402725184124.issue28638@psf.upfronthosting.co.za> STINNER Victor added the comment: > So structseq is 1.9x faster than namedtuple to get an attribute by name. Oops, I wrote it backward: So namedtuple is 1.9x slower than structseq to get an attribute by name. (1.9x slower doesn't mean 1.9x faster, sorry.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:05:05 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 13:05:05 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500296705.81.0.330161428158.issue30450@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If the dependencies are in git, why don't you use "git clone" instead of trying a HTTP fetch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:05:27 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 17 Jul 2017 13:05:27 +0000 Subject: [issue18558] Iterable glossary entry needs clarification In-Reply-To: <1374796651.89.0.668716719647.issue18558@psf.upfronthosting.co.za> Message-ID: <1500296727.07.0.961781079469.issue18558@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: Of course. The Deceptive class was just reductio ad absurdum. I'm all for believing the class through what attributes does it expose. We agree there. Where we don't agree, is _what_ attributes constitute the iteration protocol. You, the source code and the documentation of the collections.abc.Iterable say one thing (__iter__), while I, the current version of Python (at least CPython, but I think other implementations do the same) and the glossary say another thing (__iter__ or __getitem__). [It's not the only protocol consisting of two attributes... e.g. bool protocol also consists of two attributes, __bool__ and __len__ (though it is not optional, so we don't have collections.abc.Boolable).] You seem to say that only the glossary needs fixing. But then we'll be in an even more weird position, where we must say some objects can be iterated, but are not iterables. I'm pretty sure you don't want that. The whole point of "Xable" words (e.g. "callable", as opposed to "function") is that it encompasses everything that can be Xed, not only the first thing that comes to mind (e.g. classes can also be called). Or are you saying that after the glossary is fixed, then we should fix Python by (at least deprecating, if not) forbidding __getitem__ iteration? I'm not sure that this is the consensus. Are you? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:06:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jul 2017 13:06:02 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500296762.52.0.933529936539.issue28638@psf.upfronthosting.co.za> STINNER Victor added the comment: > Speed isn't everything, and it certainly isn't adequate justification for breaking public APIs that have been around for years. What about the memory usage? > See my old issue #19640 (...) msg203271: """ I found this issue while using my tracemalloc module to analyze the memory consumption of Python. On the Python test suite, the _source attribute is the 5th line allocating the most memory: /usr/lib/python3.4/collections/__init__.py: 676.2 kB """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:06:44 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 13:06:44 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500296804.17.0.230046364898.issue30450@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For example "git clone --depth 1 https://github.com/python/cpython-bin-deps --branch openssl-bin-1.0.2k myopenssldir" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:07:50 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 13:07:50 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500296869.99.0.047329976827.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: We can't assume git.exe is available either (build from sdist/hggit/.zip), though I guess we can also use it as a fallback. At least on the buildbots it'll be there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:09:07 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 13:09:07 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500296947.84.0.230923299915.issue30450@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think it's reasonable to mandate the presence of a git install to fetch CPython externals. After all we used to mandate the presence of a svn install... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:17:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jul 2017 13:17:15 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1500296947.84.0.230923299915.issue30450@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > We can't assume git.exe is available either How do you get CPython source code if git is not available? Also using HTTP to get a tarball? I think that it's ok to require git to build CPython on Windows. Previously, we required: svn, perl and git :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:17:47 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 13:17:47 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500297467.29.0.17126116792.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: > we used to mandate the presence of a svn install And we regretted that so much that we changed away from it :) When discussing this changeover plan, Zach and I decided we needed a fallback requiring only OS dependencies. In this case, the Powershell dependency fails on Windows 7 since it does not have the Invoke-WebRequest command (unless you've been installing all your updates). We decided against using git first because then the case that is more reliable (download and extract a .zip file from a URL) would go unused/untested in many cases. We also use the potentially installed python.exe in other places in the build, so it's far from a waste to grab it, and we already required *any* Python dependency to do a full build (docs and/or installer), so it isn't really adding anything there. The bit that was overlooked was the PowerShell on old systems limitation, and the absence of py.exe when you don't have Python 3 installed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:19:02 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 13:19:02 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500297542.68.0.304769139309.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: > How do you get CPython source code if git is not available? Go to GitHub and click the "Download" button, or select any sdist from our downloads page, or use Mercurial+hggit, or Dulwich directly, or a mirror/fork on any VCS you like. There are plenty of ways that don't require having git.exe on your PATH. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:23:29 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 13:23:29 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500297809.5.0.0996489991857.issue30450@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- pull_requests: +2799 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:25:48 2017 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9_Rossi_Korol?=) Date: Mon, 17 Jul 2017 13:25:48 +0000 Subject: [issue26781] os.walk max_depth In-Reply-To: <1460815870.93.0.432472188169.issue26781@psf.upfronthosting.co.za> Message-ID: <1500297948.21.0.0860526906119.issue26781@psf.upfronthosting.co.za> Andr? Rossi Korol added the comment: I proposed a new function called lwalk(level walk) that recurses only to a certain level of depth: http://bugs.python.org/issue30942 It is implemented in os.py and calls os.walk, but making sure it recurses only to a selected level of depth. If it is accepted I could send a Pull Request with the lwalk function implemented in os.py. ---------- hgrepos: +371 nosy: +andrekorol Added file: http://bugs.python.org/file47020/os.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:25:55 2017 From: report at bugs.python.org (Arie van Wingerden) Date: Mon, 17 Jul 2017 13:25:55 +0000 Subject: [issue30944] Python 32 bit install fails on Windows - BitDefender false positives In-Reply-To: <1500296110.88.0.753518071064.issue30944@psf.upfronthosting.co.za> Message-ID: Arie van Wingerden added the comment: OK. Will contact BitDefender. 2017-07-17 14:55 GMT+02:00 Steve Dower : > > Steve Dower added the comment: > > The best response is to notify Bitdefender so they can fix their > signatures. > > Python is commonly used in malware, and so some parts of it are often > misidentified as unique to some detected virus. By reporting the name of > the virus and providing the actual file to Bitdefender, they can fix their > signatures and provide an update. > > Most AV companies provide a specific email address for false positives. > Feel free to email them, or provide enough information here (including > their email address) and someone else can forward it. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:26:27 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 13:26:27 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500297987.87.0.328371560024.issue30450@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > And we regretted that so much that we changed away from it :) I'm not sure what your reasons were but from my POV (as someone who used to build on Windows from time to time), the two problems were: 1) svn was only used for this while we had migrated to hg 2) svn is darn slow, which neither hg nor git (especially with shallow clones, see "git clone --depth 1") are I don't think the annoyance itself of having to install git is much to worry about, since 1) it's a one time cost 2) it's quite easy 3) many developers or packagers are bound to already use git for other projects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:28:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jul 2017 13:28:37 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500298117.63.0.304609954306.issue30450@psf.upfronthosting.co.za> STINNER Victor added the comment: Ah ok, I see, I was focused on buildbots and other CIs, sorry. > Maybe we should consider just checking in nuget.exe? Where? In Python source code? I don't want to how to maintain yet another dependencies :-( I prefer to try a few tools, or explain how to get them. And write good documentation how to build Python on Windows ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:30:28 2017 From: report at bugs.python.org (INADA Naoki) Date: Mon, 17 Jul 2017 13:30:28 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500298228.35.0.794538495214.issue28638@psf.upfronthosting.co.za> INADA Naoki added the comment: I respect Raymond's rejection. But I want to write down why I like Jelle's approach. Currently, functools is the only module which is very popular. But leaving this means every new namedtuple makes startup time about 0.6ms slower. This is also problem for applications heavily depending on namedtuple. Creating namedtuple is more than 15 times slower than normal class. It's not predictable or reasonable overhead. It's not once I profiled application startup time and found namedtuple account non-negligible percentage. It's possible to keep `_source` with Jelle's approach. `_source` can be equivalent source rather than exact source eval()ed. I admit it's not ideal. But all namedtuple user and all Python implementation can benefit from it. It's possible to expose StructSeq somewhere. It can make it faster to import `functools`. But it's ugly too that applications and libraries tries it first and falls back to namedtuple. And when it is used widely, other Python implementations will be forced to implement it. That's why I'm willing collections.namedtuple overhead is reasonable and predictable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:31:32 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 17 Jul 2017 13:31:32 +0000 Subject: [issue19640] Dynamically generate the _source attribute of namedtuple to save memory) In-Reply-To: <1384767730.42.0.112147293599.issue19640@psf.upfronthosting.co.za> Message-ID: <1500298292.11.0.846949702926.issue19640@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:31:51 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 17 Jul 2017 13:31:51 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500298311.34.0.251134225653.issue28638@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:33:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jul 2017 13:33:49 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1500298311.43.0.0733064322262.issue28638@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > It's possible to expose StructSeq somewhere. Hum, when I mentioned structseq: my idea was more to reimplement namedtuple using the existing structseq code, since structseq is well tested and very fast. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:36:03 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 13:36:03 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500298563.25.0.829234849727.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: Unfortunately, "install " is often a blocking requirement for many developers (typically the ones who get paid well to do this), so I'd rather have no requirements. Currently we achieve this if PowerShell is up to date or Python+py.exe are installed, both of which are likely even in the "I can't install anything" case. Soon we'll also succeed here if git is installed and on PATH, which likely covers a few more % of users (but especially our Win7 buildbots). I feel confident we've covered 99% of cases transparently without adding the need for more documentation - still just get_externals.bat && build.bat to build. Once Travis has finished its build I'll merge and we'll see if the buildbots like it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:43:58 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 13:43:58 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500299038.73.0.896554495105.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset efa26bcd5085279fc4e9ae96d052272a5214c2bd by Steve Dower in branch 'master': bpo-30450: Fall back to git.exe if no Python is found. (#2739) https://github.com/python/cpython/commit/efa26bcd5085279fc4e9ae96d052272a5214c2bd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:47:07 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 13:47:07 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500299227.38.0.48288921495.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: The buildbots have already successfully built, so I'm declaring this and issue30916 resolved. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 09:51:33 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 17 Jul 2017 13:51:33 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500299493.9.0.473257329675.issue30450@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Or, use the preexisting convention of the HOST_PYTHON envvar that was used prior to the recent merged PRs ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:03:38 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 14:03:38 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500300218.9.0.385324727209.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: > use the preexisting convention of the HOST_PYTHON envvar that was used prior to the recent merged PRs Is that an actual convention? I didn't see any other references, so I figured Zach had made it up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:06:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jul 2017 14:06:53 +0000 Subject: [issue30830] HTTPHandlerTest of test_logging leaks a "dangling" thread on AMD64 FreeBSD CURRENT Non-Debug 3.x In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1500300413.1.0.907289245463.issue30830@psf.upfronthosting.co.za> STINNER Victor added the comment: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/587/steps/test/logs/stdio test_listen_config_10_ok (test.test_logging.ConfigDictTest) ... Warning -- threading_cleanup() failed to cleanup -1 threads after 3 sec (count: 0, dangling: 1) ok 1 test altered the execution environment: test_logging Tests result: ENV CHANGED ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:09:35 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 14:09:35 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500300575.64.0.646873724059.issue30450@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think that's used on Unix when cross-compiling, but I don't know about Windows... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:13:35 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 17 Jul 2017 14:13:35 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500300815.72.0.962450207359.issue30450@psf.upfronthosting.co.za> Jeremy Kloth added the comment: > In this case, the Powershell dependency fails on Windows 7 since it does not have the Invoke-WebRequest command (unless you've been installing all your updates). Just to note, PowerShell must be updated *manually* (at least on Win7). Plus you need to know what to update to get it. In this case, the Windows Management Framework: https://www.microsoft.com/en-us/download/details.aspx?id=40855 I've installed this on my buildbot apparently concurrently with this conversation. Personally, I'd lean toward recommending this update with Windows 7 machines as it stays closer to "naked" OS + Python checkout for building a new Python. (Although the latest merge kinda makes this a mute point). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:15:30 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 17 Jul 2017 14:15:30 +0000 Subject: [issue26781] os.walk max_depth In-Reply-To: <1460815870.93.0.432472188169.issue26781@psf.upfronthosting.co.za> Message-ID: <1500300930.85.0.940349053008.issue26781@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I think there is a little need in this feature. I concur with Serhiy and think we're better-off without this proposal. Marking this as closed. ---------- nosy: +rhettinger resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:18:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jul 2017 14:18:15 +0000 Subject: [issue30947] Update embeded copy of libexpat to 2.2.2 Message-ID: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> New submission from STINNER Victor: libexpat released a new version 2.2.2 which seems to contain 2 or 3 security fixes. I'm not sure that Python is affected by these bugs. https://github.com/libexpat/libexpat/blob/R_2_2_2/expat/Changes#L5 Release 2.2.2 Wed July 12 2017 Security fixes: #43 Protect against compilation without any source of high quality entropy enabled, e.g. with CMake build system; commit ff0207e6076e9828e536b8d9cd45c9c92069b895 #60 Windows with _UNICODE: Unintended use of LoadLibraryW with a non-wide string resulted in failure to load advapi32.dll and degradation in quality of used entropy when compiled with _UNICODE for Windows; you can launch existing binaries with EXPAT_ENTROPY_DEBUG=1 in the environment to inspect the quality of entropy used during runtime; commits * 95b95032f907ef1cd17ee7a9a1768010a825d61d * 73a5a2e9c081f49f2d775cf7ced864158b68dc80 [MOX-006] Fix non-NULL parser parameter validation in XML_Parse; resulted in NULL dereference, previously; commit ac256dafdffc9622ab0dc2c62fcecb0dfcfa71fe Bug fixes: #69 Fix improper use of unsigned long long integer literals Other changes: #73 Start requiring a C99 compiler #49 Fix "==" Bashism in configure script #50 Fix too eager getrandom detection for Debian GNU/kFreeBSD #52 and macOS #51 Address lack of stdint.h in Visual Studio 2003 to 2008 #58 Address compile warnings #68 Fix "./buildconf.sh && ./configure" for some versions of Dash for /bin/sh #72 CMake: Ease use of Expat in context of a parent project with multipe CMakeLists.txt files #72 CMake: Resolve mistaken executable permissions #76 Address compile warning with -DNDEBUG (not recommended!) #77 Address compile warning about macro redefinition Special thanks to: Alexander Bluhm Ben Boeckel C?t?lin R?ceanu Kerin Millar L?szl? B?sz?rm?nyi S. P. Zeidler Segev Finer V?clav Slav?k Victor Stinner Viktor Szakats and Radically Open Security -- Previous issue for expat 2.2.1: issue #30694. ---------- messages: 298525 nosy: christian.heimes, gregory.p.smith, haypo, ned.deily priority: normal severity: normal status: open title: Update embeded copy of libexpat to 2.2.2 type: security versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:18:49 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 17 Jul 2017 14:18:49 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1500300218.9.0.385324727209.issue30450@psf.upfronthosting.co.za> Message-ID: Jeremy Kloth added the comment: > Is that an actual convention? I didn't see any other references, so I figured Zach had made it up. It has existed in the Windows build files since 2.5, when x64 supported was initially added by MvL. ---------- nosy: +jeremy.kloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:19:59 2017 From: report at bugs.python.org (Thomas Guettler) Date: Mon, 17 Jul 2017 14:19:59 +0000 Subject: [issue30948] Docs for __subclasses__(): Add hint that Python imports are lazy Message-ID: <1500301199.65.0.488290423611.issue30948@psf.upfronthosting.co.za> New submission from Thomas Guettler: AFAIK cls.__subclasses__() only returns the classes which the interpreter has already loaded. This means there can be more subclasses in modules where not imported by the current interpreter up to now. https://docs.python.org/3.7/library/stdtypes.html?highlight=subclasses#class.__subclasses__ I think it would be nice to add a hint to the docs that python imports are lazy. What do you think? ---------- messages: 298527 nosy: guettli priority: normal severity: normal status: open title: Docs for __subclasses__(): Add hint that Python imports are lazy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:24:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jul 2017 14:24:45 +0000 Subject: [issue30947] Update embeded copy of libexpat to 2.2.2 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1500301485.91.0.997371584245.issue30947@psf.upfronthosting.co.za> STINNER Victor added the comment: > #51 Address lack of stdint.h in Visual Studio 2003 to 2008 FYI this change only impacts Python 2.7, since Python 3.3 and newer requires Visual Studio 2010 or newer, and I already backported (cherry-picked) this specific commit in Python 2.7: https://github.com/python/cpython/pull/2312/commits > #58 Address compile warnings That's my small contribution, so coming from CPython :-) https://github.com/libexpat/libexpat/pull/58 > #76 Address compile warning with -DNDEBUG (not recommended!) Nice contributions from Segev Finer, coming from CPython ;-) https://github.com/libexpat/libexpat/issues/76 > #77 Address compile warning about macro redefinition Another contribution of Segev Finer, already fixed downstream (in Python): https://github.com/libexpat/libexpat/pull/77 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:28:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jul 2017 14:28:24 +0000 Subject: [issue30947] Update embeded copy of libexpat to 2.2.2 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1500301704.86.0.755166930778.issue30947@psf.upfronthosting.co.za> STINNER Victor added the comment: About the 3 security fixes (is the last change a security fix?). """ #43 Protect against compilation without any source of high quality entropy enabled, e.g. with CMake build system; commit ff0207e6076e9828e536b8d9cd45c9c92069b895 """ Since Python uses its own entropy source, I don't think that this change impacts us. https://github.com/libexpat/libexpat/commit/ff0207e6076e9828e536b8d9cd45c9c92069b895 """ #60 Windows with _UNICODE: Unintended use of LoadLibraryW with a non-wide string resulted in failure to load advapi32.dll and degradation in quality of used entropy when compiled with _UNICODE for Windows; you can launch existing binaries with EXPAT_ENTROPY_DEBUG=1 in the environment to inspect the quality of entropy used during runtime; commits * 95b95032f907ef1cd17ee7a9a1768010a825d61d * 73a5a2e9c081f49f2d775cf7ced864158b68dc80 """ I don't understand the consequence of this specific bug. https://github.com/libexpat/libexpat/commit/95b95032f907ef1cd17ee7a9a1768010a825d61d https://github.com/libexpat/libexpat/commit/73a5a2e9c081f49f2d775cf7ced864158b68dc80 """ [MOX-006] Fix non-NULL parser parameter validation in XML_Parse; resulted in NULL dereference, previously; commit ac256dafdffc9622ab0dc2c62fcecb0dfcfa71fe """ I'm not sure that it's possible to call XML_Parse() with NULL in Python. https://github.com/libexpat/libexpat/commit/ac256dafdffc9622ab0dc2c62fcecb0dfcfa71fe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:30:24 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 17 Jul 2017 14:30:24 +0000 Subject: [issue18558] Iterable glossary entry needs clarification In-Reply-To: <1374796651.89.0.668716719647.issue18558@psf.upfronthosting.co.za> Message-ID: <1500301824.6.0.704360364517.issue18558@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The wold "iterable" just means "can be looped over". There are many ways to implement this capability (two-arg form of iter(), the __iter__ method, generators, __getitem__ with integer indexing, etc). collections.abc.Iterable is more limited and that is okay. There is nothing that compels us to break an API has been around and successful for 26+ years. That clearly wasn't Guido's intention when he added collections.abc.Iterable which is just a building block for more complex ABCs. I recommend closing this. We're not going to kill a useful API and break tons of code because of an overly pedantic reading of what is allowed to be iterable. However we can make a minor amendment to the glossary entry to mention that there are multiple ways of becoming iterable. Stephen, the try/except is a reasonable way to recognize an iterable. The ABCs are intended to recognize only things that implement a particular implementation or that are registered. It is not more encompassing or normative than that. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger versions: +Python 3.7 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:35:03 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 17 Jul 2017 14:35:03 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1500302103.26.0.544235218569.issue30940@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Wasn't this change a mistake? Now that it is deployed, it should probably be left alone (it is has to take back an API change), but this should be a cautionary note for arg-clinic enthusiasts to not change existing APIs. When Argument Clinic is too limited to express what Python does for an exiting API, that particular function needs to be skipped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:35:55 2017 From: report at bugs.python.org (pfreixes) Date: Mon, 17 Jul 2017 14:35:55 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499288108.18.0.207232280352.issue30861@psf.upfronthosting.co.za> Message-ID: <1500302155.51.0.449003995206.issue30861@psf.upfronthosting.co.za> pfreixes added the comment: The following links point to three different implementations of the same scenario using a Twisted, Node and Python blocking clients that try to reproduce the same scenario. - Twisted https://gist.github.com/pfreixes/0d8b24b98567e557d6059b3308aa07ca - Node https://gist.github.com/pfreixes/b62c199e62ae09d1a5b9e13652c7a273 - Python blocking https://gist.github.com/pfreixes/7a85e43642782eb7e7d0669eadd0216a All of them are able to give you the buffer when the RST package was already processed by the OS. I'm still trying to get a Java client, but TBH I won't expect a different behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:36:43 2017 From: report at bugs.python.org (Daniel Watkins) Date: Mon, 17 Jul 2017 14:36:43 +0000 Subject: [issue30949] Provide assertion functions in unittest.mock Message-ID: <1500302203.03.0.925103147939.issue30949@psf.upfronthosting.co.za> New submission from Daniel Watkins: The convenience assertion methods on mock objects can be easily mistyped and if they are mistyped, they will silently pass. This can be quite user-hostile. Consider the following: >>> example = Mock() >>> example.assert_called_once() >>> example.assert_caled_once_with(...) This will not raise any exceptions, though the first feels natural and the latter is misspelt. To avoid using the methods, one can type: >>> example = Mock() >>> assert example.call_count == 1 >>> assert example.call_args_list == [call(...)] but the meaning of that latter statement is particularly non-obvious. Instead, it would be great if I could import the assertions from mock as functions, and call them with mock as the first argument: >>> from unittest.mock import assert_called_once # This will be an ImportError >>> example = Mock() >>> assert_caled_once_with(example, ...) # A NameError >>> assert_called_once_with(example, ...) # Great success! ---------- components: Tests messages: 298533 nosy: odd_bloke priority: normal severity: normal status: open title: Provide assertion functions in unittest.mock versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:40:33 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 17 Jul 2017 14:40:33 +0000 Subject: [issue18558] Iterable glossary entry needs clarification In-Reply-To: <1374796651.89.0.668716719647.issue18558@psf.upfronthosting.co.za> Message-ID: <1500302433.17.0.736481836028.issue18558@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: Raymond, I think you didn't understand the issue. Glossary already _has_ the ammendment you mention (at least for the __getitem__ - I'm not sure any of other examples you mention are counterexamples to that interpretation: callable_iterators and generators _do_ have an __iter__ attribute, and they are correctly detected as instances of collections.abc.Iterable). I wanted to push in the _opposite_ direction, to fully bless __getitem__ as a way to declare iterability, so it could be recognized by Iterable's instancecheck. Because it seems to me that whoever wrote that instancecheck, didn't have the _intention_ to exclude __getitem__ iteration. Or at least, if we cannot do that because of backward compatibility:-(, to explicitly document that Iterable ABC _does not_ fully encompass what we mean by "being iterable". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:40:50 2017 From: report at bugs.python.org (tribaal) Date: Mon, 17 Jul 2017 14:40:50 +0000 Subject: [issue30949] Provide assertion functions in unittest.mock In-Reply-To: <1500302203.03.0.925103147939.issue30949@psf.upfronthosting.co.za> Message-ID: <1500302450.0.0.618783285354.issue30949@psf.upfronthosting.co.za> Changes by tribaal : ---------- nosy: +tribaal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 11:05:53 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 17 Jul 2017 15:05:53 +0000 Subject: [issue18558] Iterable glossary entry needs clarification In-Reply-To: <1374796651.89.0.668716719647.issue18558@psf.upfronthosting.co.za> Message-ID: <1500303953.75.0.399739379585.issue18558@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Or at least, if we cannot do that because of backward > compatibility:-(, to explicitly document that Iterable ABC > _does not_ fully encompass what we mean by "being iterable". That would be a reasonable amendment to collections.abc.Iterable docs. I don't think it is either desirable or possible for collections.abc.Iterable to recognize iterables with __getitem__. We cannot know it advance whether __getitem__ is a mapping or a sequence. IIRC, that particular problem was the motivation for creating the ABCs. Without a user registering a class as Iterable or without inheriting from Iterable, there is really no way to know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 11:17:57 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 17 Jul 2017 15:17:57 +0000 Subject: [issue30948] Docs for __subclasses__(): Add hint that Python imports are lazy In-Reply-To: <1500301199.65.0.488290423611.issue30948@psf.upfronthosting.co.za> Message-ID: <1500304677.99.0.723102469675.issue30948@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the suggestion, but I don't think so. Python imports are not lazy. They are ordered. Python is an *interpreted* language, so __subclasses__ is only going to hold those subclasses whose class definitions have been executed. This is fundamental to how the language works, and does not warrant a special note here. Note that the entry already includes something that should give a strong hint about this even if you hadn't previously thought about it: the statement that it only includes subclasses that are "still alive". This implies they aren't in the list until they become alive. ---------- nosy: +r.david.murray resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 11:33:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Jul 2017 15:33:17 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1500305597.92.0.736641395842.issue30940@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: round() was not converted to Argument Clinic. There is a special comment about this: /* AC: cannot convert yet, as needs PEP 457 group support in inspect * or a semantic change to accept None for "ndigits" */ *Now* round() can be converted to Argument Clinic. I prepared a patch for this but wanted to make sure this is a desirable behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 11:39:44 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 17 Jul 2017 15:39:44 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1500305984.5.0.550065986219.issue30940@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I prepared a patch for this but wanted to make sure this is a desirable behavior. That seems reasonable to me. Mark, what do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 11:47:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Jul 2017 15:47:25 +0000 Subject: [issue30950] Convert round() to Arument Clinic Message-ID: <1500306445.79.0.000834391811439.issue30950@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: When the builtins module was converted to Argument Clinic, round() was omitted because existing signature of round() wasn't supported with the inspect module. Now round() supports None as the value for the ndigits arguments, and this is the default value. round() now has the signature round(number, ndigits=None). Proposed PR converts round() to Argument Clinic. This has two benefits: 1. inspect.signature() now works with round. 2. Faster parsing keyword arguments. ---------- components: Interpreter Core messages: 298539 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Convert round() to Arument Clinic type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 11:47:49 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 17 Jul 2017 15:47:49 +0000 Subject: [issue18558] Iterable glossary entry needs clarification In-Reply-To: <1374796651.89.0.668716719647.issue18558@psf.upfronthosting.co.za> Message-ID: <1500306469.28.0.0276437456661.issue18558@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: Yes, the mapping/sequence distinction was (at least declaratively) the reason the ABCs were introduced, but that isn't an obstacle here: whether a mapping or a sequence, it _is_ iterable, right? --- In case anybody is interested, here's how I came to this problem: at a programming competition, I set a problem where contestants had to write some function, and I declared that "the function must work for arbitrary iterable (with some properties that currently don't matter)". Then a big discussion ensued, with a big group of people thinking that classes with __getitem__ but no __iter__ don't quality (giving collections.abc.Iterable as an argument), and another big group of people thinking they do (giving EAFP as an argument: "look, I tried iterating, and succeeded"). Of course, it's an incredibly technical detail, but I don't like such gray areas. To me, things with __getitem__ are clearly iterable - the glossary says so:-). Iterable's instancecheck is simply buggy ("incomplete", if you want). There might be valid reasons for keeping it buggy, but they should be documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 11:49:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Jul 2017 15:49:06 +0000 Subject: [issue30950] Convert round() to Arument Clinic In-Reply-To: <1500306445.79.0.000834391811439.issue30950@psf.upfronthosting.co.za> Message-ID: <1500306546.34.0.340372521681.issue30950@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2800 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 11:50:02 2017 From: report at bugs.python.org (Ed Morley) Date: Mon, 17 Jul 2017 15:50:02 +0000 Subject: [issue27640] add the '--disable-test-suite' option to configure In-Reply-To: <1469700317.99.0.84265252625.issue27640@psf.upfronthosting.co.za> Message-ID: <1500306602.03.0.236227592817.issue27640@psf.upfronthosting.co.za> Changes by Ed Morley : ---------- nosy: +edmorley _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 11:51:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Jul 2017 15:51:00 +0000 Subject: [issue30950] Convert round() to Arument Clinic In-Reply-To: <1500306445.79.0.000834391811439.issue30950@psf.upfronthosting.co.za> Message-ID: <1500306660.0.0.177371631879.issue30950@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Documentation for round() is incorrect. nosy: +mark.dickinson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 11:52:23 2017 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 17 Jul 2017 15:52:23 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499288108.18.0.207232280352.issue30861@psf.upfronthosting.co.za> Message-ID: <1500306743.15.0.787471652227.issue30861@psf.upfronthosting.co.za> Guido van Rossum added the comment: There's no need. You seem to have accidentally shown a use case for getting the buffered data -- it can contain an error message explaining why the connection was closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 13:11:19 2017 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 17 Jul 2017 17:11:19 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1500311479.55.0.878274864572.issue30940@psf.upfronthosting.co.za> Mark Dickinson added the comment: Sure, fine with me to add AC support for round. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 13:12:18 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 17:12:18 +0000 Subject: [issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes In-Reply-To: <1386241984.18.0.408310965726.issue19896@psf.upfronthosting.co.za> Message-ID: <1500311538.42.0.427698609283.issue19896@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Uh, it's a pity this patch has been overlooked. Gareth, would you want to make a Github PR out of this? ---------- nosy: +pitrou type: -> enhancement versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 13:26:34 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 17 Jul 2017 17:26:34 +0000 Subject: [issue18558] Iterable glossary entry needs clarification In-Reply-To: <1374796651.89.0.668716719647.issue18558@psf.upfronthosting.co.za> Message-ID: <1500312394.58.0.852729177454.issue18558@psf.upfronthosting.co.za> R. David Murray added the comment: "things with __getitem__ are clearly iterable" This is false. IMO it should be fixed in the glossary. It should say "or __getitem__ method implementing sequence semantics". That plus the addition to the Iterable docs will close this issue. ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 13:29:35 2017 From: report at bugs.python.org (Alex Vig) Date: Mon, 17 Jul 2017 17:29:35 +0000 Subject: [issue30951] Documentation error in inspect module Message-ID: <1500312575.69.0.52467451771.issue30951@psf.upfronthosting.co.za> New submission from Alex Vig: The documentation for co_names in the inspect module is: "tuple of names of local variables" Local variable names are however in co_varnames while co_names contains global variable names. This description should read: "tuple of names of global variables" Relevant StackOverflow post here: https://stackoverflow.com/q/45147260/1953800 ---------- assignee: docs at python components: Documentation messages: 298545 nosy: Alex Vig, docs at python priority: normal severity: normal status: open title: Documentation error in inspect module versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 13:41:22 2017 From: report at bugs.python.org (Gareth Rees) Date: Mon, 17 Jul 2017 17:41:22 +0000 Subject: [issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes In-Reply-To: <1386241984.18.0.408310965726.issue19896@psf.upfronthosting.co.za> Message-ID: <1500313282.85.0.224043199592.issue19896@psf.upfronthosting.co.za> Gareth Rees added the comment: Has Antony Lee has made a copyright assignment? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 13:42:20 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 17:42:20 +0000 Subject: [issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes In-Reply-To: <1386241984.18.0.408310965726.issue19896@psf.upfronthosting.co.za> Message-ID: <1500313340.47.0.544880796242.issue19896@psf.upfronthosting.co.za> Antoine Pitrou added the comment: According to the asterisk displayed right of his name, he has, yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 13:42:34 2017 From: report at bugs.python.org (Gareth Rees) Date: Mon, 17 Jul 2017 17:42:34 +0000 Subject: [issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes In-Reply-To: <1386241984.18.0.408310965726.issue19896@psf.upfronthosting.co.za> Message-ID: <1500313354.0.0.224485404274.issue19896@psf.upfronthosting.co.za> Gareth Rees added the comment: (If he hasn't, I don't think I can make a PR because I read his patch and so any implementation I make now is based on his patch and so potentially infringes his copyright.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 13:45:00 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 17:45:00 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500313500.8.0.281140166392.issue30919@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Serhiy, I've changed the strategy in PR 2708: now the partition free space is tested before deciding to locate the file there or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 14:03:58 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 17 Jul 2017 18:03:58 +0000 Subject: [issue30576] http.server should support HTTP compression (gzip) In-Reply-To: <1496691724.59.0.955308322691.issue30576@psf.upfronthosting.co.za> Message-ID: <1500314638.01.0.0946204272993.issue30576@psf.upfronthosting.co.za> R. David Murray added the comment: I do not have a strong opinion on this issue, but I share Martin's doubts that it should be added. It certainly should not be on by default if it is added. We should get input from other core devs. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 14:08:03 2017 From: report at bugs.python.org (Gareth Rees) Date: Mon, 17 Jul 2017 18:08:03 +0000 Subject: [issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes In-Reply-To: <1386241984.18.0.408310965726.issue19896@psf.upfronthosting.co.za> Message-ID: <1500314883.38.0.260829174517.issue19896@psf.upfronthosting.co.za> Changes by Gareth Rees : ---------- pull_requests: +2801 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 15:01:45 2017 From: report at bugs.python.org (Alex) Date: Mon, 17 Jul 2017 19:01:45 +0000 Subject: [issue30951] Documentation error in inspect module In-Reply-To: <1500312575.69.0.52467451771.issue30951@psf.upfronthosting.co.za> Message-ID: <1500318105.13.0.750296711479.issue30951@psf.upfronthosting.co.za> Changes by Alex : ---------- pull_requests: +2802 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 15:38:27 2017 From: report at bugs.python.org (Alex) Date: Mon, 17 Jul 2017 19:38:27 +0000 Subject: [issue30951] Documentation error in inspect module In-Reply-To: <1500312575.69.0.52467451771.issue30951@psf.upfronthosting.co.za> Message-ID: <1500320307.62.0.746240947619.issue30951@psf.upfronthosting.co.za> Changes by Alex : ---------- pull_requests: +2803 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 15:43:02 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 17 Jul 2017 19:43:02 +0000 Subject: [issue18558] Iterable glossary entry needs clarification In-Reply-To: <1374796651.89.0.668716719647.issue18558@psf.upfronthosting.co.za> Message-ID: <1500320582.74.0.673160767114.issue18558@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The problem with the Iterable ABC is that 'iterable' and 'iterator' are *dynamically* defined, with a possibly infinite time required to possibly destructively check either definition. In general, an algorithmic *static* check can only guess whether an object is iterable, though humans analyzing enough code can potentially get it right. Therefore, using isinstance(ob, Iterable) is not 100% reliable, and in my opinion *should not be used* as the definition of lower-case 'iterable'. Definition: Object ob is iterable if 'iter(ob)' returns an iterator. For the reasons given above, iter may return a non-iterator, but it will if ob implements either the old or new iterator protocol. If ob has .__iter__, iter returns ob.__iter__(). If ob has .__getitem__, iter returns iterator(ob), where iterator is a hidden internal class that embodies the old iterator protocol by defining a .__next__ method that calls .__getitem__. In both cases, iter does the best it can by assuming that the methods are correctly written as per one of the two protocols. Loose definition: Object 'it' is iterable if it can be looped over. Python definition: Object 'it' is iterable if repeated 'next(it)' calls either return an object or raise StopIteration. This means that try: while True: next(it) except StopIteration: pass runs, possibly forever, without raising. As Raymond noted, an iterator can be created multiple ways: IteratorClass(), iter(ob), iter(func, sentinal), generator_func(). --- Iterable versus iter with respect to classes with __getitem__: Iter was added in 2.2. Built-in iterables were only gradually converted from old to new protocol, by adding a new .__iter__. So even ignoring user classes, iter *had* to respect .__getitem__. Even today, though only a small fraction of classes with .__getitem__ are iterable, people do not generally call iter() on random objects. Iterable (added 2.6) is documented as the "ABC for classes that provide the __iter__() method." In other words, isinstance(ob, Iterable) replaces hasattr(ob, '__iter__'). Except that the former is more than that. The magic word 'register' does not appear in the collections.ABC doc, and I think that this is the omission to be remedied. "ABC for classes that provide the __iter__() method, or that provide a __getitem__ method that implements the old iterator protocol and register themselves as Iterable." An example could be given using a patched version of IsIterable. If one adds two lines of code from collections.abc import Iterable ... Iterable.register(IsIterable) then isinstance(IsIterable(3), Iterable) is True, except that this is a lie in the other direction. Traceback (most recent call last): File "F:\Python\mypy\tem.py", line 17, in for i in it2: File "F:\Python\mypy\tem.py", line 7, in __getitem__ return self.data[key] TypeError: 'int' object is not subscriptable Either IsIterable.__init__ must check that data itself has .__getitem__ or IsIterable.__next__ must capture exceptions and raise IndexError instead. def __getitem__(self, key): try: return self.data[key] except Exception: raise IndexError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 15:44:01 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 19:44:01 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500320641.44.0.271111033743.issue30450@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I just got a download failure on an AppVeyor build: https://ci.appveyor.com/project/python/cpython/build/3.7.0a0.4571 Downloading nuget... Invoke-WebRequest : The operation has timed out. At line:1 char:1 + Invoke-WebRequest https://aka.ms/nugetclidl -OutFile 'C:\projects\cpy ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:Htt pWebRequest) [Invoke-WebRequest], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe ll.Commands.InvokeWebRequestCommand File "", line 1 C:\projects\cpython\PCbuild\\urlretrieve.py ^ SyntaxError: invalid syntax Installing Python via nuget... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 16:29:52 2017 From: report at bugs.python.org (ppperry) Date: Mon, 17 Jul 2017 20:29:52 +0000 Subject: [issue30949] Provide assertion functions in unittest.mock In-Reply-To: <1500302203.03.0.925103147939.issue30949@psf.upfronthosting.co.za> Message-ID: <1500323392.33.0.809737695353.issue30949@psf.upfronthosting.co.za> ppperry added the comment: You can already do this, although it it somewhat of a hack: >>> assert_called_once=Mock.assert_called_once # This will be an AttributeError >>> assert_called_once_with=Mock.assert_called_once_with >>> example = Mock() >>> assert_caled_once_with(example, ...) # A NameError >>> assert_called_once_with(example, ...) # Great success! ---------- nosy: +ppperry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 16:39:57 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Mon, 17 Jul 2017 20:39:57 +0000 Subject: [issue18875] Idle: Auto insertion of the closing parens, brackets, and braces In-Reply-To: <1377777498.6.0.468253349222.issue18875@psf.upfronthosting.co.za> Message-ID: <1500323997.31.0.230745231025.issue18875@psf.upfronthosting.co.za> Charles Wohlganger added the comment: I've written an extension (see file) that does auto insertion of closing parens, brackets, braces, ticks, and quotes. It also (optionally) skips the closers when they are typed right next to the already exiting one. It also takes into account triple-ticks / triple-quotes. ---------- nosy: +wohlganger Added file: http://bugs.python.org/file47021/ParenClose.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 16:40:19 2017 From: report at bugs.python.org (Big Stone) Date: Mon, 17 Jul 2017 20:40:19 +0000 Subject: [issue30952] include Math extension in SQlite Message-ID: <1500324019.46.0.539377026115.issue30952@psf.upfronthosting.co.za> New submission from Big Stone: I would be interested in having SQLite shipped with the math extension in python-3.7. The log / exponential function are important for some sql use case like exp(sum(log(x))) ---------- components: Extension Modules messages: 298555 nosy: Big Stone priority: normal severity: normal status: open title: include Math extension in SQlite type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 17:24:58 2017 From: report at bugs.python.org (ppperry) Date: Mon, 17 Jul 2017 21:24:58 +0000 Subject: [issue30953] Fatal python error when jumping into except clause Message-ID: <1500326698.05.0.0587216442362.issue30953@psf.upfronthosting.co.za> New submission from ppperry: trying to execute the following code: import sys def trace(frame, event, arg): if event == "line" and frame.f_lineno > 12: frame.f_lineno = 12 return None return trace sys.settrace(trace) def error(): try: pass except: pass pass pass error() Produces a fatal error: Fatal Python error: XXX block stack underflow Current thread 0x00000af4 (most recent call first): File "jumpintoexception.py", line 12 in error File "jumpintoexception.py", line 15 in ---------- components: Interpreter Core, Library (Lib) messages: 298556 nosy: ppperry priority: normal severity: normal status: open title: Fatal python error when jumping into except clause type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 17:28:39 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 21:28:39 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500326919.13.0.588799005024.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: Hmm... looks like there's another way to fail I didn't account for that goes down a different path in the batch file. I'll try being less clever. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 17:32:51 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 17 Jul 2017 21:32:51 +0000 Subject: [issue30952] include Math extension in SQlite In-Reply-To: <1500324019.46.0.539377026115.issue30952@psf.upfronthosting.co.za> Message-ID: <1500327171.38.0.883025338253.issue30952@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 17:32:58 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 21:32:58 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500327178.12.0.222808807964.issue30450@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- pull_requests: +2804 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 17:33:28 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 21:33:28 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500327208.51.0.436777562337.issue30450@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- assignee: zach.ware -> steve.dower resolution: fixed -> stage: resolved -> commit review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 17:40:41 2017 From: report at bugs.python.org (Dan Lipsitt) Date: Mon, 17 Jul 2017 21:40:41 +0000 Subject: [issue30954] backport unittest.TestCase.assertLogs to 2.7? Message-ID: <1500327641.24.0.471974723495.issue30954@psf.upfronthosting.co.za> New submission from Dan Lipsitt: Would it be appropriate to backport unittest.TestCase.assertLogs to python 2.7? This would be a useful feature for me. ---------- components: Library (Lib) messages: 298558 nosy: Dan Lipsitt, ezio.melotti, michael.foord, rbcollins priority: normal severity: normal status: open title: backport unittest.TestCase.assertLogs to 2.7? type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 17:44:32 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 21:44:32 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500327872.01.0.995789409877.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: Yeouch, it's been causing AppVeyor builds to get stuck, and then they time out after an hour. Luckily mine is up next in a minute or so, so I'll try to merge quickly and avoid anyone else getting held up. I also restored HOST_PYTHON in the PR, as a fallback for "where do I find a python.exe I can download stuff with" - specific version doesn't matter, as long as it has requests or urlretrieve. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 17:55:28 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jul 2017 21:55:28 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500328528.0.0.565483388393.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: Ah, there's also a nuget.org outage affecting AppVeyor (but not me because I'm in Italy and so connecting to the EU mirror automatically) - https://appveyor.statuspage.io/ When that recovers it should be fine again. The workaround for those without py.exe is to set PYTHON (or, post-PR, HOST_PYTHON) to a Python 3.6 or later executable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 18:05:16 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 17 Jul 2017 22:05:16 +0000 Subject: [issue30954] backport unittest.TestCase.assertLogs to 2.7? In-Reply-To: <1500327641.24.0.471974723495.issue30954@psf.upfronthosting.co.za> Message-ID: <1500329116.97.0.401744382395.issue30954@psf.upfronthosting.co.za> R. David Murray added the comment: No. 2.7 is in maintenance mode and gets no new features. ---------- nosy: +r.david.murray resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 18:06:56 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 17 Jul 2017 22:06:56 +0000 Subject: [issue30954] backport unittest.TestCase.assertLogs to 2.7? In-Reply-To: <1500327641.24.0.471974723495.issue30954@psf.upfronthosting.co.za> Message-ID: <1500329216.62.0.150017698392.issue30954@psf.upfronthosting.co.za> R. David Murray added the comment: There is, however, unittest2 on pypi that has most of the python3 features backported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 18:09:08 2017 From: report at bugs.python.org (Mital Ashok) Date: Mon, 17 Jul 2017 22:09:08 +0000 Subject: [issue30955] \\N in f-string causes next { to be literal if not escaped Message-ID: <1500329348.19.0.0660291861244.issue30955@psf.upfronthosting.co.za> New submission from Mital Ashok: Take this format python code: import unicodedata c = chr(0x012345) To print that character as a string literal, you would expect to do: print(f"'\\N{{{unicodedata.name(c)}}}'") Which should print a literal quote (`'`), a backwards slash (`\\` -> `\`), an `N`, and the two `{{` should escape and print `{`, followed by the f-expression `unicodedata.name(c)`, then the `}}` would print one `}`, and then another literal quote (`'`). However, this raises a `SyntaxError: f-string: single '}' is not allowed`. The way to do this without a syntax error is like so: print(f"'\\N{{unicodedata.name(c)}}}'") Which prints the expected: '\N{CUNEIFORM SIGN URU TIMES KI}' The shortest way to reproduce this is: f'\\N{' Which works, and: f'\\N{{' which raises an error, even though the first one should raise an error (`SyntaxError: f-string: expecting '}'`). ---------- messages: 298563 nosy: Mital Ashok priority: normal severity: normal status: open title: \\N in f-string causes next { to be literal if not escaped versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 18:26:19 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 17 Jul 2017 22:26:19 +0000 Subject: [issue30955] \\N in f-string causes next { to be literal if not escaped In-Reply-To: <1500329348.19.0.0660291861244.issue30955@psf.upfronthosting.co.za> Message-ID: <1500330379.71.0.664159954314.issue30955@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report. This problem has been fixed in Python 3.6.2 which was just released. I believe it was fixed by the changes for Issue29104. ---------- nosy: +ned.deily resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 19:05:28 2017 From: report at bugs.python.org (Arlo Clarke) Date: Mon, 17 Jul 2017 23:05:28 +0000 Subject: [issue30956] ftplib socket timeout can't be handled Message-ID: <1500332728.63.0.200349009774.issue30956@psf.upfronthosting.co.za> New submission from Arlo Clarke: Stack overflow question with full details: https://stackoverflow.com/questions/45150568/python-ftp-socket-timeout-handling Socket timeout in ftplib can't be handled; a program crash occurs even when the relevant code is wrapped in a general catch-all. ---------- components: IO messages: 298565 nosy: arloclarke priority: normal severity: normal status: open title: ftplib socket timeout can't be handled type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 19:44:01 2017 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 17 Jul 2017 23:44:01 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500335041.09.0.861732911719.issue28638@psf.upfronthosting.co.za> Guido van Rossum added the comment: On python-dev Raymond agreed to reopen the issue and consider Jelle's implementation (https://github.com/python/cpython/pull/2736). ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 20:53:31 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 18 Jul 2017 00:53:31 +0000 Subject: [issue30956] ftplib socket timeout can't be handled In-Reply-To: <1500332728.63.0.200349009774.issue30956@psf.upfronthosting.co.za> Message-ID: <1500339211.05.0.663069814192.issue30956@psf.upfronthosting.co.za> R. David Murray added the comment: Given: import socket from ftplib import FTP try: ftp = FTP('host.i.know.will.hang.com', timeout=4) except socket.timeout: print('caught') I see 'caught' printed on the console. However, if I increase the timeout to 400, then on both 3.5 tip and 3.6 tip I get a TimeoutError, not a socket.timeout. If I increase the timeout to 4000, I get the TimeoutError in a much shorter time than 4000 seconds. So, *something* is wrong here. Looking at the code it isn't obvious what. Here is the traceback: Traceback (most recent call last): File "../p36/temp.py", line 4, in ftp = FTP('xxxx', timeout=4) File "/home/rdmurray/python/p35/Lib/ftplib.py", line 118, in __init__ self.connect(host) File "/home/rdmurray/python/p35/Lib/ftplib.py", line 153, in connect source_address=self.source_address) File "/home/rdmurray/python/p35/Lib/socket.py", line 712, in create_connection raise err File "/home/rdmurray/python/p35/Lib/socket.py", line 703, in create_connection sock.connect(sa) TimeoutError: [Errno 110] Connection timed out Your traceback is different because your timeout is occurring after the initial connection. Are you sure your socket.timeout is the correct one? You might try printing socket.__file__ to check. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 21:07:47 2017 From: report at bugs.python.org (=?utf-8?b?6YKx5Lyf55Wl?=) Date: Tue, 18 Jul 2017 01:07:47 +0000 Subject: [issue30888] import class not isinstance of the class In-Reply-To: <1499652780.91.0.730599557685.issue30888@psf.upfronthosting.co.za> Message-ID: <1500340067.15.0.860371265028.issue30888@psf.upfronthosting.co.za> ??? added the comment: ok. i see what you mean. so python mark the class from the import way ---------- resolution: not a bug -> works for me stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 21:12:00 2017 From: report at bugs.python.org (Pedro Lacerda) Date: Tue, 18 Jul 2017 01:12:00 +0000 Subject: [issue27268] Incorrect error message on float('') In-Reply-To: <1465396464.66.0.148764915141.issue27268@psf.upfronthosting.co.za> Message-ID: <1500340320.88.0.382363389033.issue27268@psf.upfronthosting.co.za> Changes by Pedro Lacerda : ---------- pull_requests: +2805 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 22:14:04 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 18 Jul 2017 02:14:04 +0000 Subject: [issue30934] Document how to run coverage for repository idlelib files. In-Reply-To: <1500081585.35.0.923637622202.issue30934@psf.upfronthosting.co.za> Message-ID: <1500344044.48.0.91789868804.issue30934@psf.upfronthosting.co.za> Louie Lu added the comment: I update how to prepare coverage on Linux and MacOS. I first thought user will prepare as Terry wrote at the top of `5. Test Coverage`. Cheryl's method is good, the update guide is borrow from here. First create a virtualenv, then install coverage via pip in venv. If user want to skip the step of venv, they can copy out the coverage package in venv/lib/ to Lib/ inside. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 23:09:06 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 18 Jul 2017 03:09:06 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500347346.78.0.766558229167.issue28638@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Re-opening per discussion on python-dev. Goals: * Extend Jelle's patch to incorporate lazy support for "_source" and "verbose" so that the API is unchanged from the user's point of view. * Make sure the current test suite still passes and that the current docs remain valid. * Get better measurements of benefits so we know what is actually being achieved. * Test to see if there are new positive benefits for PyPy and Jython as well. ---------- resolution: rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 23:35:55 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Tue, 18 Jul 2017 03:35:55 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500348955.18.0.294124010504.issue28638@psf.upfronthosting.co.za> Jelle Zijlstra added the comment: Should we consider a C-based implementation like https://github.com/llllllllll/cnamedtuple? It could improve speed even more, but would be harder to maintain and test and harder to keep compatible. My sense is that it's not worth it unless benchmarks show a really dramatic difference. As for Raymond's list of goals, my PR now preserves _source and verbose=True and the test suite passes. I think the only docs change needed is in the description for _source (https://docs.python.org/3/library/collections.html#collections.somenamedtuple._source), which is no longer "used to create the named tuple class". I'll add that to my PR. I haven't done anything towards the last two goals yet. Should the change be applied to 3.6? It is fully backwards compatible, but perhaps the change is too disruptive to be included in the 3.6 series at this point. ---------- resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 23:36:12 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Tue, 18 Jul 2017 03:36:12 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500348972.26.0.516968470827.issue28638@psf.upfronthosting.co.za> Changes by Jelle Zijlstra : ---------- resolution: rejected -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 23:53:19 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 18 Jul 2017 03:53:19 +0000 Subject: [issue30953] Fatal python error when jumping into except clause In-Reply-To: <1500326698.05.0.0587216442362.issue30953@psf.upfronthosting.co.za> Message-ID: <1500349999.64.0.590936268784.issue30953@psf.upfronthosting.co.za> Louie Lu added the comment: You will need to use `dis` to see what actually done by bytecode. $ ./python -m dis tests.py Disassembly of : 9 0 SETUP_EXCEPT 4 (to 6) 10 2 POP_BLOCK 4 JUMP_FORWARD 12 (to 18) 11 >> 6 POP_TOP 8 POP_TOP 10 POP_TOP 12 12 POP_EXCEPT 14 JUMP_FORWARD 2 (to 18) 16 END_FINALLY 14 >> 18 LOAD_CONST 0 (None) 20 RETURN_VALUE this is the actual bytecode in `error()`. When the eval loop hit the line 9, it will perform bytecode `SETUP_EXCEPT`, thus push a block into the blockstack. Your code in trace wrote that `and frame.f_lineno > 12`, thus it will run line 12 and perform POP_EXCEPT to pop out the blockstack. then goto line 13, catch by trace if statement, f_lineno changed to 12, and perform `POP_EXCEPT` again, there isn't any block inside the blockstack, thus it will get a "XXX block stack underflow". ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 23:57:42 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 18 Jul 2017 03:57:42 +0000 Subject: [issue18875] Idle: Auto insertion of the closing parens, brackets, and braces In-Reply-To: <1377777498.6.0.468253349222.issue18875@psf.upfronthosting.co.za> Message-ID: <1500350262.37.0.584747691706.issue18875@psf.upfronthosting.co.za> Louie Lu added the comment: Charles, good to saw the patch, would you like to convert it into GitHub PR? also, it would have to adjust some coding style to satisfy PEP8. I can help you on GitHub to review this patch. ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 00:35:03 2017 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 18 Jul 2017 04:35:03 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500352503.21.0.238691306822.issue28638@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks Raymond and Jelle. The bar for a reimplementation in C is much higher (though we'll have to agree that Jelle's version is fast enough before we reject it). The bar for backporting this to 3.6 is much higher as well and I think it's not worth disturbing the peace (people depend on the craziest things staying the same between bugfix releases, but for feature releases they have reasons to do thorough testing). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 01:05:17 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 18 Jul 2017 05:05:17 +0000 Subject: [issue1442493] IDLE shell window gets very slow when displaying long lines Message-ID: <1500354317.7.0.0922222751623.issue1442493@psf.upfronthosting.co.za> Louie Lu added the comment: Besides warping text, there has a performance issue inside the RPCServer and Client. The (console, write, (text, file), {}) command is sent by server `asynccall`->`putmessage`. It should be sent by chunk size to client, and render on IDLE shell. The result is performed as sent by chunk size, but the client will gather all chunk until it receives all data, then render on IDLE shell. This cause the shell seems like hanging there, and doing nothing (in REPL, it will output the long string to stdout and so on). We can manually detect this then manully chunk out (console, write, args, kwargs) command's args size, so that it will look like not hanging there. The attach patch is a PoC about this. ----- For the text widget performance, I dislike the wrap method, it shouldn't be a limit to the user on IDLE (GUI IDE), even it can be set to 80 or 100 or whatever. ---------- nosy: +louielu versions: +Python 3.7 Added file: http://bugs.python.org/file47022/0001-IDLE-shell-test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 01:39:29 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 18 Jul 2017 05:39:29 +0000 Subject: [issue30917] IDLE: Add idlelib.config.IdleConf unittest In-Reply-To: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> Message-ID: <1500356369.03.0.238820438437.issue30917@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Whatever is merged with PR_2691, further improvements can be made in further PRs either on this issue or others that work on config code. I still think this test is slower than it should be -- the change to deep copy either made no difference or made it slower, but I will try profiling before experimenting more. In config, the warning prints in the directory search should use _warn, which can be blocked and mocked while testing. 4% uncovered in the file is probably 6% of IdleConf. At least some is error branches that might be interesting to trigger. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 02:40:11 2017 From: report at bugs.python.org (Simon Bernier St-Pierre) Date: Tue, 18 Jul 2017 06:40:11 +0000 Subject: [issue30957] pathlib: Path and PurePath cannot be subclassed Message-ID: <1500360011.44.0.112020885927.issue30957@psf.upfronthosting.co.za> New submission from Simon Bernier St-Pierre: Because of the special way Path and PurePath are instantiated, they can't be inherited like a normal class. Here's an example of the issue: >>> import pathlib >>> class MyPath(pathlib.Path): ... pass ... >>> p = MyPath('/home') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.5/pathlib.py", line 969, in __new__ self = cls._from_parts(args, init=False) File "/usr/lib/python3.5/pathlib.py", line 651, in _from_parts drv, root, parts = self._parse_args(args) File "/usr/lib/python3.5/pathlib.py", line 644, in _parse_args return cls._flavour.parse_parts(parts) AttributeError: type object 'MyPath' has no attribute '_flavour' A solution is to get the concrete type of Path via type(Path()) and inherit the class it yields, but it isn't pretty or intuitive. Perhaps a declaration that directs to the proper class could be added to the module. PlatformPath = WindowsPath if os.name == 'nt' else PosixPath PurePlatformPath = ... ---------- components: Library (Lib) messages: 298577 nosy: Simon Bernier St-Pierre priority: normal severity: normal status: open title: pathlib: Path and PurePath cannot be subclassed type: enhancement versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 04:00:43 2017 From: report at bugs.python.org (Leo kerr) Date: Tue, 18 Jul 2017 08:00:43 +0000 Subject: [issue30958] Scripts folder is empty Message-ID: <1500364843.66.0.331726740083.issue30958@psf.upfronthosting.co.za> New submission from Leo kerr: The Scripts folder is empty when i installed python. ---------- components: Installation messages: 298578 nosy: Onixiya priority: normal severity: normal status: open title: Scripts folder is empty type: performance versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 04:22:42 2017 From: report at bugs.python.org (Jakub Stasiak) Date: Tue, 18 Jul 2017 08:22:42 +0000 Subject: [issue12857] Expose called function on frame object In-Reply-To: <1314683667.85.0.876885324202.issue12857@psf.upfronthosting.co.za> Message-ID: <1500366162.29.0.172436655029.issue12857@psf.upfronthosting.co.za> Changes by Jakub Stasiak : ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 04:46:51 2017 From: report at bugs.python.org (=?utf-8?q?Lum=C3=ADr_Balhar?=) Date: Tue, 18 Jul 2017 08:46:51 +0000 Subject: [issue29144] Implicit namespace packages in Python 3.6 In-Reply-To: <1483468021.78.0.379899829208.issue29144@psf.upfronthosting.co.za> Message-ID: <1500367611.55.0.453738224511.issue29144@psf.upfronthosting.co.za> Lum?r Balhar added the comment: Hello. I've met this issue again in moksha project [0] where namespace package is used. - module moksha.common is installed via RPM to site-packages and there isn't file moksha/__init__.py so the implicit way to create namespace package is used there. - moksha.hub module is built in a buildroot and there is moksha/__init__.py file so this module uses different way which causes that import of moksha.common is failing. We can delete moksha/__init__.py from buildroot of moksha.hub but then we cannot run tests with `python setup.py test`. Error message is: error in moksha.hub setup command: Distribution contains no modules or packages for namespace package 'moksha' The second possibility is ship moksha/__init__.py file in python-moksha-common RPM. The question is: Why there isn't moksha/__init__.py file in RPM even when the source tarball contains it? Because of setuptools! Setuptools skips installation of __init__.py file when namespace package is recognized with the message: Skipping installation of /builddir/build/BUILDROOT/python-moksha-common-1.2.5-1.fc27.x86_64/usr/lib/python3.6/site-packages/moksha/__init__.py (namespace package) Questions summary: - Why there is such big difference between Python 3.5 and Python 3.6? - Why does setuptools skip installation of __init__.py file but it needs them to run tests of namespace subpackage? Thank you! Lum?r [0] https://github.com/mokshaproject/moksha ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 04:53:55 2017 From: report at bugs.python.org (pfreixes) Date: Tue, 18 Jul 2017 08:53:55 +0000 Subject: [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption In-Reply-To: <1499288108.18.0.207232280352.issue30861@psf.upfronthosting.co.za> Message-ID: <1500368035.33.0.15559232697.issue30861@psf.upfronthosting.co.za> pfreixes added the comment: The Java client https://gist.github.com/pfreixes/13fedf2a589c260e6c7c64ae73653bb1 Works as is expected the buffer can be read till it gets empty, no matter when the RST was sent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 05:50:05 2017 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 18 Jul 2017 09:50:05 +0000 Subject: [issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution In-Reply-To: <1419316588.75.0.487755278973.issue23102@psf.upfronthosting.co.za> Message-ID: <1500371405.37.0.708727642255.issue23102@psf.upfronthosting.co.za> Changes by Kubilay Kocak : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 06:53:41 2017 From: report at bugs.python.org (Christoph Reiter) Date: Tue, 18 Jul 2017 10:53:41 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500375221.13.0.139110490736.issue28638@psf.upfronthosting.co.za> Christoph Reiter added the comment: Why not just do the following: >>> from collections import namedtuple >>> Point = namedtuple('Point', ['x', 'y']) >>> Point._source "from collections import namedtuple\nPoint = namedtuple('Point', ['x', 'y'])\n" >>> The docs make it seems as if the primary use case of the _source attribute is to serialize the definition. Returning a source which produces a class with different performance/memory characteristics goes against that. ---------- nosy: +lazka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 07:04:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Jul 2017 11:04:22 +0000 Subject: [issue30959] Constructor signature is duplicated in the help of namedtuples Message-ID: <1500375862.86.0.253059570638.issue30959@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The docstring of namedtuple class starts with the signature of the constructor. But pydoc now outputs the signature of the constructor for classes (see issue29338). As a result, the signature is duplicated in the output. For example: $ ./python -m pydoc functools._CacheInfo Help on class CacheInfo in functools: functools._CacheInfo = class CacheInfo(builtins.tuple) | functools._CacheInfo(hits, misses, maxsize, currsize) | | CacheInfo(hits, misses, maxsize, currsize) | | Method resolution order: ... ---------- components: Library (Lib) messages: 298582 nosy: ncoghlan, rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Constructor signature is duplicated in the help of namedtuples type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 08:23:53 2017 From: report at bugs.python.org (Nick Lamb) Date: Tue, 18 Jul 2017 12:23:53 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1500380633.24.0.176167713729.issue28414@psf.upfronthosting.co.za> Nick Lamb added the comment: Did I miss Christian's "PEP Broadcast"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 08:34:34 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 18 Jul 2017 12:34:34 +0000 Subject: [issue30957] pathlib: Path and PurePath cannot be subclassed In-Reply-To: <1500360011.44.0.112020885927.issue30957@psf.upfronthosting.co.za> Message-ID: <1500381274.98.0.101553634553.issue30957@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Python 3.4, 3.5 and 3.6 are in feature-freeze, so this enhancement can only apply to 3.7. You say that pathlib.Path "can't be subclassed", but then immediately show an example of subclassing it: >>> class MyPath(pathlib.Path): ... pass ... Which works fine. If you run: issubclass(MyClass, pathlib.Path) it returns True. Unfortunately, it looks like your subclass broke one of the class invariants, but you don't find out until you try to instantiate it: >>> p = MyPath('/home') Traceback (most recent call last): ... AttributeError: type object 'MyPath' has no attribute '_flavour' _flavour is a private attribute, and is not documented, so I don't think subclassing is supported. If that is the case: - the documentation should say that subclassing is not supported; - or the Path class should actively prohibit subclassing (will probably require a metaclass); - or both. If subclassing is supported, then I think there ought to be a better way than this: py> class MyPath(pathlib.Path): ... _flavour = pathlib.Path('.')._flavour ... py> MyPath('.') MyPath('.') ---------- nosy: +pitrou, steven.daprano versions: -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 08:42:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Jul 2017 12:42:29 +0000 Subject: [issue30957] pathlib: Path and PurePath cannot be subclassed In-Reply-To: <1500360011.44.0.112020885927.issue30957@psf.upfronthosting.co.za> Message-ID: <1500381749.61.0.898896089181.issue30957@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a duplicate of issue24132. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Direct sub-classing of pathlib.Path _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 08:43:10 2017 From: report at bugs.python.org (ppperry) Date: Tue, 18 Jul 2017 12:43:10 +0000 Subject: [issue30958] Scripts folder is empty In-Reply-To: <1500364843.66.0.331726740083.issue30958@psf.upfronthosting.co.za> Message-ID: <1500381790.73.0.0897665092407.issue30958@psf.upfronthosting.co.za> Changes by ppperry : ---------- type: performance -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 09:47:11 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Tue, 18 Jul 2017 13:47:11 +0000 Subject: [issue18875] Idle: Auto insertion of the closing parens, brackets, and braces In-Reply-To: <1377777498.6.0.468253349222.issue18875@psf.upfronthosting.co.za> Message-ID: <1500385631.1.0.0979642105182.issue18875@psf.upfronthosting.co.za> Charles Wohlganger added the comment: I (foolishly) was committing to master for a different IDLE enhancement. Until that one is pulled, I don't think I can make a new PR without it also having all the changes from my previous one. New uploaded file has docstrings for the ParenClose class and I've run and fixed it against pep8 until it gave no errors. Namespaces should conform to PEP8, apart from the module name, which must match the class name due to how IDLE works with extensions. ---------- Added file: http://bugs.python.org/file47023/ParenClose.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 09:47:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Jul 2017 13:47:28 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1500385648.18.0.649123288341.issue30940@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you please make a PR for your suggestion Mark? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 10:16:17 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Jul 2017 14:16:17 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500387377.96.0.949506826025.issue28638@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 10:18:14 2017 From: report at bugs.python.org (Gerrit Holl) Date: Tue, 18 Jul 2017 14:18:14 +0000 Subject: [issue29672] `catch_warnings` context manager should reset warning registry to previous state upon exiting, to prevent warnings from being reprinted In-Reply-To: <1488234596.55.0.435492915134.issue29672@psf.upfronthosting.co.za> Message-ID: <1500387494.32.0.994173397829.issue29672@psf.upfronthosting.co.za> Gerrit Holl added the comment: I get bitten by this frequently, and find myself patching many libraries just to avoid them from calling .catch_warnings. Does anyone know whether to fix this it would suffice to edit warnings.py, or would I need to dig into _warnings.c as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 10:18:35 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Jul 2017 14:18:35 +0000 Subject: [issue29144] Implicit namespace packages in Python 3.6 In-Reply-To: <1483468021.78.0.379899829208.issue29144@psf.upfronthosting.co.za> Message-ID: <1500387515.51.0.920339175018.issue29144@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brett.cannon, eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 10:20:38 2017 From: report at bugs.python.org (Gerrit Holl) Date: Tue, 18 Jul 2017 14:20:38 +0000 Subject: [issue29672] `catch_warnings` context manager causes all warnings to be printed every time, even after exiting In-Reply-To: <1488234596.55.0.435492915134.issue29672@psf.upfronthosting.co.za> Message-ID: <1500387638.08.0.636896013655.issue29672@psf.upfronthosting.co.za> Changes by Gerrit Holl : ---------- title: `catch_warnings` context manager should reset warning registry to previous state upon exiting, to prevent warnings from being reprinted -> `catch_warnings` context manager causes all warnings to be printed every time, even after exiting _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 10:35:07 2017 From: report at bugs.python.org (Megha HR) Date: Tue, 18 Jul 2017 14:35:07 +0000 Subject: [issue30960] Python script is failing to run Message-ID: <1500388507.9.0.411751437565.issue30960@psf.upfronthosting.co.za> New submission from Megha HR: Hi, We are facing below error message whenever we use python. Could you please let me know root cause and steps to overcome this problem. ./python32.sh Fatal Python error: Py_Initialize: Unable to get the locale encoding EOFError: EOF read where not expected Abort (core dumped) Python version: # ./python3.2 -V Python 3.2.2 root at atclvm820> ---------- components: Extension Modules messages: 298589 nosy: Megha priority: normal severity: normal status: open title: Python script is failing to run type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 10:43:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Jul 2017 14:43:16 +0000 Subject: [issue30960] Python script is failing to run In-Reply-To: <1500388507.9.0.411751437565.issue30960@psf.upfronthosting.co.za> Message-ID: <1500388996.6.0.759570026194.issue30960@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Python 3.2 is not supported version. Try to upgrade to newer version. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 10:43:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Jul 2017 14:43:29 +0000 Subject: [issue30960] Python script is failing to run In-Reply-To: <1500388507.9.0.411751437565.issue30960@psf.upfronthosting.co.za> Message-ID: <1500389009.39.0.432502293638.issue30960@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 10:48:46 2017 From: report at bugs.python.org (Megha HR) Date: Tue, 18 Jul 2017 14:48:46 +0000 Subject: [issue30960] Python script is failing to run In-Reply-To: <1500388507.9.0.411751437565.issue30960@psf.upfronthosting.co.za> Message-ID: <1500389326.09.0.712693769512.issue30960@psf.upfronthosting.co.za> Megha HR added the comment: Hi Serhiy, Thanks a lot for your comment. Yes we do aware that 3.2V is outdated. Our plan is to upgrade to latest version. Otherside, It'll be great if you can let us know any root cause for below mentioned error message and how to overcome the same. ./python32.sh Fatal Python error: Py_Initialize: Unable to get the locale encoding EOFError: EOF read where not expected Abort (core dumped) ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 10:49:08 2017 From: report at bugs.python.org (Max Rothman) Date: Tue, 18 Jul 2017 14:49:08 +0000 Subject: [issue30821] unittest.mock.Mocks with specs aren't aware of default arguments In-Reply-To: <1498842809.59.0.716482523297.issue30821@psf.upfronthosting.co.za> Message-ID: <1500389348.0.0.491315035568.issue30821@psf.upfronthosting.co.za> Max Rothman added the comment: Hi, just wanted to ping this again and see if there was any movement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 11:02:54 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 18 Jul 2017 15:02:54 +0000 Subject: [issue30960] Python script is failing to run In-Reply-To: <1500388507.9.0.411751437565.issue30960@psf.upfronthosting.co.za> Message-ID: <1500390174.19.0.749955063228.issue30960@psf.upfronthosting.co.za> Louie Lu added the comment: Your information isn't that clear, this is what I found on the Internet: https://techglimpse.com/error-executing-python3-5-command-solution/ https://unix.stackexchange.com/questions/17863/py3compile-error-unable-to-get-the-locale-encoding Maybe your environment variable PYTHONHOME or PYTHONPATH had some problem. ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 11:05:09 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Jul 2017 15:05:09 +0000 Subject: [issue30946] readline module has obsolete code In-Reply-To: <1500287514.28.0.548586494402.issue30946@psf.upfronthosting.co.za> Message-ID: <1500390309.11.0.664342072565.issue30946@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset f474c5a3f3c1fbc0383800b88e8518d43a52d1d1 by Antoine Pitrou in branch 'master': bpo-30946: Remove obsolete fallback code in readline module (#2738) https://github.com/python/cpython/commit/f474c5a3f3c1fbc0383800b88e8518d43a52d1d1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 11:05:24 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Jul 2017 15:05:24 +0000 Subject: [issue30946] readline module has obsolete code In-Reply-To: <1500287514.28.0.548586494402.issue30946@psf.upfronthosting.co.za> Message-ID: <1500390324.22.0.713851021344.issue30946@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 11:21:12 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 18 Jul 2017 15:21:12 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1500391272.72.0.68279400082.issue30940@psf.upfronthosting.co.za> R. David Murray added the comment: We don't need to burden Mark with doing a PR for this (unless he wants to). This is a good new contributer practice issue :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 11:24:54 2017 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 18 Jul 2017 15:24:54 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1500391494.41.0.776702426936.issue30940@psf.upfronthosting.co.za> Mark Dickinson added the comment: Serhiy: I thought your GitHub PR (https://github.com/python/cpython/pull/2740) already included the new wording? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 11:25:50 2017 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 18 Jul 2017 15:25:50 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1500391550.43.0.545289901577.issue30940@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ah, sorry; I see. That was just for the docstring, not for the docs. My bad. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 11:26:05 2017 From: report at bugs.python.org (Megha HR) Date: Tue, 18 Jul 2017 15:26:05 +0000 Subject: [issue30960] Python script is failing to run In-Reply-To: <1500388507.9.0.411751437565.issue30960@psf.upfronthosting.co.za> Message-ID: <1500391565.74.0.703619529668.issue30960@psf.upfronthosting.co.za> Megha HR added the comment: Thanks louielu for your response. Yes I did check related to env & its python path, this looks ok. #!/usr/sunos/bin/sh -x # This script is a wrapper for the official OSS python PYTHON=/opt/python/python/python3.2 PYTHON_ENV=/etc/opt/ericsson/3ppenv/python.env if [ -r $PYTHON_ENV ]; then . $PYTHON_ENV && export PYTHONHOME && export PYTHONPATH $PYTHON $* else echo "reading $PYTHON_ENV failed" exit 1 fi Do you still suggest to export it again ? May I know in which scenarios 1)We can see the mentioned error message 2) core dump will happen for python? Appreciate your comment. Also we can see lots and lots of core files of python; -rw------- 1 nmsadm nms 7426844 Jul 14 07:05 python3.2.14513 -rw------- 1 nmsadm nms 7426844 Jul 14 07:05 python3.2.14551 -rw------- 1 nmsadm nms 7426844 Jul 14 07:05 python3.2.14651 -rw------- 1 nmsadm nms 7426844 Jul 14 07:05 python3.2.14739 -rw------- 1 nmsadm nms 7410460 Jul 14 07:05 python3.2.15279 -rw------- 1 nmsadm nms 7410460 Jul 14 07:05 python3.2.15291 -rw------- 1 nmsadm nms 7426844 Jul 14 07:05 python3.2.15290 -rw------- 1 nmsadm nms 7430940 Jul 14 07:05 python3.2.15288 -rw------- 1 nmsadm nms 7426844 Jul 14 07:05 python3.2.15368 -rw------- 1 nmsadm nms 7410460 Jul 14 07:05 python3.2.15374 -rw------- 1 nmsadm nms 7426844 Jul 14 07:05 python3.2.15575 -rw------- 1 nmsadm nms 7426844 Jul 14 07:05 python3.2.15641 -rw------- 1 nmsadm nms 7426844 Jul 14 07:05 python3.2.15792 -rw------- 1 nmsadm nms 7410460 Jul 14 07:06 python3.2.16645 -rw------- 1 nmsadm nms 7430940 Jul 14 07:06 python3.2.16652 -rw------- 1 nmsadm nms 7410460 Jul 14 07:06 python3.2.16728 -rw------- 1 nmsadm nms 7410460 Jul 14 07:06 python3.2.16895 -rw------- 1 nmsadm nms 7426844 Jul 14 07:06 python3.2.17082 -rw------- 1 nmsadm nms 7426844 Jul 14 07:06 python3.2.17273 -rw------- 1 nmsadm nms 7426844 Jul 14 07:06 python3.2.17305 -rw------- 1 nmsadm nms 7426844 Jul 14 07:06 python3.2.17365 -rw------- 1 nmsadm nms 7426844 Jul 14 07:06 python3.2.17462 #date Tue Jul 18 16:24:44 IST 2017 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 11:29:55 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 18 Jul 2017 15:29:55 +0000 Subject: [issue30960] Python script is failing to run In-Reply-To: <1500388507.9.0.411751437565.issue30960@psf.upfronthosting.co.za> Message-ID: <1500391795.43.0.123100771679.issue30960@psf.upfronthosting.co.za> R. David Murray added the comment: This is a bug tracker for Python. 3.2 is out of maintenance, so such a question is not appropriate for this forum. In any case it is an issue with your install, not with Python itself, so again not appropriate for this forum. You should ask for help on the python-list mailing list, or the #python irc channel on freenode. I wish we could help you here, but we need to keep this forum focused on bugs in Python itself. Please do not reopen the issue. louielu, if you want to continue to help Megha, which would be great, please take it to private email. ---------- nosy: +r.david.murray status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 11:34:26 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Jul 2017 15:34:26 +0000 Subject: [issue30794] Add multiprocessing.Process.kill() In-Reply-To: <1498680221.55.0.739149893408.issue30794@psf.upfronthosting.co.za> Message-ID: <1500392066.23.0.670529163117.issue30794@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset ba75af713078966cc594fc7f0809ed53c532c58f by Antoine Pitrou (Vitor Pereira) in branch 'master': bpo-30794: added kill() method to multiprocessing.Process (#2528) https://github.com/python/cpython/commit/ba75af713078966cc594fc7f0809ed53c532c58f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 11:34:58 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Jul 2017 15:34:58 +0000 Subject: [issue30794] Add multiprocessing.Process.kill() In-Reply-To: <1498680221.55.0.739149893408.issue30794@psf.upfronthosting.co.za> Message-ID: <1500392098.65.0.501092904921.issue30794@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 11:35:11 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Jul 2017 15:35:11 +0000 Subject: [issue30794] Add multiprocessing.Process.kill() In-Reply-To: <1498680221.55.0.739149893408.issue30794@psf.upfronthosting.co.za> Message-ID: <1500392111.99.0.0260904820105.issue30794@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: not a bug -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 11:44:55 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 18 Jul 2017 15:44:55 +0000 Subject: [issue30961] Py_Decref a borrowed reference in _tracemalloc Message-ID: <1500392695.23.0.976097445476.issue30961@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- components: Extension Modules nosy: xiang.zhang priority: normal severity: normal stage: patch review status: open title: Py_Decref a borrowed reference in _tracemalloc versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 11:51:08 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 18 Jul 2017 15:51:08 +0000 Subject: [issue30961] Py_Decref a borrowed reference in _tracemalloc Message-ID: <1500393068.41.0.46770820947.issue30961@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +2806 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 11:52:19 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 18 Jul 2017 15:52:19 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500393139.86.0.776627962664.issue28638@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > Should we consider a C-based implementation like https://github.com/llllllllll/cnamedtuple? > It could improve speed even more, but would be harder to maintain and > test and harder to keep compatible. My sense is that it's not worth > it unless benchmarks show a really dramatic difference. I've just filed a ticket for this: https://github.com/llllllllll/cnamedtuple/issues/7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 12:25:21 2017 From: report at bugs.python.org (Arlo Clarke) Date: Tue, 18 Jul 2017 16:25:21 +0000 Subject: [issue30956] ftplib socket timeout can't be handled In-Reply-To: <1500332728.63.0.200349009774.issue30956@psf.upfronthosting.co.za> Message-ID: <1500395121.59.0.0116825098973.issue30956@psf.upfronthosting.co.za> Arlo Clarke added the comment: Thanks David. Lowering the timeout to below 60s seems to have resolved this issue. Or at least the error isn't being thrown anymore. I don't know why the error couldn't be handled in the first place, however. ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 12:33:32 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 18 Jul 2017 16:33:32 +0000 Subject: [issue30961] Py_Decref a borrowed reference in _tracemalloc Message-ID: <1500395612.92.0.495700362962.issue30961@psf.upfronthosting.co.za> New submission from Xiang Zhang: New changeset 4ed5ad79ec6c6270e6018bd0a55656305ee60907 by Xiang Zhang in branch 'master': bpo-30961: Fix decrementing a borrowed reference in tracemalloc. (#2747) https://github.com/python/cpython/commit/4ed5ad79ec6c6270e6018bd0a55656305ee60907 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 12:37:38 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 18 Jul 2017 16:37:38 +0000 Subject: [issue30961] Py_Decref a borrowed reference in _tracemalloc In-Reply-To: <1500395612.92.0.495700362962.issue30961@psf.upfronthosting.co.za> Message-ID: <1500395858.04.0.535879368867.issue30961@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +2807 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 12:38:14 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 18 Jul 2017 16:38:14 +0000 Subject: [issue30961] Py_Decref a borrowed reference in _tracemalloc In-Reply-To: <1500395612.92.0.495700362962.issue30961@psf.upfronthosting.co.za> Message-ID: <1500395894.3.0.13073318925.issue30961@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +2808 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 12:50:54 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 18 Jul 2017 16:50:54 +0000 Subject: [issue30961] Py_Decref a borrowed reference in _tracemalloc In-Reply-To: <1500395612.92.0.495700362962.issue30961@psf.upfronthosting.co.za> Message-ID: <1500396654.57.0.416775881317.issue30961@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 241c4a28d9fec7f2beffc9cbd21f156999959a9d by Xiang Zhang in branch '3.6': bpo-30961: Fix decrementing a borrowed reference in tracemalloc. (#2747) (#2748) https://github.com/python/cpython/commit/241c4a28d9fec7f2beffc9cbd21f156999959a9d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 12:52:00 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 18 Jul 2017 16:52:00 +0000 Subject: [issue30961] Py_Decref a borrowed reference in _tracemalloc In-Reply-To: <1500395612.92.0.495700362962.issue30961@psf.upfronthosting.co.za> Message-ID: <1500396720.4.0.168868887253.issue30961@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset cb3f024f3ac91e468d581f0682e63685c977c80d by Xiang Zhang in branch '3.5': bpo-30961: Fix decrementing a borrowed reference in tracemalloc. (#2747) (#2749) https://github.com/python/cpython/commit/cb3f024f3ac91e468d581f0682e63685c977c80d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 12:58:39 2017 From: report at bugs.python.org (Megha HR) Date: Tue, 18 Jul 2017 16:58:39 +0000 Subject: [issue30960] Python script is failing to run In-Reply-To: <1500388507.9.0.411751437565.issue30960@psf.upfronthosting.co.za> Message-ID: <1500397119.09.0.799606671353.issue30960@psf.upfronthosting.co.za> Megha HR added the comment: Hi, python-list mailing list, or the #python irc channel on freenode. May I know python mailing list please? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 13:03:18 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 18 Jul 2017 17:03:18 +0000 Subject: [issue30961] Py_Decref a borrowed reference in _tracemalloc In-Reply-To: <1500395612.92.0.495700362962.issue30961@psf.upfronthosting.co.za> Message-ID: <1500397398.38.0.928863978747.issue30961@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 13:09:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Jul 2017 17:09:46 +0000 Subject: [issue30960] Python script is failing to run In-Reply-To: <1500388507.9.0.411751437565.issue30960@psf.upfronthosting.co.za> Message-ID: <1500397786.81.0.827630273579.issue30960@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: https://www.python.org/community/lists/ https://www.python.org/community/irc/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 13:31:55 2017 From: report at bugs.python.org (Steve Dower) Date: Tue, 18 Jul 2017 17:31:55 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500399115.1.0.26286895918.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 5feda33a35d9413e2073411b848dc49d94c57497 by Steve Dower in branch 'master': bpo-30450: Fix logic for retrying nuget.exe download (#2744) https://github.com/python/cpython/commit/5feda33a35d9413e2073411b848dc49d94c57497 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 13:45:22 2017 From: report at bugs.python.org (Steve Dower) Date: Tue, 18 Jul 2017 17:45:22 +0000 Subject: [issue30540] regrtest: add --matchfile option In-Reply-To: <1496345954.5.0.308373538443.issue30540@psf.upfronthosting.co.za> Message-ID: <1500399922.25.0.57550241704.issue30540@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- pull_requests: +2809 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 13:51:53 2017 From: report at bugs.python.org (Steve Dower) Date: Tue, 18 Jul 2017 17:51:53 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500400313.13.0.453403016812.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: Zach - did this get backported to 2.7 or 3.5? It doesn't look like it. ---------- stage: commit review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 13:52:17 2017 From: report at bugs.python.org (Steve Dower) Date: Tue, 18 Jul 2017 17:52:17 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500400337.72.0.149136054602.issue30450@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- pull_requests: +2810 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 13:52:29 2017 From: report at bugs.python.org (Steve Dower) Date: Tue, 18 Jul 2017 17:52:29 +0000 Subject: [issue30540] regrtest: add --matchfile option In-Reply-To: <1496345954.5.0.308373538443.issue30540@psf.upfronthosting.co.za> Message-ID: <1500400349.53.0.361596624571.issue30540@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- pull_requests: -2809 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 14:02:55 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 18 Jul 2017 18:02:55 +0000 Subject: [issue30956] ftplib socket timeout can't be handled In-Reply-To: <1500332728.63.0.200349009774.issue30956@psf.upfronthosting.co.za> Message-ID: <1500400975.83.0.808148667127.issue30956@psf.upfronthosting.co.za> R. David Murray added the comment: I would like to leave this issue open. It is clear that the behavior for long timeouts does not match the docs, and that should be investigated if someone has the motivation :) ---------- resolution: works for me -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 14:04:50 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 18 Jul 2017 18:04:50 +0000 Subject: [issue30956] ftplib behaves oddly if socket timeout is greater than the default In-Reply-To: <1500332728.63.0.200349009774.issue30956@psf.upfronthosting.co.za> Message-ID: <1500401090.97.0.652882094995.issue30956@psf.upfronthosting.co.za> R. David Murray added the comment: I changed the title to reflect the problem, but note that I'm *assuming* it is "greater than the default" that is the issue, I haven't actually tested that theory. ---------- title: ftplib socket timeout can't be handled -> ftplib behaves oddly if socket timeout is greater than the default _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 14:05:10 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 18 Jul 2017 18:05:10 +0000 Subject: [issue30956] ftplib behaves oddly if socket timeout is greater than the default In-Reply-To: <1500332728.63.0.200349009774.issue30956@psf.upfronthosting.co.za> Message-ID: <1500401110.4.0.0882013972421.issue30956@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- type: crash -> behavior versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 16:24:53 2017 From: report at bugs.python.org (Avram) Date: Tue, 18 Jul 2017 20:24:53 +0000 Subject: [issue30962] Add caching to logging.Logger.isEnabledFor() Message-ID: <1500409493.45.0.605739415496.issue30962@psf.upfronthosting.co.za> New submission from Avram: Checking to see if a log level is enabled can add non-insignificant time to programs with a large number of logging statements. This issue is to track a pull request which introduces caching to the logging module so checking to see if a log level is enabled takes half the current time. Benchmark code is in the referenced pull request ---------- components: Library (Lib) messages: 298612 nosy: aviso priority: normal pull_requests: 2811 severity: normal status: open title: Add caching to logging.Logger.isEnabledFor() type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 16:31:43 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Jul 2017 20:31:43 +0000 Subject: [issue30962] Add caching to logging.Logger.isEnabledFor() In-Reply-To: <1500409493.45.0.605739415496.issue30962@psf.upfronthosting.co.za> Message-ID: <1500409903.32.0.76711386666.issue30962@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 16:34:27 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Jul 2017 20:34:27 +0000 Subject: [issue30962] Add caching to logging.Logger.isEnabledFor() In-Reply-To: <1500409493.45.0.605739415496.issue30962@psf.upfronthosting.co.za> Message-ID: <1500410067.89.0.781123911503.issue30962@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Does this speed up actual logging calls such logger.info, etc? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 16:44:43 2017 From: report at bugs.python.org (Avram) Date: Tue, 18 Jul 2017 20:44:43 +0000 Subject: [issue30962] Add caching to logging.Logger.isEnabledFor() In-Reply-To: <1500409493.45.0.605739415496.issue30962@psf.upfronthosting.co.za> Message-ID: <1500410683.46.0.120266550473.issue30962@psf.upfronthosting.co.za> Avram added the comment: Yes, though the bottleneck for normal logging is more likely in other areas so the speedup will be less noticeable. Where I notice it is with debug statements when debugging is disabled. In that scenario the bulk of the time is spent checking if the level is enabled anywhere in the ancestry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 16:45:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Jul 2017 20:45:55 +0000 Subject: [issue30962] Add caching to logging.Logger.isEnabledFor() In-Reply-To: <1500409493.45.0.605739415496.issue30962@psf.upfronthosting.co.za> Message-ID: <1500410755.91.0.694489276681.issue30962@psf.upfronthosting.co.za> STINNER Victor added the comment: >> Benchmark code is in the referenced pull request > Does this speed up actual logging calls such logger.info, etc? According to the benchmark in the PR, it's 50% faster when the log is ignored, like a debug call in production. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 17:17:58 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 18 Jul 2017 21:17:58 +0000 Subject: [issue30917] IDLE: Add idlelib.config.IdleConf unittest In-Reply-To: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> Message-ID: <1500412678.43.0.396769610177.issue30917@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset f776eb0f0e046f2fa3a96540bb42d8cf970f6c55 by terryjreedy (Louie Lu) in branch 'master': bpo-30917: IDLE: Add config.IdleConf unittests (#2691) https://github.com/python/cpython/commit/f776eb0f0e046f2fa3a96540bb42d8cf970f6c55 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 17:17:58 2017 From: report at bugs.python.org (Jim Jewett) Date: Tue, 18 Jul 2017 21:17:58 +0000 Subject: [issue30963] xxlimited.c XxoObject_Check should be XxoObject_CheckExact Message-ID: <1500412678.84.0.816991478409.issue30963@psf.upfronthosting.co.za> New submission from Jim Jewett: https://github.com/python/cpython/blob/master/Modules/xxlimited.c#L28 #define XxoObject_Check(v) (Py_TYPE(v) == Xxo_Type) assumes that the type cannot be subclassed, but does not say so. Since this is demo code, it would be better to use something like decimal: #define PyDec_CheckExact(v) (Py_TYPE(v) == &PyDec_Type) #define PyDec_Check(v) PyObject_TypeCheck(v, &PyDec_Type) I *believe* (but haven't verified) that would be: #define XxoObject_CheckExact(v) (Py_TYPE(v) == &Xxo_Type) #define XxoObject_Check(v) PyObject_TypeCheck(v, &Xxo_Type) ---------- components: Extension Modules messages: 298617 nosy: Jim.Jewett priority: normal severity: normal stage: needs patch status: open title: xxlimited.c XxoObject_Check should be XxoObject_CheckExact type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 17:20:36 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 18 Jul 2017 21:20:36 +0000 Subject: [issue30917] IDLE: Add idlelib.config.IdleConf unittest In-Reply-To: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> Message-ID: <1500412836.55.0.800550044581.issue30917@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2812 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 19:05:24 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 18 Jul 2017 23:05:24 +0000 Subject: [issue30917] IDLE: Add idlelib.config.IdleConf unittest In-Reply-To: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> Message-ID: <1500419124.25.0.543196817799.issue30917@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The deepcopy does not work on 3.6. Any fix should be applied to 3.7 as well. If nothing else, we should try to reload with read_string. This is a blocker for merging anything else into config and test_config. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 20:08:17 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 19 Jul 2017 00:08:17 +0000 Subject: [issue30958] Scripts folder is empty In-Reply-To: <1500364843.66.0.331726740083.issue30958@psf.upfronthosting.co.za> Message-ID: <1500422897.12.0.835129140733.issue30958@psf.upfronthosting.co.za> Ned Deily added the comment: Sorry, but you are going to have supply more information for anyone to attempt to give an answer. Please indicated exactly how you are trying to install Python (building from source, with one of the binary installers, etc), which operating system and version, which version of Python, and the path to the empty Scripts folder. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 20:44:40 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 19 Jul 2017 00:44:40 +0000 Subject: [issue30585] [security][3.3] Backport smtplib fix for TLS stripping vulnerability, CVE-2016-0772 In-Reply-To: <1496824592.96.0.351417246075.issue30585@psf.upfronthosting.co.za> Message-ID: <1500425080.83.0.416363283506.issue30585@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 3625f7fd11679ecb390ffa58ef36d487acc8159b by Ned Deily (Victor Stinner) in branch '3.3': [3.3] bpo-30585: [security] raise an error when STARTTLS fails (#225) https://github.com/python/cpython/commit/3625f7fd11679ecb390ffa58ef36d487acc8159b ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 20:46:42 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 19 Jul 2017 00:46:42 +0000 Subject: [issue30585] [security][3.3] Backport smtplib fix for TLS stripping vulnerability, CVE-2016-0772 In-Reply-To: <1496824592.96.0.351417246075.issue30585@psf.upfronthosting.co.za> Message-ID: <1500425202.59.0.742039046154.issue30585@psf.upfronthosting.co.za> Ned Deily added the comment: Merged for release in 3.3.7rc1 ---------- priority: release blocker -> resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 20:48:01 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 19 Jul 2017 00:48:01 +0000 Subject: [issue30964] Mention ensurepip in package installation docs Message-ID: <1500425281.82.0.79058660024.issue30964@psf.upfronthosting.co.za> New submission from Nick Coghlan: The package installation docs at https://github.com/python/cpython/blob/master/Doc/installing/index.rst have a section on "Common Installation Issues": https://docs.python.org/3/installing/#common-installation-issues A new entry should be added to this section to cover the case where pip isn't installed by default (e.g. because it was deselected when running the installer), and to suggest trying "python -m ensurepip --default-pip" as a potential remedy. ---------- assignee: docs at python components: Documentation keywords: easy messages: 298622 nosy: docs at python, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Mention ensurepip in package installation docs type: enhancement versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 21:00:08 2017 From: report at bugs.python.org (Leo kerr) Date: Wed, 19 Jul 2017 01:00:08 +0000 Subject: [issue30958] Scripts folder is empty In-Reply-To: <1500422897.12.0.835129140733.issue30958@psf.upfronthosting.co.za> Message-ID: <596eaf13.4e38630a.33025.62ab@mx.google.com> Leo kerr added the comment: Nvm turns out the modules in the folder were hidden for some reason. Thanks anyway. Sent from Mail for Windows 10 From: Ned Deily Sent: Wednesday, 19 July 2017 10:08 AM To: leo.kerr300 at gmail.com Subject: [issue30958] Scripts folder is empty Ned Deily added the comment: Sorry, but you are going to have supply more information for anyone to attempt to give an answer. Please indicated exactly how you are trying to install Python (building from source, with one of the binary installers, etc), which operating system and version, which version of Python, and the path to the empty Scripts folder. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 21:00:46 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 19 Jul 2017 01:00:46 +0000 Subject: [issue30958] Scripts folder is empty In-Reply-To: <1500364843.66.0.331726740083.issue30958@psf.upfronthosting.co.za> Message-ID: <1500426046.67.0.556120356534.issue30958@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 21:05:23 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 19 Jul 2017 01:05:23 +0000 Subject: [issue29144] Implicit namespace packages in Python 3.6 In-Reply-To: <1483468021.78.0.379899829208.issue29144@psf.upfronthosting.co.za> Message-ID: <1500426323.59.0.726838300645.issue29144@psf.upfronthosting.co.za> Nick Coghlan added the comment: Are you able to confirm the version of setuptools involved is the same in both cases? The reason I ask is that the interaction between pkg_resources-style namespace packages and native ones is known to be temperamental (https://packaging.python.org/guides/packaging-namespace-packages/#creating-a-namespace-package), and the suggested resolution is to make sure that if you're using pkg_resources namespaces at all then *all* packages contributing to the namespace should be using them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 21:11:44 2017 From: report at bugs.python.org (Louie Lu) Date: Wed, 19 Jul 2017 01:11:44 +0000 Subject: [issue30917] IDLE: Add idlelib.config.IdleConf unittest In-Reply-To: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> Message-ID: <1500426704.93.0.628321441288.issue30917@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +2813 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 21:12:11 2017 From: report at bugs.python.org (Louie Lu) Date: Wed, 19 Jul 2017 01:12:11 +0000 Subject: [issue30917] IDLE: Add idlelib.config.IdleConf unittest In-Reply-To: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> Message-ID: <1500426731.57.0.495406368067.issue30917@psf.upfronthosting.co.za> Louie Lu added the comment: PR 2754 changed it to use `read_string`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 21:43:37 2017 From: report at bugs.python.org (Ammar Askar) Date: Wed, 19 Jul 2017 01:43:37 +0000 Subject: [issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address In-Reply-To: <1499633339.94.0.136665886268.issue30883@psf.upfronthosting.co.za> Message-ID: <1500428617.0.0.650311429052.issue30883@psf.upfronthosting.co.za> Changes by Ammar Askar : ---------- pull_requests: +2814 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 21:47:00 2017 From: report at bugs.python.org (Ammar Askar) Date: Wed, 19 Jul 2017 01:47:00 +0000 Subject: [issue22650] set up and use VM for net access in the test suite In-Reply-To: <1413412028.88.0.410856906094.issue22650@psf.upfronthosting.co.za> Message-ID: <1500428820.9.0.0875612177311.issue22650@psf.upfronthosting.co.za> Ammar Askar added the comment: Opened up https://github.com/python/cpython/pull/2755/ in order to address https://bugs.python.org/issue30883 This changes the ftp servers from debian.org to pythontest.net ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 22:30:02 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 19 Jul 2017 02:30:02 +0000 Subject: [issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address In-Reply-To: <1499633339.94.0.136665886268.issue30883@psf.upfronthosting.co.za> Message-ID: <1500431402.56.0.97665830558.issue30883@psf.upfronthosting.co.za> Berker Peksag added the comment: I merged Ammar's PR in d81bea6520892e0428aec61c73e0631a69db11bb, but it looks like I missed that the PR title and commit message was different and the latter didn't contain bpo-30883. ---------- stage: needs patch -> backport needed versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 22:40:12 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 19 Jul 2017 02:40:12 +0000 Subject: [issue30730] [security] Injecting environment variable in subprocess on Windows In-Reply-To: <1498118820.13.0.596038385019.issue30730@psf.upfronthosting.co.za> Message-ID: <1500432012.9.0.146488296135.issue30730@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset e46f1c19642ea1882f427d8246987ba49351a97d by Ned Deily (Serhiy Storchaka) in branch '3.3': [security][3.3] bpo-30730: Prevent environment variables injection in subprocess on Windows. (GH-2325) (#2363) https://github.com/python/cpython/commit/e46f1c19642ea1882f427d8246987ba49351a97d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 22:53:37 2017 From: report at bugs.python.org (Ammar Askar) Date: Wed, 19 Jul 2017 02:53:37 +0000 Subject: [issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address In-Reply-To: <1499633339.94.0.136665886268.issue30883@psf.upfronthosting.co.za> Message-ID: <1500432817.97.0.552930827585.issue30883@psf.upfronthosting.co.za> Changes by Ammar Askar : ---------- pull_requests: +2815 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 22:59:33 2017 From: report at bugs.python.org (Ammar Askar) Date: Wed, 19 Jul 2017 02:59:33 +0000 Subject: [issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address In-Reply-To: <1499633339.94.0.136665886268.issue30883@psf.upfronthosting.co.za> Message-ID: <1500433173.97.0.881746800252.issue30883@psf.upfronthosting.co.za> Changes by Ammar Askar : ---------- pull_requests: +2816 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 23:02:19 2017 From: report at bugs.python.org (Ammar Askar) Date: Wed, 19 Jul 2017 03:02:19 +0000 Subject: [issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address In-Reply-To: <1499633339.94.0.136665886268.issue30883@psf.upfronthosting.co.za> Message-ID: <1500433339.27.0.520881599197.issue30883@psf.upfronthosting.co.za> Changes by Ammar Askar : ---------- pull_requests: +2817 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 00:07:51 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 19 Jul 2017 04:07:51 +0000 Subject: [issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address In-Reply-To: <1499633339.94.0.136665886268.issue30883@psf.upfronthosting.co.za> Message-ID: <1500437271.55.0.171757710226.issue30883@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset a739000db55ef55e69a53ca6966ea8657cac4354 by Berker Peksag (Ammar Askar) in branch '2.7': [2.7] bpo-30883: Use pythontest.net instead of debian.org in test_urllib2net (GH-2755) https://github.com/python/cpython/commit/a739000db55ef55e69a53ca6966ea8657cac4354 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 00:41:07 2017 From: report at bugs.python.org (Joe Jevnik) Date: Wed, 19 Jul 2017 04:41:07 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500439267.96.0.293326739947.issue28638@psf.upfronthosting.co.za> Joe Jevnik added the comment: I added a benchmark suite (using Victor's perf utility) to cnamedtuple. The results are here: https://github.com/llllllllll/cnamedtuple#benchmarks To summarize: type creation is much faster; instance creation and named attribute access are a bit faster. ---------- nosy: +llllllllll _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 00:42:27 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Wed, 19 Jul 2017 04:42:27 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500439347.48.0.503234161256.issue28638@psf.upfronthosting.co.za> Jelle Zijlstra added the comment: I benchmarked some common namedtuple operations with the following script: #!/bin/bash echo 'namedtuple creation' ./python -m timeit -s 'from collections import namedtuple' 'x = namedtuple("x", ["a", "b", "c"])' echo 'namedtuple instantiation' ./python -m timeit -s 'from collections import namedtuple; x = namedtuple("x", ["a", "b", "c"])' 'x(1, 2, 3)' echo 'namedtuple attribute access' ./python -m timeit -s 'from collections import namedtuple; x = namedtuple("x", ["a", "b", "c"]); i = x(1, 2, 3)' 'i.a' echo 'namedtuple _make' ./python -m timeit -s 'from collections import namedtuple; x = namedtuple("x", ["a", "b", "c"])' 'x._make((1, 2, 3))' -------------------------------------- With my patch as it stands now I get: $ ./ntbenchmark.sh namedtuple creation 2000 loops, best of 5: 101 usec per loop namedtuple instantiation 500000 loops, best of 5: 477 nsec per loop namedtuple attribute access 5000000 loops, best of 5: 59.9 nsec per loop namedtuple _make 500000 loops, best of 5: 430 nsec per loop -------------------------------------- With unpatched CPython master I get: $ ./ntbenchmark.sh namedtuple creation 500 loops, best of 5: 409 usec per loop namedtuple instantiation 500000 loops, best of 5: 476 nsec per loop namedtuple attribute access 5000000 loops, best of 5: 60 nsec per loop namedtuple _make 1000000 loops, best of 5: 389 nsec per loop So creating a class is about 4x faster (similar to the benchmarks various other people have run) and calling _make() is 10% slower. That's probably because of the line "if len(result) != cls._num_fields:" in my implementation, which would have been something like "if len(result) != 3" in the exec-based implementation. I also cProfiled class creation with my patch. These are results for creating 10000 3-element namedtuple classes: 390005 function calls in 2.793 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 10000 0.053 0.000 2.826 0.000 :1(make_nt) 10000 1.099 0.000 2.773 0.000 /home/jelle/qython/cpython/Lib/collections/__init__.py:380(namedtuple) 10000 0.948 0.000 0.981 0.000 {built-in method builtins.exec} 100000 0.316 0.000 0.316 0.000 {method 'format' of 'str' objects} 10000 0.069 0.000 0.220 0.000 {method 'join' of 'str' objects} 40000 0.071 0.000 0.152 0.000 /home/jelle/qython/cpython/Lib/collections/__init__.py:439() 10000 0.044 0.000 0.044 0.000 {built-in method builtins.repr} 30000 0.033 0.000 0.033 0.000 {method 'startswith' of 'str' objects} 40000 0.031 0.000 0.031 0.000 {method 'isidentifier' of 'str' objects} 40000 0.025 0.000 0.025 0.000 {method '__contains__' of 'frozenset' objects} 10000 0.022 0.000 0.022 0.000 {method 'replace' of 'str' objects} 10000 0.022 0.000 0.022 0.000 {built-in method sys._getframe} 30000 0.020 0.000 0.020 0.000 {method 'add' of 'set' objects} 20000 0.018 0.000 0.018 0.000 {built-in method builtins.len} 10000 0.013 0.000 0.013 0.000 {built-in method builtins.isinstance} 10000 0.009 0.000 0.009 0.000 {method 'get' of 'dict' objects} So about 35% of time is still spent in the exec() call to create __new__. Another 10% is in .format() calls, so using f-strings instead of .format() might also be worth it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 01:17:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Jul 2017 05:17:56 +0000 Subject: [issue30730] [security] Injecting environment variable in subprocess on Windows In-Reply-To: <1498118820.13.0.596038385019.issue30730@psf.upfronthosting.co.za> Message-ID: <1500441476.41.0.81644922074.issue30730@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 01:20:19 2017 From: report at bugs.python.org (Kubilay Kocak) Date: Wed, 19 Jul 2017 05:20:19 +0000 Subject: [issue29225] distutils.command.install_lib.get_outputs() wrong with extensions built inplace In-Reply-To: <1484062635.84.0.0152072002193.issue29225@psf.upfronthosting.co.za> Message-ID: <1500441619.64.0.718160685272.issue29225@psf.upfronthosting.co.za> Changes by Kubilay Kocak : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 01:20:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Jul 2017 05:20:50 +0000 Subject: [issue11230] "Full unicode import system" not in 3.2 In-Reply-To: <1297926635.95.0.756299771372.issue11230@psf.upfronthosting.co.za> Message-ID: <1500441650.36.0.117693471287.issue11230@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Python 3.2 is out of maintenance. Full Unicode path support was added in Python 3.3 by issue3080. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 01:22:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Jul 2017 05:22:10 +0000 Subject: [issue14975] import unicodedata, DLL load failed on Python 2.7.3 In-Reply-To: <1338504145.87.0.920765614951.issue14975@psf.upfronthosting.co.za> Message-ID: <1500441730.85.0.5547794127.issue14975@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 01:28:38 2017 From: report at bugs.python.org (Mihai Cara) Date: Wed, 19 Jul 2017 05:28:38 +0000 Subject: [issue30965] Unexpected behavior of operator "in" Message-ID: <1500442117.99.0.958324013572.issue30965@psf.upfronthosting.co.za> New submission from Mihai Cara: Unexpected behavior of operator "in" when checking if a list/tuple/etc. contains a value: >>> 1 in [1] is True False >>> (1 in [1]) is True True Is this a bug? If not, please explain why first variant return False. ---------- messages: 298633 nosy: mcara priority: normal severity: normal status: open title: Unexpected behavior of operator "in" type: behavior versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 01:34:31 2017 From: report at bugs.python.org (Ammar Askar) Date: Wed, 19 Jul 2017 05:34:31 +0000 Subject: [issue30965] Unexpected behavior of operator "in" In-Reply-To: <1500442117.99.0.958324013572.issue30965@psf.upfronthosting.co.za> Message-ID: <1500442471.68.0.0140043612978.issue30965@psf.upfronthosting.co.za> Ammar Askar added the comment: Check out this section of the documentation, notably this part: "Note that comparisons, membership tests, and identity tests, all have the same precedence and have a left-to-right chaining feature" Chaining lets you write stuff like this: >>> x = 1 >>> 0 < x < 2 True And since membership tests and identity tests are chained, the code you posted above essentially turns into: (1 in [1]) and ([1] is True) The former part of that expression is True but the latter is false. ---------- nosy: +ammar2 resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 01:34:56 2017 From: report at bugs.python.org (Ammar Askar) Date: Wed, 19 Jul 2017 05:34:56 +0000 Subject: [issue30965] Unexpected behavior of operator "in" In-Reply-To: <1500442117.99.0.958324013572.issue30965@psf.upfronthosting.co.za> Message-ID: <1500442496.1.0.626008026841.issue30965@psf.upfronthosting.co.za> Ammar Askar added the comment: Sorry, forgot the actual link. https://docs.python.org/3/reference/expressions.html#operator-precedence ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 01:35:50 2017 From: report at bugs.python.org (Tim Peters) Date: Wed, 19 Jul 2017 05:35:50 +0000 Subject: [issue30965] Unexpected behavior of operator "in" In-Reply-To: <1500442117.99.0.958324013572.issue30965@psf.upfronthosting.co.za> Message-ID: <1500442550.68.0.71680108434.issue30965@psf.upfronthosting.co.za> Tim Peters added the comment: Not a bug. For an explanation, I just answered a very similar question on StackOverflow: https://stackoverflow.com/questions/45180899/unexpected-result-from-in-operator/45180967#45180899 ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 01:39:47 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Wed, 19 Jul 2017 05:39:47 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500442787.58.0.538233281427.issue28638@psf.upfronthosting.co.za> Jelle Zijlstra added the comment: Thanks Joe! I adapted your benchmark suite to also run my implementation. See https://github.com/JelleZijlstra/cnamedtuple/commit/61b6fbf4de37f8131ab43c619593327004974e52 for the code and results. The results are consistent with what we've seen before. Joe's cnamedtuple is about 40x faster for class creation than the current implementation, and my PR only speeds class creation up by 4x. That difference is big enough that I think we should seriously consider using the C implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 01:44:29 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 19 Jul 2017 05:44:29 +0000 Subject: [issue30917] IDLE: Add idlelib.config.IdleConf unittest In-Reply-To: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> Message-ID: <1500443069.72.0.27502906436.issue30917@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thanks. I will look at it tomorrow and if it seems ok, prepare a new combined backport and see if it passes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 03:00:21 2017 From: report at bugs.python.org (Pierre Quentel) Date: Wed, 19 Jul 2017 07:00:21 +0000 Subject: [issue30576] http.server should support HTTP compression (gzip) In-Reply-To: <1496691724.59.0.955308322691.issue30576@psf.upfronthosting.co.za> Message-ID: <1500447621.91.0.225497749521.issue30576@psf.upfronthosting.co.za> Pierre Quentel added the comment: Is Python-ideas the appropriate place to get input from other core devs ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 03:11:11 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 19 Jul 2017 07:11:11 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1500448271.24.0.612081684765.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset e99d3a52a50b3f836fb9fb88f317aacddd494858 by Steve Dower in branch '3.6': [3.6] bpo-30450: Improved logic for obtaining dependencies (#2751) https://github.com/python/cpython/commit/e99d3a52a50b3f836fb9fb88f317aacddd494858 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 04:00:23 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 19 Jul 2017 08:00:23 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500451223.73.0.336235240844.issue28638@psf.upfronthosting.co.za> INADA Naoki added the comment: I want to focus on pure Python implementation in this issue. While "40x faster" is more 10x faster than "4x faster", C implementation can boost only CPython and makes maintenance more harder. And sometimes "more 10x faster" is not so important. For example, say application startup takes 1sec and namedtuple creation took 0.4sec of the 1sec: 4x faster: 1sec -> 0.7sec (-30%) 40x faster: 1sec -> 0.61sec (-39%) In this case, "4x faster" reduces 0.3sec and "more 10x faster" reduces only 0.09sec. Of course, 1.9x faster attribute access (http://bugs.python.org/issue28638#msg298499) is attractive. But this issue is too long already. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 04:11:22 2017 From: report at bugs.python.org (Elvis Stansvik) Date: Wed, 19 Jul 2017 08:11:22 +0000 Subject: [issue29225] distutils.command.install_lib.get_outputs() wrong with extensions built inplace In-Reply-To: <1484062635.84.0.0152072002193.issue29225@psf.upfronthosting.co.za> Message-ID: <1500451882.22.0.770905170255.issue29225@psf.upfronthosting.co.za> Changes by Elvis Stansvik : ---------- pull_requests: +2818 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 04:14:12 2017 From: report at bugs.python.org (=?utf-8?q?Lum=C3=ADr_Balhar?=) Date: Wed, 19 Jul 2017 08:14:12 +0000 Subject: [issue29144] Implicit namespace packages in Python 3.6 In-Reply-To: <1483468021.78.0.379899829208.issue29144@psf.upfronthosting.co.za> Message-ID: <1500452052.05.0.508924518627.issue29144@psf.upfronthosting.co.za> Lum?r Balhar added the comment: Hello. I've tried the build of python-moksha-common on Fedora rawhide [0] and Fedora 25 [1]. Fedora rawhide: Python 2.7.13 and 3.6.1, setuptools 36.2.0 Fedora 25: Python 2.7.13 and 3.5.3, setuptools 25.1.1 Source tarball of moksha.common contains pkg_resources-style __init__.py file and the setuptools skipped installation of this file in all (four) cases. It seems that setuptools do the same in all versions but the problem comes with Python 3.6 which is more strict than Python 3.5 in behavior related to namespace packages. So, when one part of namespace package doesn't contain __init__.py file and other part contains pkg_resources-style __init__.py file: - in Python 2.7 and 3.5 everything works - in Python 3.6 submodules cannot import each other The question is whether it is a bug/feature in Python 3.6 and setuptools should install pkg_resources-style __init__.py or not. What do you think? [0] https://koji.fedoraproject.org/koji/taskinfo?taskID=20606746 [1] https://koji.fedoraproject.org/koji/taskinfo?taskID=20606838 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 04:19:40 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 19 Jul 2017 08:19:40 +0000 Subject: [issue29225] distutils.command.install_lib.get_outputs() wrong with extensions built inplace In-Reply-To: <1484062635.84.0.0152072002193.issue29225@psf.upfronthosting.co.za> Message-ID: <1500452380.8.0.848079211273.issue29225@psf.upfronthosting.co.za> Ned Deily added the comment: Now has PR waiting for review. Thanks, Elvis. ---------- nosy: +ned.deily stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 04:49:57 2017 From: report at bugs.python.org (Marco Buttu) Date: Wed, 19 Jul 2017 08:49:57 +0000 Subject: [issue30951] Documentation error in inspect module In-Reply-To: <1500312575.69.0.52467451771.issue30951@psf.upfronthosting.co.za> Message-ID: <1500454197.58.0.941187427013.issue30951@psf.upfronthosting.co.za> Marco Buttu added the comment: Or maybe: "tuple of names of global variables used in the bytecode" ---------- nosy: +marco.buttu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 04:53:22 2017 From: report at bugs.python.org (Armin Rigo) Date: Wed, 19 Jul 2017 08:53:22 +0000 Subject: [issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds Message-ID: <1500454402.66.0.425527808924.issue30966@psf.upfronthosting.co.za> New submission from Armin Rigo: multiprocessing.queues.SimpleQueue should have a close() method. This is needed to explicitly release the two file descriptors of the Pipe used internally. Without it, the file descriptors leak if a reference to the SimpleQueue object happens to stay around for longer than expected (e.g. in a reference cycle, or with PyPy). I think the following would do: diff -r 0b72fd1a7641 lib-python/2.7/multiprocessing/queues.py --- a/lib-python/2.7/multiprocessing/queues.py Sun Jul 16 13:41:28 2017 +0200 +++ b/lib-python/2.7/multiprocessing/queues.py Wed Jul 19 10:45:03 2017 +0200 @@ -358,6 +358,11 @@ self._wlock = Lock() self._make_methods() + def close(self): + # PyPy extension: CPython doesn't have this method! + self._reader.close() + self._writer.close() + def empty(self): return not self._reader.poll() ---------- messages: 298645 nosy: arigo priority: normal severity: normal status: open title: multiprocessing.queues.SimpleQueue leaks 2 fds versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 05:05:01 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 19 Jul 2017 09:05:01 +0000 Subject: [issue29225] distutils.command.install_lib.get_outputs() wrong with extensions built inplace In-Reply-To: <1484062635.84.0.0152072002193.issue29225@psf.upfronthosting.co.za> Message-ID: <1500455101.21.0.728349773692.issue29225@psf.upfronthosting.co.za> INADA Naoki added the comment: I thought `inplace` option is for debugging/testing without install, not for installing or packaging. As far as document [1], `inplace=1` in `setup.cfg` is noticed as: "which is probably a bad idea for this option, since always building extensions in-place would break installation of the module distribution." [1] https://docs.python.org/3.6/distutils/configfile.html#writing-the-setup-configuration-file So I don't know we should fix this or prohibit this. Is this works for commands other than `install`? How about sdist and bdist_wheel? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 05:12:49 2017 From: report at bugs.python.org (Jakub Stasiak) Date: Wed, 19 Jul 2017 09:12:49 +0000 Subject: [issue28629] Emit ResourceWarning when implicitly terminating a suspended frame? In-Reply-To: <1478487031.39.0.63356302946.issue28629@psf.upfronthosting.co.za> Message-ID: <1500455569.45.0.0979137390708.issue28629@psf.upfronthosting.co.za> Changes by Jakub Stasiak : ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 05:17:49 2017 From: report at bugs.python.org (Elvis Stansvik) Date: Wed, 19 Jul 2017 09:17:49 +0000 Subject: [issue29225] distutils.command.install_lib.get_outputs() wrong with extensions built inplace In-Reply-To: <1484062635.84.0.0152072002193.issue29225@psf.upfronthosting.co.za> Message-ID: <1500455869.68.0.0947296596173.issue29225@psf.upfronthosting.co.za> Elvis Stansvik added the comment: @inada.naoki: I was half afraid that note in the docs would be brought up :) But I should have brought it up myself, sorry about that. My take is that I see no reason why this limitation should exists. For projects that have extensions, and wish to be runnable both directly from the distribution source tree, but also be installable, it would be quite convenient to be able to set inplace=1 in setup.cfg and have it just work (tm). At least, that's how I ran into this issue. Doing so breaks `setup.py install`. I haven't tested other targets like sdist and bdist_wheel, but I'll do that and report back. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 05:20:15 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 19 Jul 2017 09:20:15 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500456015.93.0.584316901399.issue28638@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > While "40x faster" is more 10x faster than "4x faster", C > implementation can boost only CPython and makes maintenance more harder. As a counter argument against "let's not do it because it'll be harder to maintain" I'd like to point out that namedtuple API is already kind of over engineered (see: "verbose", "rename", "module" and "_source") and as such it seems likely it will remain pretty much the same in the future. So why not treat namedtuple like any other basic data structure, boost its internal implementation and simply use the existing unit tests to make sure there are no regressions? It seems the same barrier does not apply to tuples, lists and sets. > Of course, 1.9x faster attribute access (http://bugs.python.org/issue28638#msg298499) is attractive. It is indeed and it makes a huge difference in situations like busy loops. E.g. in case of asyncio 1.9x faster literally means being able to serve twice the number of reqs/sec: https://github.com/python/cpython/blob/3e2ad8ec61a322370a6fbdfb2209cf74546f5e08/Lib/asyncio/selector_events.py#L523 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 05:44:08 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 19 Jul 2017 09:44:08 +0000 Subject: [issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds In-Reply-To: <1500454402.66.0.425527808924.issue30966@psf.upfronthosting.co.za> Message-ID: <1500457448.93.0.839140617491.issue30966@psf.upfronthosting.co.za> Xiang Zhang added the comment: Get this solved then we could also solve #23267, which reports pipes leak in pool due to using SimpleQueue. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 05:45:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 09:45:13 +0000 Subject: [issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds In-Reply-To: <1500454402.66.0.425527808924.issue30966@psf.upfronthosting.co.za> Message-ID: <1500457513.84.0.0159775557999.issue30966@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 05:46:46 2017 From: report at bugs.python.org (Thomas Mortensson) Date: Wed, 19 Jul 2017 09:46:46 +0000 Subject: [issue30967] Python core crash during os.fork() on CentOS 6.5 (Python 2.7.13) Message-ID: <1500457606.55.0.0362958437729.issue30967@psf.upfronthosting.co.za> New submission from Thomas Mortensson: Unsure how to re-produce. Have a CoreDump file with the below backtrace. Our module is socc, we were running a Twisted application and Python core dumped giving us the following backtrace. Looks like we failed to spawn a process wsing os.fork() due to a double free in PyThread_ReInitTLS. System Details: CentOS 6.5 Kernel - 2.6.32-696.el6.x86_64 Python 2.7.13 (default, Feb 6 2017, 15:27:35) [GCC 4.8.3 20140911 (Red Hat 4.8.3-10)] on linux2 GDB - GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.el6 File "/usr/local/lib/python2.7/site-packages/socc/cloudTransport/transport.py", line 128, in executeProcessInThread line +128 ret = reactor.spawnProcess(execProtocol, args[0], args, env=os.environ, childFDs={0: "w", 1: "r", 2: "r"}) Python backtrace: (gdb) py-bt Traceback (most recent call first): File "/usr/local/lib/python2.7/site-packages/twisted/internet/process.py", line 382, in _fork self.pid = os.fork() File "/usr/local/lib/python2.7/site-packages/twisted/internet/process.py", line 677, in __init__ self._fork(path, uid, gid, executable, args, environment, fdmap=fdmap) File "/usr/local/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 345, in spawnProcess processProtocol, uid, gid, childFDs) File "/usr/local/lib/python2.7/site-packages/socc/cloudTransport/transport.py", line 128, in executeProcessInThread File "/usr/local/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext return func(*args,**kw) File "/usr/local/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/local/lib/python2.7/site-packages/twisted/python/threadpool.py", line 196, in _worker result = context.call(ctx, function, *args, **kwargs) File "/usr/local/lib/python2.7/threading.py", line 754, in run self.__target(*self.__args, **self.__kwargs) File "/usr/local/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/local/lib/python2.7/threading.py", line 774, in __bootstrap self.__bootstrap_inner() /* Forget everything not associated with the current thread id. * This function is called from PyOS_AfterFork(). It is necessary * because other thread ids which were in use at the time of the fork * may be reused for new threads created in the forked process. */ void PyThread_ReInitTLS(void) { long id = PyThread_get_thread_ident(); struct key *p, **q; if (!keymutex) return; /* As with interpreter_lock in PyEval_ReInitThreads() we just create a new lock without freeing the old one */ keymutex = PyThread_allocate_lock(); /* Delete all keys which do not match the current thread id */ q = &keyhead; while ((p = *q) != NULL) { if (p->id != id) { *q = p->next; free((void *)p); <-------------------------FAILED HERE /* NB This does *not* free p->value! */ } else q = &p->next; } } Installed python27-Logbook-debuginfo-0.9.1-1.el6_7.x86_64.rpm python27-PyYAML-debuginfo-3.12-1.x86_64.rpm python27-Twisted-debuginfo-14.0.0-1.x86_64.rpm python27-cffi-debuginfo-1.9.1-1.el6_7.x86_64.rpm python27-cryptography-debuginfo-1.7.2-1.el6_7.x86_64.rpm python27-debuginfo-2.7.13-2.el6_7.x86_64.rpm python27-psutil-debuginfo-5.1.3-1.x86_64.rpm python27-simplejson-debuginfo-3.10.0-1.el6_7.el6_7.x86_64.rpm python27-zope-interface-debuginfo-4.3.3-1.x86_64.rpm Backtrace is: #0 0x00007ffff6db0625 in raise () from /lib64/libc.so.6 #1 0x00007ffff6db1e05 in abort () from /lib64/libc.so.6 #2 0x00007ffff6dee537 in __libc_message () from /lib64/libc.so.6 #3 0x00007ffff6df3f4e in malloc_printerr () from /lib64/libc.so.6 #4 0x00007ffff6df6cad in _int_free () from /lib64/libc.so.6 #5 0x00007ffff7b082a9 in PyThread_ReInitTLS () at Python/thread.c:413 #6 0x00007ffff7b0fbb4 in PyOS_AfterFork () at Modules/signalmodule.c:1004 #7 0x00007ffff7b12cf6 in posix_fork (self=, noargs=) at Modules/posixmodule.c:3875 #8 0x00007ffff7ac8460 in call_function (oparg=, pp_stack=0x7fffdc043fb0) at Python/ceval.c:4336 #9 PyEval_EvalFrameEx (f=f at entry=0x36bb930, throwflag=throwflag at entry=0) at Python/ceval.c:2989 #10 0x00007ffff7ac9d0d in PyEval_EvalCodeEx (co=, globals=, locals=locals at entry=0x0, args=, argcount=argcount at entry=7, kws=kws at entry=0x36b54d0, kwcount=1, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3584 #11 0x00007ffff7ac8800 in fast_function (nk=, na=7, n=, pp_stack=0x7fffdc0441f0, func=) at Python/ceval.c:4447 #12 call_function (oparg=, pp_stack=0x7fffdc0441f0) at Python/ceval.c:4372 #13 PyEval_EvalFrameEx (f=f at entry=0x36b5270, throwflag=throwflag at entry=0) at Python/ceval.c:2989 #14 0x00007ffff7ac9d0d in PyEval_EvalCodeEx (co=, globals=, locals=locals at entry=0x0, args=args at entry=0x7fffdeaa5e38, argcount=10, kws=kws at entry=0x0, kwcount=kwcount at entry=0, defs=defs at entry=0x7fffeb543068, defcount=defcount at entry=3, closure=0x0) at Python/ceval.c:3584 #15 0x00007ffff7a40760 in function_call (func=0x7fffeb429398, arg=0x7fffdeaa5e20, kw=0x0) at Objects/funcobject.c:523 #16 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0x7fffeb429398, arg=arg at entry=0x7fffdeaa5e20, kw=kw at entry=0x0) at Objects/abstract.c:2547 #17 0x00007ffff7a1cec5 in instancemethod_call (func=0x7fffeb429398, arg=0x7fffdeaa5e20, kw=0x0) at Objects/classobject.c:2602 #18 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0x7fffdc068820, arg=arg at entry=0x7fffea19c2d0, kw=kw at entry=0x0) at Objects/abstract.c:2547 #19 0x00007ffff7a7c5bf in slot_tp_init (self=0x7fffdc059710, args=0x7fffea19c2d0, kwds=0x0) at Objects/typeobject.c:5806 #20 0x00007ffff7a78ecf in type_call (type=, args=0x7fffea19c2d0, kwds=0x0) at Objects/typeobject.c:765 #21 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0xb89410, arg=arg at entry=0x7fffea19c2d0, kw=kw at entry=0x0) at Objects/abstract.c:2547 #22 0x00007ffff7ac452e in do_call (nk=, na=, pp_stack=0x7fffdc044820, func=) at Python/ceval.c:4569 #23 call_function (oparg=, pp_stack=0x7fffdc044820) at Python/ceval.c:4374 #24 PyEval_EvalFrameEx (f=f at entry=0x36b0c00, throwflag=throwflag at entry=0) at Python/ceval.c:2989 #25 0x00007ffff7ac9d0d in PyEval_EvalCodeEx (co=, globals=, locals=locals at entry=0x0, args=, argcount=argcount at entry=4, kws=kws at entry=0x36acac0, kwcount=2, defs=0x7fffedb795a8, defcount=7, closure=0x0) at Python/ceval.c:3584 #26 0x00007ffff7ac8800 in fast_function (nk=, na=4, n=, pp_stack=0x7fffdc044a60, func=) at Python/ceval.c:4447 #27 call_function (oparg=, pp_stack=0x7fffdc044a60) at Python/ceval.c:4372 #28 PyEval_EvalFrameEx (f=f at entry=0x36ac900, throwflag=throwflag at entry=0) at Python/ceval.c:2989 #29 0x00007ffff7ac9d0d in PyEval_EvalCodeEx (co=, globals=, locals=locals at entry=0x0, args=args at entry=0x7fffdc068928, argcount=3, kws=kws at entry=0x7ffff7fa4068, kwcount=kwcount at entry=0, defs=defs at entry=0x0, ---Type to continue, or q to quit--- defcount=defcount at entry=0, closure=0x0) at Python/ceval.c:3584 #30 0x00007ffff7a40835 in function_call (func=0x7fffdc0af140, arg=0x7fffdc068910, kw=0x7fffdc060c58) at Objects/funcobject.c:523 #31 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0x7fffdc0af140, arg=arg at entry=0x7fffdc068910, kw=kw at entry=0x7fffdc060c58) at Objects/abstract.c:2547 #32 0x00007ffff7ac38d2 in ext_do_call (nk=, na=, flags=, pp_stack=0x7fffdc044d70, func=0x7fffdc0af140) at Python/ceval.c:4666 #33 PyEval_EvalFrameEx (f=f at entry=0x7fffdc078238, throwflag=throwflag at entry=0) at Python/ceval.c:3028 #34 0x00007ffff7ac9d0d in PyEval_EvalCodeEx (co=, globals=, locals=locals at entry=0x0, args=args at entry=0x7fffdeac0ea0, argcount=6, kws=kws at entry=0x7ffff7fa4068, kwcount=kwcount at entry=0, defs=defs at entry=0x0, defcount=defcount at entry=0, closure=0x0) at Python/ceval.c:3584 #35 0x00007ffff7a40835 in function_call (func=0x7fffecf8f050, arg=0x7fffdeac0e88, kw=0x7fffdc07ad70) at Objects/funcobject.c:523 #36 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0x7fffecf8f050, arg=arg at entry=0x7fffdeac0e88, kw=kw at entry=0x7fffdc07ad70) at Objects/abstract.c:2547 #37 0x00007ffff7ac38d2 in ext_do_call (nk=, na=, flags=, pp_stack=0x7fffdc045070, func=0x7fffecf8f050) at Python/ceval.c:4666 #38 PyEval_EvalFrameEx (f=f at entry=0x7fffdc07b620, throwflag=throwflag at entry=0) at Python/ceval.c:3028 #39 0x00007ffff7ac9d0d in PyEval_EvalCodeEx (co=, globals=, locals=locals at entry=0x0, args=args at entry=0x7fffdeac0f08, argcount=6, kws=kws at entry=0x7ffff7fa4068, kwcount=kwcount at entry=0, defs=defs at entry=0x0, defcount=defcount at entry=0, closure=0x0) at Python/ceval.c:3584 #40 0x00007ffff7a40835 in function_call (func=0x7fffecf8f230, arg=0x7fffdeac0ef0, kw=0x7fffdc054d70) at Objects/funcobject.c:523 #41 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0x7fffecf8f230, arg=arg at entry=0x7fffdeac0ef0, kw=kw at entry=0x7fffdc054d70) at Objects/abstract.c:2547 #42 0x00007ffff7ac38d2 in ext_do_call (nk=, na=, flags=, pp_stack=0x7fffdc045370, func=0x7fffecf8f230) at Python/ceval.c:4666 #43 PyEval_EvalFrameEx (f=f at entry=0x36ab6a0, throwflag=throwflag at entry=0) at Python/ceval.c:3028 #44 0x00007ffff7ac9d0d in PyEval_EvalCodeEx (co=, globals=, locals=locals at entry=0x0, args=args at entry=0x7fffeb4344e8, argcount=1, kws=kws at entry=0x7ffff7fa4068, kwcount=kwcount at entry=0, defs=defs at entry=0x0, defcount=defcount at entry=0, closure=0x0) at Python/ceval.c:3584 #45 0x00007ffff7a40835 in function_call (func=0x7fffdc07f2a8, arg=0x7fffeb4344d0, kw=0x7fffdc061910) at Objects/funcobject.c:523 #46 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0x7fffdc07f2a8, arg=arg at entry=0x7fffeb4344d0, kw=kw at entry=0x7fffdc061910) at Objects/abstract.c:2547 #47 0x00007ffff7ac38d2 in ext_do_call (nk=, na=, flags=, pp_stack=0x7fffdc045670, func=0x7fffdc07f2a8) at Python/ceval.c:4666 #48 PyEval_EvalFrameEx (f=f at entry=0x7fffdc075cc8, throwflag=throwflag at entry=0) at Python/ceval.c:3028 #49 0x00007ffff7ac891b in fast_function (nk=, na=1, n=, pp_stack=0x7fffdc045800, func=) at Python/ceval.c:4437 #50 call_function (oparg=, pp_stack=0x7fffdc045800) at Python/ceval.c:4372 #51 PyEval_EvalFrameEx (f=f at entry=0x36aaa60, throwflag=throwflag at entry=0) at Python/ceval.c:2989 #52 0x00007ffff7ac891b in fast_function (nk=, na=1, n=, pp_stack=0x7fffdc0459a0, func=) at Python/ceval.c:4437 #53 call_function (oparg=, pp_stack=0x7fffdc0459a0) at Python/ceval.c:4372 #54 PyEval_EvalFrameEx (f=f at entry=0x7fffdc076e50, throwflag=throwflag at entry=0) at Python/ceval.c:2989 #55 0x00007ffff7ac9d0d in PyEval_EvalCodeEx (co=, globals=, locals=locals at entry=0x0, args=args at entry=0x7fffedb4e8e8, argcount=1, kws=kws at entry=0x0, kwcount=kwcount at entry=0, defs=defs at entry=0x0, defcount=defcount at entry=0, closure=0x0) at Python/ceval.c:3584 #56 0x00007ffff7a40760 in function_call (func=0x7fffed216c08, arg=0x7fffedb4e8d0, kw=0x0) at Objects/funcobject.c:523 #57 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0x7fffed216c08, arg=arg at entry=0x7fffedb4e8d0, kw=kw at entry=0x0) at Objects/abstract.c:2547 ---Type to continue, or q to quit--- #58 0x00007ffff7a1cec5 in instancemethod_call (func=0x7fffed216c08, arg=0x7fffedb4e8d0, kw=0x0) at Objects/classobject.c:2602 #59 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0x7fffdc068370, arg=arg at entry=0x7ffff7fa4050, kw=) at Objects/abstract.c:2547 #60 0x00007ffff7ac01c7 in PyEval_CallObjectWithKeywords (func=0x7fffdc068370, arg=0x7ffff7fa4050, kw=) at Python/ceval.c:4221 #61 0x00007ffff7b0d9c2 in t_bootstrap (boot_raw=0xdef990) at Modules/threadmodule.c:620 #62 0x00007ffff77a4aa1 in start_thread () from /lib64/libpthread.so.0 #63 0x00007ffff6e6693d in clone () from /lib64/libc.so.6 Core dump available upon request ---------- components: Interpreter Core messages: 298650 nosy: Thomas Mortensson priority: normal severity: normal status: open title: Python core crash during os.fork() on CentOS 6.5 (Python 2.7.13) type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 05:46:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 09:46:47 +0000 Subject: [issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds In-Reply-To: <1500454402.66.0.425527808924.issue30966@psf.upfronthosting.co.za> Message-ID: <1500457607.41.0.804225983523.issue30966@psf.upfronthosting.co.za> STINNER Victor added the comment: On Python 3.6+, regrtest is able to detect file descriptor leaks when using --huntrleaks. Is someone interested to backport this feature to 3.5 and/or 2.7 which would mean fix all FD leaks in our test suite? If someone wants to work on that, I would suggest to first fix all bugs, and when the test suite is fine: modify regrtest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 05:47:59 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 19 Jul 2017 09:47:59 +0000 Subject: [issue23267] multiprocessing pool.py doesn't close inqueue and outqueue pipes on termination In-Reply-To: <1421588019.18.0.707676170756.issue23267@psf.upfronthosting.co.za> Message-ID: <1500457679.19.0.735032458182.issue23267@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- dependencies: +multiprocessing.queues.SimpleQueue leaks 2 fds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 05:51:58 2017 From: report at bugs.python.org (Thomas Mortensson) Date: Wed, 19 Jul 2017 09:51:58 +0000 Subject: [issue30967] Python core crash during os.fork() on CentOS 6.5 (Python 2.7.13) In-Reply-To: <1500457606.55.0.0362958437729.issue30967@psf.upfronthosting.co.za> Message-ID: <1500457918.93.0.133682252164.issue30967@psf.upfronthosting.co.za> Thomas Mortensson added the comment: Unsure if related to: https://bugs.python.org/issue10517 or https://bugs.python.org/issue13156 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 05:52:07 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 19 Jul 2017 09:52:07 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500457927.07.0.778747445413.issue28638@psf.upfronthosting.co.za> INADA Naoki added the comment: I didn't say "let's not do it". I just want to focus on pure Python implementation at this issue, because this thread is too long already. Feel free to open new issue about C implementation. Even if C implementation is added later, pure Python optimization can boost PyPy performance. (https://github.com/python/cpython/pull/2736#issuecomment-316014866) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 05:54:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 09:54:03 +0000 Subject: [issue30967] Crash in PyThread_ReInitTLS() in the child process after os.fork() on CentOS 6.5 (Python 2.7.13) In-Reply-To: <1500457606.55.0.0362958437729.issue30967@psf.upfronthosting.co.za> Message-ID: <1500458043.19.0.173196863594.issue30967@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 2.7 uses its own implementation of Thread Local Storage: see find_key() in Python/thread.c. This implementation uses a lock and a chained list. A fork only clones the current thread in the child process, all other threads are "removed", so Python has to manually remove all TLS variables of the other threads using PyThread_ReInitTLS(). I don't think that Python 3 is affected by such bug, since Python 3 uses native TLS APIs like pthread pthread_{get,set}specific() on UNIX/BSD. ---------- nosy: +haypo title: Python core crash during os.fork() on CentOS 6.5 (Python 2.7.13) -> Crash in PyThread_ReInitTLS() in the child process after os.fork() on CentOS 6.5 (Python 2.7.13) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 05:56:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 09:56:59 +0000 Subject: [issue30967] Crash in PyThread_ReInitTLS() in the child process after os.fork() on CentOS 6.5 (Python 2.7.13) In-Reply-To: <1500457606.55.0.0362958437729.issue30967@psf.upfronthosting.co.za> Message-ID: <1500458219.16.0.505094422832.issue30967@psf.upfronthosting.co.za> STINNER Victor added the comment: This bug seems similar to issue #29640. Good news: it contains a fix (not merged yet) :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 06:03:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 10:03:13 +0000 Subject: [issue29640] _PyThreadState_Init and fork race leads to inconsistent key list In-Reply-To: <1487927038.37.0.851881550844.issue29640@psf.upfronthosting.co.za> Message-ID: <1500458593.54.0.513617712437.issue29640@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 06:05:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 10:05:24 +0000 Subject: [issue30967] Crash in PyThread_ReInitTLS() in the child process after os.fork() on CentOS 6.5 (Python 2.7.13) In-Reply-To: <1500457606.55.0.0362958437729.issue30967@psf.upfronthosting.co.za> Message-ID: <1500458724.33.0.717701214771.issue30967@psf.upfronthosting.co.za> STINNER Victor added the comment: Anoter previous change related to PyThread_ReInitTLS(), issue #13817, unlikely related to your bug. commit e0e88b0483d73c925e8f1809d24031acd6bfdf01 Author: Charles-Fran?ois Natali Date: Thu Feb 2 19:57:19 2012 +0100 Issue #13817: After fork(), reinit the ad-hoc TLS implementation earlier to fix a random deadlock when fork() is called in a multithreaded process in debug mode, and make PyOS_AfterFork() more robust. This commit is part of Python 2.7 since Python 2.7.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 06:06:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 10:06:13 +0000 Subject: [issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds In-Reply-To: <1500454402.66.0.425527808924.issue30966@psf.upfronthosting.co.za> Message-ID: <1500458773.76.0.826460877448.issue30966@psf.upfronthosting.co.za> STINNER Victor added the comment: See also my bpo-30171: "Emit ResourceWarning in multiprocessing Queue destructor". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 06:06:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 10:06:24 +0000 Subject: [issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds In-Reply-To: <1500454402.66.0.425527808924.issue30966@psf.upfronthosting.co.za> Message-ID: <1500458784.29.0.762198101654.issue30966@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 06:08:56 2017 From: report at bugs.python.org (Elvis Stansvik) Date: Wed, 19 Jul 2017 10:08:56 +0000 Subject: [issue29225] distutils.command.install_lib.get_outputs() wrong with extensions built inplace In-Reply-To: <1484062635.84.0.0152072002193.issue29225@psf.upfronthosting.co.za> Message-ID: <1500458936.63.0.641828816031.issue29225@psf.upfronthosting.co.za> Elvis Stansvik added the comment: Okay, so it seems my "fix" is not complete at all. Not even `setup.py install` works with plain distutils, since it just copies the build dir. Back when I created this issue, I must have (accidentally) tested `setup.py install` using setuptools. With setuptools it _does_ work when my fix for get_outputs() is applied, but only because (I think) then the egg creation code from setuptools is used, which is somehow helped by my fix to get_outputs(). Note that it doesn't even work with setuptools if --single-version-externally-managed is used (bypassing egg creation). So my "fix" only really helped for a very specific case. So, hm. I guess a more involved fix is necessary in order to get this to work for all relevant commands of plain distutils. Sorry for the noise, I guess I'll close my PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 06:13:39 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 19 Jul 2017 10:13:39 +0000 Subject: [issue29225] distutils.command.install_lib.get_outputs() wrong with extensions built inplace In-Reply-To: <1484062635.84.0.0152072002193.issue29225@psf.upfronthosting.co.za> Message-ID: <1500459219.8.0.816558252827.issue29225@psf.upfronthosting.co.za> INADA Naoki added the comment: Sorry, I'm not packaging expert. Please wait for expert for right direction. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 06:14:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 10:14:13 +0000 Subject: [issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds In-Reply-To: <1500454402.66.0.425527808924.issue30966@psf.upfronthosting.co.za> Message-ID: <1500459253.03.0.361670869964.issue30966@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is marked as also affecting Python 3.7. I don't see a SimpleQueue.close() method in master, but I don't remind any resource warning when running tests on master neither. Does it mean that our test runner miss such file descriptor leak? Or worse, that SimpleQueue is not tested? I see a TestSimpleQueue test case in Lib/test/_test_multiprocessing.py. haypo at selma$ ./python -m test test_multiprocessing_spawn -m TestSimpleQueue -R 3:3 (...) Tests result: SUCCESS > This is needed to explicitly release the two file descriptors of the Pipe used internally. Without it, the file descriptors leak if a reference to the SimpleQueue object happens to stay around for longer than expected (e.g. in a reference cycle, or with PyPy). Oh ok, the garbage collector is able to close the file descriptors. The bug is when a SimpleQueue is not collected. So again, I consider that a ResourceWarning is needed here. The purpose of a ResourceWarning is to warn when a leak may be kept alive longer than expected if it's not closed explicitly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 06:14:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 10:14:20 +0000 Subject: [issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds In-Reply-To: <1500454402.66.0.425527808924.issue30966@psf.upfronthosting.co.za> Message-ID: <1500459260.06.0.769861373565.issue30966@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 06:16:37 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 19 Jul 2017 10:16:37 +0000 Subject: [issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds In-Reply-To: <1500454402.66.0.425527808924.issue30966@psf.upfronthosting.co.za> Message-ID: <1500459397.05.0.608815698228.issue30966@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Anyone who thinks those objects stay alive too long can submit a PR for SimpleQueue and Pool to close them eagerly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 06:17:30 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 19 Jul 2017 10:17:30 +0000 Subject: [issue30171] Emit ResourceWarning in multiprocessing Queue destructor In-Reply-To: <1493214770.49.0.943228970697.issue30171@psf.upfronthosting.co.za> Message-ID: <1500459450.05.0.40971196761.issue30171@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm willing to close this issue, as I don't think a ResourceWarning is appropriate here. ---------- resolution: -> not a bug stage: -> resolved status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 06:21:12 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 19 Jul 2017 10:21:12 +0000 Subject: [issue23267] multiprocessing pool.py doesn't close inqueue and outqueue pipes on termination In-Reply-To: <1421588019.18.0.707676170756.issue23267@psf.upfronthosting.co.za> Message-ID: <1500459672.98.0.967844506711.issue23267@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think this issue is mistaken. The reader and writer objects are closed automatically when they are destroyed (see Connection.__del__). The only thing that may lack is a way to close them more eagerly. In any case, I'm closing as a duplicate of issue 30966. ---------- dependencies: -multiprocessing.queues.SimpleQueue leaks 2 fds nosy: +pitrou resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> multiprocessing.queues.SimpleQueue leaks 2 fds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 06:21:32 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Wed, 19 Jul 2017 10:21:32 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500459692.8.0.315458035664.issue30822@psf.upfronthosting.co.za> Utkarsh Upadhyay added the comment: So it seems that running the experiments without `-utzdata` would be an acceptable fix (assuming that there are no other interesting time-zones worthy of explicit testing)? Can I help in the resolution of this issue, since resolution of http://bugs.python.org/issue30302 is tangentially conditioned on it. (-: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 06:21:51 2017 From: report at bugs.python.org (Thomas Mortensson) Date: Wed, 19 Jul 2017 10:21:51 +0000 Subject: [issue30967] Crash in PyThread_ReInitTLS() in the child process after os.fork() on CentOS 6.5 (Python 2.7.13) In-Reply-To: <1500457606.55.0.0362958437729.issue30967@psf.upfronthosting.co.za> Message-ID: <1500459711.24.0.0485575630209.issue30967@psf.upfronthosting.co.za> Thomas Mortensson added the comment: Indeed, #29640 seems remarkably similar. Will attempt to run attached POC code. Thank you very much for your help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 06:22:35 2017 From: report at bugs.python.org (Elvis Stansvik) Date: Wed, 19 Jul 2017 10:22:35 +0000 Subject: [issue29225] distutils.command.install_lib.get_outputs() wrong with extensions built inplace In-Reply-To: <1484062635.84.0.0152072002193.issue29225@psf.upfronthosting.co.za> Message-ID: <1500459755.31.0.843629906496.issue29225@psf.upfronthosting.co.za> Elvis Stansvik added the comment: So feel free to close this issue. The use case was quite marginal anyway, and we can always instruct developers to run `build_ext --inplace` when they intend to use the distribution out of the source directory (and not have inplace=1 in setup.cfg, to allow for installation as well). If anyone should want to try to remove the limitation wrt installation with inplace extensions, I think they're in for quite a bit of work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 06:31:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 10:31:22 +0000 Subject: [issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds In-Reply-To: <1500454402.66.0.425527808924.issue30966@psf.upfronthosting.co.za> Message-ID: <1500460282.85.0.718392979458.issue30966@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2819 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 06:31:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 10:31:58 +0000 Subject: [issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds In-Reply-To: <1500454402.66.0.425527808924.issue30966@psf.upfronthosting.co.za> Message-ID: <1500460318.08.0.216689944435.issue30966@psf.upfronthosting.co.za> STINNER Victor added the comment: > Anyone who thinks those objects stay alive too long can submit a PR for SimpleQueue and Pool to close them eagerly. I started with SimpleQueue for the master branch: https://github.com/python/cpython/pull/2760 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 07:28:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 11:28:53 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x Message-ID: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> New submission from STINNER Victor: The build only contains one change: commit f776eb0f0e046f2fa3a96540bb42d8cf970f6c55 bpo-30917: IDLE: Add config.IdleConf unittests (#2691) Patch by Louie Lu. http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/893/steps/test/logs/stdio ====================================================================== FAIL: test_get_font (idlelib.idle_test.test_config.IdleConfTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\idlelib\idle_test\test_config.py", line 605, in test_get_font (f['family'], 10 if f['size'] < 10 else f['size'], f['weight'])) AssertionError: Tuples differ: ('Courier New', 9, 'normal') != ('Courier New', 10, 'normal') First differing element 1: 9 10 - ('Courier New', 9, 'normal') ? ^ + ('Courier New', 10, 'normal') ? ^^ ---------- messages: 298668 nosy: haypo priority: normal severity: normal status: open title: test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 07:29:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 11:29:05 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1500463745.44.0.814619609999.issue30968@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +Tests, Windows keywords: +buildbot nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 07:29:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 11:29:43 +0000 Subject: [issue30917] IDLE: Add idlelib.config.IdleConf unittest In-Reply-To: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> Message-ID: <1500463783.6.0.796613560823.issue30917@psf.upfronthosting.co.za> STINNER Victor added the comment: Please see bpo-30968: "test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x". ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 07:29:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 11:29:51 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1500463791.17.0.523266945072.issue30968@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- assignee: -> terry.reedy components: +IDLE nosy: +louielu, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 07:34:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 11:34:15 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500464055.41.0.0637991660718.issue28638@psf.upfronthosting.co.za> STINNER Victor added the comment: General note about this issue: while the issie title is "Optimize namedtuple creation", it would be *nice* to not only optimization the creation but also attribute access by name: http://bugs.python.org/issue28638#msg298499 Maybe we can have a very fast C implementation using structseq, and a fast Python implementation (faster than the current Python implementation) fallback for non-CPython. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 07:55:53 2017 From: report at bugs.python.org (Antti Haapala) Date: Wed, 19 Jul 2017 11:55:53 +0000 Subject: [issue30969] Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__` Message-ID: <1500465353.64.0.619810995706.issue30969@psf.upfronthosting.co.za> New submission from Antti Haapala: The doc reference/expressions.srt says that > For user-defined classes which do not define __contains__() but do > define __iter__(), x in y is True if some value z with x == z is > produced while iterating over y. If an exception is raised during the > iteration, it is as if in raised that exception. and > Lastly, the old-style iteration protocol is tried: if a class defines > __getitem__(), x in y is True if and only if there is a non-negative > integer index i such that x == y[i], and all lower integer indices do > not raise IndexError exception. (If any other exception is raised, it > is as if in raised that exception). The documentation doesn't match the implementation, which clearly does `x is y or x == y` to check if `x` is the element `y` from a container. Both the `__iter__` and the index-iteration method test the elements using `is` first. While the document says that `x is x` means that `x == x` should be true, it is not true for example in the case of `nan`: ---------- assignee: docs at python components: Documentation messages: 298671 nosy: docs at python, ztane priority: normal severity: normal status: open title: Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__` type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 07:57:57 2017 From: report at bugs.python.org (Antti Haapala) Date: Wed, 19 Jul 2017 11:57:57 +0000 Subject: [issue30969] Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__` In-Reply-To: <1500465353.64.0.619810995706.issue30969@psf.upfronthosting.co.za> Message-ID: <1500465477.82.0.924275608007.issue30969@psf.upfronthosting.co.za> Changes by Antti Haapala : ---------- pull_requests: +2820 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 08:57:08 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 19 Jul 2017 12:57:08 +0000 Subject: [issue30576] http.server should support HTTP compression (gzip) In-Reply-To: <1496691724.59.0.955308322691.issue30576@psf.upfronthosting.co.za> Message-ID: <1500469028.1.0.391167905952.issue30576@psf.upfronthosting.co.za> R. David Murray added the comment: Getting input from python ideas is a great idea :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 08:58:48 2017 From: report at bugs.python.org (=?utf-8?q?Mih=C3=A1ly_Mirk?=) Date: Wed, 19 Jul 2017 12:58:48 +0000 Subject: [issue30970] return-value of filecmp.dircmp.report_* Message-ID: <1500469128.89.0.457428406304.issue30970@psf.upfronthosting.co.za> New submission from Mih?ly Mirk: The functions: filecmp.dircmp.report() filecmp.dircmp.report_partial_closure() filecmp.dircmp.report_full_closure() do not have return values ---------- messages: 298673 nosy: Mih?ly Mirk priority: normal pull_requests: 2822 severity: normal status: open title: return-value of filecmp.dircmp.report_* type: enhancement versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 10:02:49 2017 From: report at bugs.python.org (Masayuki Yamamoto) Date: Wed, 19 Jul 2017 14:02:49 +0000 Subject: [issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX In-Reply-To: <1447861816.88.0.632584646231.issue25658@psf.upfronthosting.co.za> Message-ID: <1500472969.55.0.764947886513.issue25658@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: Nick and Erik, thank you for the comments! I merged proposal into the PR. Well, I'm interested in the hide implementation detail for TSS API (lately, I've read the python-ideas thread "PEP: Hide implementation details in the C API" which Victor opened [1]). Present, the draft of new API has given two methods for thread key initialization for the non-limited API (i.e. Py_tss_NEEDS_INIT for statically, PyThread_tss_alloc for dynamic). The static initialization needs implementation detail for thread key, but Py_tss_t is designed as an opaque data type based on the stable ABI and we don't feel like to open the implementation detail to the API client. On the other hand, we'd provide newly thread key (de-)allocation functions for the limited API, the API client is able to get an initialized value without knowing thread key detail. And also the functions can be used on the non-limited API. Therefore, I think it makes more sense that all API clients use PyThread_tss_(alloc|free) regardless of the limited API. The reason is which are (1) Py_tss_t behaves as an opaque data type as expected for any API client (cannot read and write directly the fields in any case), (2) the API gets more consistency (just one method for key initialization on the API client). TL;DR: I'd suggest to make key type strict, what do you think about below changes? - replace Py_LIMITED_API with Py_BUILD_CORE on Python/pythread.h Py_tss_t definition - use PyThread_tss_(alloc|free) in Modules/_tracemalloc.c - also use in Modules/_testcapimodule.c [1] https://mail.python.org/pipermail/python-ideas/2017-July/046399.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 10:07:31 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 19 Jul 2017 14:07:31 +0000 Subject: [issue30969] Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__` In-Reply-To: <1500465353.64.0.619810995706.issue30969@psf.upfronthosting.co.za> Message-ID: <1500473251.12.0.106904820094.issue30969@psf.upfronthosting.co.za> R. David Murray added the comment: I think you change is appropriate given that the "equivalent to" for the built in iterators contains the 'is' expression. However, I also think we should drop that second whole paragraph, and in the previous paragraph say "...but are :term:`iterable`...". Because conceptually what we do is iterate whatever we're given if iter doesn't return a TypeError, and it is iter that handles the fallback to the older __getitem__ protocol. I don't see why we should re-explain the iteration protocol in the docs for 'in'. (I haven't looked at how this is actually implemented, but the implementation ought to be equivalent to that or we will eventually run into bugs.) I don't think this would result in any loss of precision or understandability, and in fact I think it would make it easier to understand. See also issue 27605, which also wants to edit this section slightly. ---------- nosy: +r.david.murray, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 10:08:29 2017 From: report at bugs.python.org (Masayuki Yamamoto) Date: Wed, 19 Jul 2017 14:08:29 +0000 Subject: [issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX In-Reply-To: <1447861816.88.0.632584646231.issue25658@psf.upfronthosting.co.za> Message-ID: <1500473309.94.0.818896797052.issue25658@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: oh, I found a mistake. - replace Py_LIMITED_API with Py_BUILD_CORE on Include/pythread.h Py_tss_t definition ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 10:16:04 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 19 Jul 2017 14:16:04 +0000 Subject: [issue30970] return-value of filecmp.dircmp.report_* In-Reply-To: <1500469128.89.0.457428406304.issue30970@psf.upfronthosting.co.za> Message-ID: <1500473764.83.0.0756756191159.issue30970@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for wanting to improve Python. However, the purpose of those function is to *print* the result. They intentionally do not have return values. All of the values that you would have these functions return are accessible via attributes already. ---------- nosy: +r.david.murray resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 10:18:04 2017 From: report at bugs.python.org (Mihai Cara) Date: Wed, 19 Jul 2017 14:18:04 +0000 Subject: [issue30965] Unexpected behavior of operator "in" In-Reply-To: <1500442117.99.0.958324013572.issue30965@psf.upfronthosting.co.za> Message-ID: <1500473884.16.0.848380767662.issue30965@psf.upfronthosting.co.za> Mihai Cara added the comment: Thank you! It was my fault: I was not expecting `in` to be a comparison operator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 10:21:22 2017 From: report at bugs.python.org (Louie Lu) Date: Wed, 19 Jul 2017 14:21:22 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1500474082.34.0.821256678883.issue30968@psf.upfronthosting.co.za> Louie Lu added the comment: After checking source code, I found that is my fault on the test code. After the blocker PR 2754 been merged, I'll fix this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 10:23:42 2017 From: report at bugs.python.org (Mihai Cara) Date: Wed, 19 Jul 2017 14:23:42 +0000 Subject: [issue30965] Unexpected behavior of operator "in" In-Reply-To: <1500442117.99.0.958324013572.issue30965@psf.upfronthosting.co.za> Message-ID: <1500474222.39.0.377811165623.issue30965@psf.upfronthosting.co.za> Mihai Cara added the comment: I am sure that some time ago I read that `in` is a comparison operator but I forgot it and I was thinking that (x in y) would be equivalent to (replaced with) the return value of y.__contains__(x). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 11:31:34 2017 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 19 Jul 2017 15:31:34 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1500464055.41.0.0637991660718.issue28638@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Yeah, it looks like the standard `_pickle` and `pickle` solution would work here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 11:54:35 2017 From: report at bugs.python.org (Jaume) Date: Wed, 19 Jul 2017 15:54:35 +0000 Subject: [issue30931] Race condition in asyncore wrongly closes channel In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1500479675.34.0.167840973925.issue30931@psf.upfronthosting.co.za> Changes by Jaume : ---------- pull_requests: +2823 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 12:21:53 2017 From: report at bugs.python.org (Nir Soffer) Date: Wed, 19 Jul 2017 16:21:53 +0000 Subject: [issue30931] Race condition in asyncore may access the wrong dispatcher In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1500481313.42.0.832550539482.issue30931@psf.upfronthosting.co.za> Nir Soffer added the comment: Adding more info after discussion in github. After polling readable/writeable dispatchers, asyncore.poll(2) receive a list of ready file descriptors, and invoke callbacks on the dispatcher objects. If a dispatchers is closed and and a new dispatcher is created, the new dispatcher may get the same file descriptor. If the file descriptor was in the ready list returned from poll()/select(), asyncore may try to invoke one of the callbacks (e.g. handle_write) on the new dispatcher. Here is an example in asycore.poll() r, w, e = select.select(r, w, e, timeout) for fd in r: obj = map.get(fd) if obj is None: continue read(obj) read close obj, removing fd from map, then creates a new one getting the same fd... for fd in w: obj = map.get(fd) this get the new object from the map, instead of the closed one. if obj is None: continue write(obj) invoke write on the wrong socket, which is not writable for fd in e: obj = map.get(fd) same issue here if obj is None: continue _exception(obj) asyncore.poll2() has same issue: r = pollster.poll(timeout) for fd, flags in r: obj = map.get(fd) if obj is None: continue readwrite(obj, flags) fd may have been closed and recreated by in a previous iteration of the loop. This issue is demonstrated in the failing test: https://github.com/python/cpython/pull/2707/commits/5aeb0098d2347984f3a89cf036c305edd2b8382b ---------- title: Race condition in asyncore wrongly closes channel -> Race condition in asyncore may access the wrong dispatcher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 13:51:14 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 19 Jul 2017 17:51:14 +0000 Subject: [issue30945] loop.create_server does not detect if the interface is IPv6 enabled In-Reply-To: <1500285874.65.0.183073718331.issue30945@psf.upfronthosting.co.za> Message-ID: <1500486674.47.0.672866065843.issue30945@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Better than trying to detect IPv6 compatibility beforehand would probably to recognize the error and simply ignore it. Note: errno 99 is EADDRNOTAVAIL. Something like this could work (untested): diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index 33b8f48..413161a 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -1038,6 +1038,11 @@ class BaseEventLoop(events.AbstractEventLoop): try: sock.bind(sa) except OSError as err: + if err.errno == errno.EADDRNOTAVAIL: + # See bpo-30945 + sockets.pop() + sock.close() + continue raise OSError(err.errno, 'error while attempting ' 'to bind on address %r: %s' % (sa, err.strerror.lower())) from None ---------- nosy: +pitrou versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 13:54:25 2017 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 19 Jul 2017 17:54:25 +0000 Subject: [issue30945] loop.create_server does not detect if the interface is IPv6 enabled In-Reply-To: <1500285874.65.0.183073718331.issue30945@psf.upfronthosting.co.za> Message-ID: <1500486865.1.0.075112187881.issue30945@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Better than trying to detect IPv6 compatibility beforehand would probably to recognize the error and simply ignore it. +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 15:14:25 2017 From: report at bugs.python.org (Joshua Jay Herman) Date: Wed, 19 Jul 2017 19:14:25 +0000 Subject: [issue24459] Mention PYTHONFAULTHANDLER in the man page In-Reply-To: <1434487895.85.0.561507121326.issue24459@psf.upfronthosting.co.za> Message-ID: <1500491665.67.0.311340446429.issue24459@psf.upfronthosting.co.za> Joshua Jay Herman added the comment: Was this ever merged? I'm not sure whats happening. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 15:52:56 2017 From: report at bugs.python.org (Daniel Himmelstein) Date: Wed, 19 Jul 2017 19:52:56 +0000 Subject: [issue30971] Improve code readability of json.tool Message-ID: <1500493976.74.0.611723443059.issue30971@psf.upfronthosting.co.za> New submission from Daniel Himmelstein: In https://github.com/python/cpython/pull/2720, I propose code changes to the json.tool command line utility. These changes are entirely non-functional and instead focus on improving code readability, style, brevity, extensibility, and maintainability. These changes mainly came up during the implementation of two enhancements of json.tool: + https://github.com/python/cpython/pull/345 to add indentation / whitespace options (bpo-29636). + https://github.com/python/cpython/pull/201 to display non-ascii characters (bpo-27413). These issues and pull requests are currently awaiting further consensus around their design and desirability. Therefore, I wanted to separate the non-functional code improvements from these PRs into a distinct PR. This has the benefit of allowing the future enhancement PRs to focus solely on adding features rather than the readability changes. ---------- components: Library (Lib) messages: 298686 nosy: dhimmel priority: normal pull_requests: 2824 severity: normal status: open title: Improve code readability of json.tool versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 16:12:00 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Wed, 19 Jul 2017 20:12:00 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1500495120.82.0.331831387279.issue27099@psf.upfronthosting.co.za> Charles Wohlganger added the comment: Changes to master have introduced tests with hardcoded values for what extensions are expected to be loaded by IDLE. Given that this patch turn all current extensions into mainlined modules, none of them are loaded as extensions and all of the related tests fail. What should I do about this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 16:48:00 2017 From: report at bugs.python.org (pfreixes) Date: Wed, 19 Jul 2017 20:48:00 +0000 Subject: [issue30490] Allow pass an exception to the Event.set method In-Reply-To: <1495832374.38.0.182460539379.issue30490@psf.upfronthosting.co.za> Message-ID: <1500497280.02.0.273299787951.issue30490@psf.upfronthosting.co.za> pfreixes added the comment: More info about why here https://github.com/python/cpython/pull/1824#issuecomment-315903808 ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 17:18:02 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 19 Jul 2017 21:18:02 +0000 Subject: [issue29144] Implicit namespace packages in Python 3.6 In-Reply-To: <1483468021.78.0.379899829208.issue29144@psf.upfronthosting.co.za> Message-ID: <1500499082.03.0.248680189791.issue29144@psf.upfronthosting.co.za> Brett Cannon added the comment: Without looking into what changed, I say Python 3.6 being more strict in what is a namespace package is reasonable and setuptools needs to be better about installing pkg_resources-using __init__.py files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 17:54:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 19 Jul 2017 21:54:03 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1500501243.81.0.792245923106.issue27099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Either the hard-coding in the config test will have to be changed or it will have to be replaced by something adaptive. I have not quite decided yet. Once the new tests are merged, I expect to do some followup improvements. Equal important for this issue is minimal testing of each extension converted. They do not have to be complete, but should demonstrate that the extension is present in the menu and basically runs. Testing for presence in the menu has to be worked out. There should be one or more separate issues that will be dependencies of this. Does your patch put menu entries in the same place? I will want to move some, but that can be a followup issue, which will require change in the test. Ditto for combining some of the small files into fewer files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 18:06:11 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 19 Jul 2017 22:06:11 +0000 Subject: [issue30971] Improve code readability of json.tool In-Reply-To: <1500493976.74.0.611723443059.issue30971@psf.upfronthosting.co.za> Message-ID: <1500501971.33.0.781056542583.issue30971@psf.upfronthosting.co.za> R. David Murray added the comment: However, our general policy is that we don't make such changes unless we are also touching the code for other reasons. So I think using this PR as a base for your feature PRs, and then committing everything together if they are accepted, would be the way to go. I don't know if it would work to actually use it as a base for the other PRs in github, or if it would work better to just make it the initial commit in a commit series. The github workflow is too new for us to have definite answers to such questions :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 18:21:50 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 19 Jul 2017 22:21:50 +0000 Subject: [issue30971] Improve code readability of json.tool In-Reply-To: <1500493976.74.0.611723443059.issue30971@psf.upfronthosting.co.za> Message-ID: <1500502910.02.0.924443250077.issue30971@psf.upfronthosting.co.za> Berker Peksag added the comment: I don't think most of the changes improve readability of json.tool. Everyone has their own preferences and it's usually not enough to justify code churn. Also, we don't need to add comments when the code itself is pretty descriptive: # Output JSON with options.outfile as outfile: json.dump(obj, outfile, sort_keys=options.sort_keys, indent=4) outfile.write('\n') IMO, the only acceptable change is the correct use of 'default' parameter for 'infile' and 'outfile'. ---------- nosy: +berker.peksag stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 18:49:35 2017 From: report at bugs.python.org (Elvis Pranskevichus) Date: Wed, 19 Jul 2017 22:49:35 +0000 Subject: [issue30972] Event loop incorrectly inherited in child processes. Message-ID: <1500504575.06.0.700406850987.issue30972@psf.upfronthosting.co.za> New submission from Elvis Pranskevichus: The attached example shows that `asyncio.get_event_loop` still returns parent process' event loop in some cases. It appears that the fix in issue #29703 was incomplete: PARENT PID: 21947, LOOP: <_UnixSelectorEventLoop running=True closed=False debug=False> at 0x7f0fbe7cfd68 WORKER PID: 21948, LOOP: <_UnixSelectorEventLoop running=True closed=False debug=False> at 0x7f0fbe7cfd68 concurrent.futures.process._RemoteTraceback: """ Traceback (most recent call last): File "/usr/lib64/python3.6/concurrent/futures/process.py", line 175, in _process_worker r = call_item.fn(*call_item.args, **call_item.kwargs) File "test.py", line 13, in worker return loop.run_until_complete(worker_coro()) File "/usr/lib64/python3.6/asyncio/base_events.py", line 454, in run_until_complete self.run_forever() File "/usr/lib64/python3.6/asyncio/base_events.py", line 408, in run_forever raise RuntimeError('This event loop is already running') RuntimeError: This event loop is already running """ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "test.py", line 25, in loop.run_until_complete(main()) File "/usr/lib64/python3.6/asyncio/base_events.py", line 466, in run_until_complete return future.result() File "test.py", line 21, in main return await loop.run_in_executor(executor, worker) RuntimeError: This event loop is already running ---------- components: asyncio files: test.py messages: 298693 nosy: Elvis.Pranskevichus, yselivanov priority: normal severity: normal status: open title: Event loop incorrectly inherited in child processes. type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47024/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 19:27:08 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 19 Jul 2017 23:27:08 +0000 Subject: [issue30917] IDLE: Add idlelib.config.IdleConf unittest In-Reply-To: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> Message-ID: <1500506828.12.0.425050453284.issue30917@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset ed014f7e135fe021837208960237d6c37afde5be by terryjreedy (Louie Lu) in branch 'master': bpo-30917: IDLE: Fix mock_config deepcopy to read_string (#2754) https://github.com/python/cpython/commit/ed014f7e135fe021837208960237d6c37afde5be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 19:42:30 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 19 Jul 2017 23:42:30 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1500507750.81.0.453643388779.issue30968@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2826 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 19:53:26 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 19 Jul 2017 23:53:26 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1500508406.81.0.495254817052.issue30968@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I merged pr2754 in pr2753, the 3.6 backport of pr2691. To avoid breaking 3.6 buildbots more than one test, I will hold off merging pr2753 until a fix is available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 20:01:16 2017 From: report at bugs.python.org (Berker Peksag) Date: Thu, 20 Jul 2017 00:01:16 +0000 Subject: [issue29403] mock's autospec's behavior on method-bound builtin functions is broken In-Reply-To: <1485903715.23.0.569013669104.issue29403@psf.upfronthosting.co.za> Message-ID: <1500508876.35.0.809369922481.issue29403@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 856cbcc12f2e4cca93af5dc7ed6bcea4dd942f10 by Berker Peksag (Aaron Gallagher) in branch 'master': bpo-29403: Fix mock's broken autospec behavior on method-bound builtin functions (GH-3) https://github.com/python/cpython/commit/856cbcc12f2e4cca93af5dc7ed6bcea4dd942f10 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 20:14:22 2017 From: report at bugs.python.org (Kubilay Kocak) Date: Thu, 20 Jul 2017 00:14:22 +0000 Subject: [issue30333] test_multiprocessing_forkserver: poll() failed on AMD64 FreeBSD CURRENT Non-Debug 3.5 In-Reply-To: <1494429873.7.0.669335220252.issue30333@psf.upfronthosting.co.za> Message-ID: <1500509662.51.0.178113358045.issue30333@psf.upfronthosting.co.za> Changes by Kubilay Kocak : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 20:15:52 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Jul 2017 00:15:52 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1500509752.85.0.139639827791.issue30968@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Louie, I am fixing this (I believe). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 20:20:41 2017 From: report at bugs.python.org (Berker Peksag) Date: Thu, 20 Jul 2017 00:20:41 +0000 Subject: [issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address In-Reply-To: <1499633339.94.0.136665886268.issue30883@psf.upfronthosting.co.za> Message-ID: <1500510041.09.0.898156237686.issue30883@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset aca493b7a337338fa20395fbc2d1895cb8093826 by Berker Peksag (Ammar Askar) in branch '3.5': [3.5] bpo-30883: Use pythontest.net instead of debian.org in test_urllib2net (GH-2755) https://github.com/python/cpython/commit/aca493b7a337338fa20395fbc2d1895cb8093826 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 20:21:11 2017 From: report at bugs.python.org (Berker Peksag) Date: Thu, 20 Jul 2017 00:21:11 +0000 Subject: [issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address In-Reply-To: <1499633339.94.0.136665886268.issue30883@psf.upfronthosting.co.za> Message-ID: <1500510071.4.0.703386926082.issue30883@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset ae4dca7701ca77a37aa8c956450ff8e21fe6883e by Berker Peksag (Ammar Askar) in branch '3.6': [3.6] bpo-30883: Use pythontest.net instead of debian.org in test_urllib2net (GH-2755) https://github.com/python/cpython/commit/ae4dca7701ca77a37aa8c956450ff8e21fe6883e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 20:22:40 2017 From: report at bugs.python.org (Berker Peksag) Date: Thu, 20 Jul 2017 00:22:40 +0000 Subject: [issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address In-Reply-To: <1499633339.94.0.136665886268.issue30883@psf.upfronthosting.co.za> Message-ID: <1500510160.06.0.927836328702.issue30883@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks, Ammar! ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 20:23:06 2017 From: report at bugs.python.org (Berker Peksag) Date: Thu, 20 Jul 2017 00:23:06 +0000 Subject: [issue29403] mock's autospec's behavior on method-bound builtin functions is broken In-Reply-To: <1485903715.23.0.569013669104.issue29403@psf.upfronthosting.co.za> Message-ID: <1500510186.13.0.969912935479.issue29403@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 20:28:54 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Jul 2017 00:28:54 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1500510534.15.0.945906565405.issue30968@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2827 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 20:45:38 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Jul 2017 00:45:38 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1500511538.39.0.541865672984.issue30968@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 9f9192afbb4e45d09f0d3d717b457d157dc46398 by terryjreedy in branch 'master': bpo-30968: Fix test_get_font in IDLE's test_config. (#2769) https://github.com/python/cpython/commit/9f9192afbb4e45d09f0d3d717b457d157dc46398 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 21:16:47 2017 From: report at bugs.python.org (Louie Lu) Date: Thu, 20 Jul 2017 01:16:47 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1500513407.69.0.793369511528.issue30968@psf.upfronthosting.co.za> Louie Lu added the comment: Yes, Terry's patch fixed this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 23:24:45 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 20 Jul 2017 03:24:45 +0000 Subject: [issue29144] Implicit namespace packages in Python 3.6 In-Reply-To: <1483468021.78.0.379899829208.issue29144@psf.upfronthosting.co.za> Message-ID: <1500521085.37.0.570443004928.issue29144@psf.upfronthosting.co.za> Nick Coghlan added the comment: At the Python level, the rules are simple: the first directory on sys.path that contains an __init__.py file is identified as a self-contained package. It is then up to that __init__.py file to emulate namespace package behaviour (by extending __path__) if that's what the author intended. Nothing changed in Python 3.6 in terms of that, and it's been that way ever since native namespace packages were introduced. So if there's a behavioural change in the pkg_resources namespace emulation in going from Python 3.5 to 3.6 that occurs with both old & new versions of setuptools, then I see two main possible candidates for that: 1. Something changed in one of the APIs that setuptools uses to recalculate __path__ 2. Something changed in importlib where we're not respecting runtime changes to __path__ properly, and are instead relying on either __spec__.submodule_search_locations or a stale cached version of __path__ Neither of those is something we *intended* to change in 3.6, so I think it's reasonable to categorise this as 3.6 regression at the standard library level (even though setuptools will likely need to work around it anyway, given the earliest we'll be able to fix it is in 3.6.3) ---------- keywords: +3.6regression stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 00:24:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Jul 2017 04:24:39 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1500524679.01.0.205400549756.issue30940@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The documentation should be updated before converting round() to Argument Clinic, because this update should be backported to 3.6 and 3.5, while the conversion can be made only in 3.7. ---------- keywords: +easy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 00:41:58 2017 From: report at bugs.python.org (T Trindad) Date: Thu, 20 Jul 2017 04:41:58 +0000 Subject: [issue30973] Regular expression "hangs" interpreter Message-ID: <1500525718.61.0.130114594968.issue30973@psf.upfronthosting.co.za> New submission from T Trindad: The following code "hangs" the interpreter: import re re.search(r"/\*\*((?:[^*]+|\*[^/])*)\*/", """ /** Copy Constructor **/ private EvaluationContext (EvaluationContext base) {""") Changing the regex to r"/\*\*((?:[^*]|\*[^/])*)\*/" makes it work normally. ---------- components: Regular Expressions messages: 298705 nosy: T Trindad, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: Regular expression "hangs" interpreter type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 01:02:15 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Jul 2017 05:02:15 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1500526935.3.0.0735217414482.issue30968@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Fix worked: test_idle passed in build 897. http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/897/steps/test/logs/stdio I also included the fix of PR2769 in PR2753 (3.6 backport). ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 01:05:22 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Jul 2017 05:05:22 +0000 Subject: [issue30917] IDLE: Add idlelib.config.IdleConf unittest In-Reply-To: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> Message-ID: <1500527122.96.0.524147190772.issue30917@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2828 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 01:23:02 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Jul 2017 05:23:02 +0000 Subject: [issue30917] IDLE: Add idlelib.config.IdleConf unittest In-Reply-To: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> Message-ID: <1500528182.4.0.223149420323.issue30917@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 65c24c846797b93d7adb72fc400f95a570f43fa9 by terryjreedy in branch '3.6': [3.6] bpo-30917: IDLE: Add config.IdleConf unittests (GH-2691) (#2753) https://github.com/python/cpython/commit/65c24c846797b93d7adb72fc400f95a570f43fa9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 04:07:10 2017 From: report at bugs.python.org (Marcel Partap) Date: Thu, 20 Jul 2017 08:07:10 +0000 Subject: [issue30974] os.samefile / shutil._samefile: following symlinks Message-ID: <1500538030.77.0.17785692497.issue30974@psf.upfronthosting.co.za> New submission from Marcel Partap: Don't know whether it should be considered a documentation or behavioral issue, but os.samefile calls os.stat() on given files, following symlinks. Does this really "test whether two pathnames reference the same actual file"? I'd consider os.lstat() more suited for that. This bites me every time I want to overwrite a symlink with its referenced file using ranger. ---------- messages: 298708 nosy: eMPee584 priority: normal severity: normal status: open title: os.samefile / shutil._samefile: following symlinks type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 04:37:37 2017 From: report at bugs.python.org (Andrew Jaffe) Date: Thu, 20 Jul 2017 08:37:37 +0000 Subject: [issue30392] default webbrowser fails on macOS Sierra 10.12.5 In-Reply-To: <1495050601.31.0.205212071557.issue30392@psf.upfronthosting.co.za> Message-ID: <1500539857.52.0.888880337691.issue30392@psf.upfronthosting.co.za> Andrew Jaffe added the comment: 10.12.6 is out and the bug appears to be fixed... ---------- resolution: out of date -> third party status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 04:57:50 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Thu, 20 Jul 2017 08:57:50 +0000 Subject: [issue10544] yield expression inside generator expression does nothing In-Reply-To: <1290799279.15.0.89740732651.issue10544@psf.upfronthosting.co.za> Message-ID: <1500541070.9.0.129778681829.issue10544@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 05:06:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Jul 2017 09:06:00 +0000 Subject: [issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address In-Reply-To: <1499633339.94.0.136665886268.issue30883@psf.upfronthosting.co.za> Message-ID: <1500541560.29.0.997293850436.issue30883@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I didn't know that pythontest.net had a FTP server. Cool! Thank you for the fix ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 05:07:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Jul 2017 09:07:54 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1500541674.65.0.970113165247.issue30968@psf.upfronthosting.co.za> STINNER Victor added the comment: Terry: FYI your commit message starts with multiple spaces. I would also suggest you to format your name as you did previously: "Terry Jan Reedy". commit 9f9192afbb4e45d09f0d3d717b457d157dc46398 Author: terryjreedy Date: Wed Jul 19 20:45:36 2017 -0400 bpo-30968: Fix test_get_font in IDLE's test_config. (#2769) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 05:09:47 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 20 Jul 2017 09:09:47 +0000 Subject: [issue10544] yield expression inside generator expression does nothing In-Reply-To: <1290799279.15.0.89740732651.issue10544@psf.upfronthosting.co.za> Message-ID: <1500541787.77.0.421028895052.issue10544@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- assignee: -> levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 06:07:35 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 20 Jul 2017 10:07:35 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1500545255.45.0.122307825379.issue25988@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: The last few weeks something bothered while working on Protocols PEP: protocols should be ideally compact (and PEP already emphasizes this). However, the only potential candidates for __getitem__ are Sequence and Mapping, that are both quite bulky (half dozen members each). I was thinking about different options like adding BaseMap as a base for Mapping and Sequence that will only have __getitem__. I expect this to be a popular protocol, since often people just need something that can be subscripted. Fortunately I stumbled into this issue. It looks like the optimal way now is: * Have an abstract base class (let's call it BaseMap, although I don't really like this name) in collections.abc that has only __getitem__ method. * It will be inherited by both Sequence and Mapping, but for the purpose of static typing, Sequence[T] will be a subtype of BaseMap[int, T], while Mapping[KT, VT] will be a subtype of BaseMap[KT, VT]. * BaseMap will be contravariant in key, this will solve problems with Mapping (invariant in key), for example a function that expects BaseMap[str, int] will accept Dict[Union[str, unicode], int]. * BaseMap will be a protocol in typing, so that people can extend it depending on their needs (e.g. add a .get() method). Guido, ?ukasz if you agree, then I will add this to the Protocols PEP and will make a PR to collections.abc. We need to agree on the name, there are two options now: BaseMap and Indexable. I don't like the second since I would rather have it as a generic alias: Indexable = BaseMap[int, T]. However, BaseMap is also not very good, since I want something more "neutral" between Mapping and Sequence. ---------- assignee: -> levkivskyi nosy: +levkivskyi, lukasz.langa versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 07:29:49 2017 From: report at bugs.python.org (Mick Phillips) Date: Thu, 20 Jul 2017 11:29:49 +0000 Subject: [issue30975] Multiprocessing: Event.set() blocks indefinitely if a process waiting on it has died. Message-ID: <1500550188.97.0.422386846774.issue30975@psf.upfronthosting.co.za> New submission from Mick Phillips: If a process was waiting on an Event but dies for some reason, nothing else can set the Event. I think the Event._cond lock can not be acquired. See attached for a demonstration. I see the same behaviour in Python 2.7.5 and Python 3.5.2. Is this expected behaviour? ---------- components: Windows files: WaitersSleepers.py messages: 298713 nosy: Mick Phillips, davin, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Multiprocessing: Event.set() blocks indefinitely if a process waiting on it has died. type: behavior versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file47025/WaitersSleepers.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 07:34:42 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 20 Jul 2017 11:34:42 +0000 Subject: [issue30945] loop.create_server does not detect if the interface is IPv6 enabled In-Reply-To: <1500285874.65.0.183073718331.issue30945@psf.upfronthosting.co.za> Message-ID: <1500550482.55.0.203937069174.issue30945@psf.upfronthosting.co.za> Antoine Pitrou added the comment: C?cile, could you try the following patch? I have no easy way to test here. ---------- keywords: +patch Added file: http://bugs.python.org/file47026/eaddrnotavail_asyncio.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 07:43:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Jul 2017 11:43:29 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500551009.62.0.307405002096.issue30822@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2829 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 07:49:54 2017 From: report at bugs.python.org (Gareth Rees) Date: Thu, 20 Jul 2017 11:49:54 +0000 Subject: [issue30973] Regular expression "hangs" interpreter In-Reply-To: <1500525718.61.0.130114594968.issue30973@psf.upfronthosting.co.za> Message-ID: <1500551394.42.0.0480201626261.issue30973@psf.upfronthosting.co.za> Gareth Rees added the comment: This is the usual exponential backtracking behaviour of Python's regex engine. The problem is that the regex (?:[^*]+|\*[^/])* can match against a string in exponentially many ways, and Python's regex engine tries all of them before giving up. ---------- nosy: +gdr at garethrees.org _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 07:57:41 2017 From: report at bugs.python.org (Cecile Tonglet) Date: Thu, 20 Jul 2017 11:57:41 +0000 Subject: [issue30945] loop.create_server does not detect if the interface is IPv6 enabled In-Reply-To: <1500285874.65.0.183073718331.issue30945@psf.upfronthosting.co.za> Message-ID: <1500551861.32.0.711649140354.issue30945@psf.upfronthosting.co.za> Cecile Tonglet added the comment: Sure! It seems to work, the process returns an exit code of 0 and I see no traceback but the message is still displayed in the terminal. (Also I did something weird because your patch applies on branch master and I ran it with Python 3.6... I suppose it shouldn't be a problem) [0] [11:54:13] /tmp > d run -it --rm -v /tmp:/tmp:ro -v ~/repos/cpython/Lib/asyncio:/usr/local/lib/python3.6/asyncio:ro python:3.6 python /tmp/test_ipv6.py error while attempting to bind on address ('::1', 27015, 0, 0): cannot assign requested address [0] [11:54:19] /tmp > d run -it --rm -v /tmp:/tmp:ro python:3.6 python /tmp/test_ipv6.py Traceback (most recent call last): File "/usr/local/lib/python3.6/asyncio/base_events.py", line 1043, in create_server sock.bind(sa) OSError: [Errno 99] Cannot assign requested address During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/test_ipv6.py", line 11, in server = loop.run_until_complete(server_creation) File "/usr/local/lib/python3.6/asyncio/base_events.py", line 466, in run_until_complete return future.result() File "/usr/local/lib/python3.6/asyncio/base_events.py", line 1047, in create_server % (sa, err.strerror.lower())) OSError: [Errno 99] error while attempting to bind on address ('::1', 27015, 0, 0): cannot assign requested address [1] [11:54:52] /tmp > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 08:28:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Jul 2017 12:28:08 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500553688.08.0.637931975289.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy Storchaka: "If testing with -u tzdata is such expensive, tzdata can be excluded from all resources." I agree, I wrote a PR for that: https://github.com/python/cpython/pull/2775 I like using "-u all" without having to remind that a specific resource (tzdata) is too slow to be enabled by default. I suggest to backport this change to all branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 08:46:05 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 20 Jul 2017 12:46:05 +0000 Subject: [issue30945] loop.create_server does not detect if the interface is IPv6 enabled In-Reply-To: <1500285874.65.0.183073718331.issue30945@psf.upfronthosting.co.za> Message-ID: <1500554765.36.0.0971540658388.issue30945@psf.upfronthosting.co.za> Antoine Pitrou added the comment: C?cile, thank you. The reason the message is still displayed is that I turned the error into a warning (in other words, it is expected). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 09:20:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Jul 2017 13:20:43 +0000 Subject: [issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds In-Reply-To: <1500454402.66.0.425527808924.issue30966@psf.upfronthosting.co.za> Message-ID: <1500556843.01.0.543936096847.issue30966@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2830 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 09:33:16 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 20 Jul 2017 13:33:16 +0000 Subject: [issue30975] Multiprocessing: Event.set() blocks indefinitely if a process waiting on it has died. In-Reply-To: <1500550188.97.0.422386846774.issue30975@psf.upfronthosting.co.za> Message-ID: <1500557596.8.0.127241016376.issue30975@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hi Mick, thanks for reporting this issue. You're right that the behaviour isn't expected. ---------- nosy: +pitrou stage: -> needs patch versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 09:42:03 2017 From: report at bugs.python.org (Mick Phillips) Date: Thu, 20 Jul 2017 13:42:03 +0000 Subject: [issue30975] Multiprocessing: Event.set() blocks indefinitely if a process waiting on it has died. In-Reply-To: <1500550188.97.0.422386846774.issue30975@psf.upfronthosting.co.za> Message-ID: <1500558123.88.0.231995129953.issue30975@psf.upfronthosting.co.za> Mick Phillips added the comment: Thanks for confirming. If anyone finds this and is looking for a workaround, here's what I'm using: while not event.is_set() try: time.sleep(timeout) except (KeyboardInterrupt, IOError): pass ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 09:46:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Jul 2017 13:46:35 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500558395.17.0.556235259818.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 5b392bbaeb9d9b1db961ecfc7315d8c8662c27f6 by Victor Stinner in branch 'master': bpo-30822: Exclude tzdata from regrtest --all (#2775) https://github.com/python/cpython/commit/5b392bbaeb9d9b1db961ecfc7315d8c8662c27f6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 09:59:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Jul 2017 13:59:58 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500559198.58.0.345755243853.issue30822@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2831 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 10:05:30 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 20 Jul 2017 14:05:30 +0000 Subject: [issue30975] multiprocessing.Condition.notify_all() blocks indefinitely if a process waiting on it has died In-Reply-To: <1500550188.97.0.422386846774.issue30975@psf.upfronthosting.co.za> Message-ID: <1500559530.45.0.450551777511.issue30975@psf.upfronthosting.co.za> Antoine Pitrou added the comment: As a matter of fact, the bug is in Condition (which is used by Event.wait() but not by Event.is_set(), hence your workaround). Here is a reproducer script. This looks like a hard issue to solve. There is no way to know whether a process that used to be waiting for a Condition was killed. ---------- title: Multiprocessing: Event.set() blocks indefinitely if a process waiting on it has died. -> multiprocessing.Condition.notify_all() blocks indefinitely if a process waiting on it has died Added file: http://bugs.python.org/file47027/WaitersSleepers.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 10:12:44 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Thu, 20 Jul 2017 14:12:44 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1500559964.17.0.352694045428.issue27099@psf.upfronthosting.co.za> Charles Wohlganger added the comment: Menus items were placed where they appeared as extensions. It would be no difficulty for me to move them around. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 10:16:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Jul 2017 14:16:00 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500560160.61.0.471075460468.issue30822@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2832 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 10:20:00 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 20 Jul 2017 14:20:00 +0000 Subject: [issue30975] multiprocessing.Condition.notify_all() blocks indefinitely if a process waiting on it has died In-Reply-To: <1500550188.97.0.422386846774.issue30975@psf.upfronthosting.co.za> Message-ID: <1500560400.13.0.439068011185.issue30975@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 10:58:52 2017 From: report at bugs.python.org (Mick Phillips) Date: Thu, 20 Jul 2017 14:58:52 +0000 Subject: [issue30976] multiprocessing.Process.is_alive can show True for dead processes Message-ID: <1500562732.45.0.832960980555.issue30976@psf.upfronthosting.co.za> New submission from Mick Phillips: multiprocessing.Process.is_alive() returns True for processes that have been killed. See attached for example. Workaround: also test against psutils.pid_exists. ---------- components: Windows files: alive.py messages: 298724 nosy: davin, mickp, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: multiprocessing.Process.is_alive can show True for dead processes versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file47028/alive.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 11:08:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Jul 2017 15:08:50 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500563330.92.0.989285098075.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 96ef06f3979023fd69ed8796d0b1d88885d3ae4d by Victor Stinner in branch '3.6': bpo-30822: Exclude tzdata from regrtest --all (#2775) (#2777) https://github.com/python/cpython/commit/96ef06f3979023fd69ed8796d0b1d88885d3ae4d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 11:08:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Jul 2017 15:08:54 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500563334.35.0.861428524026.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 645e503ba58086c7f51eda4d025743f2afc05a2a by Victor Stinner in branch '3.5': bpo-30822: Exclude tzdata from regrtest --all (#2775) (#2781) https://github.com/python/cpython/commit/645e503ba58086c7f51eda4d025743f2afc05a2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 11:16:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Jul 2017 15:16:27 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500563787.88.0.112715858856.issue30822@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2833 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 11:24:43 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 20 Jul 2017 15:24:43 +0000 Subject: [issue30973] Regular expression "hangs" interpreter In-Reply-To: <1500525718.61.0.130114594968.issue30973@psf.upfronthosting.co.za> Message-ID: <1500564283.96.0.433539429651.issue30973@psf.upfronthosting.co.za> R. David Murray added the comment: Right. We don't try to fix handling these kinds of exponential expressions. This is a case of "don't do that" :) (I don't know if the regex module is better at "handling" this kind of regex bug.) ---------- nosy: +r.david.murray resolution: -> wont fix stage: -> resolved status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 11:29:47 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 20 Jul 2017 15:29:47 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1500564587.29.0.596988166095.issue25988@psf.upfronthosting.co.za> Raymond Hettinger added the comment: IIRC, the original motivation for ABCs was to differentiate distinct uses of __getitem__ (we forever struggled with differentiating sequences from mapping). It seems to me that this proposal is a step backwards. Other than a feeling of lightness, I don't think this proposal does anything for us. What is point of knowing an object is Subscriptable without knowing how it is to be used. The OP has a sense that Mapping and Sequence are "too heavy" but I think the reality that useful classes almost never use __getitem__ in isolation; rather, it is part of a small constellation of methods that are typically used together. I would prefer that collections.abc continue to reflect that reality. Also, I worry that collections.abc is becoming cluttered. The existence of use ABCs like MutableMapping is being drowned-out by one-trick-ponies. We're developing an unfavorable ratio of theoretical building blocks versus the practical tools. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 11:31:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Jul 2017 15:31:31 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500564691.64.0.647070686234.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: (Oops, I gone too fast in my 3.5 backport. tzdata was only introduced in Python 3.6, for me it was something older. I wrote a new fix for 3.5, to only add extralargefile, but don't add tzdata.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 11:33:23 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 20 Jul 2017 15:33:23 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1500564803.44.0.232594556149.issue28638@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > it would be *nice* to not only optimization the creation > but also attribute access by name FWIW, once the property/itemgetter pair are instantiated in the NT class, the actual lookup runs through them at C speed (no pure python steps). There is not much fluff here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 11:47:15 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 20 Jul 2017 15:47:15 +0000 Subject: [issue30974] Update os.samefile docstring to match documentation In-Reply-To: <1500538030.77.0.17785692497.issue30974@psf.upfronthosting.co.za> Message-ID: <1500565635.12.0.436640091079.issue30974@psf.upfronthosting.co.za> R. David Murray added the comment: I would take "actual file" as meaning the file the symlink points to, so I'd say the documentation matches the implementation according to your description of the two. The current docs actually say "refer to the same file or directory", and mention os.stat explicitly, so again I'd say the docs and implementation match. It sounds like what you want is to open a feature request for a samefile equivalent that does not follow symlinks. lsamefile? We could use this issue for making the docstring match the docs, though. I think the sentence in the docs is short enough to just get copied into the docstring. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, r.david.murray title: os.samefile / shutil._samefile: following symlinks -> Update os.samefile docstring to match documentation versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 12:08:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Jul 2017 16:08:57 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500566937.36.0.773700653816.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset bf3a1e973b49236e6f267cca135d36290568e6a4 by Victor Stinner in branch '3.5': bpo-30822: regrtest: remove tzdata (#2782) https://github.com/python/cpython/commit/bf3a1e973b49236e6f267cca135d36290568e6a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 12:15:43 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Thu, 20 Jul 2017 16:15:43 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500567343.11.0.292066092762.issue30822@psf.upfronthosting.co.za> Changes by Utkarsh Upadhyay : ---------- pull_requests: +2834 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 12:33:26 2017 From: report at bugs.python.org (John Taylor) Date: Thu, 20 Jul 2017 16:33:26 +0000 Subject: [issue29284] Include thread_name_prefix in the concurrent.futures.ThreadPoolExecutor example 17.4.2.1 In-Reply-To: <1484584964.59.0.239435362381.issue29284@psf.upfronthosting.co.za> Message-ID: <1500568406.74.0.240949969655.issue29284@psf.upfronthosting.co.za> John Taylor added the comment: Bump ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 12:50:54 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 20 Jul 2017 16:50:54 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1500569454.97.0.469268028885.issue25988@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Raymond, > The existence of use ABCs like MutableMapping is being drowned-out by one-trick-ponies. We're developing an unfavorable ratio of theoretical building blocks versus the practical tools. Why do you think they are "theoretical"? FWIW, a simple search on GitHub for abc.X gives this: Sequence 322K Mapping 267K Iterable 244K Container 99K MutableMapping 77K I don't see any pattern here (although this may be only anecdotal evidence :-) > Other than a feeling of lightness, I don't think this proposal does anything for us. This proposal makes more sense (and motivation) in the context of static typing, since it is a good way to know how __getitem__ is going to be used -- from its static type. Something typed with Subscriptable[int, T] would accept both Sequence[T] and Mapping[int, T]. The latter two are currently differentiated by __reversed__ (Sequence is Reversible as opposed to Mapping). Concerning an invariant that order of iteration is consistent with indexing by subsequent integers, I think this can't be checked reliably neither statically, nor by any simple runtime isinstance check. For example a subclass can override Indexable.__iter__ and break the iteration order. We can still add it, and rely on user cooperation. Anyway, I am not insisting on adding either Subscriptable nor Indexable, but I think it is important that these things are discussed in view of PEP 544. Alternative proposal would be to add Subscriptable and its subclass Indexable only to typing as protocols (with some special-casing in type checkers for the latter to provide a higher level of contract). (Concerning the name, I think Enumerable sounds better than Indexable, IIUC the idea is to work correctly with enumerate.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 13:11:31 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Jul 2017 17:11:31 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1500570691.62.0.116277530483.issue30968@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I don't understand 'format your name' as there is no formatting that I did. Github copies account name and email as they are. I have no idea about commit message. The PR title has no extra spaces. But github does not always copy correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 13:13:20 2017 From: report at bugs.python.org (Gareth Rees) Date: Thu, 20 Jul 2017 17:13:20 +0000 Subject: [issue30976] multiprocessing.Process.is_alive can show True for dead processes In-Reply-To: <1500562732.45.0.832960980555.issue30976@psf.upfronthosting.co.za> Message-ID: <1500570800.58.0.364811387228.issue30976@psf.upfronthosting.co.za> Gareth Rees added the comment: This is a race condition ? when os.kill returns, that means that the signal has been delivered, but it does not mean that the subprocess has exited yet. You can see this by inserting a sleep after the kill and before the liveness check: print(proc.is_alive()) os.kill(proc.pid, signal.SIGTERM) time.sleep(1) print(proc.is_alive()) This (probably) gives the process time to exit. (Presumably the psutil.pid_exists() call has a similar effect.) Of course, waiting for 1 second (or any amount of time) might not be enough. The right thing to do is to join the process. Then when the join exits you know it died. ---------- nosy: +gdr at garethrees.org _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 13:14:10 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Jul 2017 17:14:10 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1500570850.04.0.433290783039.issue30968@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I will try to look at the first line more carefully before hitting the 2nd green button. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 13:15:28 2017 From: report at bugs.python.org (Wouter Bolsterlee) Date: Thu, 20 Jul 2017 17:15:28 +0000 Subject: [issue30977] reduce uuid.UUID() memory footprint Message-ID: <1500570928.48.0.991848922118.issue30977@psf.upfronthosting.co.za> New submission from Wouter Bolsterlee: memory usage for uuid.UUID seems larger than it has to be. it seems that using __slots__ will save around ~100 bytes per instance, which is very significant, e.g. when dealing with large sets of uuids (which are often used as "primary keys" into external data stores). uuid.UUID has a __setattr__ that prevents any extra attributes to be set: def __setattr__(self, name, value): raise TypeError('UUID objects are immutable') ...so it seems to me not having __dict__ should not cause any problems? before (RES column): >>> import uuid >>> y = {uuid.uuid4() for _ in range(1000000)} PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command 23020 wbolster 20 0 315M 253M 7256 S 0.0 1.6 0:04.98 python with slots: >>> import uuid >>> y = {uuid.uuid4() for _ in range(1000000)} PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command 21722 wbolster 20 0 206M 145M 7348 S 0.0 0.9 0:05.03 python i will open a pr on github shortly. ---------- messages: 298738 nosy: wbolster priority: normal severity: normal status: open title: reduce uuid.UUID() memory footprint _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 13:15:59 2017 From: report at bugs.python.org (Wouter Bolsterlee) Date: Thu, 20 Jul 2017 17:15:59 +0000 Subject: [issue30977] reduce uuid.UUID() memory footprint In-Reply-To: <1500570928.48.0.991848922118.issue30977@psf.upfronthosting.co.za> Message-ID: <1500570959.54.0.165124377984.issue30977@psf.upfronthosting.co.za> Changes by Wouter Bolsterlee : ---------- pull_requests: +2835 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 13:19:58 2017 From: report at bugs.python.org (Wouter Bolsterlee) Date: Thu, 20 Jul 2017 17:19:58 +0000 Subject: [issue30977] reduce uuid.UUID() memory footprint In-Reply-To: <1500570928.48.0.991848922118.issue30977@psf.upfronthosting.co.za> Message-ID: <1500571198.74.0.256704178546.issue30977@psf.upfronthosting.co.za> Wouter Bolsterlee added the comment: as a follow-up note, i also experimented with keeping the actual value as a bytes object instead of an integer, but that does not lead to less memory being used: a 128-bit integer uses less memory than a 16 byte bytes object (presumably because PyBytesObject has a cached hash() field and a trailing null byte). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 13:23:37 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Jul 2017 17:23:37 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1500571417.15.0.899999678486.issue27099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Same place is good for now as testing will be easier. Moving menu items will be a separate issue later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 13:27:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Jul 2017 17:27:23 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1500571643.32.0.981771868406.issue30968@psf.upfronthosting.co.za> STINNER Victor added the comment: Terry J. Reedy: I don't understand 'format your name' as there is no formatting that I did. GitHub picks your commits unchanged. Git picks your name from your .gitconfig configuration file, global $HOME/.gitconfig or local /.gitconfig. It's just that I saw "terryjreedy" in your last commit, instead of the usual "Terry Jan Reedy". It's up to you to pick whatever name you want, I was just surprised to see the name formatted differently. > I have no idea about commit message. The PR title has no extra spaces. But github does not always copy correctly. It doesn't matter at all. It's just that I was surprised ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 13:56:51 2017 From: report at bugs.python.org (Nicholas P Kobald) Date: Thu, 20 Jul 2017 17:56:51 +0000 Subject: [issue30964] Mention ensurepip in package installation docs In-Reply-To: <1500425281.82.0.79058660024.issue30964@psf.upfronthosting.co.za> Message-ID: <1500573411.02.0.620503135176.issue30964@psf.upfronthosting.co.za> Nicholas P Kobald added the comment: Should this section refer to https://packaging.python.org/tutorials/installing-packages/#install-pip-setuptools-and-wheel as well? ---------- nosy: +Nickk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 14:04:52 2017 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Jul 2017 18:04:52 +0000 Subject: [issue30231] test_imaplib needs a TLS server accepting self-signed certificates In-Reply-To: <1493736284.13.0.622029485806.issue30231@psf.upfronthosting.co.za> Message-ID: <1500573892.39.0.894282981928.issue30231@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset b5f20ea91ec4d9dc7e1c31629903888c651bd02c by Ned Deily (Victor Stinner) in branch '3.3': [3.3] Backport CI config from master and remove skipped imaplib tests (#2481) https://github.com/python/cpython/commit/b5f20ea91ec4d9dc7e1c31629903888c651bd02c ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 15:08:29 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Jul 2017 19:08:29 +0000 Subject: [issue30576] http.server should support HTTP compression (gzip) In-Reply-To: <1496691724.59.0.955308322691.issue30576@psf.upfronthosting.co.za> Message-ID: <1500577709.74.0.519749561153.issue30576@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I saw the python-ideas post. I have no experience with http.server, but I just read the doc, and know something of our general enhancement policies. I hope these comments help. There are two questions: Should compression support be added to http.server? If so, how? To me, the purpose of the module is to provide a server and request handlers for toy, experimental, and basic production use, whether on a private or the public net. Whatever the case was when the module was written, compression strikes me as a basic http feature now. I agree with Martin that compression does not fit with the current definition of SimpleHTTPRequestHandler. I suggest instead a subclass thereof. CompressionHTTPRequestHandler? ZippyHTTPRequestHandler? Then add -zip to command line options. If cgi + compression is relevant, a CompressionMixin might be posible, but I notice that there has been no suggestion so far that the combination is needed. I suspect one motivation for adding compression to Simple... is to make it default. I understand the desire to give users something for 'free', but changing default behavior usually breaks something somewhere and is therefore contrary to our general policy, and I definitely would not break it for this. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 15:13:32 2017 From: report at bugs.python.org (Mick Phillips) Date: Thu, 20 Jul 2017 19:13:32 +0000 Subject: [issue30976] multiprocessing.Process.is_alive can show True for dead processes In-Reply-To: <1500562732.45.0.832960980555.issue30976@psf.upfronthosting.co.za> Message-ID: <1500578012.58.0.103395483158.issue30976@psf.upfronthosting.co.za> Mick Phillips added the comment: Yep - apologies, my mistake. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 15:13:41 2017 From: report at bugs.python.org (nicholas kobald) Date: Thu, 20 Jul 2017 19:13:41 +0000 Subject: [issue30964] Mention ensurepip in package installation docs In-Reply-To: <1500425281.82.0.79058660024.issue30964@psf.upfronthosting.co.za> Message-ID: <1500578021.28.0.534457447578.issue30964@psf.upfronthosting.co.za> Changes by nicholas kobald : ---------- pull_requests: +2836 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 15:22:22 2017 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 20 Jul 2017 19:22:22 +0000 Subject: [issue30973] Regular expression "hangs" interpreter In-Reply-To: <1500525718.61.0.130114594968.issue30973@psf.upfronthosting.co.za> Message-ID: <1500578542.72.0.543214375895.issue30973@psf.upfronthosting.co.za> Matthew Barnett added the comment: The regex module is much better in this respect, but it's not foolproof. With this particular example it completes quickly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 15:53:55 2017 From: report at bugs.python.org (Akuli) Date: Thu, 20 Jul 2017 19:53:55 +0000 Subject: [issue30978] str.format_map() silences exceptions in __getitem__ Message-ID: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> New submission from Akuli: Example: class BrokenMapping: def __getitem__(self, key): 1/0 # this silences the ZeroDivisionError and raises KeyError('world') 'hello {world}'.format_map(BrokenMapping()) I have tried this on several different CPython versions on Ubuntu 14.04 (including the latest Python 3.7.0a0 from github) and they all do this. PyPy passes the ZeroDivisionError through correctly. ---------- messages: 298747 nosy: Akuli priority: normal severity: normal status: open title: str.format_map() silences exceptions in __getitem__ type: behavior versions: Python 3.3, Python 3.4, Python 3.5, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 16:22:26 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 20 Jul 2017 20:22:26 +0000 Subject: [issue29284] Include thread_name_prefix in the concurrent.futures.ThreadPoolExecutor example 17.4.2.1 In-Reply-To: <1484584964.59.0.239435362381.issue29284@psf.upfronthosting.co.za> Message-ID: <1500582146.72.0.136118715409.issue29284@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Hi John, Would you be able to make a GitHub pull request for your change? Since CPython development has moved to GitHub, you may have a better chance of a review with a PR. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 16:44:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Jul 2017 20:44:32 +0000 Subject: [issue30917] IDLE: Add idlelib.config.IdleConf unittest In-Reply-To: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> Message-ID: <1500583472.24.0.783840659128.issue30917@psf.upfronthosting.co.za> Terry J. Reedy added the comment: PR2769 is the fix for master for test_get_font for #30968. The listing here is a cross-reference. The fix was incorporated into the 3.6 backport PR2753 before it was merged. This issue is closed, having increased coverage from 46% to 96%. Further work on config and test config should be new issues building on top of this one. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 16:53:58 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Thu, 20 Jul 2017 20:53:58 +0000 Subject: [issue18875] Idle: Auto insertion of the closing parens, brackets, and braces In-Reply-To: <1377777498.6.0.468253349222.issue18875@psf.upfronthosting.co.za> Message-ID: <1500584038.23.0.910770194376.issue18875@psf.upfronthosting.co.za> Changes by Charles Wohlganger : Added file: http://bugs.python.org/file47029/test_parenclose.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 16:59:57 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Thu, 20 Jul 2017 20:59:57 +0000 Subject: [issue18875] Idle: Auto insertion of the closing parens, brackets, and braces In-Reply-To: <1377777498.6.0.468253349222.issue18875@psf.upfronthosting.co.za> Message-ID: <1500584397.47.0.570687070383.issue18875@psf.upfronthosting.co.za> Charles Wohlganger added the comment: I've uploaded a test file and updated ParenClose. ---------- Added file: http://bugs.python.org/file47030/ParenClose.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 17:23:15 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Jul 2017 21:23:15 +0000 Subject: [issue28523] Idlelib.configdialog: use 'color' insteadof 'colour' In-Reply-To: <1477345028.99.0.578585352452.issue28523@psf.upfronthosting.co.za> Message-ID: <1500585795.98.0.98450382123.issue28523@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2837 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 17:37:12 2017 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 20 Jul 2017 21:37:12 +0000 Subject: [issue30978] str.format_map() silences exceptions in __getitem__ In-Reply-To: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> Message-ID: <1500586632.43.0.0507190925619.issue30978@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 17:38:42 2017 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 20 Jul 2017 21:38:42 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1500586722.43.0.237522052903.issue25988@psf.upfronthosting.co.za> Guido van Rossum added the comment: At least one use of Indexable (by whatever name, but this rolls off the tongue the easiest) would be the metaclass in typing.py that allows one to write List[int] -- there's no containter here! The "drowning out" seems purely subjective -- perhaps if you order the contents of the module alphabetically you won't get much insight, but the docs should use a better organizing principle than that. (After all alphabetization was invented as a crutch for searching. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 18:32:04 2017 From: report at bugs.python.org (=?utf-8?b?QmVybsOhdCBHw6Fib3I=?=) Date: Thu, 20 Jul 2017 22:32:04 +0000 Subject: [issue30979] the winapi fails to run shortcuts (because considers a shortcut not a valid Win32App) Message-ID: <1500589924.87.0.691040995571.issue30979@psf.upfronthosting.co.za> New submission from Bern?t G?bor: Although python27.exe.lnk is callable from any command line tool, with any of its arguments the subprocess module thinks it's not a valid Win32 application. Proof, let there be python27.exe.lnk be a shortcut to python.exe: C:\Python27 ? ls python* python.exe* python27.exe.lnk* pythonw.exe* ? python.exe -c "import sys; print(sys.version)" 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] C:\Python27 ? python.exe -c "import subprocess; print(subprocess.call(['./python.exe', '-c', '\"import sys; print(sys.version)\"']))" 0 C:\Python27 ? python27.exe -c "import subprocess; print(subprocess.call(['./python27.exe.lnk', '-c', '\"import sys; print(sys.version)\"']))" Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\subprocess.py", line 168, in call return Popen(*popenargs, **kwargs).wait() File "C:\Python27\lib\subprocess.py", line 390, in __init__ errread, errwrite) File "C:\Python27\lib\subprocess.py", line 640, in _execute_child startupinfo) WindowsError: [Error 193] %1 is not a valid Win32 application ---------- components: Windows messages: 298752 nosy: Bern?t G?bor, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: the winapi fails to run shortcuts (because considers a shortcut not a valid Win32App) type: enhancement versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 19:21:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Jul 2017 23:21:47 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500592907.78.0.0962561004527.issue30822@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2838 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 19:23:23 2017 From: report at bugs.python.org (Nir Soffer) Date: Thu, 20 Jul 2017 23:23:23 +0000 Subject: [issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor Message-ID: <1500593003.51.0.725099647676.issue30980@psf.upfronthosting.co.za> New submission from Nir Soffer: Commit 4d4c69dc35154a9c21fed1b6b4088e741fbc6ae6 added protection for double close in file_wrapper.close, but the test did not consider that fact that file_wrapper is dupping the file descriptor, making the test ineffective. >>> fd1, fd2 = os.pipe() >>> f = asyncore.file_wrapper(fd1) >>> os.close(f.fd) >>> f.close() Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.5/asyncore.py", line 621, in close os.close(self.fd) OSError: [Errno 9] Bad file descriptor >>> f.fd 4 >>> fd3, fd4 = os.pipe() >>> fd3 4 >>> f.close() >>> os.close(fd3) Traceback (most recent call last): File "", line 1, in OSError: [Errno 9] Bad file descriptor f.close() closed an unrelated file descriptor. ---------- messages: 298753 nosy: Nir Soffer, haypo priority: normal severity: normal status: open title: Calling asyncore.file_wrapper.close twice may close unrelated file descriptor versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 19:26:29 2017 From: report at bugs.python.org (Eryk Sun) Date: Thu, 20 Jul 2017 23:26:29 +0000 Subject: [issue30979] the winapi fails to run shortcuts (because considers a shortcut not a valid Win32App) In-Reply-To: <1500589924.87.0.691040995571.issue30979@psf.upfronthosting.co.za> Message-ID: <1500593189.4.0.785548275401.issue30979@psf.upfronthosting.co.za> Eryk Sun added the comment: subprocess.Popen calls WinAPI CreateProcess, which can execute PE/COFF executables and .BAT/.CMD batch scripts. It doesn't know anything about .LNK shell shortcuts. If CreateProcess fails, a Windows shell (e.g. CMD or PowerShell) tries ShellExecuteEx, which knows how to open a .LNK file. You can use shell=True for this in Python. Directly supporting ShellExecuteEx would be a major enhancement. It would probably require a new keyword-only parameter, or at least a sentinel value for the existing `shell` parameter. ---------- nosy: +eryksun versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 19:31:27 2017 From: report at bugs.python.org (Nir Soffer) Date: Thu, 20 Jul 2017 23:31:27 +0000 Subject: [issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor In-Reply-To: <1500593003.51.0.725099647676.issue30980@psf.upfronthosting.co.za> Message-ID: <1500593487.78.0.634493033518.issue30980@psf.upfronthosting.co.za> Changes by Nir Soffer : ---------- pull_requests: +2839 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 19:36:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Jul 2017 23:36:31 +0000 Subject: [issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor In-Reply-To: <1500593003.51.0.725099647676.issue30980@psf.upfronthosting.co.za> Message-ID: <1500593791.84.0.344391596275.issue30980@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 20:07:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 00:07:26 +0000 Subject: [issue30931] Race condition in asyncore may access the wrong dispatcher In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1500595646.48.0.592390573455.issue30931@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 20:12:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 00:12:18 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500595938.29.0.179123777838.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 80ebc438ed377f8c6491e8887425526c6787c0e7 by Victor Stinner in branch '2.7': bpo-30822: regrtest: fix -u extralargefile (#2788) https://github.com/python/cpython/commit/80ebc438ed377f8c6491e8887425526c6787c0e7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 20:14:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 00:14:56 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500596096.93.0.384724688532.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 287c5594edc1ca08db64d1f4739cc36bfe75ae75 by Victor Stinner (Utkarsh Upadhyay) in branch 'master': bpo-30822: Fix testing of datetime module. (#2530) (#2783) https://github.com/python/cpython/commit/287c5594edc1ca08db64d1f4739cc36bfe75ae75 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 20:56:24 2017 From: report at bugs.python.org (Nir Soffer) Date: Fri, 21 Jul 2017 00:56:24 +0000 Subject: [issue30977] reduce uuid.UUID() memory footprint In-Reply-To: <1500570928.48.0.991848922118.issue30977@psf.upfronthosting.co.za> Message-ID: <1500598584.92.0.986611447829.issue30977@psf.upfronthosting.co.za> Nir Soffer added the comment: This saves memory, but using str(uuid.uuid4()) requires even less memory. If you really want to save memory, you can keep the uuid.uuid4().int. Can you explain someone would like to have 1000000 uuid objects, instead of 1000000 strings? What is the advantage of keeping UUID objects around? ---------- nosy: +Nir Soffer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 22:04:43 2017 From: report at bugs.python.org (Louie Lu) Date: Fri, 21 Jul 2017 02:04:43 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1500602683.59.0.505051875028.issue30968@psf.upfronthosting.co.za> Louie Lu added the comment: For the problem about the small name in git log Author, if you want to changed it, it will need to setup at https://github.com/settings/profile and update the first column "Name". I think this is because we merged on GitHub, and GitHub ignores the git author but use GitHub account's name (if this didn't setup, it will fallback to GitHub account). I have some small name with "mlouielu" when I changed to this new account. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 22:16:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 02:16:32 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1500603392.96.0.162578915112.issue30968@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thanks. I will see what that does. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 22:19:00 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 02:19:00 +0000 Subject: [issue30981] IDLE: Add config dialog font page tests Message-ID: <1500603540.53.0.577825019665.issue30981@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: terry.reedy components: IDLE nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Add config dialog font page tests type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 22:23:21 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 02:23:21 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1500603801.75.0.288614155638.issue30870@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am closing this as basically complete. I opened #30981 to add and perhaps complete font page tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 22:33:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 02:33:48 +0000 Subject: [issue30981] IDLE: Add config dialog font page tests Message-ID: <1500604428.18.0.819214688476.issue30981@psf.upfronthosting.co.za> New submission from Terry J. Reedy: I am working on this. * Change 'test_highlight_sample' to 'highlight_sample. * Change 'set_font_sample()' to 'set_samples()', since it also changes highlight_sample, and test. * Add gui event test for 'bold' checkbutton. * Perhaps add gui event test for size pulldown, or wait until replace. * Test tab setting or wait until replace. Do this before #24776 to redo page and #13802 to redo sample ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 22:34:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 02:34:32 +0000 Subject: [issue30870] IDLE: configdialog/fonts: change font when select by key up/down In-Reply-To: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> Message-ID: <1500604472.55.0.545885108007.issue30870@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 Thu Jul 20 22:36:45 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 02:36:45 +0000 Subject: [issue13802] IDLE Prefernces/Fonts: use multiple alphabets in examples In-Reply-To: <1326756140.29.0.0714084996967.issue13802@psf.upfronthosting.co.za> Message-ID: <1500604605.06.0.494860715708.issue13802@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I decided to rearrange page #24776 before changing sample #13802. ---------- dependencies: +IDLE: Improve config dialog font change user interface _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 22:37:00 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 02:37:00 +0000 Subject: [issue24776] IDLE: Improve config dialog font change user interface In-Reply-To: <1438463567.56.0.28070163335.issue24776@psf.upfronthosting.co.za> Message-ID: <1500604620.16.0.377386708299.issue24776@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I decided to rearrange page #24776 before changing sample #13802. ---------- dependencies: +IDLE: Add config dialog font page tests -IDLE Prefernces/Fonts: use multiple alphabets in examples _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 23:10:59 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 21 Jul 2017 03:10:59 +0000 Subject: [issue30466] Tutorial doesn't explain the use of classes In-Reply-To: <1495666720.41.0.650692797283.issue30466@psf.upfronthosting.co.za> Message-ID: <1500606659.0.0.495724190566.issue30466@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset ef4231adb7aa6b323c94e854ac3dc3bebc841115 by Mariatta (Trey Hunner) in branch '3.6': bpo-30466: Add brief explanation of classes to tutorial (GH-1804) (GH-2700) https://github.com/python/cpython/commit/ef4231adb7aa6b323c94e854ac3dc3bebc841115 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 23:11:50 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 21 Jul 2017 03:11:50 +0000 Subject: [issue30466] Tutorial doesn't explain the use of classes In-Reply-To: <1495666720.41.0.650692797283.issue30466@psf.upfronthosting.co.za> Message-ID: <1500606710.32.0.569416268848.issue30466@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 23:17:13 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 03:17:13 +0000 Subject: [issue30780] IDLE: configdialog - add tests for ConfigDialog GUI. In-Reply-To: <1498516711.25.0.892352273971.issue30780@psf.upfronthosting.co.za> Message-ID: <1500607033.46.0.255186422461.issue30780@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- dependencies: +IDLE: Add config dialog font page tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 23:51:57 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 21 Jul 2017 03:51:57 +0000 Subject: [issue30964] Mention ensurepip in package installation docs In-Reply-To: <1500425281.82.0.79058660024.issue30964@psf.upfronthosting.co.za> Message-ID: <1500609117.67.0.764608374186.issue30964@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset b3527bfefd7a0188d43a2d7515ac6addd97a8202 by Nick Coghlan (Nicholas) in branch 'master': bpo-30964: Mention ensurepip in package installation docs (GH-2786) https://github.com/python/cpython/commit/b3527bfefd7a0188d43a2d7515ac6addd97a8202 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 23:52:36 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 21 Jul 2017 03:52:36 +0000 Subject: [issue30959] Constructor signature is duplicated in the help of namedtuples In-Reply-To: <1500375862.86.0.253059570638.issue30959@psf.upfronthosting.co.za> Message-ID: <1500609156.97.0.231019829326.issue30959@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Pydoc isn't the only tool for looking at docstrings. I'm worried that you're systematically killing-off useful docstrings because of a world view that all tools will use pydoc and signatures. As a result, IDLE's tooltips are now useless (this comes up every single day when I teach python courses). BPython is thrown-off, etc. Here's one of many problem examples of the docstring losing information: Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 19 2015, 20:38:52) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> print(sorted.__doc__) sorted(iterable, key=None, reverse=False) --> new sorted list >>> print(sorted.__doc__) Return a new list containing all items from the iterable in ascending order. A custom key function can be supplied to customize the sort order, and the reverse flag can be set to request the result in descending order. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 23:56:57 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 21 Jul 2017 03:56:57 +0000 Subject: [issue30964] Mention ensurepip in package installation docs In-Reply-To: <1500425281.82.0.79058660024.issue30964@psf.upfronthosting.co.za> Message-ID: <1500609417.68.0.86376472321.issue30964@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- stage: needs patch -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 00:42:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Jul 2017 04:42:23 +0000 Subject: [issue30978] str.format_map() silences exceptions in __getitem__ In-Reply-To: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> Message-ID: <1500612143.65.0.946996527633.issue30978@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2840 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 00:46:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Jul 2017 04:46:01 +0000 Subject: [issue30978] str.format_map() silences exceptions in __getitem__ In-Reply-To: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> Message-ID: <1500612361.66.0.733643452695.issue30978@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yet one consequence: this swallows KeyboardInterrupt and converts it to KeyError. ---------- components: +Interpreter Core, Unicode nosy: +ezio.melotti, haypo, serhiy.storchaka stage: -> patch review versions: +Python 3.6 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 01:07:00 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 05:07:00 +0000 Subject: [issue28523] Idlelib.configdialog: use 'color' insteadof 'colour' In-Reply-To: <1477345028.99.0.578585352452.issue28523@psf.upfronthosting.co.za> Message-ID: <1500613620.55.0.115518304934.issue28523@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset a54a8f188a803cd41bdc8758c10d34ba3328c566 by Terry Jan Reedy in branch 'master': bpo-28523: IDLE: Use 'color' instead of 'colour'. (#2787) https://github.com/python/cpython/commit/a54a8f188a803cd41bdc8758c10d34ba3328c566 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 01:10:19 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 05:10:19 +0000 Subject: [issue28523] Idlelib.configdialog: use 'color' insteadof 'colour' In-Reply-To: <1477345028.99.0.578585352452.issue28523@psf.upfronthosting.co.za> Message-ID: <1500613819.93.0.99497106003.issue28523@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2841 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 01:19:35 2017 From: report at bugs.python.org (nicholas kobald) Date: Fri, 21 Jul 2017 05:19:35 +0000 Subject: [issue30964] Mention ensurepip in package installation docs In-Reply-To: <1500425281.82.0.79058660024.issue30964@psf.upfronthosting.co.za> Message-ID: <1500614375.98.0.651574315632.issue30964@psf.upfronthosting.co.za> Changes by nicholas kobald : ---------- pull_requests: +2842 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 01:21:48 2017 From: report at bugs.python.org (nicholas kobald) Date: Fri, 21 Jul 2017 05:21:48 +0000 Subject: [issue30964] Mention ensurepip in package installation docs In-Reply-To: <1500425281.82.0.79058660024.issue30964@psf.upfronthosting.co.za> Message-ID: <1500614508.3.0.701898441874.issue30964@psf.upfronthosting.co.za> Changes by nicholas kobald : ---------- pull_requests: +2843 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 01:29:12 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 05:29:12 +0000 Subject: [issue28523] Idlelib.configdialog: use 'color' insteadof 'colour' In-Reply-To: <1477345028.99.0.578585352452.issue28523@psf.upfronthosting.co.za> Message-ID: <1500614952.04.0.684431250054.issue28523@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset ac5c1e2ea311d11714f89476c86936f9388d19a4 by Terry Jan Reedy in branch '3.6': [3.6] bpo-28523: IDLE: Use 'color' instead of 'colour'. (GH-2787) (#2791) https://github.com/python/cpython/commit/ac5c1e2ea311d11714f89476c86936f9388d19a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 01:51:58 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 05:51:58 +0000 Subject: [issue28523] Idlelib.configdialog: use 'color' insteadof 'colour' In-Reply-To: <1477345028.99.0.578585352452.issue28523@psf.upfronthosting.co.za> Message-ID: <1500616318.27.0.334849471467.issue28523@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 01:59:22 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 05:59:22 +0000 Subject: [issue30981] IDLE: Add config dialog font page tests In-Reply-To: <1500604428.18.0.819214688476.issue30981@psf.upfronthosting.co.za> Message-ID: <1500616762.95.0.785720777988.issue30981@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2844 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 02:18:42 2017 From: report at bugs.python.org (nicholas kobald) Date: Fri, 21 Jul 2017 06:18:42 +0000 Subject: [issue30964] Mention ensurepip in package installation docs In-Reply-To: <1500425281.82.0.79058660024.issue30964@psf.upfronthosting.co.za> Message-ID: <1500617922.98.0.459872173135.issue30964@psf.upfronthosting.co.za> Changes by nicholas kobald : ---------- pull_requests: +2845 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 02:20:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 06:20:48 +0000 Subject: [issue30981] IDLE: Add config dialog font page tests In-Reply-To: <1500604428.18.0.819214688476.issue30981@psf.upfronthosting.co.za> Message-ID: <1500618048.39.0.727694687312.issue30981@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset d0969d69245d9c4eea3498ba4bde4b4cd676ad7f by Terry Jan Reedy in branch 'master': bpo-30981: IDLE -- Add more configdialog font page tests. (#2794) https://github.com/python/cpython/commit/d0969d69245d9c4eea3498ba4bde4b4cd676ad7f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 02:22:23 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 06:22:23 +0000 Subject: [issue30981] IDLE: Add config dialog font page tests In-Reply-To: <1500604428.18.0.819214688476.issue30981@psf.upfronthosting.co.za> Message-ID: <1500618143.87.0.286938159275.issue30981@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2846 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 02:27:14 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 06:27:14 +0000 Subject: [issue30981] IDLE: Add config dialog font page tests In-Reply-To: <1500604428.18.0.819214688476.issue30981@psf.upfronthosting.co.za> Message-ID: <1500618434.39.0.221796720914.issue30981@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I left out gui event tests since they depends on the widgets, which will likely change. I though about tests for the uncovered load_font_config and load_tab_config, but am not sure what to do that would not amount to copying their code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 02:29:46 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 21 Jul 2017 06:29:46 +0000 Subject: [issue30964] Mention ensurepip in package installation docs In-Reply-To: <1500425281.82.0.79058660024.issue30964@psf.upfronthosting.co.za> Message-ID: <1500618586.49.0.23548386953.issue30964@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 82a77d38d6dc7df740e7b01b66aeff433730e9ca by Nick Coghlan (Nicholas) in branch '2.7': [2.7] bpo-30964: Mention ensurepip in package installation docs (GH-2795) https://github.com/python/cpython/commit/82a77d38d6dc7df740e7b01b66aeff433730e9ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 02:37:35 2017 From: report at bugs.python.org (nicholas kobald) Date: Fri, 21 Jul 2017 06:37:35 +0000 Subject: [issue30964] Mention ensurepip in package installation docs In-Reply-To: <1500425281.82.0.79058660024.issue30964@psf.upfronthosting.co.za> Message-ID: <1500619055.28.0.854462562287.issue30964@psf.upfronthosting.co.za> Changes by nicholas kobald : ---------- pull_requests: +2847 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 02:44:45 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 21 Jul 2017 06:44:45 +0000 Subject: [issue30964] Mention ensurepip in package installation docs In-Reply-To: <1500425281.82.0.79058660024.issue30964@psf.upfronthosting.co.za> Message-ID: <1500619485.38.0.933416776385.issue30964@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset df5837b5a916aac645087ae02c44e88ff77024ef by Nick Coghlan (Nicholas) in branch '3.6': [3.6] bpo-30964: Mention ensurepip in package installation docs (GH-2797) https://github.com/python/cpython/commit/df5837b5a916aac645087ae02c44e88ff77024ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 02:45:33 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 21 Jul 2017 06:45:33 +0000 Subject: [issue30964] Mention ensurepip in package installation docs In-Reply-To: <1500425281.82.0.79058660024.issue30964@psf.upfronthosting.co.za> Message-ID: <1500619533.39.0.769909095846.issue30964@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks for the contribution & backports! ---------- stage: backport needed -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 02:50:02 2017 From: report at bugs.python.org (Tim Golden) Date: Fri, 21 Jul 2017 06:50:02 +0000 Subject: [issue30979] the winapi fails to run shortcuts (because considers a shortcut not a valid Win32App) In-Reply-To: <1500589924.87.0.691040995571.issue30979@psf.upfronthosting.co.za> Message-ID: <1500619802.93.0.0320444923116.issue30979@psf.upfronthosting.co.za> Tim Golden added the comment: For shell objects such as shortcuts you could use os.startfile which invokes ShellExecute under the covers ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 03:09:11 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 07:09:11 +0000 Subject: [issue30981] IDLE: Add config dialog font page tests In-Reply-To: <1500604428.18.0.819214688476.issue30981@psf.upfronthosting.co.za> Message-ID: <1500620951.44.0.0794249109178.issue30981@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Viktor, I am aware that there are errors in the patch I pushed that will result in error on the Windows machines that run gui tests. Am working on a fix now. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 03:23:14 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 21 Jul 2017 07:23:14 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1500621794.22.0.675372174404.issue25988@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Guido, do you think there is some way to decouple collections.abc from spilling into the namespace for non-abc collections module? At the interactive prompt, running dir() on collections gives an alphabetical hodgepodge of the two modules. To my eyes, it is difficult to discern the concrete from the abstract. >>> dir(collections) ['AsyncGenerator', 'AsyncIterable', 'AsyncIterator', 'Awaitable', 'ByteString', 'Callable', 'ChainMap', 'Collection', 'Container', 'Coroutine', 'Counter', 'Generator', 'Hashable', 'ItemsView', 'Iterable', 'Iterator', 'KeysView', 'Mapping', 'MappingView', 'MutableMapping', 'MutableSequence', 'MutableSet', 'OrderedDict', 'Reversible', 'Sequence', 'Set', 'Sized', 'UserDict', 'UserList', 'UserString', 'ValuesView', '_Link', '_OrderedDictItemsView', '_OrderedDictKeysView', '_OrderedDictValuesView', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '_chain', '_class_template', '_collections_abc', '_count_elements', '_eq', '_field_template', '_heapq', '_iskeyword', '_itemgetter', '_proxy', '_recursive_repr', '_repeat', '_repr_template', '_starmap', '_sys', 'abc', 'defaultdict', 'deque', 'namedtuple'] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 03:25:47 2017 From: report at bugs.python.org (nicholas kobald) Date: Fri, 21 Jul 2017 07:25:47 +0000 Subject: [issue30964] Mention ensurepip in package installation docs In-Reply-To: <1500425281.82.0.79058660024.issue30964@psf.upfronthosting.co.za> Message-ID: <1500621947.2.0.697064730913.issue30964@psf.upfronthosting.co.za> nicholas kobald added the comment: No problem! thanks for the help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 03:26:19 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 07:26:19 +0000 Subject: [issue30981] IDLE: Add config dialog font page tests In-Reply-To: <1500604428.18.0.819214688476.issue30981@psf.upfronthosting.co.za> Message-ID: <1500621979.26.0.291813544655.issue30981@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2848 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 03:28:10 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 07:28:10 +0000 Subject: [issue30981] IDLE: Add config dialog font page tests In-Reply-To: <1500604428.18.0.819214688476.issue30981@psf.upfronthosting.co.za> Message-ID: <1500622090.21.0.370727738093.issue30981@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am too tired to fix this correctly right now, so I added @skip to class with failing tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 03:47:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 07:47:03 +0000 Subject: [issue30981] IDLE: Add config dialog font page tests In-Reply-To: <1500604428.18.0.819214688476.issue30981@psf.upfronthosting.co.za> Message-ID: <1500623223.45.0.444093074443.issue30981@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 7c5798ebfa9b822d6cedf1fc8c034f6ea90644dc by Terry Jan Reedy in branch 'master': bpo-30981: temporarity skip failing IDLE test class (#2798) https://github.com/python/cpython/commit/7c5798ebfa9b822d6cedf1fc8c034f6ea90644dc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 04:09:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 08:09:18 +0000 Subject: [issue30981] IDLE: Add config dialog font page tests In-Reply-To: <1500622090.21.0.370727738093.issue30981@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Thanks for the fix :-) (Don't forget to fix it later ;-)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 04:32:34 2017 From: report at bugs.python.org (Eryk Sun) Date: Fri, 21 Jul 2017 08:32:34 +0000 Subject: [issue30979] the winapi fails to run shortcuts (because considers a shortcut not a valid Win32App) In-Reply-To: <1500589924.87.0.691040995571.issue30979@psf.upfronthosting.co.za> Message-ID: <1500625954.99.0.267812822398.issue30979@psf.upfronthosting.co.za> Eryk Sun added the comment: That depends on the shortcut. I have some shortcuts that are designed to be run from the command line (e.g. python.lnk), which take arguments and inherit the working directory of the parent process. I add .LNK to PATHEXT so I can run them as commands without a filename extension. os.startfile doesn't allow passing command-line arguments to these shortcuts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 04:43:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 08:43:38 +0000 Subject: [issue30576] http.server should support HTTP compression (gzip) In-Reply-To: <1496691724.59.0.955308322691.issue30576@psf.upfronthosting.co.za> Message-ID: <1500626618.86.0.271739714782.issue30576@psf.upfronthosting.co.za> STINNER Victor added the comment: I used a lot http.server in the past to transfer files between two computers. I like transparent compression on the file. The implementation doesn't seem so complex, gzip is now standard and client HTTP headers are used to decide if gzip is wanted or not. But I have comments on the current implementation. My main question is on the Content-Length. Can we skip it to not have to compress the whole file just to get its size, whereas we can use gzip as a "stream" when compress while we write compressed bytes on the socket? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 04:54:23 2017 From: report at bugs.python.org (SylvainDe) Date: Fri, 21 Jul 2017 08:54:23 +0000 Subject: [issue30959] Constructor signature is duplicated in the help of namedtuples In-Reply-To: <1500375862.86.0.253059570638.issue30959@psf.upfronthosting.co.za> Message-ID: <1500627263.47.0.485019466859.issue30959@psf.upfronthosting.co.za> SylvainDe added the comment: Regarding the `sorted.__doc__` issue, it seems like the signature does not appear in the `__doc__` member but it does appear when using `help(sorted)` which is probably what really matters. In any case, I find PEP 257 about this part a bit ambiguous : "The one-line docstring should NOT be a "signature"". Even though is should not be JUST a signature, should it CONTAIN the signature ? ---------- nosy: +SylvainDe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 04:57:53 2017 From: report at bugs.python.org (wouter bolsterlee) Date: Fri, 21 Jul 2017 08:57:53 +0000 Subject: [issue30977] reduce uuid.UUID() memory footprint In-Reply-To: <1500570928.48.0.991848922118.issue30977@psf.upfronthosting.co.za> Message-ID: <1500627473.71.0.580028777158.issue30977@psf.upfronthosting.co.za> wouter bolsterlee added the comment: i consider uuids as low level data types, not as fancy containers, similar to how i view datetime objects. given the native support in e.g. postgresql and many other systems, it's common to deal with uuids. of course you can convert to/from strings or numbers, but that is cumbersome in many cases. for comparison, one would typically not convert unicode text from/into utf-8 encoded byte strings either, even though the latter will save memory in many cases. from experience: converting can lead to nasty bugs, e.g. because you forgot about a conversion, and then a uuid string does not compare equal to a uuid.UUID instance, leaving you puzzled. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 05:13:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 09:13:03 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500628383.72.0.868618322763.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: Utkarsh comment on the PR: > I'm afraid I don't really know how to read the waterfall chart at http://buildbot.python.org/all/waterfall. Yeah, sorry about this awful view :-) We now have a mailing list getting notifications when a buildbot fails: https://mail.python.org/mm3/mailman3/lists/buildbot-status.python.org/ We got two new failures since yesterday on Windows buildbots, but it's related to IDLE and so unrelated to your change. So a quick check says that test_datetime doesn't time out anymore! Previously, the test failed on a few buildbots. I checked the test output to look if test_datetime became the new slowest test and ... no. For example, on PPC64 Fedora 3.x, test_datetime is not even listed in the "10 slowest tests", which means that it took 36 sec or less, whereas the test took longer than 15 minutes when tzdata was used. IMHO you can already cook a first backport for 3.6, but I would prefer to wait another day just to make sure to everything is fine (to wait for new buildbot builds). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 05:14:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 09:14:54 +0000 Subject: [issue30982] AMD64 Windows8.1 Refleaks 3.x: compilation error, cannot open python37_d.dll Message-ID: <1500628494.4.0.575498765725.issue30982@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.x/builds/55/steps/compile/logs/stdio D:\buildarea\3.x.ware-win81-release.refleak\build>"C:\Program Files (x86)\MSBuild\14.0\bin\\msbuild.exe" "D:\buildarea\3.x.ware-win81-release.refleak\build\PCbuild\\pythoncore.vcxproj" /t:KillPython /nologo /v:m /p:Configuration=Release /p:Platform=x64 /p:KillPython=true Killing any running python.exe instances... (...) D:\buildarea\3.x.ware-win81-release.refleak\build>"C:\Program Files (x86)\MSBuild\14.0\bin\\msbuild.exe" "D:\buildarea\3.x.ware-win81-release.refleak\build\PCbuild\\pythoncore.vcxproj" /t:KillPython /nologo /v:m /p:Configuration=Debug /p:Platform=x64 /p:KillPython=true Killing any running python_d.exe instances... (...) LINK : fatal error LNK1104: cannot open file 'D:\buildarea\3.x.ware-win81-release.refleak\build\PCBuild\amd64\python37_d.dll' [D:\buildarea\3.x.ware-win81-release.refleak\build\PCbuild\pythoncore.vcxproj] ---------- components: Tests messages: 298787 nosy: haypo, zach.ware priority: normal severity: normal status: open title: AMD64 Windows8.1 Refleaks 3.x: compilation error, cannot open python37_d.dll versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 05:15:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 09:15:41 +0000 Subject: [issue30982] AMD64 Windows8.1 Refleaks 3.x: compilation error, cannot open python37_d.dll In-Reply-To: <1500628494.4.0.575498765725.issue30982@psf.upfronthosting.co.za> Message-ID: <1500628541.59.0.575041664176.issue30982@psf.upfronthosting.co.za> STINNER Victor added the comment: Ah, the log also contains: D:\buildarea\3.x.ware-win81-release.refleak\build\Tools\buildbot\..\..\build\test_python_5232 - The process cannot access the file because it is being used by another process. What's going on? A zombi process? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 05:20:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 09:20:23 +0000 Subject: [issue24459] Mention PYTHONFAULTHANDLER in the man page In-Reply-To: <1434487895.85.0.561507121326.issue24459@psf.upfronthosting.co.za> Message-ID: <1500628823.72.0.888171120555.issue24459@psf.upfronthosting.co.za> STINNER Victor added the comment: > Was this ever merged? No. > I'm not sure whats happening. Hum, nothing is happening. In december, Berker wrote "Thanks for the updated patch, Joshua. I will review and commit it this week." and then it seems like he found issues, since he proposed a new patch. And then, nothing new happened. Nobody reviewed latest Berker's patch and Berker maybe forgot to push it. Can someone pick a recent patch and convert it to a GitHub PR? Berker, the author of the most recent patch, maybe? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 06:03:43 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 21 Jul 2017 10:03:43 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1500631423.65.0.615507827193.issue25988@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Names from collections.abc are re-exported to collections for backward compatibility. IIRC Serhiy also wanted to stop re-exporting them. I am not sure whether we need any "deprecation period" for this. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 06:10:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Jul 2017 10:10:19 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1500631819.43.0.309465212399.issue25988@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm not sure that *new* names in collections.abc should be re-exported to collections. This isn't required for backward compatibility. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 06:21:56 2017 From: report at bugs.python.org (Gareth Rees) Date: Fri, 21 Jul 2017 10:21:56 +0000 Subject: [issue24869] shlex lineno inaccurate with certain inputs In-Reply-To: <1439571963.46.0.603944237065.issue24869@psf.upfronthosting.co.za> Message-ID: <1500632516.11.0.688427672649.issue24869@psf.upfronthosting.co.za> Changes by Gareth Rees : ---------- pull_requests: +2849 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 06:24:17 2017 From: report at bugs.python.org (Gareth Rees) Date: Fri, 21 Jul 2017 10:24:17 +0000 Subject: [issue24869] shlex lineno inaccurate with certain inputs In-Reply-To: <1439571963.46.0.603944237065.issue24869@psf.upfronthosting.co.za> Message-ID: <1500632657.31.0.46402434059.issue24869@psf.upfronthosting.co.za> Gareth Rees added the comment: I've made a pull request. (Not because I expect it to be merged as-is, but to provide a starting point for discussion.) ---------- nosy: +petri.lehtinen, vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 06:29:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 10:29:49 +0000 Subject: [issue29606] urllib FTP protocol stream injection In-Reply-To: <1487609342.46.0.653185585548.issue29606@psf.upfronthosting.co.za> Message-ID: <1500632989.55.0.847288332648.issue29606@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2850 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 06:35:35 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 21 Jul 2017 10:35:35 +0000 Subject: [issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes In-Reply-To: <1386241984.18.0.408310965726.issue19896@psf.upfronthosting.co.za> Message-ID: <1500633335.42.0.757803443126.issue19896@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 3913bad4957ac30e58a7ffe9279333ad176a8eea by Antoine Pitrou (Gareth Rees) in branch 'master': bpo-19896: Add typecodes 'q' and 'Q' to multiprocessing.sharedctypes (#2741) https://github.com/python/cpython/commit/3913bad4957ac30e58a7ffe9279333ad176a8eea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 06:35:57 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 21 Jul 2017 10:35:57 +0000 Subject: [issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes In-Reply-To: <1386241984.18.0.408310965726.issue19896@psf.upfronthosting.co.za> Message-ID: <1500633357.73.0.661153461535.issue19896@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 06:36:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 10:36:46 +0000 Subject: [issue30978] str.format_map() silences exceptions in __getitem__ In-Reply-To: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> Message-ID: <1500633406.09.0.405553696891.issue30978@psf.upfronthosting.co.za> STINNER Victor added the comment: While KeyboardInterrupt and ZeroDivisionError are easy to understand, IndexError converted to KeyError doesn't look like a major bug. So I'm not sure about fixing Python 3.5 and 3.6. Maybe it's ok because this function is rarely used and exceptions are not "expected": I hardly imagine a code explicitly catching KeyError to do something on format_map() error. In short, my vote for backport is +0 :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 06:39:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 10:39:49 +0000 Subject: [issue29606] urllib FTP protocol stream injection In-Reply-To: <1487609342.46.0.653185585548.issue29606@psf.upfronthosting.co.za> Message-ID: <1500633589.15.0.123696428724.issue29606@psf.upfronthosting.co.za> STINNER Victor added the comment: > Wouldn't be better to solve this issue on the level of the ftplib module or FTP handler in urllib.request instead of urllib.parse? I'm not sure that it's possible, ftplib gets the wrong hostname parameter. The best place to reject invalid characters is where the URL is parsed, no? See also my bpo-30713. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 06:42:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 10:42:55 +0000 Subject: [issue29606] urllib FTP protocol stream injection In-Reply-To: <1487609342.46.0.653185585548.issue29606@psf.upfronthosting.co.za> Message-ID: <1500633775.28.0.205567236487.issue29606@psf.upfronthosting.co.za> STINNER Victor added the comment: Since corona10 abandonned his https://github.com/python/cpython/pull/1216 I created a new PR: https://github.com/python/cpython/pull/2800 I chose to only reject newline (\n): "\r" and "\0" are not rejected. My PR rejects any URL containing "\n", even if the newline is part of the "path" part of the URL. While I expect that filenames containing newlines are very rare, my PR is an incompatible change which breaks such use case :-( I don't know where is the balanace between security and backward compatibility... I started a thread on python-dev: https://mail.python.org/pipermail/python-dev/2017-July/148699.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 06:49:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 10:49:13 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1500634153.79.0.797909405602.issue30814@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2851 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 07:00:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 11:00:10 +0000 Subject: [issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes In-Reply-To: <1386241984.18.0.408310965726.issue19896@psf.upfronthosting.co.za> Message-ID: <1500634810.35.0.01054182277.issue19896@psf.upfronthosting.co.za> STINNER Victor added the comment: Unhappy buildbot: http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/1065/steps/test/logs/stdio ... File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_multiprocessing_fork.py", line 2, in import test._test_multiprocessing File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/_test_multiprocessing.py", line 3180, in class _Foo(Structure): File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/_test_multiprocessing.py", line 3184, in _Foo ('z', c_longlong,) NameError: name 'c_longlong' is not defined ---------- nosy: +haypo resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 07:00:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 11:00:49 +0000 Subject: [issue30891] importlib: _find_and_load() race condition on sys.modules[name] check In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1500634849.01.0.243296588134.issue30891@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e72b1359f81d1dd42bd8a5c5cc2b3928b74f8023 by Victor Stinner in branch 'master': bpo-30891: Fix again importlib _find_and_load() (#2665) https://github.com/python/cpython/commit/e72b1359f81d1dd42bd8a5c5cc2b3928b74f8023 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 07:01:00 2017 From: report at bugs.python.org (Steve Ward) Date: Fri, 21 Jul 2017 11:01:00 +0000 Subject: [issue30618] readlink for pathlib paths In-Reply-To: <1497052559.7.0.422106710991.issue30618@psf.upfronthosting.co.za> Message-ID: <1500634860.08.0.628104075082.issue30618@psf.upfronthosting.co.za> Changes by Steve Ward : ---------- nosy: +planet36 -smheidrich _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 07:01:29 2017 From: report at bugs.python.org (Steve Ward) Date: Fri, 21 Jul 2017 11:01:29 +0000 Subject: [issue30618] readlink for pathlib paths In-Reply-To: <1497052559.7.0.422106710991.issue30618@psf.upfronthosting.co.za> Message-ID: <1500634889.92.0.508528207488.issue30618@psf.upfronthosting.co.za> Changes by Steve Ward : ---------- nosy: +smheidrich _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 07:02:43 2017 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 21 Jul 2017 11:02:43 +0000 Subject: [issue30978] str.format_map() silences exceptions in __getitem__ In-Reply-To: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> Message-ID: <1500634963.89.0.42783535312.issue30978@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'm -0 on a backport. The new behavior is more correct, but I don't like changing the exception type in a micro release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 07:05:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 11:05:08 +0000 Subject: [issue30891] importlib: _find_and_load() race condition on sys.modules[name] check In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1500635108.22.0.919961072676.issue30891@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2852 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 07:05:51 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 21 Jul 2017 11:05:51 +0000 Subject: [issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes In-Reply-To: <1386241984.18.0.408310965726.issue19896@psf.upfronthosting.co.za> Message-ID: <1500635151.27.0.478692431401.issue19896@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Apparently that buildbot doesn't have libffi. I submitted a PR in https://github.com/python/cpython/pull/2802. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 07:28:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 11:28:58 +0000 Subject: [issue30891] importlib: _find_and_load() race condition on sys.modules[name] check In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1500636538.13.0.190521111126.issue30891@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset bb323b261d0f41ad6998d3a16c41b29b3bb8e982 by Victor Stinner in branch '3.6': bpo-30891: Fix again importlib _find_and_load() (#2665) (#2801) https://github.com/python/cpython/commit/bb323b261d0f41ad6998d3a16c41b29b3bb8e982 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 07:46:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Jul 2017 11:46:54 +0000 Subject: [issue29606] urllib FTP protocol stream injection In-Reply-To: <1487609342.46.0.653185585548.issue29606@psf.upfronthosting.co.za> Message-ID: <1500637614.0.0.100526786079.issue29606@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is wrong with an URL containing '\n'? I suppose that when format a request with a text protocol, embedded '\n' can split the request line on two lines and inject a new command. The most robust way would be to check whether the formatted line contains '\n', '\r', '\0' or other illegal characters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 07:54:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 11:54:09 +0000 Subject: [issue29606] urllib FTP protocol stream injection In-Reply-To: <1487609342.46.0.653185585548.issue29606@psf.upfronthosting.co.za> Message-ID: <1500638049.88.0.267548899955.issue29606@psf.upfronthosting.co.za> STINNER Victor added the comment: > What is wrong with an URL containing '\n'? For the attack, see http://blog.blindspotsecurity.com/2017/02/advisory-javapython-ftp-injections.html Honestly, I don't understand well the bug :) But it doesn't seem correct to me to have a newline in a hostname. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 09:02:35 2017 From: report at bugs.python.org (Bruno Penteado) Date: Fri, 21 Jul 2017 13:02:35 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdp's python extension Message-ID: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> New submission from Bruno Penteado: pep 0523 renames PyEval_EvalFrameEx to _PyEval_EvalFrameDefault while the gdb python extension only looks for PyEval_EvalFrameEx to understand if it is dealing with a frame. Final effect is that attaching gdb to a python3.6 process doesnt resolve python objects. Eg. py-list and py-bt dont work properly ---------- messages: 298804 nosy: bcap priority: normal severity: normal status: open title: eval frame rename in pep 0523 broke gdp's python extension versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 09:08:50 2017 From: report at bugs.python.org (Bruno Penteado) Date: Fri, 21 Jul 2017 13:08:50 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1500642530.77.0.211320576935.issue30983@psf.upfronthosting.co.za> Changes by Bruno Penteado : ---------- title: eval frame rename in pep 0523 broke gdp's python extension -> eval frame rename in pep 0523 broke gdb's python extension _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 09:12:58 2017 From: report at bugs.python.org (Bruno Penteado) Date: Fri, 21 Jul 2017 13:12:58 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1500642778.02.0.367449592214.issue30983@psf.upfronthosting.co.za> Changes by Bruno Penteado : ---------- pull_requests: +2853 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 10:26:04 2017 From: report at bugs.python.org (Cathy Avery) Date: Fri, 21 Jul 2017 14:26:04 +0000 Subject: [issue27584] New addition of vSockets to the python socket module In-Reply-To: <1469115390.74.0.838831983223.issue27584@psf.upfronthosting.co.za> Message-ID: <1500647164.3.0.699051726644.issue27584@psf.upfronthosting.co.za> Cathy Avery added the comment: Hi, I believe I am waiting for a final review. Is there anything else I need to be doing at this point. Thanks, Cathy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 11:08:36 2017 From: report at bugs.python.org (Louie Lu) Date: Fri, 21 Jul 2017 15:08:36 +0000 Subject: [issue12910] urllib.quote quotes too many chars, e.g., '()' In-Reply-To: <1315304798.98.0.174203108938.issue12910@psf.upfronthosting.co.za> Message-ID: <1500649716.77.0.159466060956.issue12910@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- title: urrlib.quote quotes too many chars, e.g., '()' -> urllib.quote quotes too many chars, e.g., '()' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 11:15:55 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Fri, 21 Jul 2017 15:15:55 +0000 Subject: [issue18875] Idle: Auto insertion of the closing parens, brackets, and braces In-Reply-To: <1377777498.6.0.468253349222.issue18875@psf.upfronthosting.co.za> Message-ID: <1500650155.03.0.00136057463686.issue18875@psf.upfronthosting.co.za> Changes by Charles Wohlganger : Added file: http://bugs.python.org/file47031/test_parenclose.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 11:21:27 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 21 Jul 2017 15:21:27 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers In-Reply-To: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> Message-ID: <1500650487.03.0.558966990484.issue30907@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Any objections to closing this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 11:24:03 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 21 Jul 2017 15:24:03 +0000 Subject: [issue30803] Truth value of sets not properly documented In-Reply-To: <1498743378.1.0.0570911503542.issue30803@psf.upfronthosting.co.za> Message-ID: <1500650643.47.0.810633174007.issue30803@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 11:32:50 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Fri, 21 Jul 2017 15:32:50 +0000 Subject: [issue30984] traceback.print_exc return value documentation Message-ID: <1500651170.07.0.787106480078.issue30984@psf.upfronthosting.co.za> New submission from Jelle Zijlstra: The documentation for traceback.format_tb says "Return a list of ?pre-processed? stack trace entries extracted from the traceback object tb. It is useful for alternate formatting of stack traces. The optional limit argument has the same meaning as for print_tb(). A ?pre-processed? stack trace entry is a 4-tuple (filename, line number, function name, text) representing the information that is usually printed for a stack trace." However, as of 3.5 it actually returns a StackSummary object, which is a subclass of list and contains FrameSummary objects. FrameSummary objects are not tuples. The documentation is accurate for 3.4 and earlier. I'm surprised this change was made because it seems like a compatibility break, but it's too late to do something about that now. The documentation should be changed to correct the return value and add a "versionchanged: 3.5" note. ---------- assignee: docs at python components: Documentation messages: 298807 nosy: Jelle Zijlstra, docs at python priority: normal severity: normal status: open title: traceback.print_exc return value documentation versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 11:53:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Jul 2017 15:53:41 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers In-Reply-To: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> Message-ID: <1500652421.54.0.492772931579.issue30907@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't have any objections to closing this. The net benefit is contradictory, the maintenance cost is not zero. In many performance important cases (dictionary lookup, searching in sequences) the identity already is checked before calling the comparison method. Maybe it is worth to remove the fast patch from slice_richcompare() or speed up the general case, but this is a different issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 11:55:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Jul 2017 15:55:43 +0000 Subject: [issue30978] str.format_map() silences exceptions in __getitem__ In-Reply-To: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> Message-ID: <1500652543.05.0.829039864626.issue30978@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What are your thoughts about backporting this Raymond? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 11:57:09 2017 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 21 Jul 2017 15:57:09 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1500631819.43.0.309465212399.issue25988@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Yes we will need a deprecation period for this starting with 3.7. It's fine not to import names newly added to collections.abc in 3.7 (i.e. collections would have to explicitly import everything that it got via * in 3.6). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 12:02:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 16:02:02 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers In-Reply-To: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> Message-ID: <1500652922.84.0.263914110405.issue30907@psf.upfronthosting.co.za> STINNER Victor added the comment: I never understood how container comparison works. >>> nan = float("nan") >>> [nan] == [nan] True >>> (nan,) == (nan,) True >>> nan == nan False >>> nan is nan True I picked the float NaN because it's one of the weirdest object in Python: it's not equal to itself. I don't know what is the impact of the proposed change on comparison. Can it break an application? It's unclear to me. -- It also recalls me an optimization I proposed on string: begin with comparison on the hash, if the two hashs are already known. At the end, we decided that it wasn't worth it. -- Raymond, Tim and Serhiy don't seem to be convince, so I will follow them and agree to reject this optimization :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 12:06:42 2017 From: report at bugs.python.org (Jaume) Date: Fri, 21 Jul 2017 16:06:42 +0000 Subject: [issue30985] Set closing variable in asyncore at close Message-ID: <1500653202.45.0.597116986405.issue30985@psf.upfronthosting.co.za> Changes by Jaume : ---------- nosy: walkhour priority: normal severity: normal status: open title: Set closing variable in asyncore at close _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 12:07:51 2017 From: report at bugs.python.org (Jaume) Date: Fri, 21 Jul 2017 16:07:51 +0000 Subject: [issue30985] Set closing variable in asyncore at close Message-ID: <1500653271.9.0.0129188901731.issue30985@psf.upfronthosting.co.za> Changes by Jaume : ---------- pull_requests: +2854 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 12:10:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 16:10:39 +0000 Subject: [issue30978] str.format_map() silences exceptions in __getitem__ In-Reply-To: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> Message-ID: <1500653439.03.0.799814671472.issue30978@psf.upfronthosting.co.za> STINNER Victor added the comment: For Python 3.5 and 3.6, would it make sense to modify the code to pass though BaseException, but replace all other exceptions with KeyError? It would be a compromise between doing nothing and fixing the bug :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 12:14:24 2017 From: report at bugs.python.org (Tim Peters) Date: Fri, 21 Jul 2017 16:14:24 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers In-Reply-To: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> Message-ID: <1500653664.68.0.798181409776.issue30907@psf.upfronthosting.co.za> Tim Peters added the comment: Victor, this part of the docs explains what you're seeing; scroll down to the """ In enforcing reflexivity of elements, the comparison of collections assumes that for a collection element x, x == x is always true ... """ part. https://docs.python.org/3/reference/expressions.html#value-comparisons In passing, note that dicts indexed by strings (well, indexed by anything) _do_ compare hashes first. In that specific case it's a major win - but in that specific case we also know in advance that "EQ or NE?" is the only question needing an answer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 12:54:09 2017 From: report at bugs.python.org (wouter bolsterlee) Date: Fri, 21 Jul 2017 16:54:09 +0000 Subject: [issue30907] speed up comparisons to self for built-in containers In-Reply-To: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> Message-ID: <1500656049.51.0.264992422918.issue30907@psf.upfronthosting.co.za> Changes by wouter bolsterlee : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 13:04:09 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 21 Jul 2017 17:04:09 +0000 Subject: [issue30981] IDLE: Add config dialog font page tests In-Reply-To: <1500604428.18.0.819214688476.issue30981@psf.upfronthosting.co.za> Message-ID: <1500656649.97.0.903656413929.issue30981@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +2856 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 14:16:02 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 21 Jul 2017 18:16:02 +0000 Subject: [issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699) In-Reply-To: <1416797425.29.0.948172439575.issue22928@psf.upfronthosting.co.za> Message-ID: <1500660962.53.0.664963290479.issue22928@psf.upfronthosting.co.za> Ned Deily added the comment: Getting to be the last chance to backport this for 3.3.x. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 14:21:26 2017 From: report at bugs.python.org (Cooper Lees) Date: Fri, 21 Jul 2017 18:21:26 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1500661286.41.0.347686932607.issue30983@psf.upfronthosting.co.za> Changes by Cooper Lees : ---------- nosy: +cooperlees _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 14:26:29 2017 From: report at bugs.python.org (Nir Soffer) Date: Fri, 21 Jul 2017 18:26:29 +0000 Subject: [issue30985] Set closing variable in asyncore at close Message-ID: <1500661589.01.0.75637783455.issue30985@psf.upfronthosting.co.za> New submission from Nir Soffer: This is an old issue with asyncore - asyncore has a "closing" attribute, but it was never used. Every user has to implement the closing once logic in dispatcher subclasses. Here is a typical fixes in user code: - https://github.com/oVirt/vdsm/blob/master/lib/vdsm/storage/asyncevent.py#L497 - https://github.com/oVirt/vdsm/blob/master/lib/vdsm/storage/asyncevent.py#L540 Fixing closing attribute will allow fixing the races during asyncore.poll() and asyncore.poll2(), see https://github.com/python/cpython/pull/2764 ---------- nosy: +Nir Soffer versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 14:26:51 2017 From: report at bugs.python.org (Nir Soffer) Date: Fri, 21 Jul 2017 18:26:51 +0000 Subject: [issue30985] Set closing variable in asyncore at close In-Reply-To: <1500661589.01.0.75637783455.issue30985@psf.upfronthosting.co.za> Message-ID: <1500661611.41.0.778986209493.issue30985@psf.upfronthosting.co.za> Changes by Nir Soffer : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 14:35:30 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 21 Jul 2017 18:35:30 +0000 Subject: [issue30978] str.format_map() silences exceptions in __getitem__ In-Reply-To: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> Message-ID: <1500662130.52.0.434697518773.issue30978@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > What are your thoughts about backporting this Raymond? +0 On the one hand, this can be considered a bug fix. On the other hand, I would suspect that no code that is currently working would benefit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 14:54:38 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 21 Jul 2017 18:54:38 +0000 Subject: [issue30953] Fatal python error when jumping into except clause In-Reply-To: <1500326698.05.0.0587216442362.issue30953@psf.upfronthosting.co.za> Message-ID: <1500663278.63.0.923226672976.issue30953@psf.upfronthosting.co.za> Xavier de Gaye added the comment: issue 17288 is related. ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 15:37:18 2017 From: report at bugs.python.org (Akuli) Date: Fri, 21 Jul 2017 19:37:18 +0000 Subject: [issue30978] str.format_map() silences exceptions in __getitem__ In-Reply-To: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> Message-ID: <1500665838.19.0.89720479083.issue30978@psf.upfronthosting.co.za> Akuli added the comment: I think all exceptions should be passed through. Things like dict.__contains__ don't selectively turn some errors to KeyError either; if something is not hashable it's a TypeError, not a KeyError. >>> [] in {} Traceback (most recent call last): File "", line 1, in TypeError: unhashable type: 'list' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 15:40:06 2017 From: report at bugs.python.org (Akuli) Date: Fri, 21 Jul 2017 19:40:06 +0000 Subject: [issue30978] str.format_map() silences exceptions in __getitem__ In-Reply-To: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> Message-ID: <1500666006.2.0.282160506323.issue30978@psf.upfronthosting.co.za> Akuli added the comment: Oops, I forgot to mention that I have no thoughts about backporting this. It would be nice to see this fixed in 3.7 though :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 15:51:14 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 21 Jul 2017 19:51:14 +0000 Subject: [issue30971] Improve code readability of json.tool In-Reply-To: <1500493976.74.0.611723443059.issue30971@psf.upfronthosting.co.za> Message-ID: <1500666674.42.0.606746445029.issue30971@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with the other commenters and am marking this as closed. Thank you for the effort to contribute. May I suggest working on one the many open bug reports. ---------- nosy: +rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 15:51:19 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 21 Jul 2017 19:51:19 +0000 Subject: [issue30978] str.format_map() silences exceptions in __getitem__ In-Reply-To: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> Message-ID: <1500666679.48.0.687310598505.issue30978@psf.upfronthosting.co.za> Brett Cannon added the comment: I'm -0 on the backport since as Raymond and Eric pointed out it won't benefit currently working code and I personally don't like changing what exception is raised in a bugfix release. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 16:18:07 2017 From: report at bugs.python.org (Segev Finer) Date: Fri, 21 Jul 2017 20:18:07 +0000 Subject: [issue29672] `catch_warnings` context manager causes all warnings to be printed every time, even after exiting In-Reply-To: <1488234596.55.0.435492915134.issue29672@psf.upfronthosting.co.za> Message-ID: <1500668287.09.0.621757033705.issue29672@psf.upfronthosting.co.za> Segev Finer added the comment: I think you will need to save and restore _filters_version and _onceregistry. Since _filters_version is a static variable in _warnings.c you will probably also have to modify it somehow to make it accessible to warnings.py. ---------- components: +Library (Lib) nosy: +Segev Finer type: -> behavior versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 16:38:23 2017 From: report at bugs.python.org (ecbftw) Date: Fri, 21 Jul 2017 20:38:23 +0000 Subject: [issue29606] urllib FTP protocol stream injection In-Reply-To: <1487609342.46.0.653185585548.issue29606@psf.upfronthosting.co.za> Message-ID: <1500669503.8.0.942565948356.issue29606@psf.upfronthosting.co.za> ecbftw added the comment: > The best place to reject invalid characters is where the URL is parsed, no? See also my bpo-30713. No I don't really agree with that. What other APIs can be used to submit a directory name, user name, password, or other field in an FTP command? If you block unacceptable characters only at URL parsing, then you fail to address those other vectors. The normal way to fix any injection vulneability is to encode the dangerous characters just before then are included in the surrounding syntax. Unfortunately in FTP's case, there's no widely-accepted way to encode these characters. So I think you should instead throw an exception right before the commands are put on the control channel. Fixing the bug at the "sink" like this is a far more resilient way to address injections. Any "legitimate" use case that users might have for these characters wouldn't have worked anyway. The code is already broken for new lines in file names. If you change the code such that it throws an exception when they are written to the control channel, that's a better mode of failure than what you have right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 17:04:47 2017 From: report at bugs.python.org (ecbftw) Date: Fri, 21 Jul 2017 21:04:47 +0000 Subject: [issue29606] urllib FTP protocol stream injection In-Reply-To: <1487609342.46.0.653185585548.issue29606@psf.upfronthosting.co.za> Message-ID: <1500671087.97.0.352345187418.issue29606@psf.upfronthosting.co.za> ecbftw added the comment: > What is wrong with an URL containing '\n'? I suppose that when format a request with a text protocol, embedded '\n' can split the request line on two lines and inject a new command. The most robust way would be to check whether the formatted line contains '\n', '\r', '\0' or other illegal characters. I agree, there's nothing wrong with an encoded line feed (%0a) in a URL. HTTP can easily handle '\n' in a basic auth password field, for instance. The problem is when these characters are included in a context where they are interpreted as a delimiter of some kind. In FTP's case, they are being interpreted as the delimiter between commands. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 18:02:42 2017 From: report at bugs.python.org (Segev Finer) Date: Fri, 21 Jul 2017 22:02:42 +0000 Subject: [issue30222] make_zip.py had a bug when setting up full 64 bit distribution. In-Reply-To: <1493665158.27.0.48978585861.issue30222@psf.upfronthosting.co.za> Message-ID: <1500674562.72.0.0385670001949.issue30222@psf.upfronthosting.co.za> Segev Finer added the comment: Try with: .\python.bat Tools\msi\make_zip.py -a amd64 -o py37-amd64.zip It requires amd64 instead of x64. Probably can add a choices (https://docs.python.org/3/library/argparse.html#choices) argument there to make it more robust. ---------- nosy: +Segev Finer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 18:06:13 2017 From: report at bugs.python.org (Segev Finer) Date: Fri, 21 Jul 2017 22:06:13 +0000 Subject: [issue30986] Add --include-py argument to Tools/msi/make_zip.py Message-ID: <1500674773.9.0.384713319634.issue30986@psf.upfronthosting.co.za> New submission from Segev Finer: Add an argument --include-py to Tools/msi/make_zip.py that allows including the Python modules sources and not only bytecode. I found it useful while running Twisted's test suite in PR 2318, since I got an error otherwise. I don't remember what that error was and wasn't able to reproduce it while trying to run Twisted's test suite again. ---------- components: Windows messages: 298826 nosy: Segev Finer, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Add --include-py argument to Tools/msi/make_zip.py type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 18:08:49 2017 From: report at bugs.python.org (Segev Finer) Date: Fri, 21 Jul 2017 22:08:49 +0000 Subject: [issue30986] Add --include-py argument to Tools/msi/make_zip.py In-Reply-To: <1500674773.9.0.384713319634.issue30986@psf.upfronthosting.co.za> Message-ID: <1500674929.62.0.236924967647.issue30986@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2857 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 18:12:01 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 21 Jul 2017 22:12:01 +0000 Subject: [issue29403] mock's autospec's behavior on method-bound builtin functions is broken In-Reply-To: <1485903715.23.0.569013669104.issue29403@psf.upfronthosting.co.za> Message-ID: <1500675121.65.0.191715196494.issue29403@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- pull_requests: +2858 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 18:12:18 2017 From: report at bugs.python.org (Segev Finer) Date: Fri, 21 Jul 2017 22:12:18 +0000 Subject: [issue30222] make_zip.py had a bug when setting up full 64 bit distribution. In-Reply-To: <1493665158.27.0.48978585861.issue30222@psf.upfronthosting.co.za> Message-ID: <1500675138.64.0.649370954873.issue30222@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2859 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 18:31:06 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 21 Jul 2017 22:31:06 +0000 Subject: [issue29403] mock's autospec's behavior on method-bound builtin functions is broken In-Reply-To: <1485903715.23.0.569013669104.issue29403@psf.upfronthosting.co.za> Message-ID: <1500676266.6.0.548771036258.issue29403@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 64b9a15886840df422c5203fad25c9801b4cf61e by Berker Peksag in branch '3.6': [3.6] bpo-29403: Fix mock's broken autospec behavior on method-bound builtin functions (GH-3) https://github.com/python/cpython/commit/64b9a15886840df422c5203fad25c9801b4cf61e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 19:11:26 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 21 Jul 2017 23:11:26 +0000 Subject: [issue29403] mock's autospec's behavior on method-bound builtin functions is broken In-Reply-To: <1485903715.23.0.569013669104.issue29403@psf.upfronthosting.co.za> Message-ID: <1500678686.48.0.966969252726.issue29403@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- pull_requests: +2860 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 19:27:19 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 21 Jul 2017 23:27:19 +0000 Subject: [issue29403] mock's autospec's behavior on method-bound builtin functions is broken In-Reply-To: <1485903715.23.0.569013669104.issue29403@psf.upfronthosting.co.za> Message-ID: <1500679639.23.0.903742729963.issue29403@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset e78dc0aaf03cd98373910150c2d35418cf938254 by Berker Peksag in branch '3.5': [3.5] bpo-29403: Fix mock's broken autospec behavior on method-bound builtin functions (GH-3) https://github.com/python/cpython/commit/e78dc0aaf03cd98373910150c2d35418cf938254 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 19:27:59 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 21 Jul 2017 23:27:59 +0000 Subject: [issue29403] mock's autospec's behavior on method-bound builtin functions is broken In-Reply-To: <1485903715.23.0.569013669104.issue29403@psf.upfronthosting.co.za> Message-ID: <1500679679.52.0.201637390371.issue29403@psf.upfronthosting.co.za> Berker Peksag added the comment: Thank you for the PR, Aaron! ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 20:56:15 2017 From: report at bugs.python.org (Eric Huss) Date: Sat, 22 Jul 2017 00:56:15 +0000 Subject: [issue30392] default webbrowser fails on macOS Sierra 10.12.5 In-Reply-To: <1495050601.31.0.205212071557.issue30392@psf.upfronthosting.co.za> Message-ID: <1500684975.44.0.892483231898.issue30392@psf.upfronthosting.co.za> Changes by Eric Huss : ---------- nosy: +ehuss _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 20:58:35 2017 From: report at bugs.python.org (Eric Huss) Date: Sat, 22 Jul 2017 00:58:35 +0000 Subject: [issue24955] webbrowser broken on Mac OS X when using the BROWSER variable In-Reply-To: <1440842500.82.0.168118984503.issue24955@psf.upfronthosting.co.za> Message-ID: <1500685115.67.0.387215421486.issue24955@psf.upfronthosting.co.za> Changes by Eric Huss : ---------- nosy: +ehuss _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 22:20:57 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 22 Jul 2017 02:20:57 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1500690057.3.0.90016379671.issue25988@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Yes we will need a deprecation period for this starting with 3.7. There are two ways to do this. A wimpy and clean way is to just add a deprecation notice in the docs. The thorough and messy way is to temporarily copy everything from the 3.6 collections.abc into the regular collections module and then insert deprecation warning code directly in each of copied classes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 23:35:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Jul 2017 03:35:38 +0000 Subject: [issue29606] urllib FTP protocol stream injection In-Reply-To: <1487609342.46.0.653185585548.issue29606@psf.upfronthosting.co.za> Message-ID: <1500694538.94.0.709524560868.issue29606@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The right way of fixing the vulnerability is checking a line for '\n' and '\r' in ftplib.FTP.putline(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 23:47:32 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Jul 2017 03:47:32 +0000 Subject: [issue29672] `catch_warnings` context manager causes all warnings to be printed every time, even after exiting In-Reply-To: <1488234596.55.0.435492915134.issue29672@psf.upfronthosting.co.za> Message-ID: <1500695252.41.0.20716075726.issue29672@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +pitrou, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 00:13:11 2017 From: report at bugs.python.org (Pier-Yves Lessard) Date: Sat, 22 Jul 2017 04:13:11 +0000 Subject: [issue30987] Support for ISO-TP protocol in SocketCAN Message-ID: <1500696791.75.0.683510511028.issue30987@psf.upfronthosting.co.za> New submission from Pier-Yves Lessard: PF_CAN socket using ISO-TP protocol cannot be used as getsockaddrarg only supports CAN_RAW and CAN_BCM for AF_CAN addresses. ---------- components: Library (Lib) messages: 298832 nosy: Pier-Yves Lessard priority: normal severity: normal status: open title: Support for ISO-TP protocol in SocketCAN type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 00:14:20 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 22 Jul 2017 04:14:20 +0000 Subject: [issue29606] urllib FTP protocol stream injection In-Reply-To: <1487609342.46.0.653185585548.issue29606@psf.upfronthosting.co.za> Message-ID: <1500696860.15.0.187814807559.issue29606@psf.upfronthosting.co.za> Martin Panter added the comment: Serhiy, that is what Dong-hee already proposed in , but someone needs to decide if we want to support RFC 2640, in which I understand LF on its own is legal, and CR is escaped by adding a NUL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 00:14:52 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Jul 2017 04:14:52 +0000 Subject: [issue30981] IDLE: Add config dialog font page tests In-Reply-To: <1500604428.18.0.819214688476.issue30981@psf.upfronthosting.co.za> Message-ID: <1500696892.76.0.201250494438.issue30981@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2861 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 00:36:15 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Jul 2017 04:36:15 +0000 Subject: [issue30981] IDLE: Add config dialog font page tests In-Reply-To: <1500604428.18.0.819214688476.issue30981@psf.upfronthosting.co.za> Message-ID: <1500698175.47.0.740961701079.issue30981@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 616ecf18f3aacbd8d172e01673877b22fe946e54 by Terry Jan Reedy in branch 'master': bpo-30981: IDLE: Augment one configdialog font page test (#2810) https://github.com/python/cpython/commit/616ecf18f3aacbd8d172e01673877b22fe946e54 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 00:49:47 2017 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 22 Jul 2017 04:49:47 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1500698987.0.0.277157609902.issue25988@psf.upfronthosting.co.za> Guido van Rossum added the comment: The copying approach likely won't work because there will be code that uses isinstance(x, collections.abc.Sequence) and other code that uses isinstance(x, collections.Sequence) and they'll expect both to be true. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 00:50:02 2017 From: report at bugs.python.org (Tim Bell) Date: Sat, 22 Jul 2017 04:50:02 +0000 Subject: [issue30988] Exception parsing invalid email address headers starting or ending with dot Message-ID: <1500699002.76.0.343337119039.issue30988@psf.upfronthosting.co.za> New submission from Tim Bell: Email addresses with a display name starting with a dot ("."), or ending with a dot without whitespace before the angle bracket trigger exceptions when accessing the header, after creating the message object with the "default" policy. For example: >>> import email >>> from email.policy import default >>> email.message_from_bytes(b'To: . Doe ')['to'] '. Doe ' >>> email.message_from_bytes(b'To: . Doe ', policy=default)['to'] Traceback (most recent call last): File "", line 1, in File "/Users/bhat/git/cpython/Lib/email/message.py", line 391, in __getitem__ return self.get(name) File "/Users/bhat/git/cpython/Lib/email/message.py", line 471, in get return self.policy.header_fetch_parse(k, v) File "/Users/bhat/git/cpython/Lib/email/policy.py", line 162, in header_fetch_parse return self.header_factory(name, value) File "/Users/bhat/git/cpython/Lib/email/headerregistry.py", line 586, in __call__ return self[name](name, value) File "/Users/bhat/git/cpython/Lib/email/headerregistry.py", line 197, in __new__ cls.parse(value, kwds) File "/Users/bhat/git/cpython/Lib/email/headerregistry.py", line 344, in parse for mb in addr.all_mailboxes])) File "/Users/bhat/git/cpython/Lib/email/headerregistry.py", line 344, in for mb in addr.all_mailboxes])) File "/Users/bhat/git/cpython/Lib/email/_header_value_parser.py", line 834, in display_name return self[0].display_name File "/Users/bhat/git/cpython/Lib/email/_header_value_parser.py", line 768, in display_name return self[0].display_name File "/Users/bhat/git/cpython/Lib/email/_header_value_parser.py", line 931, in display_name if res[0][0].token_type == 'cfws': AttributeError: 'str' object has no attribute 'token_type' >>> >>> email.message_from_bytes(b'To: John X.')['to'] 'John X.' >>> email.message_from_bytes(b'To: John X.', policy=default)['to'] Traceback (most recent call last): File "", line 1, in File "/Users/bhat/git/cpython/Lib/email/message.py", line 391, in __getitem__ return self.get(name) File "/Users/bhat/git/cpython/Lib/email/message.py", line 471, in get return self.policy.header_fetch_parse(k, v) File "/Users/bhat/git/cpython/Lib/email/policy.py", line 162, in header_fetch_parse return self.header_factory(name, value) File "/Users/bhat/git/cpython/Lib/email/headerregistry.py", line 586, in __call__ return self[name](name, value) File "/Users/bhat/git/cpython/Lib/email/headerregistry.py", line 197, in __new__ cls.parse(value, kwds) File "/Users/bhat/git/cpython/Lib/email/headerregistry.py", line 344, in parse for mb in addr.all_mailboxes])) File "/Users/bhat/git/cpython/Lib/email/headerregistry.py", line 344, in for mb in addr.all_mailboxes])) File "/Users/bhat/git/cpython/Lib/email/_header_value_parser.py", line 834, in display_name return self[0].display_name File "/Users/bhat/git/cpython/Lib/email/_header_value_parser.py", line 768, in display_name return self[0].display_name File "/Users/bhat/git/cpython/Lib/email/_header_value_parser.py", line 936, in display_name if res[-1][-1].token_type == 'cfws': AttributeError: 'str' object has no attribute 'token_type' ---------- components: email messages: 298836 nosy: barry, r.david.murray, timb07 priority: normal severity: normal status: open title: Exception parsing invalid email address headers starting or ending with dot type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 00:56:20 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Jul 2017 04:56:20 +0000 Subject: [issue30981] IDLE: Add config dialog font page tests In-Reply-To: <1500604428.18.0.819214688476.issue30981@psf.upfronthosting.co.za> Message-ID: <1500699380.61.0.942899619151.issue30981@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 04864b491e3ce0f022e918ad344fb53a99ce2a1b by Terry Jan Reedy in branch '3.6': [3.6] bpo-30981: IDLE -- Add more configdialog font page tests. (GH-? (#2796) https://github.com/python/cpython/commit/04864b491e3ce0f022e918ad344fb53a99ce2a1b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 00:58:45 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Jul 2017 04:58:45 +0000 Subject: [issue30981] IDLE: Test config dialog font bold button and sample change In-Reply-To: <1500604428.18.0.819214688476.issue30981@psf.upfronthosting.co.za> Message-ID: <1500699525.59.0.946059155164.issue30981@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed title: IDLE: Add config dialog font page tests -> IDLE: Test config dialog font bold button and sample change _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 01:02:10 2017 From: report at bugs.python.org (Tim Bell) Date: Sat, 22 Jul 2017 05:02:10 +0000 Subject: [issue30988] Exception parsing invalid email address headers starting or ending with dot In-Reply-To: <1500699002.76.0.343337119039.issue30988@psf.upfronthosting.co.za> Message-ID: <1500699730.52.0.51682148052.issue30988@psf.upfronthosting.co.za> Changes by Tim Bell : ---------- pull_requests: +2862 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 03:01:30 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Jul 2017 07:01:30 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1500706890.71.0.352382439323.issue25988@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If we want to add programming warnings, we should replace sys.modules['collections'] with an instance of a module type subclass with corresponding properties raising a DeprecationWarning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 03:17:22 2017 From: report at bugs.python.org (Lovesh Harchandani) Date: Sat, 22 Jul 2017 07:17:22 +0000 Subject: [issue30989] Sort only when needed in TimedRotatingFileHandler's getFilesToDelete Message-ID: <1500707842.79.0.354493990388.issue30989@psf.upfronthosting.co.za> New submission from Lovesh Harchandani: At `/Lib/logging/handlers.py` in `TimedRotatingFileHandler`'s `getFilesToDelete` method, filenames are sorted using `result.sort()` regardless of `len(result)`, if `len(result)` < backupCount, sorting is not required. ---------- messages: 298839 nosy: Lovesh Harchandani priority: normal severity: normal status: open title: Sort only when needed in TimedRotatingFileHandler's getFilesToDelete versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 03:18:34 2017 From: report at bugs.python.org (Lovesh Harchandani) Date: Sat, 22 Jul 2017 07:18:34 +0000 Subject: [issue30989] Sort only when needed in TimedRotatingFileHandler's getFilesToDelete In-Reply-To: <1500707842.79.0.354493990388.issue30989@psf.upfronthosting.co.za> Message-ID: <1500707914.46.0.707192083391.issue30989@psf.upfronthosting.co.za> Changes by Lovesh Harchandani : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 03:18:53 2017 From: report at bugs.python.org (Lovesh Harchandani) Date: Sat, 22 Jul 2017 07:18:53 +0000 Subject: [issue30989] Sort only when needed in TimedRotatingFileHandler's getFilesToDelete In-Reply-To: <1500707842.79.0.354493990388.issue30989@psf.upfronthosting.co.za> Message-ID: <1500707933.04.0.362314205946.issue30989@psf.upfronthosting.co.za> Changes by Lovesh Harchandani : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 03:56:38 2017 From: report at bugs.python.org (Lovesh Harchandani) Date: Sat, 22 Jul 2017 07:56:38 +0000 Subject: [issue30989] Sort only when needed in TimedRotatingFileHandler's getFilesToDelete In-Reply-To: <1500707842.79.0.354493990388.issue30989@psf.upfronthosting.co.za> Message-ID: <1500710198.37.0.759455186585.issue30989@psf.upfronthosting.co.za> Changes by Lovesh Harchandani : ---------- pull_requests: +2863 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 04:02:31 2017 From: report at bugs.python.org (Matheus Vieira Portela) Date: Sat, 22 Jul 2017 08:02:31 +0000 Subject: [issue30802] datetime.datetime.strptime('200722', '%Y%U') In-Reply-To: <1498726688.6.0.920894490968.issue30802@psf.upfronthosting.co.za> Message-ID: <1500710551.7.0.946996007192.issue30802@psf.upfronthosting.co.za> Matheus Vieira Portela added the comment: Therefore, should we implement the behavior of assuming the first day of the week if none is provided or not? ---------- nosy: +matheus.v.portela _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 04:03:50 2017 From: report at bugs.python.org (Matheus Vieira Portela) Date: Sat, 22 Jul 2017 08:03:50 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1500710630.93.0.31465198704.issue1100942@psf.upfronthosting.co.za> Matheus Vieira Portela added the comment: The patch is broken against Python 3.7. I'll try working on it. ---------- nosy: +matheus.v.portela Added file: http://bugs.python.org/file47032/issue1100942_20170722.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 04:04:22 2017 From: report at bugs.python.org (Matheus Vieira Portela) Date: Sat, 22 Jul 2017 08:04:22 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1500710662.91.0.313472243316.issue1100942@psf.upfronthosting.co.za> Matheus Vieira Portela added the comment: Also, may I move this issue to a GitHub PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 05:32:24 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 09:32:24 +0000 Subject: [issue28060] Clean up division fast paths in Objects/longobject.c In-Reply-To: <1473504373.09.0.740082667997.issue28060@psf.upfronthosting.co.za> Message-ID: <1500715944.99.0.790251905819.issue28060@psf.upfronthosting.co.za> Antoine Pitrou added the comment: What's the status of this? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 05:33:07 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 09:33:07 +0000 Subject: [issue26549] co_stacksize is calculated from unoptimized code In-Reply-To: <1457822745.22.0.972836245522.issue26549@psf.upfronthosting.co.za> Message-ID: <1500715987.71.0.959432438118.issue26549@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 05:46:34 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 09:46:34 +0000 Subject: [issue26732] multiprocessing sentinel resource leak In-Reply-To: <1460325501.58.0.225914662536.issue26732@psf.upfronthosting.co.za> Message-ID: <1500716794.12.0.232673372271.issue26732@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is expected with the "fork" method, but also happens with the "forkserver" method. ---------- nosy: +pitrou stage: -> needs patch versions: +Python 3.6, Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 06:04:29 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 10:04:29 +0000 Subject: [issue26732] multiprocessing sentinel resource leak In-Reply-To: <1460325501.58.0.225914662536.issue26732@psf.upfronthosting.co.za> Message-ID: <1500717869.54.0.91315500117.issue26732@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +2865 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 06:05:17 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 10:05:17 +0000 Subject: [issue26732] multiprocessing sentinel resource leak In-Reply-To: <1460325501.58.0.225914662536.issue26732@psf.upfronthosting.co.za> Message-ID: <1500717917.84.0.993334328808.issue26732@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 06:09:56 2017 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 22 Jul 2017 10:09:56 +0000 Subject: [issue28060] Clean up division fast paths in Objects/longobject.c In-Reply-To: <1473504373.09.0.740082667997.issue28060@psf.upfronthosting.co.za> Message-ID: <1500718196.22.0.582998539001.issue28060@psf.upfronthosting.co.za> Mark Dickinson added the comment: > What's the status of this? Forgotten, rather than abandoned. :-( I'll unassign so that someone else can pick this up. I believe the patch is ready to go, except that of course now it needs a PR. ---------- assignee: mark.dickinson -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 06:14:07 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 10:14:07 +0000 Subject: [issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes In-Reply-To: <1386241984.18.0.408310965726.issue19896@psf.upfronthosting.co.za> Message-ID: <1500718447.05.0.632750944564.issue19896@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 06:20:22 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 10:20:22 +0000 Subject: [issue27151] multiprocessing.Process leaves read pipes open (Process.sentinel) In-Reply-To: <1464519594.44.0.838880586419.issue27151@psf.upfronthosting.co.za> Message-ID: <1500718822.19.0.794436345548.issue27151@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> rejected stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 06:21:01 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 10:21:01 +0000 Subject: [issue30171] Emit ResourceWarning in multiprocessing Queue destructor In-Reply-To: <1493214770.49.0.943228970697.issue30171@psf.upfronthosting.co.za> Message-ID: <1500718861.35.0.376249946708.issue30171@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 07:22:57 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 11:22:57 +0000 Subject: [issue26732] multiprocessing sentinel resource leak In-Reply-To: <1460325501.58.0.225914662536.issue26732@psf.upfronthosting.co.za> Message-ID: <1500722577.57.0.520962166638.issue26732@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 896145d9d266ee2758cfcd7691238cbc1f9e1ab8 by Antoine Pitrou in branch 'master': bpo-26732: fix too many fds in processes started with the "forkserver" method (#2813) https://github.com/python/cpython/commit/896145d9d266ee2758cfcd7691238cbc1f9e1ab8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 07:23:05 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 11:23:05 +0000 Subject: [issue26732] multiprocessing sentinel resource leak In-Reply-To: <1460325501.58.0.225914662536.issue26732@psf.upfronthosting.co.za> Message-ID: <1500722585.67.0.90878428778.issue26732@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 08:50:31 2017 From: report at bugs.python.org (ppperry) Date: Sat, 22 Jul 2017 12:50:31 +0000 Subject: [issue30990] Calls to C functions using `.__call__` don't get sent to profiler. Message-ID: <1500727831.57.0.777794469243.issue30990@psf.upfronthosting.co.za> New submission from ppperry: If you create a file called `inputtest.py` with the contents `input.__call__()`, and run the built-in profile module on it, it doesn't notice the call to `input`, and produces a report not including that call. 4 function calls in 0.000 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 1 0.000 0.000 0.000 0.000 :0(exec) 1 0.000 0.000 0.000 0.000 :0(setprofile) 1 0.000 0.000 0.000 0.000 inputtest.py:1() 1 0.000 0.000 0.000 0.000 profile:0( at 0x00000000029880C0, file "inputtest.py", line 1>) 0 0.000 0.000 profile:0(profiler) ---------- components: Interpreter Core, Library (Lib) messages: 298847 nosy: ppperry priority: normal severity: normal status: open title: Calls to C functions using `.__call__` don't get sent to profiler. type: behavior versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 09:04:19 2017 From: report at bugs.python.org (Kubilay Kocak) Date: Sat, 22 Jul 2017 13:04:19 +0000 Subject: [issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699) In-Reply-To: <1416797425.29.0.948172439575.issue22928@psf.upfronthosting.co.za> Message-ID: <1500728659.4.0.50240707039.issue22928@psf.upfronthosting.co.za> Changes by Kubilay Kocak : ---------- stage: resolved -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 09:51:32 2017 From: report at bugs.python.org (Segev Finer) Date: Sat, 22 Jul 2017 13:51:32 +0000 Subject: [issue27790] test_distutils spews linker messages on Windows In-Reply-To: <1471468881.84.0.977496152734.issue27790@psf.upfronthosting.co.za> Message-ID: <1500731492.23.0.234120839804.issue27790@psf.upfronthosting.co.za> Segev Finer added the comment: We are getting those warnings because distutils builds extension modules without /GL (https://msdn.microsoft.com/en-us/library/0zza0de8.aspx) but with /LTCG (https://msdn.microsoft.com/en-us/library/xbf3tbeh.aspx). We should either add /GL to truly enable whole program optimizations/link-time code generation or remove it. It is added in https://github.com/python/cpython/blob/896145d9d266ee2758cfcd7691238cbc1f9e1ab8/Lib/distutils/_msvccompiler.py#L233-L241. ---------- nosy: +Segev Finer type: -> behavior versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 09:58:30 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 22 Jul 2017 13:58:30 +0000 Subject: [issue25571] Improve the lltrace feature with the Py_Debug mode In-Reply-To: <1446844426.01.0.118649403374.issue25571@psf.upfronthosting.co.za> Message-ID: <1500731910.53.0.269516803464.issue25571@psf.upfronthosting.co.za> St?phane Wirtel added the comment: @gwk no problem for a review of your patch @haypo as discussed before, maybe we could remove the lltrace feature because this one is never used by the developers. or we could ask on @python-dev ML. If there is a better solution and this one could replace the current `lltrace`, I am ok with that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 10:00:59 2017 From: report at bugs.python.org (Segev Finer) Date: Sat, 22 Jul 2017 14:00:59 +0000 Subject: [issue27790] test_distutils spews linker messages on Windows In-Reply-To: <1471468881.84.0.977496152734.issue27790@psf.upfronthosting.co.za> Message-ID: <1500732059.45.0.517297606205.issue27790@psf.upfronthosting.co.za> Segev Finer added the comment: Investigated some more. We are adding /GL for release but not in debug. But adding /LTCG for both debug and release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 10:03:55 2017 From: report at bugs.python.org (Segev Finer) Date: Sat, 22 Jul 2017 14:03:55 +0000 Subject: [issue27790] test_distutils spews linker messages on Windows In-Reply-To: <1471468881.84.0.977496152734.issue27790@psf.upfronthosting.co.za> Message-ID: <1500732235.12.0.460344459106.issue27790@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2866 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 10:10:59 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 22 Jul 2017 14:10:59 +0000 Subject: [issue30222] make_zip.py had a bug when setting up full 64 bit distribution. In-Reply-To: <1493665158.27.0.48978585861.issue30222@psf.upfronthosting.co.za> Message-ID: <1500732659.96.0.877703679608.issue30222@psf.upfronthosting.co.za> Steve Dower added the comment: I have a separate PR out that fixes this one, just waiting on Zach to review (but since it only touches the more obscure release files, it's rare for anyone but me to have an opinion). The script is supposed to take the build path rather than the architecture, but that got reverted at some point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 10:13:17 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 22 Jul 2017 14:13:17 +0000 Subject: [issue30986] Add --include-py argument to Tools/msi/make_zip.py In-Reply-To: <1500674773.9.0.384713319634.issue30986@psf.upfronthosting.co.za> Message-ID: <1500732797.1.0.949345034212.issue30986@psf.upfronthosting.co.za> Steve Dower added the comment: The nuget package doesn't suffer from this - why not? Should you have been using the full layout rather than the embedding layout? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 10:27:30 2017 From: report at bugs.python.org (Segev Finer) Date: Sat, 22 Jul 2017 14:27:30 +0000 Subject: [issue30986] Add --include-py argument to Tools/msi/make_zip.py In-Reply-To: <1500674773.9.0.384713319634.issue30986@psf.upfronthosting.co.za> Message-ID: <1500733650.71.0.530618641248.issue30986@psf.upfronthosting.co.za> Segev Finer added the comment: I used the full one. I doubt virtualenv (used by tox) will work with the embedding layout :P. I remember getting an exception from something because it was missing the .py source files but I don't remember what it was and wasn't able to reproduce it now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 10:31:22 2017 From: report at bugs.python.org (Segev Finer) Date: Sat, 22 Jul 2017 14:31:22 +0000 Subject: [issue30222] make_zip.py had a bug when setting up full 64 bit distribution. In-Reply-To: <1493665158.27.0.48978585861.issue30222@psf.upfronthosting.co.za> Message-ID: <1500733882.61.0.886342481567.issue30222@psf.upfronthosting.co.za> Segev Finer added the comment: I did make a PR which only changes -a/--arch to a choices argument. https://github.com/python/cpython/pull/2808 I guess the PR you are talking about is https://github.com/python/cpython/pull/2750/files which changes this entirely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 10:32:26 2017 From: report at bugs.python.org (jonny) Date: Sat, 22 Jul 2017 14:32:26 +0000 Subject: [issue30991] test_ctypes , test_dbm and test_ssl fail on arm64 (aarch64) architecture Message-ID: <1500733945.72.0.618200195446.issue30991@psf.upfronthosting.co.za> New submission from jonny: I am running debian stretch on 64bit arm system. I am trying to install python 3.6.2. But facing errors in these tests while running make test. I have installed these libraries :: apt install liblzma-dev libz-dev libreadline-dev libncursesw5-dev libssl-dev libgdbm-dev libsqlite3-dev libbz2-dev tk-dev libc6-dev libdb-dev libmpdec-dev test_ctype test_pass_by_value is still a issue for aarch64 as I found here :: https://bugs.python.org/issue29804. So is with test_ssl as mentioned here :: https://bugs.python.org/issue30714 But I have no idea why test_dbm is failing as I have installed req. libraries as stated here :: http://bugs.python.org/issue14120 As test_ctypes test_pass_by_value has been fixed [https://github.com/python/cpython/commit/a86339b83fbd0932e0529a3c91935e997a234582#diff-8e60f1d7697d458dee7303f92bc5a5c0L250 ] in Python version 3.7.0 alpha 1 [https://github.com/python/cpython]. So I tried to build python 3.7.0. But this time only test_dbm and test_ssl failed showing same errors. Please guide me , how to resolve these. ---------- components: Tests files: python3.6.2 build aarch64 log.txt messages: 298855 nosy: jonny789 priority: normal severity: normal status: open title: test_ctypes ,test_dbm and test_ssl fail on arm64 (aarch64) architecture type: crash versions: Python 3.6 Added file: http://bugs.python.org/file47033/python3.6.2 build aarch64 log.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 10:46:06 2017 From: report at bugs.python.org (ecbftw) Date: Sat, 22 Jul 2017 14:46:06 +0000 Subject: [issue30713] Reject newline character (U+000A) in URLs in urllib.parse In-Reply-To: <1497972033.13.0.439611221466.issue30713@psf.upfronthosting.co.za> Message-ID: <1500734766.84.0.294113156957.issue30713@psf.upfronthosting.co.za> ecbftw added the comment: I'm the guy that did the original security research on this issue. I've been a pentester for over 12 years, where I am regularly helping developers understand how to best correct their injection flaws. Please carefully consider what I'm trying to tell you. I've been trying to get this message through to Python for nearly 2 years now. =( Serhiy has the right idea. His email here shows a firm understanding of the issue and the correct remediation approach: https://mail.python.org/pipermail/python-dev/2017-July/148715.html It seems every developer initially assumes input validation is the way you deal with injection flaws. But this creates a false sense of a "trade off" between security and usability. Rejecting evil-looking things up front just creates more problems for you. Also, you can't be sure every code path leading from user input to the injection point is addressed. (What other ways can new lines reach the FTP library?) Instead, the problem needs to be dealt with in the lines of code just before the injection occurs. Ideally, any special character should be encoded/escaped, in which case you get the best of both worlds: security and full usability. However, when you're dealing with a syntax that was poorly designed and doesn't have a standard way to escape special characters, then you are forced to reject them. Still, it is better to do this rejection right before the commands are dropped onto the TCP stream. That way, if you later decide that there's an acceptable way to encode new lines for *specific* commands, then you can perform that encoding right there and relax the restrictions in specific cases. I like Serhiy's idea of optionally supporting escaping via the syntax defined in RFC 2640. This should be disabled by default, and a short-term security patch shouldn't try to tackle it. But in a new Python release, a switch could be added that causes new lines to be escaped for specific commands, such as the CWD and GET commands. It is likely that this escaping is only going to be useful in specific commands, based on what FTP servers actually support. Of course none of this is possible if you use a heavy-handed approach of blocking %0a in URLs up front. ---------- nosy: +ecbftw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 11:34:52 2017 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 22 Jul 2017 15:34:52 +0000 Subject: [issue30403] PEP 547: Running extension modules using -m switch In-Reply-To: <1495192842.98.0.357031276673.issue30403@psf.upfronthosting.co.za> Message-ID: <1500737692.33.0.64209653701.issue30403@psf.upfronthosting.co.za> Stefan Behnel added the comment: FYI, I've finally managed to find the time for implementing PEP 489 style module initialisation in Cython. It was so easy that I'm sorry it took me so long to get started. Cython 0.26 is fresh out, so the feature should go into 0.27. https://github.com/cython/cython/pull/1794 Note that I ended up implementing the Py_mod_create function which is now copying attributes from the spec right after creation. While not strictly required, I guess, it turned out to be easiest, but it seems like this does now conflict with the current "-m" implementation. I asked on the github commit why that restriction exists. One thing I stumbled over: exec_in_module() is a Python level function. Would that make it possible to re-execute an already imported module? That could be dangerous, because C level module code often initialises resources that a simple re-execution of the module exec function would overwrite without cleaning up the old state. I did not (yet?) implement support for m_clear() etc., and that might actually turn out to be really risky when it comes to supporting arbitrary user code. OTOH, that case is easy to detect because the module is already completely initialised at that point. As far as I understand it, all that this PEP really changes from the POV of the extension module is that it calls the exec function with a different module name ("__main__"). Cython already provides that feature itself (by embedding CPython in a C main function), so this should be easy to support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 11:40:49 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Sat, 22 Jul 2017 15:40:49 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500738049.25.0.956007283218.issue30822@psf.upfronthosting.co.za> Changes by Utkarsh Upadhyay : ---------- pull_requests: +2867 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 11:47:31 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Sat, 22 Jul 2017 15:47:31 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1500738451.68.0.239910913045.issue30822@psf.upfronthosting.co.za> Changes by Utkarsh Upadhyay : ---------- pull_requests: +2868 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 11:53:24 2017 From: report at bugs.python.org (Chris White) Date: Sat, 22 Jul 2017 15:53:24 +0000 Subject: [issue30992] Invalid PGP Key Prevents Archive Validation Message-ID: <1500738803.82.0.333391248268.issue30992@psf.upfronthosting.co.za> New submission from Chris White: When trying to validate the Python 3.6.1 tgz using the ASC file, I can't import all the keys due to the following error: ``` gpg: Note: signatures using the MD5 algorithm are rejected gpg: key ED9D77D5: no valid user IDs gpg: this may be caused by a missing self-signature ``` This is using Ubuntu 16.04 and gpg (GnuPG) 1.4.20, running the command ``` wget https://www.python.org/static/files/pubkeys.txt gpg --import pubkeys.txt ``` If I take out the key ID manually out of the entire list and import the keys by their IDs instead it works. ---------- components: Installation messages: 298858 nosy: cwprogram priority: normal severity: normal status: open title: Invalid PGP Key Prevents Archive Validation type: security versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 12:11:04 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Jul 2017 16:11:04 +0000 Subject: [issue27790] test_distutils spews linker messages on Windows In-Reply-To: <1471468881.84.0.977496152734.issue27790@psf.upfronthosting.co.za> Message-ID: <1500739864.93.0.488494180714.issue27790@psf.upfronthosting.co.za> Terry J. Reedy added the comment: With the patch, I still see the Creating ... messages but without the LINK: warning. It *seems* like a no-brainer to apply the patch. With those gone, it would seem reasonable to intercept the message as Steve described and only print it if it contains 'LINK' or if the test fails. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 13:20:25 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 22 Jul 2017 17:20:25 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1500744025.0.0.680050881009.issue30119@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: New changeset 2b1e6e9696cb433c0e0da11145157d54275d119f by Giampaolo Rodola (Dong-hee Na) in branch 'master': bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal command (#1214) https://github.com/python/cpython/commit/2b1e6e9696cb433c0e0da11145157d54275d119f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 15:07:12 2017 From: report at bugs.python.org (Larry Hastings) Date: Sat, 22 Jul 2017 19:07:12 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1500750432.58.0.881601955565.issue26617@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset 34fae03cd6c9e304e02c571b3bf9e8df0cfe76be by larryhastings (Serhiy Storchaka) in branch '3.4': [3.4] bpo-26617: Ensure gc tracking is off when invoking weakref callbacks. (#2695) https://github.com/python/cpython/commit/34fae03cd6c9e304e02c571b3bf9e8df0cfe76be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 15:07:43 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Jul 2017 19:07:43 +0000 Subject: [issue30993] IDLE: Document and fix configdialog font tests. Message-ID: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> New submission from Terry J. Reedy: This follows #30981 and the comments on PR 2805 after the close notice. * Causal chains in a directed acyclic graph link user actions to provisional entries in changes and and changes in the example displays. Explain these better in the docstring. Each font test function tests pieces of the graph. *test_font_set should run even if not run first. ---------- assignee: terry.reedy components: IDLE messages: 298862 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Document and fix configdialog font tests. type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 15:18:05 2017 From: report at bugs.python.org (Larry Hastings) Date: Sat, 22 Jul 2017 19:18:05 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1500751085.55.0.578131535505.issue26617@psf.upfronthosting.co.za> Larry Hastings added the comment: Sorry for the delay in merging your PR. I believe Ned is planning to tag the next 3.3 rc1 tomorrow (Sunday). If you see this, and you have time, it'd be great if you could make a PR for the 3.3 backport. Note that 3.3 is probably *not* getting converted to use "blurb". So if you do make the backport, please just edit Misc/NEWS directly. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 15:18:47 2017 From: report at bugs.python.org (Larry Hastings) Date: Sat, 22 Jul 2017 19:18:47 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds In-Reply-To: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> Message-ID: <1500751127.13.0.581540372541.issue30939@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset 3b3a5a5b70dc468dcfacb17a3d6b342820b480ff by larryhastings (Ned Deily) in branch '3.4': bpo-30939: Avoid Sphinx deprecation warning in docs build. (#2721) (#2724) https://github.com/python/cpython/commit/3b3a5a5b70dc468dcfacb17a3d6b342820b480ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 15:22:34 2017 From: report at bugs.python.org (Larry Hastings) Date: Sat, 22 Jul 2017 19:22:34 +0000 Subject: [issue30730] [security] Injecting environment variable in subprocess on Windows In-Reply-To: <1498118820.13.0.596038385019.issue30730@psf.upfronthosting.co.za> Message-ID: <1500751354.1.0.0319018483937.issue30730@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset b1549175ed30f2931e2bb980a7e3c360ed19e1c9 by larryhastings (Victor Stinner) in branch '3.4': [3.4] Backport CI config from master (#2475) https://github.com/python/cpython/commit/b1549175ed30f2931e2bb980a7e3c360ed19e1c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 15:22:34 2017 From: report at bugs.python.org (Larry Hastings) Date: Sat, 22 Jul 2017 19:22:34 +0000 Subject: [issue30231] test_imaplib needs a TLS server accepting self-signed certificates In-Reply-To: <1493736284.13.0.622029485806.issue30231@psf.upfronthosting.co.za> Message-ID: <1500751354.59.0.823025831501.issue30231@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset b1549175ed30f2931e2bb980a7e3c360ed19e1c9 by larryhastings (Victor Stinner) in branch '3.4': [3.4] Backport CI config from master (#2475) https://github.com/python/cpython/commit/b1549175ed30f2931e2bb980a7e3c360ed19e1c9 ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 15:33:00 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 22 Jul 2017 19:33:00 +0000 Subject: [issue30993] IDLE: Document and fix configdialog font tests. In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500751980.81.0.697099567251.issue30993@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +2869 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 15:33:43 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Jul 2017 19:33:43 +0000 Subject: [issue30981] IDLE: Test config dialog font bold button and sample change In-Reply-To: <1500604428.18.0.819214688476.issue30981@psf.upfronthosting.co.za> Message-ID: <1500752023.91.0.529962832823.issue30981@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Followup issue is #30993. ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 15:34:38 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Jul 2017 19:34:38 +0000 Subject: [issue30780] IDLE: configdialog - add tests for ConfigDialog GUI. In-Reply-To: <1498516711.25.0.892352273971.issue30780@psf.upfronthosting.co.za> Message-ID: <1500752078.66.0.232413481462.issue30780@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- dependencies: +IDLE: Document and fix configdialog font tests. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 15:39:57 2017 From: report at bugs.python.org (Lele Gaifax) Date: Sat, 22 Jul 2017 19:39:57 +0000 Subject: [issue27645] Supporting native backup facility of SQLite In-Reply-To: <1469728098.24.0.732586701981.issue27645@psf.upfronthosting.co.za> Message-ID: <1500752397.85.0.556203916765.issue27645@psf.upfronthosting.co.za> Lele Gaifax added the comment: Monthly offer to do whatever is needed to easy the path to adoption :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 16:11:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Jul 2017 20:11:05 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1500754265.11.0.366641912439.issue26617@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems this isn't reproducible with 3.3. ---------- priority: release blocker -> normal status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 16:11:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Jul 2017 20:11:28 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1500754288.42.0.925702689653.issue26617@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: -953 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 16:23:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Jul 2017 20:23:22 +0000 Subject: [issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699) In-Reply-To: <1416797425.29.0.948172439575.issue22928@psf.upfronthosting.co.za> Message-ID: <1500755002.96.0.927484279436.issue22928@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2870 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 16:48:02 2017 From: report at bugs.python.org (Pierre Quentel) Date: Sat, 22 Jul 2017 20:48:02 +0000 Subject: [issue30576] http.server should support HTTP compression (gzip) In-Reply-To: <1496691724.59.0.955308322691.issue30576@psf.upfronthosting.co.za> Message-ID: <1500756482.5.0.753897991521.issue30576@psf.upfronthosting.co.za> Pierre Quentel added the comment: Thank you Terry and Victor for your comments. I understand that you agree on adding HTTP compression to http.server, but don't want it to be enabled by default. @terry.reedy With the implementation proposed in the Pull Request, to disable compression by default, all it takes is to set the attribute SimpleHTTPRequestHandler.compressed_types to the empty list. Users who want to enable compression for some types would create subclasses of Simple... that set compressed_types. For instance : import http.server class CompressedHandler(http.server.SimpleHTTPRequestHandler): compressed_types = ["text/html", "text/plain"] http.server.test(HandlerClass=CompressedHandler) Would that be ok ? For a command line argument --gzip, compressed_types could be set to a list of commonly compressed types - I don't think we want to pass a list of types on the command line. For CGI scripts, I may be missing something but for me it is up to the script to determine the response headers and content, I don't think a mixin class in http.server could help. @haypo I fully agree on your comment about content-length, the implementation in the PR is not optimal. The alternative would be to send the answer using chunked transfer encoding, which is currently not used in http.server, and would also be relevant for other use cases than gzipped files. It shouldn't be difficult to add, and I volunteer to propose an implementation, but it's yet another feature to add to the server. Do you think it's relevant ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 17:12:35 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 21:12:35 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1500757955.66.0.825729271617.issue17611@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 17:21:47 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 21:21:47 +0000 Subject: [issue28965] Multiprocessing spawn/forkserver fails to pass Queues In-Reply-To: <1481676708.34.0.90034781132.issue28965@psf.upfronthosting.co.za> Message-ID: <1500758507.85.0.923640519501.issue28965@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, this is really an error in your script. If you add `p.join()` to wait for the process to end, you'll see no error pops up. What really happens is that the parent process ends before the child is fully started, and the resource underlying the queue is cleaned up at this point. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 17:25:29 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 21:25:29 +0000 Subject: [issue28965] Multiprocessing spawn/forkserver fails to pass Queues In-Reply-To: <1481676708.34.0.90034781132.issue28965@psf.upfronthosting.co.za> Message-ID: <1500758729.23.0.947541907221.issue28965@psf.upfronthosting.co.za> Antoine Pitrou added the comment: More exactly, since the child process is not "daemonic", the parent process waits for it to end, but after collecting the queue's resources. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 17:26:54 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 21:26:54 +0000 Subject: [issue28965] Multiprocessing spawn/forkserver fails to pass Queues In-Reply-To: <1481676708.34.0.90034781132.issue28965@psf.upfronthosting.co.za> Message-ID: <1500758814.93.0.0840859183491.issue28965@psf.upfronthosting.co.za> Antoine Pitrou added the comment: So, while it might be possible to improve on this, it would risk fragilizing other use cases, and besides, this is not a problem that is likely to happen in real usage. Therefore, I'd rather close this issue. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 17:36:11 2017 From: report at bugs.python.org (Christian Heimes) Date: Sat, 22 Jul 2017 21:36:11 +0000 Subject: [issue30576] http.server should support HTTP compression (gzip) In-Reply-To: <1496691724.59.0.955308322691.issue30576@psf.upfronthosting.co.za> Message-ID: <1500759371.03.0.619142974771.issue30576@psf.upfronthosting.co.za> Christian Heimes added the comment: I share RDM's sentiment and I'm not keen to add more complexity. The http.server module in Python's stdlib is a useful example implementation of a simple HTTP server. I'd rather keep it simple and see a full featured HTTP server on PyPI. These days we don't have to include all batteries in Python's standard library. PyPI and pip made it super easy to install additional packages. I might be convinced to add transparent gzip compression if it is done properly. A temporary file, compress-than-send, and whole content handling (content-length) are all wrong. Your current implementation will result in at least one CVE and a bunch of mails to Python security mailing list. Transparent compression must use chunked encoding with a small in-memory buffer instead of a file and zlib.compressobj() instead of gzip.GzipFile. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 17:52:54 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 21:52:54 +0000 Subject: [issue28382] Possible deadlock on sys.stdout/stderr when combining multiprocessing with threads In-Reply-To: <1475796037.28.0.0216232278478.issue28382@psf.upfronthosting.co.za> Message-ID: <1500760374.84.0.795204285367.issue28382@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, after a bit of diagnosing, the issue is combining multi-threading with use of fork(). The problem is file objects (such as sys.stdout) have locks but those locks may be taken at the exact point where fork() happens, in which case the child will block when trying to take the lock again. This is mostly a duplicate of issue 6721, but perhaps multiprocessing could at least improve things for sys.stdout and sys.stderr (though I'm not sure how). This is also compounded by the fact that Process._bootstrap() flushed the standard streams at the end. ---------- nosy: +davin, pitrou title: Possible deadlock after many multiprocessing.Process are launch -> Possible deadlock on sys.stdout/stderr when combining multiprocessing with threads versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 17:55:07 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 21:55:07 +0000 Subject: [issue27833] Process is locked when try to execute Queue.put() inside In-Reply-To: <1471942613.74.0.630952786652.issue27833@psf.upfronthosting.co.za> Message-ID: <1500760507.34.0.215163350968.issue27833@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed the simple solution here is to consume items in the queue before trying to join the process. ---------- nosy: +pitrou status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 17:59:46 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 21:59:46 +0000 Subject: [issue26692] cgroups support in multiprocessing In-Reply-To: <1459817171.82.0.158211239936.issue26692@psf.upfronthosting.co.za> Message-ID: <1500760786.06.0.743898965339.issue26692@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +neologix, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 17:59:53 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 21:59:53 +0000 Subject: [issue26692] cgroups support in multiprocessing In-Reply-To: <1459817171.82.0.158211239936.issue26692@psf.upfronthosting.co.za> Message-ID: <1500760793.21.0.563434963423.issue26692@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> needs patch type: behavior -> enhancement versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 18:01:46 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 22:01:46 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500760906.75.0.0434607618934.issue26762@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not able to reproduce. Can you try again with latest master? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 18:03:43 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Jul 2017 22:03:43 +0000 Subject: [issue17140] Document multiprocessing.pool.ThreadPool In-Reply-To: <1360116485.64.0.452267246232.issue17140@psf.upfronthosting.co.za> Message-ID: <1500761023.82.0.583187431429.issue17140@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python versions: +Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 18:33:21 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Jul 2017 22:33:21 +0000 Subject: [issue30993] IDLE: Document and fix configdialog font tests. In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500762801.22.0.616794821359.issue30993@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Patch ready for test on linux and review. ---------- nosy: +csabella, louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 19:54:17 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Jul 2017 23:54:17 +0000 Subject: [issue30993] IDLE: Document and fix configdialog font tests. In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500767657.07.0.393647552464.issue30993@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2871 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 19:59:17 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 22 Jul 2017 23:59:17 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1500767957.95.0.991273789334.issue25988@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > The copying approach likely won't work ... Then it seems like just adding a note to the docs is the way to go. That's probably okay though. I don't think we've every gotten much benefit from the programmatic deprecation warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 20:15:19 2017 From: report at bugs.python.org (Nir Soffer) Date: Sun, 23 Jul 2017 00:15:19 +0000 Subject: [issue30994] Asyncore does not need to copy map.items() before polling Message-ID: <1500768919.1.0.764948579908.issue30994@psf.upfronthosting.co.za> New submission from Nir Soffer: Asyncore is not thread safe, and cannot be called from multiple threads. Hence it does not need to copy the socket_map when preparing for poll or select. The copy was introduced in: commit d74900ebb5a22b387b49684990da1925e1d6bdc9 Author: Josiah Carlson Date: Mon Jul 7 04:15:08 2008 +0000 Committing Py3k version of changelist 64080 and 64257, along with updated tests for smtpd, which required updating with the new semantics. This is a huge patch, looks like port of asyncore to python 3, trying to keep the behavior of the python 2 code. Converting map.items() to list(map.items()) is correct, but on python 3 we can take advantage of the fact that items() does not copy anything. ---------- components: Library (Lib) messages: 298880 nosy: Nir Soffer, giampaolo.rodola, haypo priority: normal severity: normal status: open title: Asyncore does not need to copy map.items() before polling versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 20:20:21 2017 From: report at bugs.python.org (Charles Machalow) Date: Sun, 23 Jul 2017 00:20:21 +0000 Subject: [issue12528] Implement configurable bitfield allocation strategy In-Reply-To: <1310327557.36.0.947857913804.issue12528@psf.upfronthosting.co.za> Message-ID: <1500769221.23.0.66564247747.issue12528@psf.upfronthosting.co.za> Charles Machalow added the comment: Was browsing and found this. This option would be very useful as it could help avoid a current bug I've had to deal with : https://bugs.python.org/issue29753. My use case works with data/structs from another device all-together, so I can't control it's packing. However since GCC/Linux builds currently have the specified bug, I can't get around it. This option would have allowed me to just specify the MSVC strategy, which in general is what I want to not have to have OS-specific behavior. With the bug in mind, this could have almost be a bug-workaround for me. ---------- nosy: +Charles Machalow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 20:26:39 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 23 Jul 2017 00:26:39 +0000 Subject: [issue30993] IDLE: Document and fix configdialog font tests. In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500769599.93.0.948218674811.issue30993@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Works on linux. I just had one question on github about a test for sizelist and moving the initialization of the Tk variables into setUp. I also deleted a second comment that was just a wrong comment, but it's led me to another question. For test_indent_scale, you have the widget test and the `changes` test in the same place. I know you mentioned that you had thought about this before, but now that you have the widget tests for the font name, font bold, (and soon) font size, would there be any reason to split the test_font_set tests into the same place where each of the widgets is tested? That way, all the pieces of the graph flow would be in one place for each widget/Tk Variable/trace function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 20:28:26 2017 From: report at bugs.python.org (Nir Soffer) Date: Sun, 23 Jul 2017 00:28:26 +0000 Subject: [issue30994] Asyncore does not need to copy map.items() before polling In-Reply-To: <1500768919.1.0.764948579908.issue30994@psf.upfronthosting.co.za> Message-ID: <1500769706.09.0.112815053693.issue30994@psf.upfronthosting.co.za> Changes by Nir Soffer : ---------- pull_requests: +2872 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 21:29:55 2017 From: report at bugs.python.org (Mitar) Date: Sun, 23 Jul 2017 01:29:55 +0000 Subject: [issue30995] Support logging.getLogger(style='{') Message-ID: <1500773395.26.0.78055303667.issue30995@psf.upfronthosting.co.za> New submission from Mitar: Currently, using non-legacy formatting in logging message is really cumbersome. I think a new style could be supported much easier using the following: logger = logging.getLogger(style='{') logger.misc('User {} logged in', username} This is both backwards compatible, and does not interfere with 3rd party packages which might use a different logger with different style. You only have to make sure they do not use this logger without knowing about new format, which can be done in various ways (like prefixing the name of the logger, for example). See https://bugs.python.org/issue14031 for more information, where this has also been proposed but not really commented upon. ---------- components: Library (Lib) messages: 298883 nosy: mitar priority: normal severity: normal status: open title: Support logging.getLogger(style='{') type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 22:30:43 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 23 Jul 2017 02:30:43 +0000 Subject: [issue30993] IDLE: Document and fix configdialog font tests. In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500777043.21.0.455437696418.issue30993@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am thinking that the tab title should be 'Font/Indent' rather than 'Font/Tabs' to avoid the confusion between the simulated file-folder tab that we click on and the tab key that indents. Opinions? But maybe the indent widget will be moved, eliminating the issue, or maybe more will be added, as part of converting 'extensions' to features, requiring a different rename. 'Reformat paragraph, also affect text layout. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 23:13:55 2017 From: report at bugs.python.org (Steve Dower) Date: Sun, 23 Jul 2017 03:13:55 +0000 Subject: [issue30222] make_zip.py had a bug when setting up full 64 bit distribution. In-Reply-To: <1493665158.27.0.48978585861.issue30222@psf.upfronthosting.co.za> Message-ID: <1500779635.98.0.829996923702.issue30222@psf.upfronthosting.co.za> Steve Dower added the comment: That's the PR I meant (on phone today, so navigating gh is out). If you look through history you'll see it's mostly a revert of a revert, at least for that script. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 23:42:29 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 23 Jul 2017 03:42:29 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1500781349.81.0.354090879524.issue30853@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This issue is really about managing the set of var,callback pairs. The idea of wrapping vars just clouded the issue. class VarTrace: def __init__(self): self.tracers = [] # or set if need to delete def add(self, var, callback): if isinstance(callback, tuple): callback = self.make_callback(var, callback) self.vartrace.add((var, callback)) return var def make_callback(self, var, args): # Used for 6 vars. def var_callback(*params): changes.add_item(*args, var.get()) return var_callback def attach(self): for var, callback in self.tracers: var.trace_add('write', callback) def remove(cls): # detach? for var, _ in self.tracers: var.trace_remove('write', var.trace_info()[0][1]) # doc this # A functionalist would define a function that returns a sequence of closures. tracers = VarTrace() # write tests, then patch creation of tested vars, retest, patch rest. - self.font_name = StringVar(parent) + self.font_name = tracers.add(StringVar(parent), var_changed_font) ---------- nosy: +csabella title: IDLE: configdialog -- factor out Variable subclass -> IDLE: configdialog -- factor out Tracer subclass _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 00:12:51 2017 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 23 Jul 2017 04:12:51 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1500767957.95.0.991273789334.issue25988@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I think it's not worth the hack that Serhiy suggests. But we should make some noise around this change in the 3.7 announcement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 00:34:07 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 23 Jul 2017 04:34:07 +0000 Subject: [issue30993] IDLE: Document and fix configdialog font tests. In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500784447.91.0.924851155527.issue30993@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes, test_font_set could be split up. But then the setup would have to be repeated for each, and it would be harder to verify that each .set() call was being tested the same way. The event graph for indent_scale is a simple linear chain, and the simple liner test mirrors that. The combined test of bold_toggle and set_samples is not what I wanted, but I prefer it to the alternative of depending on an undocumented internal detail of the tcl wrapper maker (_tkinter, I suspect). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 02:44:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Jul 2017 06:44:07 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1500792247.29.0.207503917682.issue30876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c824cc8426a16dd9f3949a3ed135523d37787bae by Serhiy Storchaka in branch '3.5': [3.5] Backport bpo-30876 (GH-2639), bpo-18018 and bpo-26367. (#2677) https://github.com/python/cpython/commit/c824cc8426a16dd9f3949a3ed135523d37787bae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 02:44:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Jul 2017 06:44:07 +0000 Subject: [issue18018] SystemError: Parent module '' not loaded, cannot perform relative import In-Reply-To: <1369011708.43.0.213176616662.issue18018@psf.upfronthosting.co.za> Message-ID: <1500792247.47.0.83399837188.issue18018@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c824cc8426a16dd9f3949a3ed135523d37787bae by Serhiy Storchaka in branch '3.5': [3.5] Backport bpo-30876 (GH-2639), bpo-18018 and bpo-26367. (#2677) https://github.com/python/cpython/commit/c824cc8426a16dd9f3949a3ed135523d37787bae ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 02:44:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Jul 2017 06:44:07 +0000 Subject: [issue26367] importlib.__import__ does not fail for invalid relative import In-Reply-To: <1455584341.33.0.058581047341.issue26367@psf.upfronthosting.co.za> Message-ID: <1500792247.82.0.644675657842.issue26367@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c824cc8426a16dd9f3949a3ed135523d37787bae by Serhiy Storchaka in branch '3.5': [3.5] Backport bpo-30876 (GH-2639), bpo-18018 and bpo-26367. (#2677) https://github.com/python/cpython/commit/c824cc8426a16dd9f3949a3ed135523d37787bae ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 02:44:45 2017 From: report at bugs.python.org (Kevin williams) Date: Sun, 23 Jul 2017 06:44:45 +0000 Subject: [issue30994] Asyncore does not need to copy map.items() before polling In-Reply-To: <1500768919.1.0.764948579908.issue30994@psf.upfronthosting.co.za> Message-ID: <1500792285.56.0.595307453932.issue30994@psf.upfronthosting.co.za> Changes by Kevin williams : ---------- nosy: -Nir Soffer, giampaolo.rodola, haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 03:00:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Jul 2017 07:00:14 +0000 Subject: [issue29902] copy breaks staticmethod In-Reply-To: <1490447804.79.0.661284691694.issue29902@psf.upfronthosting.co.za> Message-ID: <1500793214.44.0.307510587561.issue29902@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have decided to not merge these changes in 3.5. They help to avoid programmatic errors, but have a non-zero chance of breaking programs that work by accidence. Since this is the last non-secure bugfix we will not have a chance to rollback these changes. An alternative to these changes is testing a program with Python 3.6. ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 03:01:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Jul 2017 07:01:22 +0000 Subject: [issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699) In-Reply-To: <1416797425.29.0.948172439575.issue22928@psf.upfronthosting.co.za> Message-ID: <1500793282.65.0.577326781199.issue22928@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +benjamin.peterson, larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 03:56:19 2017 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 23 Jul 2017 07:56:19 +0000 Subject: [issue26692] cgroups support in multiprocessing In-Reply-To: <1500760793.24.0.182939763232.issue26692@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: I'm not convinced. The reason is that using the number of CPU cores is just a heuristic for a *default value*: the API allows the user to specify the number of workers to use, so it's not really a limitation. The problem is that if you try to think about a more "correct" default value, it gets complicated: here, it's about cgroups, but for example: - What if they are multiple processes running on the same box? - What if the process is subject to CPU affinity? Currently, the CPU affinity mask is ignored. - What if the code being executed by children is itself multi-threaded (maybe because it's using a numerical library using BLAS etc)? - What about hyper-threading? If the code has a lot of cache misses, it would probably be a good idea to use one worker per logical thread, but if it's cache-friendly, probably not. - Etc. In other words, I think that there's simply not reasonable default value for the number of workers to use, that any value will make some class of users/use-case unhappy, and it would add a lot of unnecessary complexity. Since the user can always specify the number of workers - if you find a place where it's not possible, then please report it - I really think we should let the choice/burden up to the user. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 04:32:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Jul 2017 08:32:55 +0000 Subject: [issue26579] Support pickling slots in subclasses of common classes In-Reply-To: <1458204186.54.0.651323931278.issue26579@psf.upfronthosting.co.za> Message-ID: <1500798775.46.0.521028208242.issue26579@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2873 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 04:33:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Jul 2017 08:33:50 +0000 Subject: [issue26579] Support pickling slots in subclasses of common classes In-Reply-To: <1458204186.54.0.651323931278.issue26579@psf.upfronthosting.co.za> Message-ID: <1500798830.58.0.183126724569.issue26579@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +haypo, r.david.murray versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 04:53:50 2017 From: report at bugs.python.org (Louie Lu) Date: Sun, 23 Jul 2017 08:53:50 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1500800030.4.0.866973064649.issue19903@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +2874 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 05:30:08 2017 From: report at bugs.python.org (Fengyuan Chen) Date: Sun, 23 Jul 2017 09:30:08 +0000 Subject: [issue30996] add coroutine AbstractEventLoop.sock_close Message-ID: <1500802208.0.0.551974338989.issue30996@psf.upfronthosting.co.za> New submission from Fengyuan Chen: I suppose asyncio lack async version of sock_close that can call loop.remove_reader and others before close socket and perhaps lack something like coroutine AbstractEventLoop.sock_make_blocking that can do some deregister job. switch constant in the script: * change CALL_REMOVE_READING_BEFORE_CLOSE to True will make script running smoothly * change USE_UVLOOP to True will make script use uvloop ---------- components: asyncio files: asyncio_wait_forever.py messages: 298894 nosy: cfy, yselivanov priority: normal severity: normal status: open title: add coroutine AbstractEventLoop.sock_close type: resource usage versions: Python 3.6 Added file: http://bugs.python.org/file47034/asyncio_wait_forever.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 06:47:19 2017 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 23 Jul 2017 10:47:19 +0000 Subject: [issue30997] TestCase.subTest and expectedFailure Message-ID: <1500806839.59.0.646969271653.issue30997@psf.upfronthosting.co.za> New submission from Ronald Oussoren: It would be nice if there were a way to mark a TestCase.subTest as an expected failure. I have a number of testcases that use the subTest feature and where a small subset of those tests are expected failures due to platform issues. It would be nice if it were possible to mark those tests as such. I'm currently using self.skipTest() to mark these subTests as special, but that's less than ideal. ---------- components: Library (Lib) messages: 298895 nosy: ezio.melotti, michael.foord, rbcollins, ronaldoussoren priority: low severity: normal status: open title: TestCase.subTest and expectedFailure type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 06:53:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Jul 2017 10:53:28 +0000 Subject: [issue29902] copy breaks staticmethod In-Reply-To: <1490447804.79.0.661284691694.issue29902@psf.upfronthosting.co.za> Message-ID: <1500807208.84.0.42780778241.issue29902@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2875 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 06:56:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Jul 2017 10:56:44 +0000 Subject: [issue29902] copy breaks staticmethod In-Reply-To: <1490447804.79.0.661284691694.issue29902@psf.upfronthosting.co.za> Message-ID: <1500807404.32.0.430320827135.issue29902@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: But I think it is worth to add a check and emit a deprecation warning in Py3k mode in 2.7. 2.7 has longer support term than 3.5. And since it is less compatible with 3.6, it is harder to use 3.6 for testing 2.7 programs. ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 07:05:29 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 23 Jul 2017 11:05:29 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500807929.14.0.920123789413.issue30919@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 3051f0b78e53d1b771b49375dc139ca13f9fd76e by Antoine Pitrou in branch 'master': bpo-30919: shared memory allocation performance regression in multiprocessing (#2708) https://github.com/python/cpython/commit/3051f0b78e53d1b771b49375dc139ca13f9fd76e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 07:05:43 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 23 Jul 2017 11:05:43 +0000 Subject: [issue30919] Shared Array Memory Allocation Regression In-Reply-To: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> Message-ID: <1500807943.65.0.0401005905577.issue30919@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 07:11:04 2017 From: report at bugs.python.org (Louie Lu) Date: Sun, 23 Jul 2017 11:11:04 +0000 Subject: [issue30997] TestCase.subTest and expectedFailure In-Reply-To: <1500806839.59.0.646969271653.issue30997@psf.upfronthosting.co.za> Message-ID: <1500808264.94.0.0414418931394.issue30997@psf.upfronthosting.co.za> Louie Lu added the comment: So for example: for i in range(10): with self.subTest(i=i): DoSomething(i) we have some platform specific in i=8, i=9, and you want to labeled as expectedFailure. Do I miss something? ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 08:07:14 2017 From: report at bugs.python.org (Louie Lu) Date: Sun, 23 Jul 2017 12:07:14 +0000 Subject: [issue30997] TestCase.subTest and expectedFailure In-Reply-To: <1500806839.59.0.646969271653.issue30997@psf.upfronthosting.co.za> Message-ID: <1500811634.48.0.0674461789241.issue30997@psf.upfronthosting.co.za> Louie Lu added the comment: There is a mailing-list discusss this before: https://mail.python.org/pipermail/python-list/2016-June/710575.html But after checking, current subTest contextmanager won't yield subtest, so the method of with self.subTest() as sub won't work. Another problem is, inside the subTest, if there have expectfailed, it will raise _ShouldStop, causing the after test won't run it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 08:16:39 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 23 Jul 2017 12:16:39 +0000 Subject: [issue28382] Possible deadlock on sys.stdout/stderr when combining multiprocessing with threads In-Reply-To: <1475796037.28.0.0216232278478.issue28382@psf.upfronthosting.co.za> Message-ID: <1500812199.94.0.786955239318.issue28382@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Also, a reliable fix is to use the "forkserver" (or "spawn", but it is much slower) method: https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 08:22:53 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 23 Jul 2017 12:22:53 +0000 Subject: [issue26692] cgroups support in multiprocessing In-Reply-To: <1459817171.82.0.158211239936.issue26692@psf.upfronthosting.co.za> Message-ID: <1500812573.17.0.997566748556.issue26692@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Agreed that it is not possible for multiprocessing to choose an optimal default in all settings. However, making the default adequate for more use cases sounds like a reasonable goal. Currently, we are using `os.cpu_count()`. Ideally, we would have a second API `os.usable_cpu_count()` that would return the number of logical CPUs usable by the current process (taking into account affinity settings, cgroups, etc.). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 08:25:55 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 23 Jul 2017 12:25:55 +0000 Subject: [issue30995] Support logging.getLogger(style='{') In-Reply-To: <1500773395.26.0.78055303667.issue30995@psf.upfronthosting.co.za> Message-ID: <1500812755.39.0.59699154.issue30995@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 08:41:13 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 23 Jul 2017 12:41:13 +0000 Subject: [issue30993] IDLE: Document and fix configdialog font tests. In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500813673.65.0.241911506305.issue30993@psf.upfronthosting.co.za> Cheryl Sabella added the comment: +1 on the Font/Indent name. And I agree that the indent widget would make more sense on the General tab, or another name, like Editor/Shell Preferences. Another thought I had was Fonts should maybe be part of a Theme. At the theme level (not at the tag level), define font name/font size and then have font bold at the tag level. Spyder has that, so the function names (IDLE tag of `definition`) are bolded and the rest aren't. It's subtle, but I find it pleasing to work with because function/class/method names stand out. That would be after everything else though. Another thought I had with the cycle in fonts: A wdiget is clicked on, which calls the tkinter command callback. But, the Tk variable is also updated which calls the trace function. Those are the two paths. What if the trace function called set_samples? Then font_bold and font_size widgets wouldn't need the command argument. I think `opt_menu_highlight_target` does that now because the command is commented out. instead of: click bold-toggle ~> set font_bold -> var_changed_font | \---> call set_sample this: click bold_toggle -> set font_bold -> var_changed_font -> set_sample ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 08:50:56 2017 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 23 Jul 2017 12:50:56 +0000 Subject: [issue30997] TestCase.subTest and expectedFailure In-Reply-To: <1500806839.59.0.646969271653.issue30997@psf.upfronthosting.co.za> Message-ID: <1500814256.71.0.852290658332.issue30997@psf.upfronthosting.co.za> Ronald Oussoren added the comment: That's correct, I have a test like: def test_something(self): for info in CASES: with self.subTest(info): self.assert_something(info) For some values of 'info' the test is known to fail and I want to mark those as exptectedFailure somehow and there doesn't appear to be a way to do so right now. I'm currently doing: with self.subTest(info): try: ... # actual test except: if info in KNOWN_FAILURES: self.skipTest() raise That suppresses the test failures, but in an unclean way and without getting a warning when the testcase starts working again. I could generate testcases manually the old fashioned way without using subTest, but that results in more complicated test code and requires rewriting a number of tests. One possible design for making it possible to mark subTests as known failures it to return a value in the subTest context manager that has a method for marking the subTest: with self.subTest(...) as tc: if ...: tc.expectedFailure(...) ... # actual test I don't know how invasive such a change would be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 08:54:41 2017 From: report at bugs.python.org (Mandeep Singh) Date: Sun, 23 Jul 2017 12:54:41 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1500814481.65.0.0148364229124.issue30940@psf.upfronthosting.co.za> Changes by Mandeep Singh : ---------- pull_requests: +2876 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 09:02:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 23 Jul 2017 13:02:34 +0000 Subject: [issue25571] Improve the lltrace feature with the Py_Debug mode In-Reply-To: <1500731910.53.0.269516803464.issue25571@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: I suggest to wait until sys.settrace() supports bytecode level tracing, then rewrite lltrace on top of it, open a new issue to remove C lltrace and close this issue. You need to write to python-dev if you want to remove the current C lltrace. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 09:09:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 23 Jul 2017 13:09:20 +0000 Subject: [issue30994] Asyncore does not need to copy map.items() before polling In-Reply-To: <1500768919.1.0.764948579908.issue30994@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Why it may be ok to avoid the copy, what is the advantage of applying the change? The current code is correct. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 10:48:58 2017 From: report at bugs.python.org (Shoham Peller) Date: Sun, 23 Jul 2017 14:48:58 +0000 Subject: [issue8450] httplib: false BadStatusLine() raised In-Reply-To: <1271630731.08.0.327097174192.issue8450@psf.upfronthosting.co.za> Message-ID: <1500821338.98.0.892758762494.issue8450@psf.upfronthosting.co.za> Changes by Shoham Peller : ---------- pull_requests: +2877 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 11:04:54 2017 From: report at bugs.python.org (Louie Lu) Date: Sun, 23 Jul 2017 15:04:54 +0000 Subject: [issue30997] TestCase.subTest and expectedFailure In-Reply-To: <1500806839.59.0.646969271653.issue30997@psf.upfronthosting.co.za> Message-ID: <1500822294.83.0.927479852285.issue30997@psf.upfronthosting.co.za> Louie Lu added the comment: I'm successful to add a sub.expectedFailure() to subTest, but in current API, it isn't that will done. First, you will not get any alarm or information that there is a test been treat as "expected failure" at the result text. Second, it just act like you putting @unittest.expectedFailure at the top of the test. Third, current result didn't put expected failure as a result category, so it will not show it at the result if we skip some test in the subTest, and it will need to changed to add an expected failure list to handle multiple expected failure in a test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 12:20:10 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 23 Jul 2017 16:20:10 +0000 Subject: [issue30993] IDLE: Document and fix configdialog font tests. In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500826810.11.0.41918726357.issue30993@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 07ba305a4c169e017e076e490a173a6f9b95b38e by Terry Jan Reedy in branch 'master': bpo-30993: IDLE - Improve configdialog font page and tests. (#2818) https://github.com/python/cpython/commit/07ba305a4c169e017e076e490a173a6f9b95b38e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 12:22:29 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 23 Jul 2017 16:22:29 +0000 Subject: [issue30993] IDLE: Document and fix configdialog font tests. In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500826949.39.0.811973432348.issue30993@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2878 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 13:06:29 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 23 Jul 2017 17:06:29 +0000 Subject: [issue30993] IDLE: Document and fix configdialog font tests. In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500829589.42.0.730831994051.issue30993@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A big issue with changing to tagging individual elements is back compatibility. Besides which, if the font is not bold, I cannot imaging bolding anything other than the definition names. This also seems to venture beyond 'keep IDLE simple for beginners'. How about a new option to just bold definition names? Factoring out the call to set_samples to one place is a great idea that simplifies code and tests. I did it and the htest dialog worked just fine. The tests also passed as were, but need reworking. I am doing that now. The result will be one FontTest class that tests that each widget sets its var, tests that var setting adds changes and calls set_samples, and tests set_samples. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 14:18:29 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 23 Jul 2017 18:18:29 +0000 Subject: [issue30993] IDLE: Document and fix configdialog font tests. In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500833909.54.0.996587107059.issue30993@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 5aa3bf041de5ee90ccbfcff103dcf3e54c5af237 by Terry Jan Reedy in branch '3.6': [3.6] bpo-30993: IDLE - Improve configdialog font page and tests. (GH-2818) (#2826) https://github.com/python/cpython/commit/5aa3bf041de5ee90ccbfcff103dcf3e54c5af237 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 15:20:32 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 23 Jul 2017 19:20:32 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1500837632.08.0.547236036797.issue17611@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +2879 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 15:22:39 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 23 Jul 2017 19:22:39 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1500837759.71.0.795002548397.issue17611@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I updated the patch for git master. Some cleanup is in order. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 15:49:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Jul 2017 19:49:42 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1500839382.43.0.924284825937.issue17611@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 16:45:21 2017 From: report at bugs.python.org (Larry Hastings) Date: Sun, 23 Jul 2017 20:45:21 +0000 Subject: [issue30714] test_ssl fails with openssl 1.1.0f In-Reply-To: <1497972401.5.0.807136343886.issue30714@psf.upfronthosting.co.za> Message-ID: <1500842721.49.0.337255465812.issue30714@psf.upfronthosting.co.za> Larry Hastings added the comment: I don't see how a fix for a *test* can be considered a *release blocker*. The PR literally doesn't change Python's behavior; it only modifies two text files and a test. There is no crash or exploitable security hole being addressed here. ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 16:46:09 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 23 Jul 2017 20:46:09 +0000 Subject: [issue30993] IDLE: Document and fix configdialog font tests. In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500842768.99.0.358428099131.issue30993@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2880 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 16:46:33 2017 From: report at bugs.python.org (Larry Hastings) Date: Sun, 23 Jul 2017 20:46:33 +0000 Subject: [issue30714] test_ssl fails with openssl 1.1.0f In-Reply-To: <1497972401.5.0.807136343886.issue30714@psf.upfronthosting.co.za> Message-ID: <1500842793.32.0.00789538843593.issue30714@psf.upfronthosting.co.za> Larry Hastings added the comment: Quoting from the Python Dev Guide: "As a guideline, critical and above are usually reserved for crashes, serious regressions or breakage of very important APIs. Whether a bug is a release blocker is a decision better left to the release manager so, in any doubt, add him or her to the nosy list." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 16:49:02 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 23 Jul 2017 20:49:02 +0000 Subject: [issue30993] IDLE: Document, fix, and complete configdialog font tests In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500842942.65.0.92935390019.issue30993@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 2nd and presumably last PR for this issue: please verify on linux. ---------- stage: needs patch -> patch review title: IDLE: Document and fix configdialog font tests. -> IDLE: Document, fix, and complete configdialog font tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 16:50:52 2017 From: report at bugs.python.org (Florian Bruhin) Date: Sun, 23 Jul 2017 20:50:52 +0000 Subject: [issue30998] faulthandler: Show C stacktrace Message-ID: <1500843052.8.0.470240287459.issue30998@psf.upfronthosting.co.za> New submission from Florian Bruhin: While faulthandler's output is already quite useful when dealing with crashes in C libraries, it'd be much more useful when it could also show a low-level C/C++ stack. glibc has functions to do that: https://www.gnu.org/software/libc/manual/html_node/Backtraces.html Windows seems to have something similar too: https://stackoverflow.com/a/5699483/2085149 ---------- components: Library (Lib) messages: 298914 nosy: The Compiler, haypo priority: normal severity: normal status: open title: faulthandler: Show C stacktrace type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 17:20:26 2017 From: report at bugs.python.org (Ammar Askar) Date: Sun, 23 Jul 2017 21:20:26 +0000 Subject: [issue30998] faulthandler: Show C stacktrace In-Reply-To: <1500843052.8.0.470240287459.issue30998@psf.upfronthosting.co.za> Message-ID: <1500844826.71.0.262646612213.issue30998@psf.upfronthosting.co.za> Ammar Askar added the comment: As the faulthandler documentation notes: > The fault handler is called on catastrophic cases and therefore can only use signal-safe functions (e.g. it cannot allocate memory on the heap). Because of this limitation traceback dumping is minimal compared to normal Python tracebacks: This immediately disqualifies glibc's backtrace function as it is explicitly marked as AS-Unsafe. The Windows code you linked also has a heap allocation, it isn't open source like backtrace but I'd imagine its implementation is fairly complex underneath. Overall, adding more complexity especially to a handler dealing with a catastrophic failure is generally not a very good idea and it's really not a trivial problem to have easy cross platform stack traces. As much as I like this idea I don't think implementing is going to be possible and this is one of the points where you just have to attach a debugger like gdb for good information. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 17:32:32 2017 From: report at bugs.python.org (Florian Bruhin) Date: Sun, 23 Jul 2017 21:32:32 +0000 Subject: [issue30998] faulthandler: Show C stacktrace In-Reply-To: <1500843052.8.0.470240287459.issue30998@psf.upfronthosting.co.za> Message-ID: <1500845552.0.0.238486693084.issue30998@psf.upfronthosting.co.za> Florian Bruhin added the comment: Hmm, fair point. I thought I had seen this being used in a SEGV handler in some other software I use, but I can't find that anymore - so either I was dreaming, or they noticed it was problematic and removed it again. I'm closing this then. My goal was to get more useful crash reports from users (who typically don't want to install/attach gdb and reproduce the bug again, if even possible), but I guess my only remaining option is automatically getting the stacktrace from "coredumpctl" on the next start, at least on Linux systems using systemd... ---------- resolution: -> wont fix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 17:46:54 2017 From: report at bugs.python.org (Ammar Askar) Date: Sun, 23 Jul 2017 21:46:54 +0000 Subject: [issue30998] faulthandler: Show C stacktrace In-Reply-To: <1500843052.8.0.470240287459.issue30998@psf.upfronthosting.co.za> Message-ID: <1500846414.33.0.604457048405.issue30998@psf.upfronthosting.co.za> Ammar Askar added the comment: No need to close it off just yet, what I posted was just my opinion. We can wait for haypo's expert opinion seeing as he implemented faulthandler. Maybe it would be useful to have an option to say always generate a core dump? Something like the stuff listed here: https://stackoverflow.com/questions/979141/how-to-programmatically-cause-a-core-dump-in-c-c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 18:10:22 2017 From: report at bugs.python.org (gerion) Date: Sun, 23 Jul 2017 22:10:22 +0000 Subject: [issue30999] statistics module: add "key" keyword argument to median, mode, ... Message-ID: <1500847822.23.0.66362631161.issue30999@psf.upfronthosting.co.za> New submission from gerion: With Python 3.4 the statistics module was added. It would be cool, if the functions: median_low() median_high() mode() would have a "key" keyword argument, just like in max() and min(): ``` >>> median_low([(1, 2), (3, 3), (4, 1)], key=lambda elem: elem[0]) (3, 3) ``` This functions always choose a specific element of the list, so a "key" argument is meaningful. Maybe such a parameter makes sense for mean() as well, if the return value always is the result itself, but this is another point: ``` >>> mean([(1, 2), (3, 3), (4, 1)], key=lambda elem: elem[0]) 2.6666666666666665 ``` ---------- components: Library (Lib) messages: 298918 nosy: gerion priority: normal severity: normal status: open title: statistics module: add "key" keyword argument to median, mode, ... type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 19:17:58 2017 From: report at bugs.python.org (Larry Hastings) Date: Sun, 23 Jul 2017 23:17:58 +0000 Subject: [issue31000] Test failure in resource module on ZFS Message-ID: <1500851878.05.0.462798019219.issue31000@psf.upfronthosting.co.za> New submission from Larry Hastings: I use Linux (Ubuntu GNOME, 17.04, 64-bit) on all my computers, and I use ZFS for the /home partition. While releasing 3.4.7rc1 and 3.5.4rc1, I encountered this test failure: % ./python -m test test_resource 0:00:00 load avg: 0.40 [1/1] test_resource test test_resource failed -- Traceback (most recent call last): File "/home/larry/src/python/releases/test35/Lib/test/test_resource.py", line 55, in test_fsize_enforced f.write(b"X" * 1024) OSError: [Errno 27] File too large 1 test failed: test_resource Tests result: FAILURE If I run this test on another filesystem (e.g. ext4), with the exact same source tree, the test passes. I also didn't see this failure when releasing 3.4.6 and 3.5.3 earlier this year. This is probably caused by new behavior in an recent update to ZFS. So I'm not sure if this is a ZFS bug, and if it is I don't know whether or not we should work around it. But it's hard to imagine ZFS is behaving correctly here. I've confirmed that this happens in all four branches tagged (3.4 through 3.7). Since it causes test failures, I'm willing to consider accepting a PR for 3.4 and 3.5. Serhiy, I've tagged you since you were the last person to touch resource.getrlimit and resource.setrlimit. Are you interested / willing to look at this bug? Do you have a computer with a ZFS filesystem you can use to run experiments? ---------- assignee: serhiy.storchaka messages: 298919 nosy: larry, ned.deily, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Test failure in resource module on ZFS type: behavior versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 19:56:36 2017 From: report at bugs.python.org (Berker Peksag) Date: Sun, 23 Jul 2017 23:56:36 +0000 Subject: [issue30274] Make importlib.abc.ExtensionFileLoader.__init__() documentation match code In-Reply-To: <1493936689.45.0.0881901800669.issue30274@psf.upfronthosting.co.za> Message-ID: <1500854196.73.0.737104896413.issue30274@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: needs patch -> patch review type: -> enhancement versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 20:31:55 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 24 Jul 2017 00:31:55 +0000 Subject: [issue30993] IDLE: Document, fix, and complete configdialog font tests In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500856315.83.0.382369812862.issue30993@psf.upfronthosting.co.za> Cheryl Sabella added the comment: The tests pass on linux and the htest looks good. Thank you for making all these changes. It seems much clearer now, but I do want to spend more time reading the code to understand it. Looks like you grouped all the font-related functions, so they are ready to become a Class? The only part I couldn't figure out is how to update highlight_sample since it wouldn't be in the class. With the backwards compatibility, I thought maybe you have an idea about how to make the changes compatible because of the issue that moves the extensions. I can see where that would be a problem as far as making changes is concerned. Maybe I'll look at the creating tests for one of the other tabs next? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 20:33:58 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 24 Jul 2017 00:33:58 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1500856438.69.0.556392780949.issue30853@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Would you like this change for fonts and indent before the tests for the other tabs are ready or would you like to have tests for all the tabs first? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 20:34:18 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 24 Jul 2017 00:34:18 +0000 Subject: [issue30454] Python module cx_Oracle ld installation issue on Solaris11U3 SPARC: fatal: file /oracle/database/lib/libclntsh.so: wrong ELF class: ELFCLASS64 error In-Reply-To: <1495623417.41.0.885565788641.issue30454@psf.upfronthosting.co.za> Message-ID: <1500856458.55.0.852750888556.issue30454@psf.upfronthosting.co.za> Berker Peksag added the comment: cx_Oracle is not part of the Python standard library and according to https://community.oracle.com/thread/4048639 the solution is to install it from Solaris' package repository. ---------- nosy: +berker.peksag resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 20:39:10 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 24 Jul 2017 00:39:10 +0000 Subject: [issue30456] 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses In-Reply-To: <1495629480.46.0.852726762555.issue30456@psf.upfronthosting.co.za> Message-ID: <1500856750.98.0.903136752035.issue30456@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 26248ef58dcf49619930ffa2e050ffa687a88601 by Berker Peksag (Eli Boyarski) in branch 'master': bpo-30456: Clarify example for duplicates in second argument of isinstance (GH-1699) https://github.com/python/cpython/commit/26248ef58dcf49619930ffa2e050ffa687a88601 ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 20:39:49 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 24 Jul 2017 00:39:49 +0000 Subject: [issue30456] 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses In-Reply-To: <1495629480.46.0.852726762555.issue30456@psf.upfronthosting.co.za> Message-ID: <1500856789.43.0.190472335206.issue30456@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: -> backport needed type: -> behavior versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 20:43:59 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 24 Jul 2017 00:43:59 +0000 Subject: [issue30999] statistics module: add "key" keyword argument to median, mode, ... In-Reply-To: <1500847822.23.0.66362631161.issue30999@psf.upfronthosting.co.za> Message-ID: <1500857039.5.0.941078720751.issue30999@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Apart from being "cool", what is the purpose of this key argument? For the example shown, where you extract an item from tuple data: >>> median_low([(1, 2), (3, 3), (4, 1)], key=lambda elem: elem[0]) (3, 3) I'm not sure I understand when you would use this, and why you would describe (3,3) as a median (a kind of average) of the given data. By the way, although it's not (yet?) officially supported, it turns out that this works: py> median_low([(1, 2), (3, 3), (4, 1)]) (3, 3) Officially, median requires numeric data. If the median* functions were to support tuples, I would be inclined to return a new tuple with the median of each column, as such: median_low([(1, 2), (3, 3), (4, 1)]) (3, 2) # median of 1,3,4 and median of 2,3,1 I can think of uses for that, e.g. calculating the "Q" correlation coefficient. What uses do you have for your suggested key argument? ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 20:44:17 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 24 Jul 2017 00:44:17 +0000 Subject: [issue30442] Skip test_xml_etree under coverage In-Reply-To: <1495562562.53.0.327833904863.issue30442@psf.upfronthosting.co.za> Message-ID: <1500857057.01.0.545364948466.issue30442@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- components: +Tests stage: -> backport needed versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 21:00:19 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 24 Jul 2017 01:00:19 +0000 Subject: [issue30451] parse windows path error in webbrowser.get() and lead to webbrowser.Error: could not locate runnable browser In-Reply-To: <1495605118.23.0.51946743768.issue30451@psf.upfronthosting.co.za> Message-ID: <1500858019.94.0.459497474084.issue30451@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> webbrowser.get(command_line) does not support Windows-style path separators type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 21:46:03 2017 From: report at bugs.python.org (gerion) Date: Mon, 24 Jul 2017 01:46:03 +0000 Subject: [issue30999] statistics module: add "key" keyword argument to median, mode, ... In-Reply-To: <1500847822.23.0.66362631161.issue30999@psf.upfronthosting.co.za> Message-ID: <1500860763.43.0.847214535342.issue30999@psf.upfronthosting.co.za> gerion added the comment: My use case is some side data somehow connected to the statistical relevant data. (I think, this is more less a similar use case as with the min and max function.) A few examples: The datastructure is a list of tuples: (score, [list of people that have this score]) ``` median = median_low([(1, ['Anna']), (3, ['Paul', 'Henry']), (4, ['Kate'])], key=lambda elem: elem[0]) for name in median[1]: print(f"{name} is one of the people that reach the median score.") ``` or you can enumerate: ``` data = [1, 3, 4] median = median_low(enumerate(data), key=lambda elem: elem[1]) print(f"median is at position {median[0]}") ``` With the keyword argument, the input can also be a list of self defined objects, where the median make sense on some member variable or function, etc.: ``` >>> median_low(list_of_self_defined_objects, key=lambda elem: elem.get_score()) ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 22:18:38 2017 From: report at bugs.python.org (Socob) Date: Mon, 24 Jul 2017 02:18:38 +0000 Subject: [issue30717] str.center() is not unicode aware In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1500862718.95.0.511111256338.issue30717@psf.upfronthosting.co.za> Changes by Socob <206a8535 at opayq.com>: ---------- nosy: +Socob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 22:20:01 2017 From: report at bugs.python.org (Socob) Date: Mon, 24 Jul 2017 02:20:01 +0000 Subject: [issue18406] unicodedata.itergraphemes / str.itergraphemes / str.graphemes In-Reply-To: <1373307945.33.0.806287270916.issue18406@psf.upfronthosting.co.za> Message-ID: <1500862801.81.0.804924220053.issue18406@psf.upfronthosting.co.za> Changes by Socob <206a8535 at opayq.com>: ---------- nosy: +Socob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 22:20:12 2017 From: report at bugs.python.org (Socob) Date: Mon, 24 Jul 2017 02:20:12 +0000 Subject: [issue12733] Request for grapheme support in Python re lib In-Reply-To: <1313092793.79.0.645060327577.issue12733@psf.upfronthosting.co.za> Message-ID: <1500862812.2.0.676220469687.issue12733@psf.upfronthosting.co.za> Changes by Socob <206a8535 at opayq.com>: ---------- nosy: +Socob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 22:20:19 2017 From: report at bugs.python.org (Socob) Date: Mon, 24 Jul 2017 02:20:19 +0000 Subject: [issue12734] Request for property support in Python re lib In-Reply-To: <1313093654.08.0.307115391635.issue12734@psf.upfronthosting.co.za> Message-ID: <1500862819.68.0.160390654949.issue12734@psf.upfronthosting.co.za> Changes by Socob <206a8535 at opayq.com>: ---------- nosy: +Socob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 22:20:52 2017 From: report at bugs.python.org (Socob) Date: Mon, 24 Jul 2017 02:20:52 +0000 Subject: [issue2636] Adding a new regex module (compatible with re) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1500862852.71.0.696608865381.issue2636@psf.upfronthosting.co.za> Changes by Socob <206a8535 at opayq.com>: ---------- nosy: +Socob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 22:21:19 2017 From: report at bugs.python.org (Socob) Date: Mon, 24 Jul 2017 02:21:19 +0000 Subject: [issue12568] Add functions to get the width in columns of a character In-Reply-To: <1310683436.9.0.375403702242.issue12568@psf.upfronthosting.co.za> Message-ID: <1500862879.76.0.205157304963.issue12568@psf.upfronthosting.co.za> Changes by Socob <206a8535 at opayq.com>: ---------- nosy: +Socob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 00:18:28 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 04:18:28 +0000 Subject: [issue30993] IDLE: Document, fix, and complete configdialog font tests In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500869908.86.0.409300328329.issue30993@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 77e97ca9ff6f3dbbf98b89b4103c46b43eef5642 by Terry Jan Reedy in branch 'master': bpo-30993: IDLE - Improve configdialog font page and tests. (#2831) https://github.com/python/cpython/commit/77e97ca9ff6f3dbbf98b89b4103c46b43eef5642 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 00:21:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Jul 2017 04:21:00 +0000 Subject: [issue18406] unicodedata.itergraphemes / str.itergraphemes / str.graphemes In-Reply-To: <1373307945.33.0.806287270916.issue18406@psf.upfronthosting.co.za> Message-ID: <1500870060.25.0.332899438769.issue18406@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka versions: +Python 3.7 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 00:24:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Jul 2017 04:24:11 +0000 Subject: [issue30442] Skip test_xml_etree under coverage In-Reply-To: <1495562562.53.0.327833904863.issue30442@psf.upfronthosting.co.za> Message-ID: <1500870251.41.0.626622272944.issue30442@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 00:33:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 04:33:56 +0000 Subject: [issue30993] IDLE: Document, fix, and complete configdialog font tests In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500870836.26.0.748258966258.issue30993@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2881 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 00:34:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Jul 2017 04:34:51 +0000 Subject: [issue31000] Test failure in resource module on ZFS In-Reply-To: <1500851878.05.0.462798019219.issue31000@psf.upfronthosting.co.za> Message-ID: <1500870891.13.0.367590833323.issue31000@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I use 32-bit Linux and when tried to install the ZFS DKMS driver got a warning that ZFS is unstable on 32-bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 00:38:07 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 04:38:07 +0000 Subject: [issue30993] IDLE: Document, fix, and complete configdialog font tests In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500871087.93.0.854987801915.issue30993@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ned, in a comment on PR2826, Louie reported "The patch unittest work on Linux, but on MacOS, I get test.support.ResourceDeined: cannot run without OS X gui process, it is wierd, I'm inside the GUI mode. Also, I'm not sure if this only on MacOS (is font problem or what), when checking bold box, some font won't render to bold (I've check that this may not relative to patch, in older commit have this problem, too)." Have you run gui tests, and in particular, IDLE tests on OSX lately? Is the OSX code in test.support for GUI required still working? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 01:11:40 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Jul 2017 05:11:40 +0000 Subject: [issue30993] IDLE: Document, fix, and complete configdialog font tests In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500873100.29.0.359083352938.issue30993@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 02:46:55 2017 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 24 Jul 2017 06:46:55 +0000 Subject: [issue30999] statistics module: add "key" keyword argument to median, mode, ... In-Reply-To: <1500847822.23.0.66362631161.issue30999@psf.upfronthosting.co.za> Message-ID: <1500878815.17.0.0274104607064.issue30999@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 02:50:07 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 06:50:07 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1500879007.01.0.706704745912.issue30853@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Step 1 is to add the class and then add tests. The tests can use artificial examples. Say 3 vars, 2 callbacks, with the 3rd done as default. I want to start this now -- see below. Let me know if you start working on this so we don't duplicate work. I just determined that calling trace_add with the same var,c pair is a bad idea. import tkinter as tk r = tk.Tk() v = tk.StringVar(r) def c(*args): print("hello", args) print(v.trace_add('write', c)) print(v.trace_add('write', c)) v.set('a') 2545142942664c 2545153771784c hello ('PY_VAR0', '', 'write') hello ('PY_VAR0', '', 'write') The class needs two lists: untraced and traced. Attach should pop from untraced and append to traced. The reverse for detach (remove renamed). One of the test tracers should increment an int var, so we can test that after calling attach twice, there is one one increment. I will take care of looking at the doc or code to refresh my memory of why the detach is written the way it is. Step 2, putting this in use, is a prerequisite for writing proper tests for extracted tab page classes, which are a prerequisite for putting the class in use. So I am inclined to convert font vars when a tested class is ready and temporarily have old and new attach functions called. We may discover a need or at least a use for other VarTrace methods when writing tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 02:50:31 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 06:50:31 +0000 Subject: [issue30993] IDLE: Document, fix, and complete configdialog font tests In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500879031.26.0.392873319468.issue30993@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 1daeb259799d0664c9453a3bd8e80411e65b52c9 by Terry Jan Reedy in branch '3.6': [3.6] bpo-30993: IDLE - Improve configdialog font page and tests. (GH-2831) (#2834) https://github.com/python/cpython/commit/1daeb259799d0664c9453a3bd8e80411e65b52c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 02:51:31 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 06:51:31 +0000 Subject: [issue30993] IDLE: Document, fix, and complete configdialog font tests In-Reply-To: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> Message-ID: <1500879091.74.0.716927560324.issue30993@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 03:22:14 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 07:22:14 +0000 Subject: [issue31001] IDLE: Add tests for configdialog highlight tab Message-ID: <1500880934.92.0.27853522448.issue31001@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: terry.reedy components: IDLE nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Add tests for configdialog highlight tab type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 03:25:08 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 07:25:08 +0000 Subject: [issue31002] IDLE: Add tests for configdialog keys tab Message-ID: <1500881108.16.0.612715894746.issue31002@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: terry.reedy components: IDLE nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Add tests for configdialog keys tab type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 03:27:37 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 07:27:37 +0000 Subject: [issue31003] IDLE: Add tests for help sources on configdialog general tab Message-ID: <1500881257.72.0.111266502472.issue31003@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: terry.reedy components: IDLE nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Add tests for help sources on configdialog general tab type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 03:28:12 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Jul 2017 07:28:12 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1500881292.39.0.284485129241.issue29572@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +2882 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 03:31:04 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Jul 2017 07:31:04 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1500881464.34.0.83638661207.issue29572@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +2883 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 03:47:35 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Jul 2017 07:47:35 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1500882455.19.0.598640359536.issue29572@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 002f778ecab98f4725a08f35d68f78559a13e47a by Ned Deily in branch '3.5': bpo-29572: Update macOS installer build to OpenSSL 1.0.2k (#457) (#2835) https://github.com/python/cpython/commit/002f778ecab98f4725a08f35d68f78559a13e47a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 04:02:33 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Jul 2017 08:02:33 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1500883353.25.0.261152922017.issue29572@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 8d41de62b9e21090c3a1ccb951ba7034a2b74180 by Ned Deily in branch '2.7': bpo-29572: Update macOS installer build to OpenSSL 1.0.2k (#457) (#2836) https://github.com/python/cpython/commit/8d41de62b9e21090c3a1ccb951ba7034a2b74180 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 04:03:45 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 08:03:45 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog Message-ID: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> New submission from Terry J. Reedy: I want to follow the safe way to refactor (from a blog post), rather than the hacker way of refactoring 'in place'. Step 0: Test code to be refactored. Finished in 30993. Step 1: Copy code to be refactored and modify as needed to isolate it from the working original. For configdialog, add 'class FontPage' below ConfigDialog and copy font/tab methods, now collected together, below that. For the test, copy class FontTest as FontPageTest and IndentTest as IndentOptionTest. The copies should pass as they will still be testing the original code. Commit. Step 2: Modify code as desired. Modify test copy to test code copy. For FontPage, this will require new tracer manager (#30853) to attach (activate) callbacks so tests will pass. Commit. Step 3: Switch from using original code to using modified code. For this issue, calling FontPage instead of create_page_font_tab may be enough. Skip original test; modify new test as needed to pass. Commit. Step 4: Once we are sure that we do not need the original code that has been replaced, delete it. Rerun tests. Commit. The separate commits will make review easier. Create or update PRs as desired. ---------- assignee: terry.reedy components: IDLE messages: 298933 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE, configdialog: Factor out FontTab class from ConfigDialog type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 04:04:34 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Jul 2017 08:04:34 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1500883474.51.0.209508762258.issue29572@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 04:05:37 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 08:05:37 +0000 Subject: [issue30780] IDLE: configdialog - add tests for ConfigDialog GUI. In-Reply-To: <1498516711.25.0.892352273971.issue30780@psf.upfronthosting.co.za> Message-ID: <1500883537.87.0.00402146192247.issue30780@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- dependencies: +IDLE: Add tests for configdialog highlight tab, IDLE: Add tests for configdialog keys tab, IDLE: Add tests for help sources on configdialog general tab _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 04:09:05 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 24 Jul 2017 08:09:05 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1500883745.86.0.991732879843.issue17611@psf.upfronthosting.co.za> Antoine Pitrou added the comment: So, the approach of duplicating finally blocks tends to lead to a non-trivial bytecode increase. There is even a potential combinatorial explosion with nested "try..finally" block: def f(): try: ... finally: try: ... finally: # etc. Such a chain of N nested "finally"s will emit O(2**N) opcodes. I'm not sure it's a pratical concern but I find it is detrimental to the readibility of bytecode (which is a nice thing to have when doing low-level debugging or tweaking). I think we can massage the PR to remove the "finally" block duplication while keeping the predictable stack effect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 04:25:51 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 24 Jul 2017 08:25:51 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1500884751.71.0.69853214173.issue17611@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For example we could generate the following bytecode: SETUP_FINALLY L1 // ... stmt1 POP_BLOCK JUMP_FINALLY L1 L1: // ... stmt2 RERAISE JUMP_FORWARD L2 L2: JUMP_FINALLY would push 3 Nones on the stack. RERAISE would raise only if non-None values are popped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:02:21 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Jul 2017 09:02:21 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds In-Reply-To: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> Message-ID: <1500886941.14.0.0464558830779.issue30939@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:05:19 2017 From: report at bugs.python.org (=?utf-8?q?Vojt=C4=9Bch_Fried?=) Date: Mon, 24 Jul 2017 09:05:19 +0000 Subject: [issue31005] caught and stored exception creates a reference cycle outside its traceback Message-ID: <1500887119.8.0.911984158836.issue31005@psf.upfronthosting.co.za> New submission from Vojt?ch Fried: I have this test case: import gc import sys import traceback def hold_world(): try: raise Exception("test1") except Exception as exc: print("exc caught in frame: ", exc.__traceback__.tb_frame) assert not exc.__traceback__.tb_next #exc.__traceback__ = None #ok tmp = exc traceback.clear_frames(exc.__traceback__) #not enough def use_obj( o ): hold_world() #o = None #needed to get rid of the reference in the frame def main(): o = ["survivor"] print(gc.get_referrers(o)) print(sys.getrefcount(o)) #2 use_obj( o ) print(gc.get_referrers(o)) print(sys.getrefcount(o)) #3 #o = None #needed to get rid of the reference in the frame if __name__ == '__main__': main() The outpus is: [] 2 exc caught in frame: [, ] 3 When either uncommenting the line "exc.__traceback__ = None" or uncommenting "o = None" lines, the output is like [] 2 exc caught in frame: [] 2 It seems that "hold_world" function somehow manages to (indirectly) add a reference to "o" object. So "o" is not cleared at "main" end, but rather garbage collected. Even though there is a reference cycle tmp -> traceback -> frame -> tmp, the frames outside "hold_world" should not be affected, but it looks like they are. ---------- components: Interpreter Core messages: 298936 nosy: vojtechfried priority: normal severity: normal status: open title: caught and stored exception creates a reference cycle outside its traceback type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:07:47 2017 From: report at bugs.python.org (Antony Lee) Date: Mon, 24 Jul 2017 09:07:47 +0000 Subject: [issue31006] typing.NamedTuple should add annotations to its constructor (__new__) parameters. Message-ID: <1500887267.27.0.393959457135.issue31006@psf.upfronthosting.co.za> New submission from Antony Lee: Currently, the fields, types and defaults used to define a typing.NamedTuple need to be retrieved from three different attributes: `_fields`, `_field_types`, and `_field_defaults` (the first two are combined in `__annotations__`, but that still misses the defaults). However, there is a place where all this information can be naturally combined: in the Signature of the constructor (as returned by `inspect.signature(cls)`). Currently, the Parameter objects in the signature have the information about the parameter names and defaults, but their annotation is not set. Thus, I would like to propose setting the annotation of the Parameters in the Signature object as well. ---------- components: Library (Lib) messages: 298937 nosy: Antony.Lee priority: normal severity: normal status: open title: typing.NamedTuple should add annotations to its constructor (__new__) parameters. versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:09:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:09:04 +0000 Subject: [issue31007] ERROR: test_pipe_handle (test.test_asyncio.test_windows_utils.PipeTests) expected ERROR_INVALID_HANDLE on x86 Windows7 3.x Message-ID: <1500887344.87.0.0437843877994.issue31007@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/905/steps/test/logs/stdio ... test_wait_for_handle (test.test_asyncio.test_windows_events.ProactorTests) ... ok test_wait_for_handle_cancel (test.test_asyncio.test_windows_events.ProactorTests) ... ok test_pipe_handle (test.test_asyncio.test_windows_utils.PipeTests) ... ERROR test_pipe_overlapped (test.test_asyncio.test_windows_utils.PipeTests) ... ok test_popen (test.test_asyncio.test_windows_utils.PopenTests) ... ok ... ====================================================================== ERROR: test_pipe_handle (test.test_asyncio.test_windows_utils.PipeTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_asyncio\test_windows_utils.py", line 128, in test_pipe_handle raise RuntimeError('expected ERROR_INVALID_HANDLE') RuntimeError: expected ERROR_INVALID_HANDLE ---------- components: Tests, Windows, asyncio keywords: buildbot messages: 298938 nosy: haypo, paul.moore, steve.dower, tim.golden, yselivanov, zach.ware priority: normal severity: normal status: open title: ERROR: test_pipe_handle (test.test_asyncio.test_windows_utils.PipeTests) expected ERROR_INVALID_HANDLE on x86 Windows7 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:11:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:11:45 +0000 Subject: [issue31008] FAIL: test_wait_for_handle (test.test_asyncio.test_windows_events.ProactorTests) on x86 Windows7 3.x Message-ID: <1500887505.08.0.647481409973.issue31008@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/905/steps/test/logs/stdio ... test_double_bind (test.test_asyncio.test_windows_events.ProactorTests) ... ok test_pipe (test.test_asyncio.test_windows_events.ProactorTests) ... ok test_wait_for_handle (test.test_asyncio.test_windows_events.ProactorTests) ... FAIL test_wait_for_handle_cancel (test.test_asyncio.test_windows_events.ProactorTests) ... ok test_pipe_handle (test.test_asyncio.test_windows_utils.PipeTests) ... ok ... ====================================================================== FAIL: test_wait_for_handle (test.test_asyncio.test_windows_events.ProactorTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_asyncio\test_windows_events.py", line 121, in test_wait_for_handle self.assertTrue(0.48 < elapsed < 0.9, elapsed) AssertionError: False is not true : 0.4599999999627471 ---------- components: Tests, Windows, asyncio keywords: buildbot messages: 298939 nosy: haypo, paul.moore, steve.dower, tim.golden, yselivanov, zach.ware priority: normal severity: normal status: open title: FAIL: test_wait_for_handle (test.test_asyncio.test_windows_events.ProactorTests) on x86 Windows7 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:12:36 2017 From: report at bugs.python.org (signal1587) Date: Mon, 24 Jul 2017 09:12:36 +0000 Subject: [issue30867] Add macro `HAVE_OPENSSL_VERIFY_PARAM` to avoid invalid function declaration In-Reply-To: <1499341032.83.0.909280464114.issue30867@psf.upfronthosting.co.za> Message-ID: <1500887556.92.0.767100454611.issue30867@psf.upfronthosting.co.za> Changes by signal1587 : ---------- title: Add necessary macro that insure `HAVE_OPENSSL_VERIFY_PARAM` to avoid invalid function declaration -> Add macro `HAVE_OPENSSL_VERIFY_PARAM` to avoid invalid function declaration _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:15:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:15:12 +0000 Subject: [issue31009] test_multiprocessing_spawn hangs randomly on AMD64 Windows10 3.x Message-ID: <1500887712.38.0.66903662356.issue31009@psf.upfronthosting.co.za> New submission from STINNER Victor: Same question as usual: why regrtest doesn't display the "running: test_multiprocessing_spawn (319 sec)" update every 30 seconds? Is regrtest main process also stuck? http://buildbot.python.org/all/builders/AMD64%20Windows10%203.x/builds/973/steps/test/logs/stdio ... Run tests in parallel using 2 child processes ... 0:47:28 [403/406] test_buffer passed (119 sec) -- running: test_multiprocessing_spawn (319 sec) 0:47:30 [404/406] test_turtle passed -- running: test_multiprocessing_spawn (321 sec) 0:47:32 [405/406] test_dynamic passed -- running: test_multiprocessing_spawn (323 sec) command timed out: 1200 seconds without output running ['Tools\\buildbot\\test.bat', '-x64', '-j2', '--timeout', '900'], attempting to kill program finished with exit code 1 elapsedTime=4059.302000 ---------- components: Tests keywords: buildbot messages: 298940 nosy: davin, haypo, pitrou priority: normal severity: normal status: open title: test_multiprocessing_spawn hangs randomly on AMD64 Windows10 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:17:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:17:14 +0000 Subject: [issue31009] test_multiprocessing_spawn hangs randomly on AMD64 Windows10 3.x and AMD64 Windows8 3.x In-Reply-To: <1500887712.38.0.66903662356.issue31009@psf.upfronthosting.co.za> Message-ID: <1500887834.48.0.104903044395.issue31009@psf.upfronthosting.co.za> STINNER Victor added the comment: Same bug on AMD64 Windows8 3.x buildbot: http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/943/steps/test/logs/stdio Run tests in parallel using 2 child processes ... 1:03:06 [402/406] test_getargs2 passed -- running: test_multiprocessing_spawn (1203 sec) 1:03:09 [403/406] test_threadedtempfile passed -- running: test_multiprocessing_spawn (1205 sec) 1:03:11 [404/406] test_slice passed -- running: test_multiprocessing_spawn (1208 sec) 1:03:19 [405/406] test_tracemalloc passed -- running: test_multiprocessing_spawn (1215 sec) command timed out: 1200 seconds without output running ['Tools\\buildbot\\test.bat', '-x64', '-j2', '--timeout', '900'], attempting to kill program finished with exit code 1 elapsedTime=5005.881000 ---------- title: test_multiprocessing_spawn hangs randomly on AMD64 Windows10 3.x -> test_multiprocessing_spawn hangs randomly on AMD64 Windows10 3.x and AMD64 Windows8 3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:21:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:21:13 +0000 Subject: [issue31010] test_socketserver.test_ForkingTCPServer(): threading_cleanup() and reap_children() warnings on AMD64 FreeBSD 10.x Shared 3.x Message-ID: <1500888073.5.0.311417517305.issue31010@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/607/steps/test/logs/stdio test_ForkingTCPServer (test.test_socketserver.SocketServerTest) ... creating server ADDR = ('127.0.0.1', 42116) CLASS = server running test client 0 test client 1 test client 2 waiting for server done Warning -- threading_cleanup() failed to cleanup -1 threads after 4 sec (count: 0, dangling: 1) Warning -- reap_children() reaped child process 83130 ok ... 1 test altered the execution environment: test_socketserver ... Total duration: 11 min 56 sec Tests result: ENV CHANGED *** Error code 3 ---------- components: Tests keywords: buildbot messages: 298942 nosy: haypo priority: normal severity: normal status: open title: test_socketserver.test_ForkingTCPServer(): threading_cleanup() and reap_children() warnings on AMD64 FreeBSD 10.x Shared 3.x type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:21:42 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 24 Jul 2017 09:21:42 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1500888102.08.0.65427627354.issue17611@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, I've pushed an update with removes the finally block duplication. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:22:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:22:21 +0000 Subject: [issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols() In-Reply-To: <1497972401.5.0.807136343886.issue30714@psf.upfronthosting.co.za> Message-ID: <1500888141.86.0.592610364082.issue30714@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_ssl fails with openssl 1.1.0f -> test_ssl fails with openssl 1.1.0f: test_alpn_protocols() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:22:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:22:50 +0000 Subject: [issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols() In-Reply-To: <1497972401.5.0.807136343886.issue30714@psf.upfronthosting.co.za> Message-ID: <1500888170.68.0.839471888796.issue30714@psf.upfronthosting.co.za> STINNER Victor added the comment: Test still fails. Failure on AMD64 Debian PGO 2.7: http://buildbot.python.org/all/builders/AMD64%20Debian%20PGO%202.7/builds/243/steps/test/logs/stdio ====================================================================== FAIL: test_alpn_protocols (test.test_ssl.ThreadedTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildbot/slaves/enable-optimizations-bot/2.7.gps-debian-profile-opt.nondebug/build/Lib/test/test_ssl.py", line 2971, in test_alpn_protocols self.assertIsInstance(stats, ssl.SSLError) AssertionError: {'compression': None, 'client_npn_protocol': None, 'cipher': ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256), 'peercert': {}, 'server_npn_protocols': [None], 'client_alpn_protocol': None, 'version': u'TLSv1.2', 'server_alpn_protocols': [None]} is not an instance of ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:25:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:25:03 +0000 Subject: [issue30850] [2.7] bsddb3: test01_basic_replication() of test_bsddb3 fails randomly on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1499181607.72.0.534776800166.issue30850@psf.upfronthosting.co.za> Message-ID: <1500888303.53.0.6625287624.issue30850@psf.upfronthosting.co.za> STINNER Victor added the comment: x86 Windows XP 2.7: http://buildbot.python.org/all/builders/x86%20Windows%20XP%202.7/builds/240/steps/test/logs/stdio ====================================================================== FAIL: test04_lock_timeout2 (bsddb.test.test_lock.LockingTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\bsddb\test\test_lock.py", line 132, in test04_lock_timeout2 self.assertGreaterEqual(end_time-start_time, 0.0999) AssertionError: 0.05800008773803711 not greater than or equal to 0.0999 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:36:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:36:22 +0000 Subject: [issue30850] [2.7] bsddb3: test01_basic_replication() of test_bsddb3 fails randomly on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1499181607.72.0.534776800166.issue30850@psf.upfronthosting.co.za> Message-ID: <1500888982.31.0.158223982169.issue30850@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2884 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:37:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:37:20 +0000 Subject: [issue30850] [2.7] bsddb3: test01_basic_replication() of test_bsddb3 fails randomly on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1499181607.72.0.534776800166.issue30850@psf.upfronthosting.co.za> Message-ID: <1500889040.57.0.79745193597.issue30850@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote https://github.com/python/cpython/pull/2840 to tolerate only 50 ms on Windows, whereas 100 ms are expected (the test expects 99 ms or greater). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:49:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:49:22 +0000 Subject: [issue30998] faulthandler: Show C stacktrace In-Reply-To: <1500843052.8.0.470240287459.issue30998@psf.upfronthosting.co.za> Message-ID: <1500889762.51.0.967613711126.issue30998@psf.upfronthosting.co.za> STINNER Victor added the comment: > While faulthandler's output is already quite useful when dealing with crashes in C libraries, it'd be much more useful when it could also show a low-level C/C++ stack. It's a deliberate choice to not read the "C" backtrace: it requires complex non-portable libraries. faulthandler has a "simple" design, but the implementation is non trivial especially because it is designed to be async-signal-safe (no malloc, no printf, no lock, etc.). faulthandler design is to read global Python internal structures and dumps them on stderr. The code is as portable as Python is: faulthandler works on all platforms! There are only tiny limitations on Windows on faulthandler.register(), but IMHO the main usage of faulthandler is to dump Python tracebacks on a crash and that works on Windows as well. By the way, I recently added support to Windows exceptions, so it uses better Windows native APIs. You *can* write a Python module which depends on a specific library and only works on a limited set of platforms. But such module belongs to PyPI, I consider that it shouldn't be part of the Python stdlib. Usually, Python avoids dependencies whenever possible. Again, to get the maximum portability. > As much as I like this idea I don't think implementing is going to be possible and this is one of the points where you just have to attach a debugger like gdb for good information. While it's "nice" to have a "C" traceback, I also prefer to get a debugger like gdb to inspect more data: variables, registers, threads, etc. > Maybe it would be useful to have an option to say always generate a core dump? Something like the stuff listed here: https://stackoverflow.com/questions/979141/how-to-programmatically-cause-a-core-dump-in-c-c 10 years ago, it was common to dump cores in the current directory. Nowadays, operating systems provide a program which collects core dumps, send them to a server to get a reliable stacktrace, automatically open a bug report, etc. Getting a core dump requires to configure your operating system. I'm not a big fan of coredump. Coredumps are not portable at all. Don't try to open a Ubuntu coredump on Fedora. I wouldn't even try to open a Fedora 25 coredump on Fedora 26. On Linux, changing how where and how coredumps are written requires to be a root user. You may want to support coredumpctl, etc. Again, it's a complex task and it's hard to get a portable behaviour. If someone is interested to get this feature, please create a small project on PyPI. Come back later when you get enough user feedback and supports enough platforms to consider that it can be added to Python stdlib. ---------- resolution: wont fix -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:50:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:50:06 +0000 Subject: [issue30758] test_pydoc hangs sometimes on 3.6 and master branches on ARMv7 Ubuntu 3.x In-Reply-To: <1498469994.85.0.367724213837.issue30758@psf.upfronthosting.co.za> Message-ID: <1500889806.32.0.0449663208753.issue30758@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_pydoc hangs sometimes on 3.6 and master branches -> test_pydoc hangs sometimes on 3.6 and master branches on ARMv7 Ubuntu 3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:51:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:51:41 +0000 Subject: [issue30758] test_pydoc hangs sometimes on 3.6 and master branches on ARMv7 Ubuntu 3.x In-Reply-To: <1498469994.85.0.367724213837.issue30758@psf.upfronthosting.co.za> Message-ID: <1500889901.34.0.407896667863.issue30758@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like test_pydoc only hangs on ARMv7 Ubuntu 3.x. Why faulthandler doesn't dump a traceback? :-( faulthandler is supposed to dump a traceback after 900 seconds. Here, regrtest was killed after 1200 seconds and test_pydoc was already running for 423 seconds. http://buildbot.python.org/all/builders/ARMv7%20Ubuntu%203.x/builds/1094/steps/test/logs/stdio ./python ./Tools/scripts/run_tests.py -j 1 -u all -W --slowest --fail-env-changed --timeout=900 -j2 -j8 ... 0:10:28 load avg: 6.21 [403/406] test_venv passed (34 sec) -- running: test_pydoc (400 sec), test_pickle (47 sec), test_tools (338 sec) 0:10:32 load avg: 5.95 [404/406] test_pickle passed (51 sec) -- running: test_pydoc (405 sec), test_tools (343 sec) 0:10:51 load avg: 4.83 [405/406] test_tools passed (361 sec) -- running: test_pydoc (423 sec) command timed out: 1200 seconds without output running ['make', 'buildbottest', 'TESTOPTS=-j2 -j8', 'TESTPYTHONOPTS=', 'TESTTIMEOUT=900'], attempting to kill process killed by signal 9 program finished with exit code -1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:59:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Jul 2017 09:59:41 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1500890381.89.0.588048717297.issue17611@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Great! I tried to update the patch myself, but there were too much conflicts. Thank you very much Antoine for taking this! Seems there are bugs in frame_setlineno() related to code duplications. And deduplicating the 'finally' blocks doesn't solve all of them. See comments on GitHub. I don't like the new END_ITER instruction. This complicates (and slows down) the evaluation loop and the peepholer. This also adds a limitation on the peepholer (END_ITER can't be optimized out). We can use other way for determaining the end of the 'for' block. The argument of the FOR_ITER instruction points to the end of the 'for' block. Just scan all addresses from 0 to max_addr and count all FOR_ITER instructions and their targets in the range between min_addr and max_addr. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 06:06:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 10:06:42 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1500890802.69.0.213990554005.issue17611@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 06:22:07 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Jul 2017 10:22:07 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1500891727.51.0.152716820389.issue30876@psf.upfronthosting.co.za> Ned Deily added the comment: When running tests from installed location, test_import now fails on master, 3.6, and 3.5 (including v3.5.4rc1) with: ====================================================================== ERROR: test_import_from_unloaded_package (test.test_import.RelativeImportTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/nad/Projects/PyDev/active/dev/3x/root/uxd/lib/python3.7/test/test_import/__init__.py", line 704, in test_import_from_unloaded_package import package2.submodule1 ModuleNotFoundError: No module named 'package2' ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 06:25:07 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Jul 2017 10:25:07 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1500891907.41.0.0709917715154.issue30814@psf.upfronthosting.co.za> Ned Deily added the comment: When running tests from installed location, test_import now fails on master and 3.6 with: ====================================================================== ERROR: test_concurrency (test.test_import.ImportTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/nad/Projects/PyDev/active/dev/3x/root/uxd/lib/python3.7/test/test_import/__init__.py", line 408, in test_concurrency raise exc File "/Users/nad/Projects/PyDev/active/dev/3x/root/uxd/lib/python3.7/test/test_import/__init__.py", line 393, in run import package ModuleNotFoundError: No module named 'package' ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 06:31:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 10:31:26 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500892286.44.0.522755386774.issue26762@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2885 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 06:43:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 10:43:31 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500893011.13.0.321287040227.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not sure that the issue is really fixed. I applied my msg263461 patch and I still see the list of "python" processes growing but then also a little bit decreasing, and some zombi processes. The problem is that it's hard to guess if a growing "ps" list is a bug or not, since we only cleanup things in tearDownClass(), not in tearDown(). So it's ok to keep some child processes between two unit tests. I wrote a first change to help debugging the issue. My change adds more warnings and calls support.reap_children(): https://github.com/python/cpython/pull/2841 With this PR, the following test fails: --- haypo at selma$ ./python -u -m test -v --fail-env-changed --match=test.test_multiprocessing_spawn.WithThreadsTestPool.test_release_task_refs --match=test.test_multiprocessing_spawn.WithProcessesTestLogging.test_level test_multiprocessing_spawn == CPython 3.7.0a0 (heads/master:b364d9f, Jul 24 2017, 11:06:33) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] == Linux-4.11.9-200.fc25.x86_64-x86_64-with-fedora-25-Twenty_Five little-endian == hash algorithm: siphash24 64bit == cwd: /home/haypo/prog/python/master/build/test_python_24433 == CPU count: 4 == encodings: locale=UTF-8, FS=utf-8 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) Run tests sequentially 0:00:00 load avg: 0.27 [1/1] test_multiprocessing_spawn test_level (test.test_multiprocessing_spawn.WithProcessesTestLogging) ... ok Warning -- reap_children() reaped child process 24437 test_release_task_refs (test.test_multiprocessing_spawn.WithThreadsTestPool) ... ok Warning -- reap_children() reaped child process 24438 Dangling processes: {, } ---------------------------------------------------------------------- Ran 2 tests in 1.369s OK Warning -- multiprocessing.process._dangling was modified by test_multiprocessing_spawn Before: <_weakrefset.WeakSet object at 0x7fdc24f70058> After: <_weakrefset.WeakSet object at 0x7fdc2a666260> test_multiprocessing_spawn failed (env changed) 1 test altered the execution environment: test_multiprocessing_spawn Total duration: 2 sec Tests result: ENV CHANGED --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 06:49:27 2017 From: report at bugs.python.org (Cathy Avery) Date: Mon, 24 Jul 2017 10:49:27 +0000 Subject: [issue27584] New addition of vSockets to the python socket module In-Reply-To: <1469115390.74.0.838831983223.issue27584@psf.upfronthosting.co.za> Message-ID: <1500893367.76.0.489135408747.issue27584@psf.upfronthosting.co.za> Cathy Avery added the comment: There is an outstanding review on my pull request at https://github.com/python/cpython/pull/2489 as there is an red X at changes requested by kushaldas and I believe I have made the necessary changes. Again please let me know if there is anything that I need to do as I am new to this process. Thanks, Cathy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 06:49:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 10:49:37 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500893377.81.0.754812629391.issue26762@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2886 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 06:52:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 10:52:45 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500893565.66.0.889305063761.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: > With this PR, the following test fails: Ah, it seems like test_level() alone is enough to reproduce the bug and the following PR fixes it: https://github.com/python/cpython/pull/2842 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 07:00:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 11:00:19 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500894019.7.0.017904580443.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: With PR 2841 + PR 2842, there is still at least one test which leaks processes: --- $ ./python -m test --match=test_notify_all -v test_multiprocessing_spawn == CPython 3.7.0a0 (heads/master:b364d9f, Jul 24 2017, 11:06:33) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] == Linux-4.11.9-200.fc25.x86_64-x86_64-with-fedora-25-Twenty_Five little-endian == hash algorithm: siphash24 64bit == cwd: /home/haypo/prog/python/master/build/test_python_28469 == CPU count: 4 == encodings: locale=UTF-8, FS=utf-8 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) Run tests sequentially 0:00:00 load avg: 0.44 [1/1] test_multiprocessing_spawn test_notify_all (test.test_multiprocessing_spawn.WithManagerTestCondition) ... ok test_notify_all (test.test_multiprocessing_spawn.WithProcessesTestCondition) ... ok Warning -- reap_children() reaped child process 28553 Warning -- reap_children() reaped child process 28557 Warning -- reap_children() reaped child process 28559 Warning -- reap_children() reaped child process 28561 test_notify_all (test.test_multiprocessing_spawn.WithThreadsTestCondition) ... ok Dangling processes: {, , , } ---------------------------------------------------------------------- Ran 3 tests in 3.772s OK Warning -- multiprocessing.process._dangling was modified by test_multiprocessing_spawn Before: <_weakrefset.WeakSet object at 0x7f2385200400> After: <_weakrefset.WeakSet object at 0x7f238a8ff260> test_multiprocessing_spawn failed (env changed) 1 test altered the execution environment: test_multiprocessing_spawn Total duration: 4 sec Tests result: SUCCESS --- I looked at the code of the test: it's full of "p.daemon = True" and "t.daemon = True", whereas these processes and threads are not tracked in a list to be cleared manually, so I'm not surprised of the warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 07:01:18 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 24 Jul 2017 11:01:18 +0000 Subject: [issue30516] Documentation for datetime substract operation incorrect? In-Reply-To: <1496179333.45.0.413102703331.issue30516@psf.upfronthosting.co.za> Message-ID: <1500894078.57.0.628956365858.issue30516@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 07:02:01 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 11:02:01 +0000 Subject: [issue30850] [2.7] bsddb3: test01_basic_replication() of test_bsddb3 fails randomly on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1499181607.72.0.534776800166.issue30850@psf.upfronthosting.co.za> Message-ID: <1500894121.91.0.00267579358458.issue30850@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0fc940a09ae6636e78f94ecf6436b8de14bd1c45 by Victor Stinner in branch '2.7': test_bsddb3 tolerates smaller timeout on Windows (#2840) https://github.com/python/cpython/commit/0fc940a09ae6636e78f94ecf6436b8de14bd1c45 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 07:02:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 11:02:23 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500894143.05.0.624309926798.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 06634950c553f8df83330ed468c11483b857b7dc by Victor Stinner in branch 'master': bpo-26762: Avoid daemon process in _test_multiprocessing (#2842) https://github.com/python/cpython/commit/06634950c553f8df83330ed468c11483b857b7dc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 07:07:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 11:07:37 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1500894457.27.0.882305295971.issue30814@psf.upfronthosting.co.za> STINNER Victor added the comment: > When running tests from installed location, test_import now fails on master and 3.6 with: Which Git revisions are you testing? On master, do you have my latest commit e72b1359f81d1dd42bd8a5c5cc2b3928b74f8023 ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 07:13:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 11:13:06 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500894786.91.0.36737049447.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: If you want to use --fail-env-changed with PR 2841, for example to use test.bisect, you may want this extra patch: diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index f2342c3..5f9e5c3 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -4352,6 +4352,7 @@ class ManagerMixin(object): "children after %s seconds" % (multiprocessing.active_children(), dt), file=sys.stderr) + test.support.environment_altered = True break gc.collect() # do garbage collection @@ -4359,6 +4360,7 @@ class ManagerMixin(object): # This is not really an error since some tests do not # ensure that all processes which hold a reference to a # managed object have been joined. + test.support.environment_altered = True print('Warning -- Shared objects which still exist at manager ' 'shutdown:') print(cls.manager._debug_info()) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 07:47:57 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 24 Jul 2017 11:47:57 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1500896877.44.0.990651761664.issue17611@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I don't like the new END_ITER instruction. This complicates (and slows down) the evaluation loop and the peepholer. I don't think it slows down anything in the eval loop. I agree it adds a bit of complexity. > This also adds a limitation on the peepholer (END_ITER can't be optimized out). It's an unconditional backedge, how could you optimize it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 08:27:08 2017 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 24 Jul 2017 12:27:08 +0000 Subject: [issue31005] caught and stored exception creates a reference cycle outside its traceback In-Reply-To: <1500887119.8.0.911984158836.issue31005@psf.upfronthosting.co.za> Message-ID: <1500899228.15.0.515412720689.issue31005@psf.upfronthosting.co.za> Mark Dickinson added the comment: It's the f_back reference from the inner frame that's keeping the outer frame alive. Here's a picture of the create garbage: http://imgur.com/a/OCRe3 And here's the script that created it: import gc import refcycle import sys import traceback def hold_world(): try: raise Exception("test1") except Exception as exc: tmp = exc def use_obj( o ): hold_world() def main(): gc.disable() gc.collect() o = ["survivor"] use_obj( o ) garbage = refcycle.garbage() garbage.export_image() if __name__ == '__main__': main() ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 08:31:22 2017 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 24 Jul 2017 12:31:22 +0000 Subject: [issue31005] caught and stored exception creates a reference cycle outside its traceback In-Reply-To: <1500887119.8.0.911984158836.issue31005@psf.upfronthosting.co.za> Message-ID: <1500899482.19.0.93545323446.issue31005@psf.upfronthosting.co.za> Mark Dickinson added the comment: BTW, I don't think that this counts as a Python bug: Python is behaving as designed here. Not closing just yet, though: it may be that there's an opportunity for improved documentation, or a wider discussion on how to solve such issues in general. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 08:56:01 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 24 Jul 2017 12:56:01 +0000 Subject: [issue30516] Documentation for datetime substract operation incorrect? In-Reply-To: <1496179333.45.0.413102703331.issue30516@psf.upfronthosting.co.za> Message-ID: <1500900961.75.0.366923359344.issue30516@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I agree. The documentation can be improved here. The note about x - y not being quite the same as x + (-y) belongs to the timedelta - timedelta operation. It should be removed from both date - timedelta and datetime-timedelta footnotes. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python stage: -> needs patch versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 08:59:37 2017 From: report at bugs.python.org (=?utf-8?q?Vojt=C4=9Bch_Fried?=) Date: Mon, 24 Jul 2017 12:59:37 +0000 Subject: [issue31005] caught and stored exception creates a reference cycle outside its traceback In-Reply-To: <1500887119.8.0.911984158836.issue31005@psf.upfronthosting.co.za> Message-ID: <1500901176.99.0.206197889018.issue31005@psf.upfronthosting.co.za> Vojt?ch Fried added the comment: Ok. As an input for a potential discussion: Should all cases in the std library that store an exception be reported as a bug (because it can potentially mess with reference counting?) One such case is function create_connection in socket.py. If "hold_world" is a function in an external code and the reference cycle problem only appears in an exceptional case it is hard to debug and it can hardly be easily fixed. If "hold_world" is in an external code, it may be impossible to deal with. You can only diligently set to None or del in each function on the stack. But if you have a factory function that actually produces an object you don't want to be garbage collected, you can't set the reference to None before returning it. It is surprising that the object is affected by a function that does not know about it. It is not stored globally, it is not passed to it. It just happens to be at a wrong time at a wrong place. Should traceback.clear_frames clear the "back referenced" frames? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 08:59:40 2017 From: report at bugs.python.org (Debarshi Goswami) Date: Mon, 24 Jul 2017 12:59:40 +0000 Subject: [issue31011] Users (except from the one who installed) not able to see python in add remove programs. Message-ID: <1500901180.63.0.497561130002.issue31011@psf.upfronthosting.co.za> New submission from Debarshi Goswami: When Python (64 bit) is installed for all users from an admin account on Windows, it gets installed correctly for all users , but it does not appear in add remove program for users other than one who installed it. Command used : python-3.6.1-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 TargetDir=C:\apps\Python36 Work around: Repair the installation by launching Python installer again. ---------- components: Installation messages: 298965 nosy: Debarshi.Goswami priority: normal severity: normal status: open title: Users (except from the one who installed) not able to see python in add remove programs. type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 09:01:24 2017 From: report at bugs.python.org (Debarshi Goswami) Date: Mon, 24 Jul 2017 13:01:24 +0000 Subject: [issue31011] Users (except from the one who installed) not able to see python in add remove programs. In-Reply-To: <1500901180.63.0.497561130002.issue31011@psf.upfronthosting.co.za> Message-ID: <1500901284.73.0.501664087449.issue31011@psf.upfronthosting.co.za> Changes by Debarshi Goswami : ---------- nosy: +manddy221 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 09:35:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 13:35:32 +0000 Subject: [issue30188] test_nntplib: random EOFError in setUpClass() In-Reply-To: <1493305628.27.0.924756319794.issue30188@psf.upfronthosting.co.za> Message-ID: <1500903332.0.0.446350901633.issue30188@psf.upfronthosting.co.za> STINNER Victor added the comment: Similar but different error (ssl.SSLEOFError) on AMD64 FreeBSD CURRENT Non-Debug 3.5: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.5/builds/211/steps/test/logs/stdio ====================================================================== ERROR: setUpClass (test.test_nntplib.NetworkedNNTP_SSLTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.5.koobs-freebsd-current.nondebug/build/Lib/test/test_nntplib.py", line 291, in setUpClass usenetrc=False) File "/usr/home/buildbot/python/3.5.koobs-freebsd-current.nondebug/build/Lib/nntplib.py", line 1077, in __init__ self.sock = _encrypt_on(self.sock, ssl_context, host) File "/usr/home/buildbot/python/3.5.koobs-freebsd-current.nondebug/build/Lib/nntplib.py", line 292, in _encrypt_on return context.wrap_socket(sock, server_hostname=hostname) File "/usr/home/buildbot/python/3.5.koobs-freebsd-current.nondebug/build/Lib/ssl.py", line 385, in wrap_socket _context=self) File "/usr/home/buildbot/python/3.5.koobs-freebsd-current.nondebug/build/Lib/ssl.py", line 760, in __init__ self.do_handshake() File "/usr/home/buildbot/python/3.5.koobs-freebsd-current.nondebug/build/Lib/ssl.py", line 996, in do_handshake self._sslobj.do_handshake() File "/usr/home/buildbot/python/3.5.koobs-freebsd-current.nondebug/build/Lib/ssl.py", line 641, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:719) ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 09:37:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 13:37:25 +0000 Subject: [issue30188] test_nntplib: random EOFError in setUpClass() In-Reply-To: <1493305628.27.0.924756319794.issue30188@psf.upfronthosting.co.za> Message-ID: <1500903445.7.0.226679218258.issue30188@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2887 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 09:40:09 2017 From: report at bugs.python.org (Leon Avery) Date: Mon, 24 Jul 2017 13:40:09 +0000 Subject: [issue31012] suggestion: allow termination argument in argparse to be specified as argument Message-ID: <1500903609.87.0.148585957188.issue31012@psf.upfronthosting.co.za> New submission from Leon Avery: In the argparse module, the argument '--' is interpreted as a signal that everything after it is a positional argument. '--' is literally written into the argparse code, in _parse_known_args. This means that a user who wishes to use '--' in some other way is out of luck. I suggest the addition of an argument to __init__ (or a method call, or something) that allows '--' to be replaced with some string of the user's choice. ---------- components: Library (Lib) messages: 298967 nosy: Leon Avery priority: normal severity: normal status: open title: suggestion: allow termination argument in argparse to be specified as argument type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 09:43:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 13:43:57 +0000 Subject: [issue30850] [2.7] bsddb3: test01_basic_replication() of test_bsddb3 fails randomly on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1499181607.72.0.534776800166.issue30850@psf.upfronthosting.co.za> Message-ID: <1500903837.97.0.190938566204.issue30850@psf.upfronthosting.co.za> STINNER Victor added the comment: The test fails randomly. Since I'm unable to reproduce the bug, I close the bug. (If the bug is not fixed, I will reopen the issue.) ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 09:50:46 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 24 Jul 2017 13:50:46 +0000 Subject: [issue31012] suggestion: allow termination argument in argparse to be specified as argument In-Reply-To: <1500903609.87.0.148585957188.issue31012@psf.upfronthosting.co.za> Message-ID: <1500904246.85.0.608083800207.issue31012@psf.upfronthosting.co.za> Steven D'Aprano added the comment: > This means that a user who wishes to use '--' in some other way is out of luck. I think that's a feature, not a limitation. Command line arguments should use broadly consistent conventions. I don't want one program to use '--' for "end of options" and another program to use it for "something else". Suppose you want to use '--' for "foo", and '%%' (say) as the end of options terminator. Whatever foo is. Okay, just swap them -- keep the usual convention where '--' is the options terminator, and use '%%' for foo. That way your users won't be surprised and confused by your application working differently from the great bulk of commandline applications. (Users never read the manual.) But maybe I'll change my mind if you can show that there's already a very common, and useful, alternative convention of '--' for foo, for some definition of foo. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 09:51:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 13:51:16 +0000 Subject: [issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads In-Reply-To: <1499865976.69.0.386624022037.issue30908@psf.upfronthosting.co.za> Message-ID: <1500904276.31.0.494151316912.issue30908@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2888 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 09:52:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 13:52:17 +0000 Subject: [issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads In-Reply-To: <1499865976.69.0.386624022037.issue30908@psf.upfronthosting.co.za> Message-ID: <1500904337.82.0.944253799505.issue30908@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2889 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 09:53:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 13:53:35 +0000 Subject: [issue30892] _elementtree: assertion error if stdlib copy module is overriden In-Reply-To: <1499705249.36.0.609429772513.issue30892@psf.upfronthosting.co.za> Message-ID: <1500904415.07.0.814327536283.issue30892@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 2.7 doesn't seem to be affected: $ python2 Python 2.7.13+ (heads/2.7:598f26b, Jul 21 2017, 01:18:41) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2 >>> import _elementtree Traceback (most recent call last): File "", line 1, in File "", line 1, in ImportError: cannot import name copy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 09:53:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 13:53:42 +0000 Subject: [issue30892] _elementtree: assertion error if stdlib copy module is overriden In-Reply-To: <1499705249.36.0.609429772513.issue30892@psf.upfronthosting.co.za> Message-ID: <1500904422.08.0.734285152043.issue30892@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 09:55:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 13:55:27 +0000 Subject: [issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads In-Reply-To: <1499865976.69.0.386624022037.issue30908@psf.upfronthosting.co.za> Message-ID: <1500904527.38.0.729044044605.issue30908@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy Storchaka: If you would like to enhance the unittest module, please open a new issue. I prefer to keep this one for the very specific test_os bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 10:05:13 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 24 Jul 2017 14:05:13 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1500905113.84.0.327806454712.issue17611@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, I've now gotten rid of END_ITER. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 10:15:36 2017 From: report at bugs.python.org (Gabriel Somlo) Date: Mon, 24 Jul 2017 14:15:36 +0000 Subject: [issue31013] gcc7 throws warning when pymem.h development header is used Message-ID: <1500905736.49.0.103266302575.issue31013@psf.upfronthosting.co.za> New submission from Gabriel Somlo: C programs using PyMem_MALLOC in pymem.h generate a warning when -Wint-in-bool-context is enabled (typically through -Wall). In places where -Werror is enabled (such as RPM build), this causes the build to fail with an error that looks like: ... In file included from /usr/include/python2.7/Python.h:78:0, from netnsmodule.c:16: netnsmodule.c: In function 'netns_nsexecvp': /usr/include/python2.7/pymem.h:97:30: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] ( (type *) PyMem_MALLOC((n) * sizeof(type)) ) ) ^ /usr/include/python2.7/pymem.h:75:15: note: in definition of macro 'PyMem_MALLOC' : malloc((n) ? (n) : 1)) ^ netnsmodule.c:61:10: note: in expansion of macro 'PyMem_NEW' argv = PyMem_NEW(char *, argc + 1); ^~~~~~~~~ cc1: all warnings being treated as errors error: command 'gcc' failed with exit status 1 ... I'm attaching a patch that fixes the issue, please consider applying! Thanks, --Gabriel ---------- files: Python-2.7.13-pymem-gcc7.patch keywords: patch messages: 298973 nosy: Gabriel Somlo priority: normal severity: normal status: open title: gcc7 throws warning when pymem.h development header is used versions: Python 2.7 Added file: http://bugs.python.org/file47035/Python-2.7.13-pymem-gcc7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 10:19:05 2017 From: report at bugs.python.org (Gabriel Somlo) Date: Mon, 24 Jul 2017 14:19:05 +0000 Subject: [issue31013] gcc7 throws warning when pymem.h development header is used In-Reply-To: <1500905736.49.0.103266302575.issue31013@psf.upfronthosting.co.za> Message-ID: <1500905945.1.0.88136389878.issue31013@psf.upfronthosting.co.za> Gabriel Somlo added the comment: This attachment illustrates how the problem is triggered. The file is part of the CORE network emulator (github.com/coreemu/core). Compile with "gcc -Wall -I/usr/include/python2.7 -c netnsmodule.c". ---------- Added file: http://bugs.python.org/file47036/netnsmodule.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 10:23:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 14:23:52 +0000 Subject: [issue31013] gcc7 throws warning when pymem.h development header is used In-Reply-To: <1500905736.49.0.103266302575.issue31013@psf.upfronthosting.co.za> Message-ID: <1500906232.6.0.892312272011.issue31013@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 10:25:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 14:25:29 +0000 Subject: [issue31013] gcc7 throws warning when pymem.h development header is used In-Reply-To: <1500905736.49.0.103266302575.issue31013@psf.upfronthosting.co.za> Message-ID: <1500906329.55.0.445064716813.issue31013@psf.upfronthosting.co.za> STINNER Victor added the comment: > /usr/include/python2.7/pymem.h:97:30: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] I don't understand this error. I would be curious to see the output of the preprocessor. Try maybe to use gcc -E? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 10:32:24 2017 From: report at bugs.python.org (John Still) Date: Mon, 24 Jul 2017 14:32:24 +0000 Subject: [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register Message-ID: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> New submission from John Still: The function `register` of the `webbrowser` module was updated a little while back to use the newish keyword-only argument syntax; however, the function `_synthesize` (also in `webbrowser`) is still using the outdated positional arguments only calling convention; leading a pair of tests in `Lib/tests/test_webbrowser.py` to fail. I've issued a PR that fixes the function call to use the more modern calling convention. ---------- components: Library (Lib) messages: 298976 nosy: jmsdvl priority: normal pull_requests: 2890 severity: normal status: open title: webbrowser._synthesize uses outdated calling signature for webbrowser.register type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 10:36:47 2017 From: report at bugs.python.org (Gabriel Somlo) Date: Mon, 24 Jul 2017 14:36:47 +0000 Subject: [issue31013] gcc7 throws warning when pymem.h development header is used In-Reply-To: <1500905736.49.0.103266302575.issue31013@psf.upfronthosting.co.za> Message-ID: <1500907007.74.0.455302548215.issue31013@psf.upfronthosting.co.za> Gabriel Somlo added the comment: output of "gcc -E -Wall -I/usr/include/python2.7 -c netnsmodule.c > foo.c" I think gcc7 is a bit more paranoid about whether some expression evaluating to an int can/should in itself be used as a Boolean (i.e., without being compared to 0). ---------- Added file: http://bugs.python.org/file47037/foo.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 10:42:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 14:42:29 +0000 Subject: [issue31013] gcc7 throws warning when pymem.h development header is used In-Reply-To: <1500905736.49.0.103266302575.issue31013@psf.upfronthosting.co.za> Message-ID: <1500907349.23.0.126726815805.issue31013@psf.upfronthosting.co.za> STINNER Victor added the comment: > malloc(((argc + 1) * sizeof(char *)) ? ((argc + 1) * sizeof(char *)) : 1)) ) ); Ah ok, the "(n)?" expression is "((argc + 1) * sizeof(char *)) ? " and yes it contains "*". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 10:48:28 2017 From: report at bugs.python.org (Christian Aguilera) Date: Mon, 24 Jul 2017 14:48:28 +0000 Subject: [issue31015] PyErr_WriteUnraisable should be more verbose in Python 2.7 Message-ID: <1500907708.11.0.730292884872.issue31015@psf.upfronthosting.co.za> New submission from Christian Aguilera: When an exception is raised in a __del__ method or a finalizer (i.e. a weakref callback), only the exception name is printed out. Unfortunately, arbitrarily complex code can be involved which makes debugging quite tedious. It would be nice to display the full traceback, so that these errors are easier to diagnose. The same bug was reported in the past, but it was fixed for Python 3.3 onwards. Since it is trivial to get this fix in Python 2.7, I'm adding the patch for it here. ---------- components: Library (Lib) files: PyErr_WriteUnraisable.patch keywords: patch messages: 298979 nosy: christian.aguilera at foundry.com priority: normal severity: normal status: open title: PyErr_WriteUnraisable should be more verbose in Python 2.7 type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file47038/PyErr_WriteUnraisable.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 10:51:33 2017 From: report at bugs.python.org (Eric Snow) Date: Mon, 24 Jul 2017 14:51:33 +0000 Subject: [issue1644818] Allow built-in packages and submodules as well as top-level modules Message-ID: <1500907893.08.0.47387380917.issue1644818@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 11:05:43 2017 From: report at bugs.python.org (Matthias Klose) Date: Mon, 24 Jul 2017 15:05:43 +0000 Subject: [issue31016] [Regression] sphinx shows an EOF error when using python2.7 from the trunk Message-ID: <1500908743.12.0.586455773708.issue31016@psf.upfronthosting.co.za> New submission from Matthias Klose: [forwarded from https://bugs.debian.org/869098 and] sphinx shows an EOF error when using python2.7 from the trunk. Last successful build was with the 2.7.13 release. It looks like this is triggered only when using the parallel mode in sphinx. I haven't yet worked on this issue, Sphinx is v1.4.9. sphinx-build -b html -d _build/doctrees -n -j 4 . _build/html Running Sphinx v1.4.9 making output directory... loading pickled environment... not yet created loading intersphinx inventory from https://docs.python.org/2/objects.inv... building [mo]: targets for 0 po files that are out of date building [html]: targets for 91 source files that are out of date updating environment: 91 added, 0 changed, 0 removed reading sources... [100%] test-repositories .. writing-tests waiting for workers... Exception occurred: File "/usr/lib/python2.7/dist-packages/sphinx/util/parallel.py", line 97, in _join_one exc, result = pipe.recv() EOFError ---------- components: Library (Lib) messages: 298980 nosy: doko priority: normal severity: normal status: open title: [Regression] sphinx shows an EOF error when using python2.7 from the trunk versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 11:11:01 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Mon, 24 Jul 2017 15:11:01 +0000 Subject: [issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing In-Reply-To: <1490694354.71.0.0417616939951.issue29930@psf.upfronthosting.co.za> Message-ID: <1500909061.62.0.63699161141.issue29930@psf.upfronthosting.co.za> ???? ????????? added the comment: Triggered almost the same error. Minimal proof: Documentation did not say that .drain() can't be called simultaneously. =================================== async def do_nothing(client_reader, client_writer): await asyncio.sleep(10000) mb = b'*' * (4096*4) async def write_cmd(writer): writer.write(mb) await writer.drain() async def amain(): srv = await asyncio.start_unix_server(do_nothing, b'\x00qwe') (reader, writer) = await asyncio.open_unix_connection(b'\x00qwe') await asyncio.gather(*(write_cmd(writer) for i in range(200))) loop = asyncio.get_event_loop() loop.run_until_complete(amain()) =================================== ---------- nosy: +socketpair _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 11:33:00 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 15:33:00 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1500910380.25.0.442844298459.issue27099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am still thinking about how to handle user customization of key defs and values. The current extensions tab does not enable custom key defs, so that would be a new feature, and hence could be handled separately, and normally. I have not yet looked at the patch to see if it does anything in this regard. I would like to move custom values to config-main. But if we do that, existing customizations would be ignored and new customization will not be seen by older versions. A second possibility is to write changes to both config-main and config-extensions, but reading them from both places would be a nuisance. A third is to keep those options on config-extensions and ignore the enable fields even though idleConf would continue to read them. Whatever we do, we will need additions to config help and a 'see help' message. Complicating the decision is that the extension tab was first added, two years ago I think, as a separate dialog with a separate system for handling user changes. When we moved it to a new tab, we did *not* convert it to using the existing system. Another existing deficiency is that there is no validity check on entries. Fortunately, the decision of where to display is separate from where to store. But if displays are moved, the machinery for extension display will have to be changed to ignore values displayed elsewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 11:40:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 15:40:52 +0000 Subject: [issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads In-Reply-To: <1499865976.69.0.386624022037.issue30908@psf.upfronthosting.co.za> Message-ID: <1500910852.57.0.855089240275.issue30908@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 157b6ad677b7b330d30b2bb5ffbb2edac77b78cb by Victor Stinner in branch '3.5': bpo-30908: Fix dangling thread in test_os.TestSendfile (#2680) (#2845) https://github.com/python/cpython/commit/157b6ad677b7b330d30b2bb5ffbb2edac77b78cb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 11:40:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 15:40:52 +0000 Subject: [issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads In-Reply-To: <1499865976.69.0.386624022037.issue30908@psf.upfronthosting.co.za> Message-ID: <1500910852.73.0.102190784683.issue30908@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset bb33ccfc5a216eff753b10a8dc59ec0277f1e1fb by Victor Stinner in branch '3.6': bpo-30908: Fix dangling thread in test_os.TestSendfile (#2680) (#2844) https://github.com/python/cpython/commit/bb33ccfc5a216eff753b10a8dc59ec0277f1e1fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 11:41:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 15:41:05 +0000 Subject: [issue30188] test_nntplib: random EOFError in setUpClass() In-Reply-To: <1493305628.27.0.924756319794.issue30188@psf.upfronthosting.co.za> Message-ID: <1500910865.3.0.456918974064.issue30188@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 5b4feb7e86ecb813b2c56560f86cda2fd46b9579 by Victor Stinner in branch 'master': bpo-30188: test_nntplib catch also ssl.SSLEOFError (#2843) https://github.com/python/cpython/commit/5b4feb7e86ecb813b2c56560f86cda2fd46b9579 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 12:03:13 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 16:03:13 +0000 Subject: [issue30728] IDLE: Modernize configdialog code. In-Reply-To: <1498088215.04.0.812004436002.issue30728@psf.upfronthosting.co.za> Message-ID: <1500912193.78.0.673370182667.issue30728@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- dependencies: -test_bsddb3 crash on x86 Windows XP 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 12:06:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Jul 2017 16:06:29 +0000 Subject: [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register In-Reply-To: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> Message-ID: <1500912389.17.0.571825398554.issue31014@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is it possible to write a test? ---------- nosy: +daves, ncoghlan, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 12:17:25 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 24 Jul 2017 16:17:25 +0000 Subject: [issue31013] gcc7 throws warning when pymem.h development header is used In-Reply-To: <1500905736.49.0.103266302575.issue31013@psf.upfronthosting.co.za> Message-ID: <1500913045.88.0.832784112625.issue31013@psf.upfronthosting.co.za> Changes by Charalampos Stratakis : ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 12:19:37 2017 From: report at bugs.python.org (John Still) Date: Mon, 24 Jul 2017 16:19:37 +0000 Subject: [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register In-Reply-To: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> Message-ID: <1500913177.07.0.482467408518.issue31014@psf.upfronthosting.co.za> John Still added the comment: What would a new test be testing? I only found this behaviour because two existing tests were failing (with the PR they pass, of course). I'm happy to write a test, I'm just not sure what the test should be testing that the existing tests don't already test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 12:23:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 16:23:50 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500913430.89.0.109606522646.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: Antoine Pitrou: "I'm not able to reproduce. Can you try again with latest master?" Oh, maybe I found why... There is a tearDownModule() function which hides bugs. Try following change: diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index 88e2eb3..ae77468 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -4432,8 +4432,8 @@ def install_tests_in_module_dict(remote_globs, start_method): def tearDownModule(): multiprocessing.set_start_method(old_start_method[0], force=True) # pause a bit so we don't get warning about dangling threads/processes - time.sleep(0.5) - multiprocessing.process._cleanup() + # time.sleep(0.5) + # multiprocessing.process._cleanup() gc.collect() tmp = set(multiprocessing.process._dangling) - set(dangling[0]) if tmp: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 12:30:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Jul 2017 16:30:27 +0000 Subject: [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register In-Reply-To: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> Message-ID: <1500913827.14.0.697827776229.issue31014@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: These tests are not failing on our buildbots and developer's computers. Seems they are failing only in special environment. This path of execution is not tested in more common environments, therefore possible regression couldn't be caught until somebody run tests in similar special environment. New test should test this path of execution in common environments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 12:32:07 2017 From: report at bugs.python.org (Aditya Hase) Date: Mon, 24 Jul 2017 16:32:07 +0000 Subject: [issue30304] TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7 In-Reply-To: <1494233409.78.0.688533240712.issue30304@psf.upfronthosting.co.za> Message-ID: <1500913927.21.0.0300695724582.issue30304@psf.upfronthosting.co.za> Changes by Aditya Hase : ---------- pull_requests: +2891 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 12:36:47 2017 From: report at bugs.python.org (Aditya Hase) Date: Mon, 24 Jul 2017 16:36:47 +0000 Subject: [issue30304] TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7 In-Reply-To: <1494233409.78.0.688533240712.issue30304@psf.upfronthosting.co.za> Message-ID: <1500914207.9.0.0739523880405.issue30304@psf.upfronthosting.co.za> Aditya Hase added the comment: Hi, I'm new to python development community. I've created a GitHub PR that fixes this issue. ---------- nosy: +adityahase _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 12:54:09 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 24 Jul 2017 16:54:09 +0000 Subject: [issue30999] statistics module: add "key" keyword argument to median, mode, ... In-Reply-To: <1500860763.43.0.847214535342.issue30999@psf.upfronthosting.co.za> Message-ID: <20170724165404.GR3149@ando.pearwood.info> Steven D'Aprano added the comment: Thanks for explaining your use-case. Although the median_* functions don't perform arithmetic on their data, they are still conceptually mathematical functions that operate on numbers and I'm reluctant to support arbitrary objects with a key function without a solid reason. In your example, I think there are existing ways to get the result you want: (1) Use a dict: data = dict([(1, ['Anna']), (3, ['Paul', 'Henry']), (4, ['Kate'])]) people = data[median_low(data)] (2) Use a custom numeric type with associated data: class MyNum(int): def __new__(cls, num, data): instance = super().__new__(cls, num) instance.data = data return instance data = [MyNum(1, ['Anna']), MyNum(3, ['Paul', 'Henry']), MyNum(4, ['Kate'])] people = median_low(data).data As for your second example, do you have a use-case for wanting to know the position of the median in the original, unsorted list? When would that be useful? One other reason for my reluctance: although median_low and median_high guarantee to only return an actual data point, that's a fairly special case. There are other order statistics (such as quartiles, quantiles, etc) which are conceptually related to median but don't necessarily return a data value. Indeed, the regular median() function doesn't always do so. I would be reluctant for median() and median_low() to have different signatures without an excellent reason. I'm not completely ruling this out. One thing which might sway me is if there are other languages or statistics libraries which offer this feature. (I say *might*, not that it definitely will.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 12:58:04 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 24 Jul 2017 16:58:04 +0000 Subject: [issue30304] TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7 In-Reply-To: <1494233409.78.0.688533240712.issue30304@psf.upfronthosting.co.za> Message-ID: <1500915484.84.0.847944555642.issue30304@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: needs patch -> patch review versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:02:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Jul 2017 17:02:12 +0000 Subject: [issue30304] TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7 In-Reply-To: <1494233409.78.0.688533240712.issue30304@psf.upfronthosting.co.za> Message-ID: <1500915732.47.0.695357420405.issue30304@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is related only to 2.7. All correct in 3.x. ---------- nosy: +serhiy.storchaka versions: -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:05:07 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 24 Jul 2017 17:05:07 +0000 Subject: [issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols() In-Reply-To: <1497972401.5.0.807136343886.issue30714@psf.upfronthosting.co.za> Message-ID: <1500915907.42.0.429373477788.issue30714@psf.upfronthosting.co.za> R. David Murray added the comment: Well, the reason one *might* consider a test failure as a release blocker (and I'm not saying you should, I'm just explaining the possible logic) is that distros would understandably like the test suite to pass before they include a release in their distribution. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:07:20 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 24 Jul 2017 17:07:20 +0000 Subject: [issue30304] TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7 In-Reply-To: <1494233409.78.0.688533240712.issue30304@psf.upfronthosting.co.za> Message-ID: <1500916040.95.0.937488062201.issue30304@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks Serhiy. Aditya, your PR was made against the master branch. Can you make the change against the 2.7 branch? Thanks. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:07:49 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 24 Jul 2017 17:07:49 +0000 Subject: [issue31017] gcc 7 fallthrough warnings Message-ID: <1500916069.5.0.832452966963.issue31017@psf.upfronthosting.co.za> New submission from Charalampos Stratakis: On gcc 7 the new -Wimplicit-fallthrough option was introduced which produces warnings about switch cases that can fall through. The easiest way to silence these warnings is to add the comment /* Falls through. */ for those cases. More information here [0] Attaching the stderr output from compilation from the master branch. [0] https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/ ---------- files: fallthrough36 messages: 298996 nosy: cstratak priority: normal severity: normal status: open title: gcc 7 fallthrough warnings versions: Python 3.7 Added file: http://bugs.python.org/file47039/fallthrough36 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:10:02 2017 From: report at bugs.python.org (Aditya Hase) Date: Mon, 24 Jul 2017 17:10:02 +0000 Subject: [issue30304] TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7 In-Reply-To: <1494233409.78.0.688533240712.issue30304@psf.upfronthosting.co.za> Message-ID: <1500916202.68.0.149632392372.issue30304@psf.upfronthosting.co.za> Changes by Aditya Hase : ---------- pull_requests: +2893 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:10:14 2017 From: report at bugs.python.org (Zachary Ware) Date: Mon, 24 Jul 2017 17:10:14 +0000 Subject: [issue31017] gcc 7 fallthrough warnings In-Reply-To: <1500916069.5.0.832452966963.issue31017@psf.upfronthosting.co.za> Message-ID: <1500916214.86.0.979908899934.issue31017@psf.upfronthosting.co.za> Zachary Ware added the comment: This is a duplicate of bpo-30923. ---------- nosy: +zach.ware resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add -Wimplicit-fallthrough=0 to Makefile ? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:15:13 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 24 Jul 2017 17:15:13 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1500916513.31.0.347938067413.issue30923@psf.upfronthosting.co.za> Changes by Charalampos Stratakis : ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:15:33 2017 From: report at bugs.python.org (Segev Finer) Date: Mon, 24 Jul 2017 17:15:33 +0000 Subject: [issue30916] Pre-build OpenSSL and Tcl/Tk for Windows In-Reply-To: <1499899065.59.0.916676241363.issue30916@psf.upfronthosting.co.za> Message-ID: <1500916533.27.0.758037312427.issue30916@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2894 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:16:47 2017 From: report at bugs.python.org (Aditya Hase) Date: Mon, 24 Jul 2017 17:16:47 +0000 Subject: [issue30304] TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7 In-Reply-To: <1494233409.78.0.688533240712.issue30304@psf.upfronthosting.co.za> Message-ID: <1500916607.43.0.466980239566.issue30304@psf.upfronthosting.co.za> Aditya Hase added the comment: I've fixed that. ---------- versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:20:41 2017 From: report at bugs.python.org (Segev Finer) Date: Mon, 24 Jul 2017 17:20:41 +0000 Subject: [issue31018] _tracemalloc frame_t packing optimization not working in Windows x64 Message-ID: <1500916841.59.0.00710376227878.issue31018@psf.upfronthosting.co.za> New submission from Segev Finer: ..\Modules\_tracemalloc.c(88): warning C4359: '': Alignment specifier is less than actual alignment (8), and will be ignored. For this to actually work we simply need to use #pragma pack instead. ---------- components: Extension Modules, Windows messages: 298999 nosy: Segev Finer, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: _tracemalloc frame_t packing optimization not working in Windows x64 type: enhancement versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:23:09 2017 From: report at bugs.python.org (Segev Finer) Date: Mon, 24 Jul 2017 17:23:09 +0000 Subject: [issue31018] _tracemalloc frame_t packing optimization not working in Windows x64 In-Reply-To: <1500916841.59.0.00710376227878.issue31018@psf.upfronthosting.co.za> Message-ID: <1500916989.26.0.527834502632.issue31018@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2895 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:23:38 2017 From: report at bugs.python.org (Segev Finer) Date: Mon, 24 Jul 2017 17:23:38 +0000 Subject: [issue31018] _tracemalloc frame_t packing optimization not working in Windows x64 In-Reply-To: <1500916841.59.0.00710376227878.issue31018@psf.upfronthosting.co.za> Message-ID: <1500917018.19.0.693048370114.issue31018@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2896 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:25:52 2017 From: report at bugs.python.org (Segev Finer) Date: Mon, 24 Jul 2017 17:25:52 +0000 Subject: [issue31018] _tracemalloc frame_t packing optimization not working in Windows x64 In-Reply-To: <1500916841.59.0.00710376227878.issue31018@psf.upfronthosting.co.za> Message-ID: <1500917152.41.0.815945431705.issue31018@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: -2896 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:29:42 2017 From: report at bugs.python.org (John Still) Date: Mon, 24 Jul 2017 17:29:42 +0000 Subject: [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register In-Reply-To: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> Message-ID: <1500917382.9.2.68489037173e-05.issue31014@psf.upfronthosting.co.za> John Still added the comment: Ok I understand what you mean. I think the only conditions for test failure are (A) $BROWSER is set and (B) $BROWSER is set to an actual executable that should be caught by ``register_standard_browsers`` prior to execution reaching the last if clause of ``register_standard_browsers`` (``if 'BROWSER' in os.environ:``) - those two conditions should be sufficient for execution to reach the offending line of code. I'll see if I can cook up a test for that. I think the right way to do this is to monkeypatch ``os.environ`` and ``shutil.which``, am I right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:32:19 2017 From: report at bugs.python.org (Aditya Hase) Date: Mon, 24 Jul 2017 17:32:19 +0000 Subject: [issue22062] Fix pathlib.Path.(r)glob doc glitches. In-Reply-To: <1406239862.0.0.293742999811.issue22062@psf.upfronthosting.co.za> Message-ID: <1500917539.2.0.0107723786354.issue22062@psf.upfronthosting.co.za> Aditya Hase added the comment: Should I create a Github PR with given patch? If so, how do I give credit to the original author? ---------- nosy: +adityahase _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:32:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Jul 2017 17:32:23 +0000 Subject: [issue30304] TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7 In-Reply-To: <1494233409.78.0.688533240712.issue30304@psf.upfronthosting.co.za> Message-ID: <1500917543.9.0.455852632175.issue30304@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:36:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 17:36:38 +0000 Subject: [issue31019] multiprocessing.Pool should join "dead" processes Message-ID: <1500917798.24.0.0382753367873.issue31019@psf.upfronthosting.co.za> New submission from STINNER Victor: With debug patches for bpo-26762, I noticed that some unit tests of test_multiprocessing_spawn leaks "dangling" processes: --- haypo at selma$ ./python -m test --fail-env-changed test_multiprocessing_spawn -v --match test.test_multiprocessing_spawn.WithProcessesTestPool.test_context == CPython 3.7.0a0 (heads/master:b364d9f, Jul 24 2017, 11:06:33) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] == Linux-4.11.9-200.fc25.x86_64-x86_64-with-fedora-25-Twenty_Five little-endian == hash algorithm: siphash24 64bit == cwd: /home/haypo/prog/python/master/build/test_python_20982 == CPU count: 4 == encodings: locale=UTF-8, FS=utf-8 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) Run tests sequentially 0:00:00 load avg: 0.16 [1/1] test_multiprocessing_spawn test_context (test.test_multiprocessing_spawn.WithProcessesTestPool) ... ok Warning -- Dangling processes: {} Dangling processes: {} ---------------------------------------------------------------------- Ran 1 test in 1.342s OK test_multiprocessing_spawn failed (env changed) 1 test altered the execution environment: test_multiprocessing_spawn Total duration: 1 sec Tests result: ENV CHANGED --- multiprocessing.Pool.terminate() doesn't call the join() method of a Process object if its is_alive() method returns false. But in practice, avoid the join() creates "dangling" processes. Attached pull request fixes the warning: Pool.terminate() now calls join() on all processes including "dead" processes. ---------- components: Library (Lib) messages: 299002 nosy: haypo priority: normal severity: normal status: open title: multiprocessing.Pool should join "dead" processes type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:43:27 2017 From: report at bugs.python.org (Segev Finer) Date: Mon, 24 Jul 2017 17:43:27 +0000 Subject: [issue31018] _tracemalloc frame_t packing optimization not working in Windows x64 In-Reply-To: <1500916841.59.0.00710376227878.issue31018@psf.upfronthosting.co.za> Message-ID: <1500918207.15.0.942452173218.issue31018@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2897 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:46:55 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 24 Jul 2017 17:46:55 +0000 Subject: [issue22062] Fix pathlib.Path.(r)glob doc glitches. In-Reply-To: <1406239862.0.0.293742999811.issue22062@psf.upfronthosting.co.za> Message-ID: <1500918415.28.0.585621729049.issue22062@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Aditya: The guideline for converting a patch to the PR is documented here: https://devguide.python.org/pullrequest/#converting-an-existing-patch-from-the-b-p-o-to-github ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:46:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 17:46:57 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500918417.06.0.684938683067.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: I just created bpo-31019 "multiprocessing.Pool should join "dead" processes" to fix dangling processes related to pool, like test.test_multiprocessing_spawn.WithProcessesTestPool.test_context. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:47:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 17:47:04 +0000 Subject: [issue31019] multiprocessing.Pool should join "dead" processes In-Reply-To: <1500917798.24.0.0382753367873.issue31019@psf.upfronthosting.co.za> Message-ID: <1500918424.65.0.0123064637064.issue31019@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2898 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:50:59 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Jul 2017 17:50:59 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1500918659.38.0.311529573427.issue30814@psf.upfronthosting.co.za> Ned Deily added the comment: > Which Git revisions are you testing? On master, do you have my latest commit e72b1359f81d1dd42bd8a5c5cc2b3928b74f8023 ? Yes, this is with current top of trunk of both branches. Perhaps I wasn't clear about "installed location". The test does not fail if you run it directly from the build directory like with "make test". It fails when you do a "make install" and then run the test using the newly installed Python. Tests need to work both ways. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:52:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 17:52:59 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500918779.16.0.553829983241.issue26762@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2899 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:59:31 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 17:59:31 +0000 Subject: [issue22062] Fix pathlib.Path.(r)glob doc glitches. In-Reply-To: <1406239862.0.0.293742999811.issue22062@psf.upfronthosting.co.za> Message-ID: <1500919171.11.0.686154576732.issue22062@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Since Mike has not responded in more that a week, please go ahead. Just put "?Original patch by Mike Short." in the commit comments (if you can, otherwise add a separate comment). Please add News blurb (see devguide) if you know how, with at least a title line. Mike has signed the CLA, though it would not matter here since his patch is taken from my message and could be classed as trivial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 14:03:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Jul 2017 18:03:43 +0000 Subject: [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register In-Reply-To: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> Message-ID: <1500919423.81.0.142982260323.issue31014@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This would be not easy. Since the BROWSER environment variable should be patched before the first use the webbrowser module, the test should import webbrowser in a separate process (you can use the test.support.script_helper.assert_python_ok() helper). _synthesize() is used in two places with different arguments: in register_standard_browsers() and in get(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 14:06:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 18:06:06 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500919566.83.0.682590018615.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: I rewrote PR 2841 to detect more bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 14:09:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 18:09:12 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500919752.03.0.913723185679.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: PR 2850 + PR 2849 (of bpo-31019) fix most dangling process/thread, but one specific test still leaks: test.test_multiprocessing_spawn.WithProcessesTestPool.test_traceback I will try to fix it once other bugs are fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 14:10:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 18:10:20 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500919820.77.0.723455361005.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: Using PR 2841, I wrote a tool to run each test in subprocess to check if a test method leaks. I found these methods: ./python -m test --fail-env-changed test_multiprocessing_spawn -v --match test.test_multiprocessing_spawn.WithProcessesTestBarrier.test_thousand ./python -m test --fail-env-changed test_multiprocessing_spawn -v --match test.test_multiprocessing_spawn.WithProcessesTestCondition.test_notify ./python -m test --fail-env-changed test_multiprocessing_spawn -v --match test.test_multiprocessing_spawn.WithProcessesTestEvent.test_event ./python -m test --fail-env-changed test_multiprocessing_spawn -v --match test.test_multiprocessing_spawn.WithProcessesTestPool.test_context ./python -m test --fail-env-changed test_multiprocessing_spawn -v --match test.test_multiprocessing_spawn.WithProcessesTestProcess.test_close ./python -m test --fail-env-changed test_multiprocessing_spawn -v --match test.test_multiprocessing_spawn.WithProcessesTestQueue.test_fork ./python -m test --fail-env-changed test_multiprocessing_spawn -v --match test.test_multiprocessing_spawn.WithProcessesTestQueue.test_qsize ./python -m test --fail-env-changed test_multiprocessing_spawn -v --match test.test_multiprocessing_spawn.WithProcessesTestQueue.test_queue_feeder_donot_stop_onexc ./python -m test --fail-env-changed test_multiprocessing_spawn -v --match test.test_multiprocessing_spawn.WithProcessesTestPool.test_traceback ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 14:15:24 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Mon, 24 Jul 2017 18:15:24 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1500920124.07.0.557226859039.issue27099@psf.upfronthosting.co.za> Charles Wohlganger added the comment: The patch moves all config variables to config-main, config-highlight (for highlight colors), and config-keys (for keys). Keys and highlights are configurable in their respective tabs. Parens and Code Context options are in the Highlighting tab, Format Paragraph configurables are in the General tab. The sections in the main.def file where the options are saved are respective to their tab. If you want, I can change the modules so they also load from their old location if an overriding option isn't found in main.def . However, I would recommend cleanly breaking from the old extensions, with a notice somewhere of where the new options are. Changing the behavior of the extensions Tab / System is a separate issue that I think would be best handled after this, as this patch already makes a lot of changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 14:20:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Jul 2017 18:20:45 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1500920445.12.0.610889968973.issue30814@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2900 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 14:20:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Jul 2017 18:20:45 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1500920445.26.0.0489244302484.issue30876@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2901 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 14:29:25 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 24 Jul 2017 18:29:25 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1500920965.99.0.691562828066.issue30853@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I would like to work on this, but I don't think I'd be able to have something ready for a few days, so I don't want to hold you up if you would like it sooner. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 14:53:39 2017 From: report at bugs.python.org (Segev Finer) Date: Mon, 24 Jul 2017 18:53:39 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1500922419.34.0.0422333494799.issue9566@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2902 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 15:29:27 2017 From: report at bugs.python.org (gerion) Date: Mon, 24 Jul 2017 19:29:27 +0000 Subject: [issue30999] statistics module: add "key" keyword argument to median, mode, ... In-Reply-To: <1500847822.23.0.66362631161.issue30999@psf.upfronthosting.co.za> Message-ID: <1500924567.24.0.886645031856.issue30999@psf.upfronthosting.co.za> gerion added the comment: The position might be useful, if you have a second list with some side data stored in it, and not a list of tuples :). I had the idea to file a bug, when I had a list of coordinates and wanted to use the point with the median of the x-coordinates as "representation" for the dataset. With max() and min() in mind, I used median_low() with key argument and get the error that key is not a valid argument (my solution was to use dicts then). So I thought this would be a similar use case as max() and min() and in fact more consistent. But I fully understand your concerns, that this breaks consistence with the other statistic functions. This is not a killer feature, but in my opinion nice to have, because it changes nothing on the default (expected) behaviour, but provides with less code very high flexibility. I cannot say something about other languages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 15:53:37 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 19:53:37 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1500926017.96.0.679309973156.issue30853@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am going to continue with the tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 16:00:53 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 20:00:53 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1500926453.83.0.508039122726.issue27099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 'Clean break' is easy to say. I won't decide yet. Other opinions? I think I will post to idle-dev also. Even if no one responds, there will have been the chance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 16:28:42 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 24 Jul 2017 20:28:42 +0000 Subject: [issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols() In-Reply-To: <1497972401.5.0.807136343886.issue30714@psf.upfronthosting.co.za> Message-ID: <1500928122.52.0.93494527229.issue30714@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Naturally up to the release managers. If I were one, I'd consider it just because not addressing the failure one way or another will lead to people finding us and asking a question about why it is failing. Adding a SkipTest when the relevant library version is found counts as addressing _that_ level of problem. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 17:05:21 2017 From: report at bugs.python.org (insomniacslk) Date: Mon, 24 Jul 2017 21:05:21 +0000 Subject: [issue31020] Add support for custom compressor in tarfile Message-ID: <1500930321.52.0.338757047173.issue31020@psf.upfronthosting.co.za> New submission from insomniacslk: Tarfile would benefit from exposing custom compressors. At the moment the only way to use something that is not gzip/bzip/lzma is to separate the archiving and compression steps. A possible approach is to pass a custom compression function to `tarfile.TarFile.open`. However the current interface is not clean enough to be exposed. I have made a very conservative change via a pull request on GitHub, see https://github.com/python/cpython/pull/2734 . Some additional considerations can be found there. A further step could require a simplified interface that only involves file name, file-like object and compression level, and returns a file-like object to read the compressed data from. For example: def my_compressor(name, fileobj=None, compresslevel=9): # compression happens here return filelike_object This further step is not captured in the pull request, but I can iterate and update the diff. ---------- components: Library (Lib) messages: 299017 nosy: insomniacslk priority: normal pull_requests: 2903 severity: normal status: open title: Add support for custom compressor in tarfile type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 17:13:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 21:13:33 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1500930813.01.0.584385045391.issue30814@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy on PR 2851: > I forget to include directories with new test files in the list of the library directories. This caused that these test files were not installed. Oh, too bad that Zach's "x86 Gentoo Installed with X 3.6" buildbot is offline. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 17:15:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 21:15:54 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1500930954.51.0.435977494902.issue30814@psf.upfronthosting.co.za> STINNER Victor added the comment: I also opened https://github.com/python/devguide/issues/241 : "Document how to add a new file or a new directory". It's not the first time that we make such mistake. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 17:18:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 21:18:10 +0000 Subject: [issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor In-Reply-To: <1500593003.51.0.725099647676.issue30980@psf.upfronthosting.co.za> Message-ID: <1500931090.65.0.639638582244.issue30980@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c648a93ae342ac28d2abbb100161eae4f907d001 by Victor Stinner (Nir Soffer) in branch 'master': bpo-30980: Fix double close in asyncore.file_wrapper (#2789) https://github.com/python/cpython/commit/c648a93ae342ac28d2abbb100161eae4f907d001 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 17:20:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 21:20:07 +0000 Subject: [issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor In-Reply-To: <1500593003.51.0.725099647676.issue30980@psf.upfronthosting.co.za> Message-ID: <1500931207.77.0.431597024429.issue30980@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for your fix Nir Soffer! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 17:48:57 2017 From: report at bugs.python.org (A. Skrobov) Date: Mon, 24 Jul 2017 21:48:57 +0000 Subject: [issue26415] Excessive peak memory consumption by the Python parser In-Reply-To: <1456182380.09.0.81920177296.issue26415@psf.upfronthosting.co.za> Message-ID: <1500932937.46.0.245194999509.issue26415@psf.upfronthosting.co.za> A. Skrobov added the comment: To bump this year-old issue, I have delivered a talk at EuroPython 2017, explaining what my patch does, how it does what it does, and why it's a good thing to do. You can watch my talk at https://www.youtube.com/watch?v=dyRDmcsTwhE&t=1h52m38s ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 17:50:50 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 21:50:50 +0000 Subject: [issue31021] Clarify programming faq. Message-ID: <1500933050.31.0.733502304217.issue31021@psf.upfronthosting.co.za> New submission from Terry J. Reedy: https://docs.python.org/3/faq/programming.html#why-does-22-10-return-3 "Why does -22 // 10 return -3? It?s primarily driven by the desire that i % j have the same sign as j. If you want that, and also want: i == (i // j) * j + (i % j) then integer division has to return the floor. C also requires that identity to hold, and then compilers that truncate i // j need to make i % j have the same sign as i. There are few real use cases for i % j when j is negative. When j is positive, there are many, and in virtually all of them it?s more useful for i % j to be >= 0. If the clock says 10 now, what did it say 200 hours ago? -190 % 12 == 2 is useful; -190 % 12 == -10 is a bug waiting to bite." A user noticed that '-190 % 12 == -10' is False, but would be True is '-' were inserted before '12', and posted https://github.com/python/cpython/pull/2768 to correct the presumed typo. It is not a typo, and I will close the issue, but the text as is is confusing. I propose replace "-190 % 12 == -10 is" with "if -190 % 12 were the mathematically equivalent -10, it would be" [a bug waiting to bite]. I don't like the 'bug' part because it would not be a bug, exactly, but it would be bug bait. I am not sure how to improve it though. ---------- assignee: docs at python components: Documentation messages: 299023 nosy: docs at python, terry.reedy priority: normal severity: normal stage: patch review status: open title: Clarify programming faq. type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 17:53:08 2017 From: report at bugs.python.org (Ashok Bakthavathsalam) Date: Mon, 24 Jul 2017 21:53:08 +0000 Subject: [issue31021] Clarify programming faq. In-Reply-To: <1500933050.31.0.733502304217.issue31021@psf.upfronthosting.co.za> Message-ID: <1500933188.16.0.169178550562.issue31021@psf.upfronthosting.co.za> Changes by Ashok Bakthavathsalam : ---------- pull_requests: +2904 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 18:29:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 22:29:18 +0000 Subject: [issue30931] Race condition in asyncore may access the wrong dispatcher In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1500935358.79.0.388015513089.issue30931@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2905 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 18:33:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 22:33:58 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500935638.43.0.809456989752.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d7e64d9934d86aa6173229de5af5fe908662a33a by Victor Stinner in branch 'master': test_multiprocessing: Fix dangling process/thread (#2850) https://github.com/python/cpython/commit/d7e64d9934d86aa6173229de5af5fe908662a33a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 18:34:37 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 24 Jul 2017 22:34:37 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1500935677.56.0.942903024987.issue27099@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I don't think a clean break is possible as there's only one set of config files on the system. So, if someone runs Idle 3.7 (this version) and Idle 2.7, they would probably want their settings to be the same for both since that's how it would currently work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 18:39:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 22:39:12 +0000 Subject: [issue30985] Set closing variable in asyncore at close In-Reply-To: <1500661589.01.0.75637783455.issue30985@psf.upfronthosting.co.za> Message-ID: <1500935952.37.0.148757644811.issue30985@psf.upfronthosting.co.za> STINNER Victor added the comment: Proposed change looks more like an enhancement like a bug fix. I consider that features are not welcome anyone in the asyncore module, since it's now deprecated, replaced with selectors and asyncio. I would prefer to reject this issue. Giampaolo, Serhiy, Guido: what do you think? > Every user has to implement the closing once logic in dispatcher subclasses. Even if it's painful, I consider that it's an acceptable compromise. ---------- nosy: +giampaolo.rodola, gvanrossum, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 18:44:41 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 22:44:41 +0000 Subject: [issue30801] shoutdown process error with python 3.4 and pyqt/PySide In-Reply-To: <1498723003.06.0.480156754664.issue30801@psf.upfronthosting.co.za> Message-ID: <1500936281.17.0.550776109205.issue30801@psf.upfronthosting.co.za> Terry J. Reedy added the comment: You must demonstrate that there is a problem with 3.6 or 3.7 and then write a patch that fixes the problem in those versions. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 18:54:17 2017 From: report at bugs.python.org (Nir Soffer) Date: Mon, 24 Jul 2017 22:54:17 +0000 Subject: [issue30985] Set closing variable in asyncore at close In-Reply-To: <1500661589.01.0.75637783455.issue30985@psf.upfronthosting.co.za> Message-ID: <1500936857.42.0.153059115101.issue30985@psf.upfronthosting.co.za> Nir Soffer added the comment: I agree that this change alone is may not be important enough to fix in asyncore today - but this enables easy detection of closed sockets needed for https://github.com/python/cpython/pull/2764 or the alternative https://github.com/python/cpython/pull/2854. Unless you suggest a better way to detect closed dispatchers. Introducing new failures modes in asyncore is extremely risky, error handling in asyncore is the weakest point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 19:03:44 2017 From: report at bugs.python.org (Nir Soffer) Date: Mon, 24 Jul 2017 23:03:44 +0000 Subject: [issue30994] Asyncore does not need to copy map.items() before polling In-Reply-To: <1500768919.1.0.764948579908.issue30994@psf.upfronthosting.co.za> Message-ID: <1500937424.17.0.958367458899.issue30994@psf.upfronthosting.co.za> Nir Soffer added the comment: The advantage is avoiding wasteful copy on each iteration. ---------- nosy: +Nir Soffer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 19:14:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 23:14:22 +0000 Subject: [issue30931] Race condition in asyncore may access the wrong dispatcher In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1500938062.67.0.20622362549.issue30931@psf.upfronthosting.co.za> STINNER Victor added the comment: On my PR 2854, Nir added these comments (extract): "And now we try to read from close dispatcher. I think we should wait for #2804 (...)" Sorry, I don't understand. My PR fixes described the bug that you described in msg298682: "If a dispatchers is closed and and a new dispatcher is created, the new dispatcher may get the same file descriptor. If the file descriptor was in the ready list returned from poll()/select(), asyncore may try to invoke one of the callbacks (e.g. handle_write) on the new dispatcher." About reading from closed dispatcher: sorry, I don't know the asyncore concurrency model, but I know the asyncio concurrency model. In asyncio, I don't see why a "dispatcher" would affect any "unrelated" dispatcher. Said differently: if a dispatcher A closes the dispatcher B and dispatcher B is "readable", the read event will be handled anyway. The "close event" will be handled at the next loop iteration. The oversimplified asyncio model is "each iteration is atomic". Closing a dispatcher calls its del_channel() which removes its file descriptor from the asyncore map. -- If I understand correctly, the *current behaviour* depends on the file descriptor order, since select.select() and select.poll.poll() returns ordered file descriptors (smallest to largest). If a dispatcher A is called and closes a dispatcher B, the dispatcher B is called or not depending on the file descriptor. If A.fileno() < B.fileno(), B is not called. If A.fileno() > B.fileno(), B was already called. Am I right? What is the use case of a dispatcher closing another one? What is the consequence on my PR? Does the dispatcher B expects to not be called to read if it was already closed? I see that close() also immediately closes the underlying socket. Does it mean that my PR can triggered OSError since we try recv() on a closed socket? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 19:16:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 23:16:06 +0000 Subject: [issue30994] Asyncore does not need to copy map.items() before polling In-Reply-To: <1500768919.1.0.764948579908.issue30994@psf.upfronthosting.co.za> Message-ID: <1500938166.06.0.247784495515.issue30994@psf.upfronthosting.co.za> STINNER Victor added the comment: asyncore is now deprecated and I prefer to restrict changes to minimum to avoid regressions. While the change makes sense, it only looks like a very cheap micro-optimization. I don't think that it's worth it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 19:31:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 23:31:27 +0000 Subject: [issue30985] Set closing variable in asyncore at close In-Reply-To: <1500661589.01.0.75637783455.issue30985@psf.upfronthosting.co.za> Message-ID: <1500939087.59.0.513054226611.issue30985@psf.upfronthosting.co.za> STINNER Victor added the comment: "Fixing closing attribute will allow fixing the races during asyncore.poll() and asyncore.poll2(), see https://github.com/python/cpython/pull/2764" Aha, *slowly* I understand that asyncore is vulnerable to multiple race conditions, and it seems lile we require to set a new closing attribute to fix it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 19:34:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 23:34:27 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500939267.33.0.55391500098.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: > test.test_multiprocessing_spawn.WithProcessesTestPool.test_traceback Oh, this test only "leaks" dangling processes and threads because PR 2841 was too strict. The problem is that multiprocessing.Pool has thread attributes which hold references to the pool: reference cycle. I don't see any easy way to break these cycles; since I don't understand if a poll is still supposed to be usable after terminate() or not. Anyway, my intent here was to do a first cleanup. So I modified my PR 2841 to call support.gc_collect() to break reference cycles. If someone wants to break reference cycles, please open a new issue. IMHO this issue already became enough complex :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 19:53:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 23:53:41 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500940421.75.0.406381574972.issue26762@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2906 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 19:55:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 23:55:56 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500940556.65.0.683085122826.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ffb49408f0780ae80a553208aa133bc5bb3ba129 by Victor Stinner in branch 'master': test_multiprocessing detects dangling per test case (#2841) https://github.com/python/cpython/commit/ffb49408f0780ae80a553208aa133bc5bb3ba129 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 20:36:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 00:36:10 +0000 Subject: [issue31022] ERROR: testRegularFile (test.test_socket.SendfileUsingSendTest) random failure on AppVeyor Message-ID: <1500942970.9.0.437902553095.issue31022@psf.upfronthosting.co.za> New submission from STINNER Victor: https://ci.appveyor.com/project/python/cpython/build/3.7.0a0.4809 (...) testNonRegularFile (test.test_socket.SendfileUsingSendTest) ... ok testOffset (test.test_socket.SendfileUsingSendTest) ... ok testRegularFile (test.test_socket.SendfileUsingSendTest) ... ERROR testWithTimeout (test.test_socket.SendfileUsingSendTest) ... ok testWithTimeoutTriggeredSend (test.test_socket.SendfileUsingSendTest) ... ok (...) ====================================================================== ERROR: testRegularFile (test.test_socket.SendfileUsingSendTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_socket.py", line 5225, in testRegularFile data = self.recv_data(conn) File "C:\projects\cpython\lib\test\test_socket.py", line 5201, in recv_data chunk = conn.recv(self.BUFSIZE) socket.timeout: timed out ---------------------------------------------------------------------- ---------- components: Tests messages: 299035 nosy: haypo priority: normal severity: normal status: open title: ERROR: testRegularFile (test.test_socket.SendfileUsingSendTest) random failure on AppVeyor versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 20:40:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 00:40:59 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500943259.34.0.767967921927.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b4c52966c810b5c5e088fceff403247f610b7d13 by Victor Stinner in branch 'master': bpo-26762: test_multiprocessing close more queues (#2855) https://github.com/python/cpython/commit/b4c52966c810b5c5e088fceff403247f610b7d13 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 21:05:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 01:05:43 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1500944743.71.0.0704000174628.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, I pushed 3 changes. Only one test still has a minor issue: test.test_multiprocessing_spawn.WithProcessesTestPool.test_context The bpo-31019 fixes it. Later, we will be able to modify ManagerMixin.tearDownClass() to emit a warning immediately if a manager leaks a process, and not have this kind loop to sleep until all processes completed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 21:33:09 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 25 Jul 2017 01:33:09 +0000 Subject: [issue30999] statistics module: add "key" keyword argument to median, mode, ... In-Reply-To: <1500924567.24.0.886645031856.issue30999@psf.upfronthosting.co.za> Message-ID: <20170725013302.GS3149@ando.pearwood.info> Steven D'Aprano added the comment: I've given this some more thought, and I think that a "key" argument would make sense for a general selection function. The general selection problem is: given a set of items A, and a number k between 1 and the number of items, return the k-th item. In Python terms, we would use a list, and 0 <= k < len(A) instead. https://www.cs.rochester.edu/~gildea/csc282/slides/C09-median.pdf I've had the idea of adding a select(A, k) function to statistics for a while now. Then the median_low would be equivalent to select(A, len(A)//2) and median_high would be select(A, len(A)//2 + 1). I'd leave the median_* functions as they are, and possibly include a key function in select. I don't think it makes sense to add key arguments to mode, mean, variance etc. I'm having trouble thinking of what that would even mean (no pun intented): it's unlikely that the mean will actually a data value (except by accident, or by careful construction of the data). Variance has the wrong units (it is the units of your data, squared) and the stdev is conceptually a difference between data values, not a data value itself, so it doesn't even make sense to apply a key function and return one of the data points. And mode counts objects, so it already applies to non-numeric data. It's even documented as applying to nominal data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 22:07:40 2017 From: report at bugs.python.org (svelankar) Date: Tue, 25 Jul 2017 02:07:40 +0000 Subject: [issue30732] json.dumps() lacks information about RecursionError related to default function In-Reply-To: <1498124337.07.0.93184881583.issue30732@psf.upfronthosting.co.za> Message-ID: <1500948460.87.0.52918995364.issue30732@psf.upfronthosting.co.za> Changes by svelankar : ---------- pull_requests: +2907 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 22:30:26 2017 From: report at bugs.python.org (svelankar) Date: Tue, 25 Jul 2017 02:30:26 +0000 Subject: [issue30732] json.dumps() lacks information about RecursionError related to default function In-Reply-To: <1498124337.07.0.93184881583.issue30732@psf.upfronthosting.co.za> Message-ID: <1500949826.23.0.478854665656.issue30732@psf.upfronthosting.co.za> Changes by svelankar : ---------- pull_requests: +2908 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 22:41:55 2017 From: report at bugs.python.org (svelankar) Date: Tue, 25 Jul 2017 02:41:55 +0000 Subject: [issue31023] Git Bootcamp and Cheat Sheet - Section 32.10 - Creating a Pull request needs an additional step Message-ID: <1500950515.8.0.297032298923.issue31023@psf.upfronthosting.co.za> New submission from svelankar: Section 32.10 - Creating a Pull Request Step 2 should be changed to Step 3 and so on. And a new step i.e. step 2 as "Press new pull request button" ---------- assignee: docs at python components: Documentation messages: 299039 nosy: docs at python, svelankar priority: normal severity: normal status: open title: Git Bootcamp and Cheat Sheet - Section 32.10 - Creating a Pull request needs an additional step _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 22:48:59 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 25 Jul 2017 02:48:59 +0000 Subject: [issue31023] Git Bootcamp and Cheat Sheet - Section 32.10 - Creating a Pull request needs an additional step In-Reply-To: <1500950515.8.0.297032298923.issue31023@psf.upfronthosting.co.za> Message-ID: <1500950939.12.0.108628872449.issue31023@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi, the issue tracker for the Dev guide is at https://github.com/python/DevGuide Can you file this issue there? Thanks. ---------- nosy: +Mariatta resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 23:44:21 2017 From: report at bugs.python.org (Craig McQueen) Date: Tue, 25 Jul 2017 03:44:21 +0000 Subject: [issue11129] logging: allow multiple entries in qualname config In-Reply-To: <1296917082.92.0.764608919678.issue11129@psf.upfronthosting.co.za> Message-ID: <1500954261.93.0.5908248626.issue11129@psf.upfronthosting.co.za> Changes by Craig McQueen : ---------- nosy: +cmcqueen1975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 02:13:22 2017 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 25 Jul 2017 06:13:22 +0000 Subject: [issue13429] provide __file__ to extension init function In-Reply-To: <1321631218.51.0.537222078649.issue13429@psf.upfronthosting.co.za> Message-ID: <1500963202.14.0.606932976694.issue13429@psf.upfronthosting.co.za> Stefan Behnel added the comment: This has been resolved by PEP 489, issue 24268. The module initialisation process receives the complete ModuleSpec now, starting with CPython 3.5, and can do with it whatever it likes, before executing any user code. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 03:10:59 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 25 Jul 2017 07:10:59 +0000 Subject: [issue29469] AST-level Constant folding In-Reply-To: <1486440158.46.0.424511474325.issue29469@psf.upfronthosting.co.za> Message-ID: <1500966659.05.0.0445157664243.issue29469@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +2909 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 03:17:50 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 25 Jul 2017 07:17:50 +0000 Subject: [issue31003] IDLE: Add tests for help sources on configdialog general tab Message-ID: <1500967070.15.0.0149219336702.issue31003@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Bugs discovered while testing for tests; fix in followup that also streamlines layout. Size vars are StringVars and write text strings that give invalid warning when read. Use IntVars and enforce minimum at least 1? Test what tk allows. Will IntVar reject non-digits? Helplist: up/down move selection indicator but do not change selection. Fix as with fontlist. Will not edit/delete what expect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 03:21:50 2017 From: report at bugs.python.org (Pierre Quentel) Date: Tue, 25 Jul 2017 07:21:50 +0000 Subject: [issue29512] regrtest refleak: implement bisection feature In-Reply-To: <1486640763.77.0.630012847727.issue29512@psf.upfronthosting.co.za> Message-ID: <1500967310.82.0.567676646762.issue29512@psf.upfronthosting.co.za> Pierre Quentel added the comment: Maybe it's me who is doing things wrong, but when I run Lib/test/test_httpservers.py I get this strange error : Traceback (most recent call last): File "C:\cpython\Lib\test\test_httpservers.py", line 7, in from http.server import BaseHTTPRequestHandler, HTTPServer, \ File "c:\python36\lib\http\server.py", line 92, in import email.utils File "c:\python36\lib\email\utils.py", line 28, in import random File "c:\python36\lib\random.py", line 48, in import bisect as _bisect File "C:\cpython\Lib\test\bisect.py", line 27, in import tempfile File "c:\python36\lib\tempfile.py", line 45, in from random import Random as _Random ImportError: cannot import name 'Random' I see that the bisect module is loaded from location /test/bisect.py because of the script introduced in the resolution of this issue. Is it intentional to give it the same name as a module of the standard library ? ---------- nosy: +quentel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 03:26:54 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 25 Jul 2017 07:26:54 +0000 Subject: [issue31003] IDLE: Add tests for help sources on configdialog general tab In-Reply-To: <1500967070.15.0.0149219336702.issue31003@psf.upfronthosting.co.za> Message-ID: <1500967614.78.0.267166925839.issue31003@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2910 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 03:50:34 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 25 Jul 2017 07:50:34 +0000 Subject: [issue31018] _tracemalloc frame_t packing optimization not working in Windows x64 In-Reply-To: <1500916841.59.0.00710376227878.issue31018@psf.upfronthosting.co.za> Message-ID: <1500969034.8.0.733541240592.issue31018@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 04:00:41 2017 From: report at bugs.python.org (Pierre Quentel) Date: Tue, 25 Jul 2017 08:00:41 +0000 Subject: [issue30576] http.server should support HTTP compression (gzip) In-Reply-To: <1496691724.59.0.955308322691.issue30576@psf.upfronthosting.co.za> Message-ID: <1500969641.81.0.422302965147.issue30576@psf.upfronthosting.co.za> Pierre Quentel added the comment: In the latest version of the Pull Request (https://github.com/python/cpython/pull/2078/commits/6466c93555bec521860c57e832b691fe7f0c6c20) : - compression is disabled by default (compressed_types is set to []) - as suggested by Chris Barker in the discussion on python-ideas, I added a list of commonly compressed types that can be used as the value of compressed_types in subclasses of SimpleHTTPRequestHandler. For want of official sources I took the list from https://github.com/h5bp/server-configs-apache. - a command-line option --gzip has been introduced, when it is set, the list of commonly compressed types is used - the implementation of compression for "big files" has been changed : as suggested by Victor and Christian, no more temporary file, compressed data is now sent as chunks using Chunked Transfer Encoding. The file object returned by send_head() is a generator that produces the chunks of compressed data ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 04:04:43 2017 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 25 Jul 2017 08:04:43 +0000 Subject: [issue31021] Clarify programming faq. In-Reply-To: <1500933050.31.0.733502304217.issue31021@psf.upfronthosting.co.za> Message-ID: <1500969883.59.0.832612075989.issue31021@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 04:16:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 08:16:25 +0000 Subject: [issue29512] regrtest refleak: implement bisection feature In-Reply-To: <1486640763.77.0.630012847727.issue29512@psf.upfronthosting.co.za> Message-ID: <1500970585.52.0.581335495798.issue29512@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are many ways of running tests, and some of them are broken now. $ ./python Lib/test/test_bisect.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE ====================================================================== ERROR: test_backcompatibility (__main__.TestBisectC) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bisect.py", line 34, in setUp (self.module.bisect_right, [], 1, 0), AttributeError: module 'bisect' has no attribute 'bisect_right' ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 04:47:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 08:47:48 +0000 Subject: [issue31018] _tracemalloc frame_t packing optimization not working in Windows x64 In-Reply-To: <1500916841.59.0.00710376227878.issue31018@psf.upfronthosting.co.za> Message-ID: <1500972468.1.0.0683574380116.issue31018@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 39243779f4c97ec6f700fa73c007ca66dfa9408e by Victor Stinner (Segev Finer) in branch 'master': bpo-31018: Switch to #pragma pack from __declspec(align) (#2848) https://github.com/python/cpython/commit/39243779f4c97ec6f700fa73c007ca66dfa9408e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 04:49:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 08:49:13 +0000 Subject: [issue31018] _tracemalloc frame_t packing optimization not working in Windows x64 In-Reply-To: <1500916841.59.0.00710376227878.issue31018@psf.upfronthosting.co.za> Message-ID: <1500972553.83.0.622684460866.issue31018@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 05:07:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 09:07:26 +0000 Subject: [issue29512] regrtest refleak: implement bisection feature In-Reply-To: <1486640763.77.0.630012847727.issue29512@psf.upfronthosting.co.za> Message-ID: <1500973646.36.0.201073519509.issue29512@psf.upfronthosting.co.za> STINNER Victor added the comment: Workarounds: * ./python -m test test_httpservers * ./python -I Lib/test/test_httpservers.py > Maybe it's me who is doing things wrong, but when I run Lib/test/test_httpservers.py I get this strange error : ... File "c:\python36\lib\random.py", line 48, in import bisect as _bisect File "C:\cpython\Lib\test\bisect.py", line 27, in ... Oh. Lib/test/ should not be in sys.path. "import bisect" loaded Lib/test/bisect.py instead of Lib/bisect.py. See my commit 3050987d85d7cf8cdd4b3c053e673d13cd8dfb12 in Python 2.7: * regrtest now removes '' and Lib/test/ from sys.path * Use absolute import in test_bisect (regrtest in master already does something similar.) But the sys.path is only fixed when regrtest is used... > There are many ways of running tests, and some of them are broken now. > $ ./python Lib/test/test_bisect.py ... if you run Lib/test/test_xxx.py directly, Lib/test/ is added to sys.path, except if you use -I: $ ./python -I Lib/test/test_bisect.py .................................... ---------------------------------------------------------------------- Ran 36 tests in 0.094s OK I didn't know that "./python Lib/test/test_bisect.py" was broken :-( Maybe Lib/test/support/__init__.py can remove Lib/test/ from sys.path? Another option is to move or rename Lib/test/bisect.py. For example, replace "./python -m test.bisect ..." with "./python -m test bisect ..." (or maybe "./python -m test --bisect ..."). The problem is that bisect has extra options, but we can add a bisect prefix to these options. I reopen this issue. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 06:40:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 10:40:27 +0000 Subject: [issue26657] Directory traversal with http.server and SimpleHTTPServer on windows In-Reply-To: <1459179015.77.0.509336394494.issue26657@psf.upfronthosting.co.za> Message-ID: <1500979227.58.0.0752596064781.issue26657@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2911 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 06:47:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 10:47:53 +0000 Subject: [issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699) In-Reply-To: <1416797425.29.0.948172439575.issue22928@psf.upfronthosting.co.za> Message-ID: <1500979673.22.0.958109350465.issue22928@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2912 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 07:17:40 2017 From: report at bugs.python.org (=?utf-8?b?QmVybsOhdCBHw6Fib3I=?=) Date: Tue, 25 Jul 2017 11:17:40 +0000 Subject: [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv Message-ID: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> New submission from Bern?t G?bor: Hello, typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv which means that Sphinx fails to find these. Thanks, ---------- components: Library (Lib) messages: 299048 nosy: Bern?t G?bor priority: normal severity: normal status: open title: typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 07:40:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 11:40:50 +0000 Subject: [issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699) In-Reply-To: <1416797425.29.0.948172439575.issue22928@psf.upfronthosting.co.za> Message-ID: <1500982850.24.0.175003323823.issue22928@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is the difference between PR 2817 and PR 2861? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 07:42:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 11:42:38 +0000 Subject: [issue31009] test_multiprocessing_spawn hangs randomly on AMD64 Windows10 3.x and AMD64 Windows8 3.x In-Reply-To: <1500887712.38.0.66903662356.issue31009@psf.upfronthosting.co.za> Message-ID: <1500982958.93.0.610547964616.issue31009@psf.upfronthosting.co.za> STINNER Victor added the comment: test_multiprocessing_spawn hangs on running test_child_fd_inflation(). Child processes call test.support.fd_count(). But in a debug build, if the fd is invalid, os.dup(fd) kills immediately the process without letting Python to handle the error. It seems like os.dup(fd) raises a OSError(EBADF), as expected, in release mode. The test is new and currently only in master, see bpo-26732. The commit: commit 896145d9d266ee2758cfcd7691238cbc1f9e1ab8 Author: Antoine Pitrou Date: Sat Jul 22 13:22:54 2017 +0200 bpo-26732: fix too many fds in processes started with the "forkserver" method (#2813) * bpo-26732: fix too many fds in processes started with the "forkserver" method A child process would inherit as many fds as the number of still-running children. * Add blurb and test comment ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 07:45:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 11:45:47 +0000 Subject: [issue26732] multiprocessing sentinel resource leak In-Reply-To: <1460325501.58.0.225914662536.issue26732@psf.upfronthosting.co.za> Message-ID: <1500983146.98.0.771314313104.issue26732@psf.upfronthosting.co.za> STINNER Victor added the comment: The newly added test now hangs on almost all Windows buildbots, see: http://bugs.python.org/issue31009#msg299050 ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 07:46:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 11:46:12 +0000 Subject: [issue26732] multiprocessing sentinel resource leak In-Reply-To: <1460325501.58.0.225914662536.issue26732@psf.upfronthosting.co.za> Message-ID: <1500983172.7.0.736675203751.issue26732@psf.upfronthosting.co.za> STINNER Victor added the comment: By the way, 3.6 is marked as affected, but the change wasn't backported to 3.6? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 07:52:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 11:52:07 +0000 Subject: [issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699) In-Reply-To: <1416797425.29.0.948172439575.issue22928@psf.upfronthosting.co.za> Message-ID: <1500983527.47.0.118643709319.issue22928@psf.upfronthosting.co.za> STINNER Victor added the comment: > What is the difference between PR 2817 and PR 2861? Oh crap, I didn't know that you already created a PR. I compared the two PR: * My PR adds \A at the start of: _is_legal_header_name = re.compile(rb'\A[^:\s][^:\r\n]*\Z').match * My PR uses blurb, yours modifies Misc/NEWS The \A was copied from the Python 2.7 commit, since Python 3.3 doesn't have fullmatch(). If you are ok to add \A and convert the NEWS entry to blurb, I can abandon my duplicated PR. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:03:58 2017 From: report at bugs.python.org (Arthur Darcet) Date: Tue, 25 Jul 2017 12:03:58 +0000 Subject: [issue31025] io.BytesIO: no way to get the length of the underlying buffer without copying data Message-ID: <1500984238.01.0.587335781014.issue31025@psf.upfronthosting.co.za> New submission from Arthur Darcet: If I'm not mistaken, a BytesIO buffer can be in three states: (1) `b = BytesIO(b'data')` -> free of any constraints (2) `d = b'data'; b = BytesIO(d)` -> cannot modify the underlying bytes without copying them (3) `b = BytesIO(b'data'); d = b.getbuffer()` -> cannot return a "bytes" representation of the data without copying it (the underlying buffer might change) My use-case is "how to get the length of the data currently in the BytesIO object". And right now, there are two solutions: (a) `len(b.getvalue())` (b) `len(b.getbuffer())` but, solution (a) is copying data if the buffer is in state (3) ; and solution (b) is copying data for state (2). And I don't see any way to distinguish between the three states from Python code. So as far as I understand it, there is no way to get the size of the buffer in Python that would reliably not copy any data Should I open a PR to add a `size()` method on the BytesIO class? (simply returning `PyLong_FromSsize_t(self->string_size)` ---------- components: IO messages: 299054 nosy: rthr priority: normal severity: normal status: open title: io.BytesIO: no way to get the length of the underlying buffer without copying data type: enhancement versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:10:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 12:10:17 +0000 Subject: [issue31026] test_bisect fails when run directly Message-ID: <1500984617.08.0.739686632306.issue31026@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: $ ./python Lib/test/test_dbm.py ..BDB0004 fop_read_meta: @test_29975_tmp_ndbm.db: unexpected file type or format ..EBDB3028 @test_29975_tmp.db: unable to flush: No such file or directory ..EBDB3028 @test_29975_tmp.db: unable to flush: No such file or directory .E......... ====================================================================== ERROR: test_anydbm_creation (__main__.TestCase-dbm.ndbm) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_dbm.py", line 73, in test_anydbm_creation self.read_helper(f) File "Lib/test/test_dbm.py", line 114, in read_helper self.assertEqual(self._dict[key], f[key.encode("ascii")]) KeyError: b'0' ====================================================================== ERROR: test_anydbm_modification (__main__.TestCase-dbm.ndbm) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_dbm.py", line 88, in test_anydbm_modification self.read_helper(f) File "Lib/test/test_dbm.py", line 114, in read_helper self.assertEqual(self._dict[key], f[key.encode("ascii")]) KeyError: b'0' ====================================================================== ERROR: test_anydbm_read (__main__.TestCase-dbm.ndbm) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_dbm.py", line 94, in test_anydbm_read self.read_helper(f) File "Lib/test/test_dbm.py", line 114, in read_helper self.assertEqual(self._dict[key], f[key.encode("ascii")]) KeyError: b'0' ---------------------------------------------------------------------- Ran 19 tests in 0.683s FAILED (errors=3) ---------- components: Tests messages: 299055 nosy: serhiy.storchaka priority: normal severity: normal status: open title: test_bisect fails when run directly type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:10:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 12:10:33 +0000 Subject: [issue31009] test_multiprocessing_spawn hangs randomly on AMD64 Windows10 3.x and AMD64 Windows8 3.x In-Reply-To: <1500887712.38.0.66903662356.issue31009@psf.upfronthosting.co.za> Message-ID: <1500984633.89.0.754641776273.issue31009@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2913 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:14:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 12:14:58 +0000 Subject: [issue31026] test_dbm fails when run directly In-Reply-To: <1500984617.08.0.739686632306.issue31026@psf.upfronthosting.co.za> Message-ID: <1500984898.38.0.0469910722501.issue31026@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: test_bisect fails when run directly -> test_dbm fails when run directly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:14:58 2017 From: report at bugs.python.org (Martin Panter) Date: Tue, 25 Jul 2017 12:14:58 +0000 Subject: [issue31025] io.BytesIO: no way to get the length of the underlying buffer without copying data In-Reply-To: <1500984238.01.0.587335781014.issue31025@psf.upfronthosting.co.za> Message-ID: <1500984898.9.0.652322925816.issue31025@psf.upfronthosting.co.za> Martin Panter added the comment: Can?t you use b.seek(0, SEEK_END)? ---------- nosy: +martin.panter versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:17:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 12:17:21 +0000 Subject: [issue31027] test_listcomps fails when run directly Message-ID: <1500985041.62.0.809402011924.issue31027@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: $ ./python Lib/test/test_listcomps.py doctest (test.test_listcomps) ... 33 tests with zero failures Traceback (most recent call last): File "Lib/test/test_listcomps.py", line 148, in test_main(verbose=True) File "Lib/test/test_listcomps.py", line 142, in test_main support.run_doctest(test_genexps, verbose) NameError: name 'test_genexps' is not defined ---------- components: Tests messages: 299057 nosy: serhiy.storchaka priority: normal severity: normal status: open title: test_listcomps fails when run directly type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:19:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 12:19:18 +0000 Subject: [issue31026] test_dbm fails when run directly In-Reply-To: <1500984617.08.0.739686632306.issue31026@psf.upfronthosting.co.za> Message-ID: <1500985158.02.0.932973726.issue31026@psf.upfronthosting.co.za> STINNER Victor added the comment: On my Linux (Fedora 25), "./python Lib/test/test_dbm.py" and "./python -m test test_dbm" both succeed. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:20:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 12:20:58 +0000 Subject: [issue31028] test_pydoc fails when run directly Message-ID: <1500985258.67.0.797354625815.issue31028@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: $ ./python Lib/test/test_pydoc.py ... ====================================================================== ERROR: test_mixed_case_module_names_are_lower_cased (__main__.PydocDocTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_pydoc.py", line 462, in test_mixed_case_module_names_are_lower_cased self.assertIn('xml.etree.elementtree', doc_link) File "/home/serhiy/py/cpython/Lib/unittest/case.py", line 1102, in assertIn if member not in container: TypeError: argument of type 'NoneType' is not iterable ---------------------------------------------------------------------- Ran 49 tests in 5.716s FAILED (errors=1, skipped=3) Traceback (most recent call last): File "Lib/test/test_pydoc.py", line 1106, in test_main() File "/home/serhiy/py/cpython/Lib/test/support/__init__.py", line 2071, in decorator return func(*args) File "Lib/test/test_pydoc.py", line 1100, in test_main PydocWithMetaClasses, File "/home/serhiy/py/cpython/Lib/test/support/__init__.py", line 1940, in run_unittest _run_suite(suite) File "/home/serhiy/py/cpython/Lib/test/support/__init__.py", line 1905, in _run_suite raise TestFailed(err) test.support.TestFailed: Traceback (most recent call last): File "Lib/test/test_pydoc.py", line 462, in test_mixed_case_module_names_are_lower_cased self.assertIn('xml.etree.elementtree', doc_link) File "/home/serhiy/py/cpython/Lib/unittest/case.py", line 1102, in assertIn if member not in container: TypeError: argument of type 'NoneType' is not iterable ---------- components: Tests messages: 299059 nosy: serhiy.storchaka priority: normal severity: normal status: open title: test_pydoc fails when run directly type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:21:58 2017 From: report at bugs.python.org (Arthur Darcet) Date: Tue, 25 Jul 2017 12:21:58 +0000 Subject: [issue31025] io.BytesIO: no way to get the length of the underlying buffer without copying data In-Reply-To: <1500984238.01.0.587335781014.issue31025@psf.upfronthosting.co.za> Message-ID: <1500985318.61.0.174020332308.issue31025@psf.upfronthosting.co.za> Arthur Darcet added the comment: it's a tiny bit slow, but that works, thank you. I guess we can close this % python -m timeit -s "import io; b = io.BytesIO(b'0' * 2 ** 30)" "p = b.tell(); b.seek(0, 2); b.tell(); b.seek(p)" 1000000 loops, best of 3: 0.615 usec per loop % python -m timeit -s "import io; b = io.BytesIO(b'0' * 2 ** 30)" "len(b.getvalue())" 10000000 loops, best of 3: 0.174 usec per loop ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:22:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 12:22:28 +0000 Subject: [issue31026] test_dbm fails when run directly In-Reply-To: <1500984617.08.0.739686632306.issue31026@psf.upfronthosting.co.za> Message-ID: <1500985348.08.0.459711270436.issue31026@psf.upfronthosting.co.za> STINNER Victor added the comment: Which dbm implementation are you using? Do you have the following modules? haypo at selma$ ./python Python 3.7.0a0 (heads/master:3924377, Jul 25 2017, 14:17:41) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import _gdbm >>> import _dbm ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:25:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 12:25:22 +0000 Subject: [issue31029] test_tokenize fails when run directly Message-ID: <1500985522.57.0.56152485573.issue31029@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: $ ./python Lib/test/test_tokenize.py Traceback (most recent call last): File "Lib/test/test_tokenize.py", line 1607, in unittest.main() NameError: name 'unittest' is not defined ---------- components: Tests keywords: easy messages: 299062 nosy: serhiy.storchaka priority: normal severity: normal status: open title: test_tokenize fails when run directly type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:27:20 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Jul 2017 12:27:20 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1500985640.89.0.339753756875.issue30923@psf.upfronthosting.co.za> St?phane Wirtel added the comment: @stefan In fact I could create the PR for the backports, but I have again the same issues for the rest of CPython. I have checked your code, and in my case 'gcc' is in the cc string, 'gcc -pthread' and you have fixed for libmpdec. But for the other modules ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:30:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 12:30:25 +0000 Subject: [issue31028] test_pydoc fails when run directly In-Reply-To: <1500985258.67.0.797354625815.issue31028@psf.upfronthosting.co.za> Message-ID: <1500985825.52.0.185626105459.issue31028@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2914 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:31:00 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Jul 2017 12:31:00 +0000 Subject: [issue31029] test_tokenize fails when run directly In-Reply-To: <1500985522.57.0.56152485573.issue31029@psf.upfronthosting.co.za> Message-ID: <1500985860.74.0.396923065187.issue31029@psf.upfronthosting.co.za> St?phane Wirtel added the comment: fixed, I am going to push my branch ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:33:10 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Jul 2017 12:33:10 +0000 Subject: [issue31029] test_tokenize fails when run directly In-Reply-To: <1500985522.57.0.56152485573.issue31029@psf.upfronthosting.co.za> Message-ID: <1500985990.83.0.79576137451.issue31029@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- pull_requests: +2915 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:41:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 12:41:50 +0000 Subject: [issue31030] sys.executable can be not normalized Message-ID: <1500986510.69.0.620251860274.issue31030@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: test_executable in Lib/test/test_sys.py tests that sys.executable is absolute. But this test is too strong, it fails if sys.executable is not normalized. $ Lib/../python -m test test_sys Run tests sequentially 0:00:00 load avg: 0.39 [1/1] test_sys test test_sys failed -- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_sys.py", line 649, in test_executable self.assertEqual(os.path.abspath(sys.executable), sys.executable) AssertionError: '/home/serhiy/py/cpython/python' != '/home/serhiy/py/cpython/Lib/../python' - /home/serhiy/py/cpython/python + /home/serhiy/py/cpython/Lib/../python ? +++++++ test_sys failed 1 test failed: test_sys Total duration: 2 sec Tests result: FAILURE I don't know what is wrong: the value of sys.executable or the test. ---------- components: Interpreter Core, Tests messages: 299065 nosy: serhiy.storchaka priority: normal severity: normal status: open title: sys.executable can be not normalized type: behavior versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:44:01 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Jul 2017 12:44:01 +0000 Subject: [issue31029] test_tokenize fails when run directly In-Reply-To: <1500985522.57.0.56152485573.issue31029@psf.upfronthosting.co.za> Message-ID: <1500986641.33.0.611071458852.issue31029@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Serhiy you are free to merge my PR, and I will do the backport for 3.6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:44:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 12:44:46 +0000 Subject: [issue31030] sys.executable can be not normalized In-Reply-To: <1500986510.69.0.620251860274.issue31030@psf.upfronthosting.co.za> Message-ID: <1500986686.97.0.211573184937.issue31030@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: test_venv fails for the same cause. $ Lib/../python -m test -m test_defaults test_venv Run tests sequentially 0:00:00 load avg: 0.31 [1/1] test_venv test test_venv failed -- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_venv.py", line 103, in test_defaults self.assertIn('home = %s' % path, data) AssertionError: 'home = /home/serhiy/py/cpython/Lib/..' not found in 'home = /home/serhiy/py/cpython\ninclude-system-site-packages = false\nversion = 3.7.0\n' test_venv failed 1 test failed: test_venv Total duration: 166 ms Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:45:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 12:45:57 +0000 Subject: [issue31030] sys.executable can be not normalized In-Reply-To: <1500986510.69.0.620251860274.issue31030@psf.upfronthosting.co.za> Message-ID: <1500986757.57.0.359169510485.issue31030@psf.upfronthosting.co.za> STINNER Victor added the comment: Technically, /home/serhiy/py/cpython/Lib/../python is absolute and is a valid path. I'm not sure that it's possible to normalize sys.executable early in the Python initialization. If we modify the site module to normalize sys.executable, it would mean that sys.executable wouldn't be normalized when using the python3 -S command line option. I dislike having subtle differences between site and no site. I suggest to normalize sys.executable in the unit test. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:48:04 2017 From: report at bugs.python.org (Niklas Fiekas) Date: Tue, 25 Jul 2017 12:48:04 +0000 Subject: [issue31031] Unify duplicate bits_in_digit and bit_length Message-ID: <1500986884.91.0.522602979941.issue31031@psf.upfronthosting.co.za> New submission from Niklas Fiekas: My previous patch to optimize bits_in_digit was rejected: http://bugs.python.org/issue29782 This leaves this issue open (mathmodule.c): /* XXX: This routine does more or less the same thing as * bits_in_digit() in Objects/longobject.c. Someday it would be nice to * consolidate them. On BSD, there's a library function called fls() * that we could use, and GCC provides __builtin_clz(). */ We could still deal with the code duplication without the complexity of the optimizations in the previous patch. ---------- components: Interpreter Core messages: 299069 nosy: louielu, mark.dickinson, niklasf priority: normal severity: normal status: open title: Unify duplicate bits_in_digit and bit_length type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:50:43 2017 From: report at bugs.python.org (Niklas Fiekas) Date: Tue, 25 Jul 2017 12:50:43 +0000 Subject: [issue31031] Unify duplicate bits_in_digit and bit_length In-Reply-To: <1500986884.91.0.522602979941.issue31031@psf.upfronthosting.co.za> Message-ID: <1500987043.06.0.450351899728.issue31031@psf.upfronthosting.co.za> Changes by Niklas Fiekas : ---------- pull_requests: +2916 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:51:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 12:51:20 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1500987080.58.0.846326318199.issue30923@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, I don't think that it's worth it to backport changes which only fix warnings. Usually, we first focus on fixing all warnings on master. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:53:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 12:53:07 +0000 Subject: [issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699) In-Reply-To: <1416797425.29.0.948172439575.issue22928@psf.upfronthosting.co.za> Message-ID: <1500987187.5.0.00742406021437.issue22928@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: \A is not needed. match() always matches from the start. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:54:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 12:54:59 +0000 Subject: [issue31031] Unify duplicate bits_in_digit and bit_length In-Reply-To: <1500986884.91.0.522602979941.issue31031@psf.upfronthosting.co.za> Message-ID: <1500987299.25.0.987249835775.issue31031@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:58:04 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Jul 2017 12:58:04 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1500987484.94.0.520067423153.issue30923@psf.upfronthosting.co.za> St?phane Wirtel added the comment: yep, currently, 3.6 and 3.5 are in 'bug fix' mode, and in this case, it's not a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:05:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 13:05:24 +0000 Subject: [issue31026] test_dbm fails when run directly In-Reply-To: <1500984617.08.0.739686632306.issue31026@psf.upfronthosting.co.za> Message-ID: <1500987924.51.0.251322753409.issue31026@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >>> import _gdbm Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named '_gdbm' >>> import _dbm >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:12:32 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Tue, 25 Jul 2017 13:12:32 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1500988352.74.0.422465920945.issue27099@psf.upfronthosting.co.za> Charles Wohlganger added the comment: Unfortunately, it looks like config deletes settings for extensions when they are not found - which is what will happen with this patch. One solution would be to have separate config files for 2 and 3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:13:10 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Jul 2017 13:13:10 +0000 Subject: [issue31032] test_ssl Message-ID: <1500988390.15.0.0705415261794.issue31032@psf.upfronthosting.co.za> New submission from St?phane Wirtel: Last commit on master commit ccfdb60af7b2db578c1aceb7742cec0330766667 (HEAD -> master, upstream/master, upstream/HEAD) Fedora 26 openssl-libs-1.1.0f-7.fc26.x86_64 openssl-devel-1.1.0f-7.fc26.x86_64 openssl-1.1.0f-7.fc26.x86_64 ``` Run tests sequentially 0:00:00 load avg: 1.07 [1/1] test_ssl Exception in thread Thread-85: Traceback (most recent call last): File "/home/stephane/src/github.com/python/cpython/Lib/threading.py", line 917, in _bootstrap_inner self.run() File "/home/stephane/src/github.com/python/cpython/Lib/test/test_ssl.py", line 1936, in run if not self.wrap_conn(): File "/home/stephane/src/github.com/python/cpython/Lib/test/test_ssl.py", line 1881, in wrap_conn self.sock, server_side=True) File "/home/stephane/src/github.com/python/cpython/Lib/ssl.py", line 401, in wrap_socket _context=self, _session=session) File "/home/stephane/src/github.com/python/cpython/Lib/ssl.py", line 808, in __init__ self.do_handshake() File "/home/stephane/src/github.com/python/cpython/Lib/ssl.py", line 1061, in do_handshake self._sslobj.do_handshake() File "/home/stephane/src/github.com/python/cpython/Lib/ssl.py", line 683, in do_handshake self._sslobj.do_handshake() OSError: [Errno 0] Error test test_ssl failed -- Traceback (most recent call last): File "/home/stephane/src/github.com/python/cpython/Lib/test/test_ssl.py", line 3273, in test_alpn_protocols self.assertIsInstance(stats, ssl.SSLError) AssertionError: {'compression': None, 'cipher': ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256), 'peercert': {}, 'client_alpn_protocol': None, 'client_npn_protocol': None, 'version': 'TLSv1.2', 'session_reused': False, 'session': <_ssl.Session object at 0x7f7ed8110a80>, 'server_alpn_protocols': [None], 'server_npn_protocols': [None], 'server_shared_ciphers': [[('ECDHE-ECDSA-AES256-GCM-SHA384', 'TLSv1.2', 256), ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES128-GCM-SHA256', 'TLSv1.2', 128), ('ECDHE-RSA-AES128-GCM-SHA256', 'TLSv1.2', 128), ('ECDHE-ECDSA-CHACHA20-POLY1305', 'TLSv1.2', 256), ('ECDHE-RSA-CHACHA20-POLY1305', 'TLSv1.2', 256), ('DHE-DSS-AES256-GCM-SHA384', 'TLSv1.2', 256), ('DHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256), ('DHE-DSS-AES128-GCM-SHA256', 'TLSv1.2', 128), ('DHE-RSA-AES128-GCM-SHA256', 'TLSv1.2', 128), ('DHE-RSA-CHACHA20-POLY1305', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES256-CCM8', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES256-CCM', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES256-SHA384', 'TLSv1.2', 256), ('ECDHE-RSA-AES256-SHA384', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES256-SHA', 'TLSv1.0', 256), ('ECDHE-RSA-AES256-SHA', 'TLSv1.0', 256), ('DHE-RSA-AES256-CCM8', 'TLSv1.2', 256), ('DHE-RSA-AES256-CCM', 'TLSv1.2', 256), ('DHE-RSA-AES256-SHA256', 'TLSv1.2', 256), ('DHE-DSS-AES256-SHA256', 'TLSv1.2', 256), ('DHE-RSA-AES256-SHA', 'SSLv3', 256), ('DHE-DSS-AES256-SHA', 'SSLv3', 256), ('ECDHE-ECDSA-AES128-CCM8', 'TLSv1.2', 128), ('ECDHE-ECDSA-AES128-CCM', 'TLSv1.2', 128), ('ECDHE-ECDSA-AES128-SHA256', 'TLSv1.2', 128), ('ECDHE-RSA-AES128-SHA256', 'TLSv1.2', 128), ('ECDHE-ECDSA-AES128-SHA', 'TLSv1.0', 128), ('ECDHE-RSA-AES128-SHA', 'TLSv1.0', 128), ('DHE-RSA-AES128-CCM8', 'TLSv1.2', 128), ('DHE-RSA-AES128-CCM', 'TLSv1.2', 128), ('DHE-RSA-AES128-SHA256', 'TLSv1.2', 128), ('DHE-DSS-AES128-SHA256', 'TLSv1.2', 128), ('DHE-RSA-AES128-SHA', 'SSLv3', 128), ('DHE-DSS-AES128-SHA', 'SSLv3', 128), ('ECDHE-ECDSA-CAMELLIA256-SHA384', 'TLSv1.2', 256), ('ECDHE-RSA-CAMELLIA256-SHA384', 'TLSv1.2', 256), ('ECDHE-ECDSA-CAMELLIA128-SHA256', 'TLSv1.2', 128), ('ECDHE-RSA-CAMELLIA128-SHA256', 'TLSv1.2', 128), ('DHE-RSA-CAMELLIA256-SHA256', 'TLSv1.2', 256), ('DHE-DSS-CAMELLIA256-SHA256', 'TLSv1.2', 256), ('DHE-RSA-CAMELLIA128-SHA256', 'TLSv1.2', 128), ('DHE-DSS-CAMELLIA128-SHA256', 'TLSv1.2', 128), ('DHE-RSA-CAMELLIA256-SHA', 'SSLv3', 256), ('DHE-DSS-CAMELLIA256-SHA', 'SSLv3', 256), ('DHE-RSA-CAMELLIA128-SHA', 'SSLv3', 128), ('DHE-DSS-CAMELLIA128-SHA', 'SSLv3', 128), ('AES256-GCM-SHA384', 'TLSv1.2', 256), ('AES128-GCM-SHA256', 'TLSv1.2', 128), ('AES256-CCM8', 'TLSv1.2', 256), ('AES256-CCM', 'TLSv1.2', 256), ('AES128-CCM8', 'TLSv1.2', 128), ('AES128-CCM', 'TLSv1.2', 128), ('AES256-SHA256', 'TLSv1.2', 256), ('AES128-SHA256', 'TLSv1.2', 128), ('AES256-SHA', 'SSLv3', 256), ('AES128-SHA', 'SSLv3', 128), ('CAMELLIA256-SHA256', 'TLSv1.2', 256), ('CAMELLIA128-SHA256', 'TLSv1.2', 128), ('CAMELLIA256-SHA', 'SSLv3', 256), ('CAMELLIA128-SHA', 'SSLv3', 128)]]} is not an instance of test_ssl failed 1 test failed: test_ssl Total duration: 1 sec Tests result: FAILURE ``` ---------- messages: 299075 nosy: christian.heimes, matrixise priority: normal severity: normal status: open title: test_ssl versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:15:06 2017 From: report at bugs.python.org (Christian Heimes) Date: Tue, 25 Jul 2017 13:15:06 +0000 Subject: [issue31032] test_ssl In-Reply-To: <1500988390.15.0.0705415261794.issue31032@psf.upfronthosting.co.za> Message-ID: <1500988506.28.0.0905084977436.issue31032@psf.upfronthosting.co.za> Christian Heimes added the comment: Duplicate of #30714 ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_ssl fails with openssl 1.1.0f: test_alpn_protocols() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:17:30 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 25 Jul 2017 13:17:30 +0000 Subject: [issue31032] test_ssl In-Reply-To: <1500988390.15.0.0705415261794.issue31032@psf.upfronthosting.co.za> Message-ID: <1500988650.33.0.912645037002.issue31032@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: This is a duplicate of http://bugs.python.org/issue30714 ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:17:38 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Jul 2017 13:17:38 +0000 Subject: [issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols() In-Reply-To: <1497972401.5.0.807136343886.issue30714@psf.upfronthosting.co.za> Message-ID: <1500988658.26.0.298128591766.issue30714@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Dear Christian, .... Have you found a solution for this issue ? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:21:40 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 25 Jul 2017 13:21:40 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future Message-ID: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> New submission from ???? ?????????: History: First, I tried to debug code around asyncio.Task() cancelling. So I wrote: ===== try: ... except Exception as e: print(e) ===== When task was cancelled, an empty string printed. I wondered why. So I change the code to ==== print(repr(e)) ==== and it printed 'CancelledError' as expected. Next, I tried: ==== print(Exception()) ==== It prints empty string too! So I came up to propose API change. I propose to add argument to the .cancel() methods (for Task and for Future). This argument should be passed to the CancelledError constructor. This will greatly improves debugging -- it allows to easily know why Future/Task was cancelled. Also, this change does not break current code. Argument must be optional. ---------- components: asyncio messages: 299079 nosy: socketpair, yselivanov priority: normal severity: normal status: open title: Add argument to .cancel() of Task and Future type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:25:22 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 25 Jul 2017 13:25:22 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1500989122.51.0.43164166396.issue17611@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- Removed message: http://bugs.python.org/msg185785 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:33:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 13:33:57 +0000 Subject: [issue31029] test_tokenize fails when run directly In-Reply-To: <1500985522.57.0.56152485573.issue31029@psf.upfronthosting.co.za> Message-ID: <1500989637.85.0.136120306448.issue31029@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 90addd6d1c1fde4ec12a6b554d1deacfac6a879c by Serhiy Storchaka (St?phane Wirtel) in branch 'master': bpo-31029: test_tokenize Add missing import unittest (#2865) https://github.com/python/cpython/commit/90addd6d1c1fde4ec12a6b554d1deacfac6a879c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:34:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 13:34:36 +0000 Subject: [issue31029] test_tokenize fails when run directly In-Reply-To: <1500985522.57.0.56152485573.issue31029@psf.upfronthosting.co.za> Message-ID: <1500989676.24.0.641639259271.issue31029@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks St?phane. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:34:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 13:34:43 +0000 Subject: [issue31029] test_tokenize fails when run directly In-Reply-To: <1500985522.57.0.56152485573.issue31029@psf.upfronthosting.co.za> Message-ID: <1500989683.64.0.581229796573.issue31029@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:47:54 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Tue, 25 Jul 2017 13:47:54 +0000 Subject: [issue31021] Clarify programming faq. In-Reply-To: <1500933050.31.0.733502304217.issue31021@psf.upfronthosting.co.za> Message-ID: <1500990474.68.0.537392208618.issue31021@psf.upfronthosting.co.za> Charles Wohlganger added the comment: Modulo is defined mathematically as the remainder of Euclidian division. I.E. a positive r where a % b = r is equivalent to a = b * x + r. I think it confuses the issue to say "-190 % 12 were the mathematical equivalent -10", when that is technically incorrect. Computer modulo uses truncated division, which is why -a % b != a % -b. "... compilers that truncate i // j need to make i % j have the same sign as i." i % j has the same sign as j, not i. I believe that is the typo that has caused the confusion. I would replace the last line with : "-190 % 12 == -10 is wrong according to the C definition for computer modulo arithmetic." ---------- nosy: +wohlganger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:48:27 2017 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 25 Jul 2017 13:48:27 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1500990507.03.0.22107338786.issue31033@psf.upfronthosting.co.za> Yury Selivanov added the comment: Well, don't use "print(e)" when you are printing errors in in Python. This is pretty standard behaviour for all Python code, not just asyncio. A lot of code in stdlib raises exceptions, almost none allows to customize them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:49:19 2017 From: report at bugs.python.org (Jim Ferrara) Date: Tue, 25 Jul 2017 13:49:19 +0000 Subject: [issue25910] Fixing links in documentation In-Reply-To: <1450530544.1.0.9187941337.issue25910@psf.upfronthosting.co.za> Message-ID: <1500990559.36.0.735872120954.issue25910@psf.upfronthosting.co.za> Changes by Jim Ferrara : ---------- pull_requests: +2917 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:50:07 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Jul 2017 13:50:07 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1500990607.68.0.690678043836.issue31033@psf.upfronthosting.co.za> St?phane Wirtel added the comment: you could use gdb or pdb for the debugging. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:50:12 2017 From: report at bugs.python.org (Stefan Krah) Date: Tue, 25 Jul 2017 13:50:12 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1500990612.3.0.0834877932871.issue30923@psf.upfronthosting.co.za> Stefan Krah added the comment: Well, it's not a bug, but perhaps it is annoying for users of this gcc version if they compile 3.6 often. Actually, I think gcc should not include this warning in -Wextra. It's something that could be run manually before a release. I'd vote for making -Wno-implicit-fallthrough global. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 10:04:29 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Jul 2017 14:04:29 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1500991469.49.0.291348095294.issue30923@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Stefan, ask on python-dev ml, or we have to ask to Ned Deily for this version ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 10:15:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 14:15:14 +0000 Subject: [issue30848] test_multiprocessing_forkserver hangs on AMD64 FreeBSD CURRENT Debug 3.x In-Reply-To: <1499181018.19.0.70320374178.issue30848@psf.upfronthosting.co.za> Message-ID: <1500992114.68.0.89086479615.issue30848@psf.upfronthosting.co.za> STINNER Victor added the comment: AMD64 FreeBSD 10.x Shared 3.x: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/621/steps/test/logs/stdio ... 0:11:00 load avg: 2.57 [403/406] test_asyncio passed -- running: test_concurrent_futures (31 sec), test_multiprocessing_fork (660 sec) 0:11:01 load avg: 2.44 [404/406] test_fstring passed -- running: test_concurrent_futures (33 sec), test_multiprocessing_fork (662 sec) running: test_concurrent_futures (63 sec), test_multiprocessing_fork (692 sec) 0:11:34 load avg: 1.63 [405/406] test_concurrent_futures passed (65 sec) -- running: test_multiprocessing_fork (694 sec) command timed out: 1200 seconds without output running ['make', 'buildbottest', 'TESTOPTS=-j2 -j4', 'TESTPYTHONOPTS=', 'TESTTIMEOUT=900'], attempting to kill process killed by signal 9 program finished with exit code -1 elapsedTime=1895.710260 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 10:16:51 2017 From: report at bugs.python.org (Martin Panter) Date: Tue, 25 Jul 2017 14:16:51 +0000 Subject: [issue30576] http.server should support HTTP compression (gzip) In-Reply-To: <1496691724.59.0.955308322691.issue30576@psf.upfronthosting.co.za> Message-ID: <1500992211.31.0.398209458575.issue30576@psf.upfronthosting.co.za> Martin Panter added the comment: I think chunked encoding is only meant to be used for HTTP 1.1. For HTTP 1.0, you have to either send Content-Length, or shut down the connection after sending the body. See also Issue 21224 about improving HTTP 1.1 support. Maybe you should add a ?Vary: accept-encoding? field (even if gzip not acceptable to the client). I wonder if it is possible to make some of the code more generic? E.g. rather than being coupled to SimpleHTTPRequestHandler, perhaps the chunk encoder, request parsing, etc could also be usable by custom servers. We already have one chunk encoder in ?http.client? and an Accept-Encoding parser in ?xmlrpc.server?. FWIW I think using GzipFile should be safe if done right. You would give it a custom writer class that accepted gzip-encoded chunks, added HTTP chunk encoding (for HTTP 1.1), and sent them to the client. IMO this is a more flexible way of doing a chunk encoder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 10:17:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 14:17:24 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1500992244.59.0.982906655653.issue30923@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm ok to kill warnings, but I would suggest to first fix most GCC7 warnings because starting to discuss backports. I expect that it will require multiple changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 10:22:49 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Jul 2017 14:22:49 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1500992569.11.0.933113706854.issue30923@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I am not for a backport, it's not a security fix or a bug fix. for my case, I just want to "kill" the warnings, maybe we could check the version of gcc and add "-Wimplicit-fallthrough=0". Here is a good explanation of the 'fallthrough' in gcc7 https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 10:32:18 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 25 Jul 2017 14:32:18 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1500993138.88.0.395128075789.issue30923@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Yeah the warnings are quit annoying when compiling the master and 3.6 branch. Fedora 26 currently includes gcc 7 which emits those warnings, other distros will follow up when they update gcc, so I'd think it would be better to fix it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 10:51:12 2017 From: report at bugs.python.org (Stefan Krah) Date: Tue, 25 Jul 2017 14:51:12 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1500994272.08.0.964490834105.issue30923@psf.upfronthosting.co.za> Stefan Krah added the comment: We can check for the version, but all versions of gcc that I tested accept and ignore -Wno-implicit-fallthrough, even though they don't actually have -Wimplicit-fallthrough. Of course they choke on -Wimplicit-fallthrough=0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 10:54:36 2017 From: report at bugs.python.org (Stefan Krah) Date: Tue, 25 Jul 2017 14:54:36 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1500994476.64.0.0868803852415.issue30923@psf.upfronthosting.co.za> Stefan Krah added the comment: I think the fall-through blog notes are slightly overstated. :-) "The switch fallthrough has been widely considered a design defect in C." It's an important feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:11:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 15:11:10 +0000 Subject: [issue31034] test_subprocess_send_signal() of test_asyncio hangs if SIGHUP is ignored Message-ID: <1500995470.63.0.711892851496.issue31034@psf.upfronthosting.co.za> New submission from STINNER Victor: A colleague reported me that the Python test suite hangs on running test_subprocess_send_signal() of test_asyncio. After analysing the issue, it seems like the test hangs becaues the RPM package builder ignores SIGHUP using something like: def daemonize(): [...] signal.signal(signal.SIGHUP, signal.SIG_IGN) [...] While we should see if Koji (software used to build packages) can be patched to restore the default signal handler for SIGHUP, I would like to enhance test_asyncio to not depend on the current SIGHUP signal handler. I modified Lib/site.py to add "import signal; signal.signal(signal.SIGHUP, signal.SIG_IGN)": on 406 test files, only test_asyncio hangs. Attached PR fixes test_asyncio. ---------- components: Tests, asyncio messages: 299094 nosy: haypo, yselivanov priority: normal severity: normal status: open title: test_subprocess_send_signal() of test_asyncio hangs if SIGHUP is ignored versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:13:38 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 25 Jul 2017 15:13:38 +0000 Subject: [issue31035] Document order of firing callbacks added with Future.add_done_callback() Message-ID: <1500995618.96.0.99651815805.issue31035@psf.upfronthosting.co.za> New submission from ???? ?????????: Please document these two things: * Order of callbacks firing is not specified. (Is it True?) * All callbacks are called *BEFORE* await triggered: ==== f = asyncio.Future() f.add_done_callback(xxx) f.add_done_callback(yyy) try: await f except Exception: ... # all callbacks are called BEFORE entering that place (for example) * How exceptions in callbacks are handled ---------- assignee: docs at python components: Documentation, asyncio messages: 299095 nosy: docs at python, socketpair, yselivanov priority: normal severity: normal status: open title: Document order of firing callbacks added with Future.add_done_callback() type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:13:54 2017 From: report at bugs.python.org (Matthias Klose) Date: Tue, 25 Jul 2017 15:13:54 +0000 Subject: [issue31036] building the python docs requires the blurb module Message-ID: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> New submission from Matthias Klose: [Ned asked to submit that as a release blocker] the build of the documentation fails with at least the 3.5.4rc1. It adds a new build dependency (blurb), which is inconvenient to build on stable environments, or when pip is not available. Please could you consider including the blurb module itself in python for the stable branches? Also the build fails with the release tarballs. ---------- components: Build messages: 299096 nosy: benjamin.peterson, doko, georg.brandl, larry, ned.deily priority: release blocker severity: normal status: open title: building the python docs requires the blurb module versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:14:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 15:14:51 +0000 Subject: [issue31034] test_subprocess_send_signal() of test_asyncio hangs if SIGHUP is ignored In-Reply-To: <1500995470.63.0.711892851496.issue31034@psf.upfronthosting.co.za> Message-ID: <1500995691.61.0.885609695317.issue31034@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2918 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:14:58 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Jul 2017 15:14:58 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1500995698.82.0.887559890382.issue31036@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:15:09 2017 From: report at bugs.python.org (Lisabel Leon) Date: Tue, 25 Jul 2017 15:15:09 +0000 Subject: [issue31037] Results in section 4.4 break and continue Message-ID: <1500995709.73.0.36567687409.issue31037@psf.upfronthosting.co.za> New submission from Lisabel Leon: The first example of this section shows different results if typed into the Python interpreter. This is the documentation (documentation.png) and these are the results as I type it into my environment (testresults.jpg). ---------- assignee: docs at python components: Documentation files: testresults.PNG messages: 299097 nosy: Lisabel Leon, docs at python priority: normal severity: normal status: open title: Results in section 4.4 break and continue versions: Python 3.6 Added file: http://bugs.python.org/file47040/testresults.PNG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:16:26 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 25 Jul 2017 15:16:26 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1500995786.59.0.987795886202.issue31036@psf.upfronthosting.co.za> Ned Deily added the comment: We should be able to fix the Makefile recipe to handle either case, i.e. when Misc/NEWS.d is not present (as in the release tarballs), don't try to run blurb. ---------- versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:16:32 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Jul 2017 15:16:32 +0000 Subject: [issue31037] Results in section 4.4 break and continue In-Reply-To: <1500995709.73.0.36567687409.issue31037@psf.upfronthosting.co.za> Message-ID: <1500995792.49.0.35303461042.issue31037@psf.upfronthosting.co.za> St?phane Wirtel added the comment: could you be more explicit? which section ? Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:18:15 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Jul 2017 15:18:15 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1500995895.89.0.139164517228.issue31036@psf.upfronthosting.co.za> St?phane Wirtel added the comment: blurb should be only used when there is a release of python, and in this case, only by the release manager. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:18:40 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 25 Jul 2017 15:18:40 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1500995920.28.0.338263286062.issue31033@psf.upfronthosting.co.za> ???? ????????? added the comment: Yes, I agree with you about my weird way of debugging. But anyway, changing API with adding ability to pass actual cause would be welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:19:24 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 25 Jul 2017 15:19:24 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1500995964.19.0.0913661212646.issue31036@psf.upfronthosting.co.za> Ned Deily added the comment: > blurb should be only used when there is a release of python, and in this case, only by the release manager. No, that's not the case. Blurb needs to be used whenever the docs are built because the NEWS file is used in the Docs build to produce the changelog.html file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:21:42 2017 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 25 Jul 2017 15:21:42 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1500996102.13.0.979135752512.issue31033@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Yes, I agree with you about my weird way of debugging. But anyway, changing API with adding ability to pass actual cause would be welcome. I'm not opposed to the idea, btw. If we do decide to add an argument to 'cancel', we probably should do the same for concurrent.futures. Another possibility would be to allow cancellation via Future.set_exception: task.set_exception(asyncio.CancelledError('message')) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:22:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 15:22:36 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1500996156.63.0.814570530848.issue31036@psf.upfronthosting.co.za> STINNER Victor added the comment: It will be easier to decide if Misc/NEWS was generated or not when... Misc/NEWS will be removed from Git: https://github.com/python/cpython/pull/2719 No? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:23:40 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Jul 2017 15:23:40 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1500996220.12.0.594961651812.issue31036@psf.upfronthosting.co.za> St?phane Wirtel added the comment: ok, I understand. but blurb is an external tool (github.com/python/core-workflow). There will be a new dependency, excepted if we store it into the Tools/ directory. and if we add it into Tools, we have to add it to the old branches where blurb is supposed to be used, and what can we do with the only 'security fix' and 'bug fix' branches ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:26:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 15:26:25 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1500996385.91.0.816102490753.issue31036@psf.upfronthosting.co.za> STINNER Victor added the comment: Thread on python-committers: https://mail.python.org/pipermail/python-committers/2017-July/004763.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:29:04 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 25 Jul 2017 15:29:04 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1500996544.32.0.286385949288.issue31033@psf.upfronthosting.co.za> ???? ????????? added the comment: Hmmm.... task.set_exception(Exception('xxx')) Will it cancel whole chain of depending futures in a RIGHT way ? Or we must require exception passed here to be subclassed from CancelledError ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:30:31 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 25 Jul 2017 15:30:31 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1500996631.46.0.751837469083.issue31036@psf.upfronthosting.co.za> Ned Deily added the comment: Unfortunately, updates to the Doc build process doc have not yet been made but the intended process is to provide blurb via the "make venv" Doc build recipe which now also pip-installs blurb from PyPI. It is the necessary to use that venv to build the docs: make venv make html PYTHON=venv/bin/python3 Or you can just install blurb somewhere into your normal shell PATH. Again, this will be documented. ---------- assignee: -> larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:32:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 15:32:14 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1500996734.53.0.911798236735.issue31036@psf.upfronthosting.co.za> STINNER Victor added the comment: > There will be a new dependency, excepted if we store it into the Tools/ directory. Please don't do that. I will be a mess to update our copy. It's already painful enough to embed our copy of libexpat, zlib and indirectly of OpenSSL (on Windows and macOS). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:32:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 15:32:52 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1500996772.91.0.871513741643.issue31036@psf.upfronthosting.co.za> STINNER Victor added the comment: > I will be a mess to update our copy. typo, you should read: "It will be..." ;-) (It will be a mess to update our copy of blurb.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:34:06 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Jul 2017 15:34:06 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1500996846.32.0.129928347599.issue31036@psf.upfronthosting.co.za> St?phane Wirtel added the comment: @haypo I don't want to add a new dependency, but it's an option. I prefer the suggestion of Ned. How do you imagine the patch ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:34:11 2017 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 25 Jul 2017 15:34:11 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1500996851.55.0.781833832187.issue31033@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Will it cancel whole chain of depending futures in a RIGHT way ? I was thinking about this: def Future.set_exception(exc): if isinstance(exc, asyncio.CancelledError): return self._cancel(exc) # here goes old code def Future.cancel(): return self._cancel(asyncio.CancelledError()) Although now, that I'm looking at it, I don't like this idea, because setting as exception is a different operation from cancelling a task/future, and we shouldn't mix them. It's OK to set a CancelledError without cancelling. Also this would be a backwards incompatible change. So back to square one -- we can consider passing extra args to .cancel() methods. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:36:27 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 25 Jul 2017 15:36:27 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1500996987.33.0.176671273477.issue31036@psf.upfronthosting.co.za> Ned Deily added the comment: Please let Larry have a chance to look at this before we spend a lot of energy here rehashing discussions. We'll fix it, it's not hard! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:39:13 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Tue, 25 Jul 2017 15:39:13 +0000 Subject: [issue30802] datetime.datetime.strptime('200722', '%Y%U') In-Reply-To: <1498726688.6.0.920894490968.issue30802@psf.upfronthosting.co.za> Message-ID: <1500997153.51.0.321207008849.issue30802@psf.upfronthosting.co.za> Utkarsh Upadhyay added the comment: @Matheus: What other languages support this? Is this (i.e. defaulting to Sunday, or Monday?) the default behavior there? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:45:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 15:45:57 +0000 Subject: [issue31009] test_multiprocessing_spawn hangs randomly on AMD64 Windows10 3.x and AMD64 Windows8 3.x In-Reply-To: <1500887712.38.0.66903662356.issue31009@psf.upfronthosting.co.za> Message-ID: <1500997557.8.0.264164677162.issue31009@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 302bbbe9ba5c72559913e2ea006c921f698a729d by Victor Stinner in branch 'master': bpo-31009: Fix support.fd_count() on Windows (#2862) https://github.com/python/cpython/commit/302bbbe9ba5c72559913e2ea006c921f698a729d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:56:15 2017 From: report at bugs.python.org (Zachary Ware) Date: Tue, 25 Jul 2017 15:56:15 +0000 Subject: [issue31037] Results in section 4.4 break and continue In-Reply-To: <1500995709.73.0.36567687409.issue31037@psf.upfronthosting.co.za> Message-ID: <1500998175.37.0.333153972342.issue31037@psf.upfronthosting.co.za> Zachary Ware added the comment: Take a look at the statement immediately following the example: "(Yes, this is the correct code. Look closely: the else clause belongs to the for loop, not the if statement.)" The example is correct, and is introducing the concept of an 'else' clause on a for loop. This is very much not the first report of this that we've had, though; perhaps the 'look closely' admonition should be moved before the example? For future reference, please copy and paste the text of your tests rather than a screenshot; not all participants can see the screenshot. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 12:04:20 2017 From: report at bugs.python.org (Lisabel Leon) Date: Tue, 25 Jul 2017 16:04:20 +0000 Subject: [issue31037] Results in section 4.4 break and continue In-Reply-To: <1500998175.37.0.333153972342.issue31037@psf.upfronthosting.co.za> Message-ID: Lisabel Leon added the comment: Thank you Zachary for such a speedy response. I'll paste text next time. Rgds! Lisabel On Tue, Jul 25, 2017 at 11:56 AM, Zachary Ware wrote: > > Zachary Ware added the comment: > > Take a look at the statement immediately following the example: > > "(Yes, this is the correct code. Look closely: the else clause belongs to > the for loop, not the if statement.)" > > The example is correct, and is introducing the concept of an 'else' clause > on a for loop. This is very much not the first report of this that we've > had, though; perhaps the 'look closely' admonition should be moved before > the example? > > For future reference, please copy and paste the text of your tests rather > than a screenshot; not all participants can see the screenshot. > > ---------- > nosy: +zach.ware > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 12:17:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 16:17:29 +0000 Subject: [issue31038] test_runpy causes running all Python tests when run directly Message-ID: <1500999449.61.0.732584715877.issue31038@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: $ ./python Lib/test/test_runpy.py .......................== CPython 3.7.0a0 (heads/master-dirty:39243779f4, Jul 25 2017, 14:32:21) [GCC 6.3.0 20170406] == Linux-4.10.0-28-generic-i686-athlon-with-debian-stretch-sid little-endian == hash algorithm: siphash24 32bit == cwd: /home/serhiy/py/cpython/build/test_python_31873 == CPU count: 2 == encodings: locale=UTF-8, FS=utf-8 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) Run tests sequentially 0:00:00 load avg: 0.85 [ 1/406] test_grammar 0:00:00 load avg: 0.85 [ 2/406] test_opcodes 0:00:00 load avg: 0.85 [ 3/406] test_dict 0:00:01 load avg: 0.85 [ 4/406] test_builtin 0:00:02 load avg: 0.85 [ 5/406] test_exceptions 0:00:02 load avg: 0.85 [ 6/406] test_types ... In isolated mode it runs normally. $ ./python -I Lib/test/test_runpy.py .............................. ---------------------------------------------------------------------- Ran 30 tests in 2.776s OK ---------- components: Tests messages: 299118 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: test_runpy causes running all Python tests when run directly type: behavior versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 12:34:41 2017 From: report at bugs.python.org (Segev Finer) Date: Tue, 25 Jul 2017 16:34:41 +0000 Subject: [issue31018] _tracemalloc frame_t packing optimization not working in Windows x64 In-Reply-To: <1500916841.59.0.00710376227878.issue31018@psf.upfronthosting.co.za> Message-ID: <1501000481.26.0.606694923532.issue31018@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2919 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 12:34:43 2017 From: report at bugs.python.org (Segev Finer) Date: Tue, 25 Jul 2017 16:34:43 +0000 Subject: [issue31018] _tracemalloc frame_t packing optimization not working in Windows x64 In-Reply-To: <1500916841.59.0.00710376227878.issue31018@psf.upfronthosting.co.za> Message-ID: <1501000483.19.0.916213866664.issue31018@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2920 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 12:49:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 16:49:09 +0000 Subject: [issue31038] test_runpy causes running all Python tests when run directly In-Reply-To: <1500999449.61.0.732584715877.issue31038@psf.upfronthosting.co.za> Message-ID: <1501001349.45.0.696256325705.issue31038@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: After commenting out methods test_directory_error, test_zipfile_error and test_main_recursion_error, test_runpy is passed. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 13:19:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 17:19:13 +0000 Subject: [issue31034] test_subprocess_send_signal() of test_asyncio hangs if SIGHUP is ignored In-Reply-To: <1500995470.63.0.711892851496.issue31034@psf.upfronthosting.co.za> Message-ID: <1501003153.8.0.5330077703.issue31034@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 830080913c22a9834d310294b9f7653234dc6a59 by Victor Stinner in branch 'master': bpo-31034: Reliable signal handler for test_asyncio (#2867) https://github.com/python/cpython/commit/830080913c22a9834d310294b9f7653234dc6a59 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 13:20:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 17:20:41 +0000 Subject: [issue31018] _tracemalloc frame_t packing optimization not working in Windows x64 In-Reply-To: <1500916841.59.0.00710376227878.issue31018@psf.upfronthosting.co.za> Message-ID: <1501003241.23.0.161972378215.issue31018@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d8b5216f998bbb0f921815165f46918b86620ab7 by Victor Stinner (Segev Finer) in branch '3.6': [3.6] bpo-31018: Switch to GH-pragma pack from __declspec(align) (GH-2848) (#2868) https://github.com/python/cpython/commit/d8b5216f998bbb0f921815165f46918b86620ab7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 13:20:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 17:20:53 +0000 Subject: [issue31018] _tracemalloc frame_t packing optimization not working in Windows x64 In-Reply-To: <1500916841.59.0.00710376227878.issue31018@psf.upfronthosting.co.za> Message-ID: <1501003253.57.0.186523449672.issue31018@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 49175b3b670a4514b5dc5dcf7b58203d2be852c1 by Victor Stinner (Segev Finer) in branch '3.5': [3.5] bpo-31018: Switch to GH-pragma pack from __declspec(align) (GH-2848) (#2869) https://github.com/python/cpython/commit/49175b3b670a4514b5dc5dcf7b58203d2be852c1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 13:21:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 17:21:25 +0000 Subject: [issue31018] _tracemalloc frame_t packing optimization not working in Windows x64 In-Reply-To: <1500916841.59.0.00710376227878.issue31018@psf.upfronthosting.co.za> Message-ID: <1501003285.15.0.229014142541.issue31018@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for the fix ;-) ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 13:35:16 2017 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 25 Jul 2017 17:35:16 +0000 Subject: [issue30802] datetime.datetime.strptime('200722', '%Y%U') In-Reply-To: <1498726688.6.0.920894490968.issue30802@psf.upfronthosting.co.za> Message-ID: <1501004116.5.0.0445185081479.issue30802@psf.upfronthosting.co.za> Matthew Barnett added the comment: I think the relevant standard is ISO 8601: https://en.wikipedia.org/wiki/ISO_8601 The first day of the week is Monday. Note particularly the examples it gives: Monday 29 December 2008 is written "2009-W01-1" Sunday 3 January 2010 is written "2009-W53-7" So the first few days of January can be in the last week of the previous year! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 13:41:07 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 25 Jul 2017 17:41:07 +0000 Subject: [issue26506] [EASY] hex() documentation: mention "%x" % int In-Reply-To: <1457372823.56.0.270827849914.issue26506@psf.upfronthosting.co.za> Message-ID: <1501004467.63.0.783634963993.issue26506@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +2921 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 13:43:02 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 25 Jul 2017 17:43:02 +0000 Subject: [issue31025] io.BytesIO: no way to get the length of the underlying buffer without copying data In-Reply-To: <1500984238.01.0.587335781014.issue31025@psf.upfronthosting.co.za> Message-ID: <1501004582.18.0.783549231116.issue31025@psf.upfronthosting.co.za> R. David Murray added the comment: I'm confused, I don't see how there can be any difference between (1) and (2). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 14:04:12 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 25 Jul 2017 18:04:12 +0000 Subject: [issue26506] [EASY] hex() documentation: mention "%x" % int In-Reply-To: <1457372823.56.0.270827849914.issue26506@psf.upfronthosting.co.za> Message-ID: <1501005852.47.0.550785312965.issue26506@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 59e6ab15e47d496ac4e5f9d53aac0fae0c708da4 by Mariatta in branch '3.6': bpo-26506: hex() documentation: mention %x % int (GH-2525) (GH-2870) https://github.com/python/cpython/commit/59e6ab15e47d496ac4e5f9d53aac0fae0c708da4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 14:05:01 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 25 Jul 2017 18:05:01 +0000 Subject: [issue26506] [EASY] hex() documentation: mention "%x" % int In-Reply-To: <1457372823.56.0.270827849914.issue26506@psf.upfronthosting.co.za> Message-ID: <1501005901.46.0.779290658145.issue26506@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks for the PRs Manvi. ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 14:05:15 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 25 Jul 2017 18:05:15 +0000 Subject: [issue31034] test_subprocess_send_signal() of test_asyncio hangs if SIGHUP is ignored In-Reply-To: <1500995470.63.0.711892851496.issue31034@psf.upfronthosting.co.za> Message-ID: <1501005915.26.0.318917719971.issue31034@psf.upfronthosting.co.za> Changes by Charalampos Stratakis : ---------- nosy: +cstratak versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 14:05:39 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 25 Jul 2017 18:05:39 +0000 Subject: [issue30721] Show expected input for right shift operator usage in custom "print" error message In-Reply-To: <1498022036.95.0.527028755561.issue30721@psf.upfronthosting.co.za> Message-ID: <1501005939.64.0.699290020975.issue30721@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The test added in the PR passes on linux (Travis) and Mac (op's machine), fails on Windows (Appveyor). The patch itself modifies abstract.c. Could some Windows expert take a look? test_string_with_stream_redirection (test.test_print.TestPy2MigrationHint) ... FAIL FAIL: test_string_with_stream_redirection (test.test_print.TestPy2MigrationHint) Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_print.py", line 165, in test_string_with_stream_redirection 'file=)', str(context.exception)) AssertionError: 'Did you mean "print(, file=)' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.StringIO'" ---------- nosy: +paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 14:21:41 2017 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 25 Jul 2017 18:21:41 +0000 Subject: [issue28777] Add asyncio.Queue __aiter__, __anext__ methods In-Reply-To: <1479877132.48.0.693527153069.issue28777@psf.upfronthosting.co.za> Message-ID: <1501006901.92.0.377111491102.issue28777@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 14:29:54 2017 From: report at bugs.python.org (Nir Soffer) Date: Tue, 25 Jul 2017 18:29:54 +0000 Subject: [issue30994] Asyncore does not need to copy map.items() before polling In-Reply-To: <1500768919.1.0.764948579908.issue30994@psf.upfronthosting.co.za> Message-ID: <1501007394.88.0.141322903338.issue30994@psf.upfronthosting.co.za> Nir Soffer added the comment: Using a quick test with 1000 clients sending 1000000 pings, I could not see significant difference between master and this patch. Seems that the extra copy is hidden by the noise. Having this documented is good enough if someone want to use this. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 14:31:26 2017 From: report at bugs.python.org (Alex Davies) Date: Tue, 25 Jul 2017 18:31:26 +0000 Subject: [issue31039] Python an android must use ashmem instead of shmem Message-ID: <1501007486.15.0.596931220228.issue31039@psf.upfronthosting.co.za> New submission from Alex Davies: ``` ERROR! Unexpected Exception: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770. ``` ---------- components: Build messages: 299130 nosy: Alex Davies, xdegaye priority: normal severity: normal status: open title: Python an android must use ashmem instead of shmem type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 14:31:38 2017 From: report at bugs.python.org (Alex Davies) Date: Tue, 25 Jul 2017 18:31:38 +0000 Subject: [issue31039] Python on android must use ashmem instead of shmem In-Reply-To: <1501007486.15.0.596931220228.issue31039@psf.upfronthosting.co.za> Message-ID: <1501007498.21.0.226804404642.issue31039@psf.upfronthosting.co.za> Changes by Alex Davies : ---------- title: Python an android must use ashmem instead of shmem -> Python on android must use ashmem instead of shmem _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 14:35:07 2017 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 25 Jul 2017 18:35:07 +0000 Subject: [issue28777] Add asyncio.Queue __aiter__, __anext__ methods In-Reply-To: <1479877132.48.0.693527153069.issue28777@psf.upfronthosting.co.za> Message-ID: <1501007707.41.0.907621338215.issue28777@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > there's no way to end the loop on the producing side. I might be missing something, but can't something similar be said of queue.get()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 14:58:07 2017 From: report at bugs.python.org (Nir Soffer) Date: Tue, 25 Jul 2017 18:58:07 +0000 Subject: [issue30931] Race condition in asyncore may access the wrong dispatcher In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1501009087.75.0.225361766956.issue30931@psf.upfronthosting.co.za> Nir Soffer added the comment: On my PR 2854, Nir added these comments (extract): > "And now we try to read from close dispatcher. I think we should wait > for #2804 (...)" > Sorry, I don't understand. My PR fixes described the bug that you > described in msg298682: > "If a dispatchers is closed and and a new dispatcher is created, the > new dispatcher may get the same file descriptor. If the file > descriptor was in the ready list returned from poll()/select(), > asyncore may try to invoke one of the callbacks (e.g. handle_write) > on the new dispatcher." > About reading from closed dispatcher: sorry, I don't know the asyncore > concurrency model, but I know the asyncio concurrency model. In > asyncio, I don't see why a "dispatcher" would affect any "unrelated" > dispatcher. Said differently: if a dispatcher A closes the dispatcher > B and dispatcher B is "readable", the read event will be handled > anyway. The "close event" will be handled at the next loop iteration. > The oversimplified asyncio model is "each iteration is atomic". I don't know asyncio enough, but I suspect this issue may effect it if it is using the fd to check if a reader/writer is closed. This is the main issue in asyncore, assuming that during the loop: obj = map.get(fd) Means that a obj is the dispatcher that owned fd when preparing for poll()/select(), and we can use obj for calling the I/O callbacks. The dispatcher owning this fd may have been closed during the loop, and a new dispatcher may have been created with the *same* fd. The only way to check if a dispatcher is closed is to check the object. > Closing a dispatcher calls its del_channel() which removes its file > descriptor from the asyncore map. And creating new one at that point will add a new channel using the same fd. > If I understand correctly, the *current behaviour* depends on the file > descriptor order, since select.select() and select.poll.poll() returns > ordered file descriptors (smallest to largest). If a dispatcher A is > called and closes a dispatcher B, the dispatcher B is called or not > depending on the file descriptor. If A.fileno() < B.fileno(), B is not > called. If A.fileno() > B.fileno(), B was already called. Am I right? I don't think the order matter, only the fact that closing a dispatcher and creating a new one is likely to use the same fd. > What is the use case of a dispatcher closing another one? What is the > consequence on my PR? Does the dispatcher B expects to not be called > to read if it was already closed? I don't know what is the use case of the reporter, but here is one possible example - you implement a proxy, each proxy connection has 2 legs, each using a dispatcher connected to an endpoint. If one leg is closed, you close also the other leg (one dispatcher closing another). Now if you create a new dispatcher during the same loop iteration, it may get the same fd of the other closed leg, and asyncore may try to read/write with this dispatcher. This may work or not depending on how you implement the dispatcher. This is domonstrated in https://github.com/python/cpython/pull/2764/commits/5aeb0098d2347984f3a89cf036c305edd2b8382b > I see that close() also immediately closes the underlying socket. Does > it mean that my PR can triggered OSError since we try recv() on a > closed socket? Yes, this is a typical issue in asyncore if you don't protect your subclass to handle double close. asyncore.file_wrapper is protected, but asyncore.dispatcher and its subclasses are not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 15:13:07 2017 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 25 Jul 2017 19:13:07 +0000 Subject: [issue31021] Clarify programming faq. In-Reply-To: <1500933050.31.0.733502304217.issue31021@psf.upfronthosting.co.za> Message-ID: <1501009987.46.0.207110183603.issue31021@psf.upfronthosting.co.za> Mark Dickinson added the comment: Terry: can you clarify which part you think is potentially confusing? I'm having a hard time seeing the text as confusing, but I suspect I'm too close to the subject matter to be able to tell. Charles: I think you're missing the point (which does rather reinforce Terry's suggestion that this FAQ could be improved). You say: > "-190 % 12 == -10 is wrong according to the C definition for computer modulo arithmetic." But that's the point: for C (specifically C99[*]), -10 is the *correct* result from the operation -190 % 12. And that's exactly why this is a FAQ: Python is behaving differently from many other mainstream languages (C, Java, C++, C#, ...) here, so it's useful to understand the justification for this design decision. For C in particular, this behaviour is mandated by section 6.5.5p6 of C99, which reads: > When integers are divided, the result of the / operator is the algebraic > quotient with any fractional part discarded. If the quotient a/b is > representable, the expression (a/b)*b + a%b shall equal a. The first part of this forces -190 / 12 to be -15 (the result of discarding the fractional part of the true quotient -15.833....); the second then forces -190 % 12 to be (-190) - (-15)*12, which is -10. ([*] In C89, the rounding direction of a/b for negative a, and hence the behaviour of a%b, was left implementation defined, but same-sign-as-a appears to have been the dominant behaviour.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 15:14:14 2017 From: report at bugs.python.org (Nir Soffer) Date: Tue, 25 Jul 2017 19:14:14 +0000 Subject: [issue30985] Set closing variable in asyncore at close In-Reply-To: <1500661589.01.0.75637783455.issue30985@psf.upfronthosting.co.za> Message-ID: <1501010054.64.0.638460377528.issue30985@psf.upfronthosting.co.za> Nir Soffer added the comment: The "new" closing attribute is old as asyncore, it was just unused :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 15:25:41 2017 From: report at bugs.python.org (Daniel Watkins) Date: Tue, 25 Jul 2017 19:25:41 +0000 Subject: [issue31040] mimetypes.add_type should complain when you give it an undotted ext Message-ID: <1501010741.93.0.952054126016.issue31040@psf.upfronthosting.co.za> New submission from Daniel Watkins: ``` import mimetypes print(mimetypes.guess_type('foo.manifest')) mimetypes.add_type('text/plain', 'manifest') print(mimetypes.guess_type('foo.manifest')) ``` results in: ``` ('application/x-ms-manifest', None) ('application/x-ms-manifest', None) ``` I (mistakenly) expected the latter print to give me "('text/plain', None)". It doesn't because I should have prepended a . to the second add_type argument. I think add_type should error out when given an extension without a dot-prefix, because it's extremely unlikely that code that does so is behaving as intended with the current implementation. (At the very least, documentation should be updated to make this expectation clearer.) ---------- components: Library (Lib) messages: 299135 nosy: odd_bloke priority: normal severity: normal status: open title: mimetypes.add_type should complain when you give it an undotted ext _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 15:30:56 2017 From: report at bugs.python.org (Robert Jennings) Date: Tue, 25 Jul 2017 19:30:56 +0000 Subject: [issue31040] mimetypes.add_type should complain when you give it an undotted ext In-Reply-To: <1501010741.93.0.952054126016.issue31040@psf.upfronthosting.co.za> Message-ID: <1501011056.61.0.340047498129.issue31040@psf.upfronthosting.co.za> Changes by Robert Jennings : ---------- nosy: +rcj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 15:41:43 2017 From: report at bugs.python.org (Daniel Watkins) Date: Tue, 25 Jul 2017 19:41:43 +0000 Subject: [issue31040] mimetypes.add_type should complain when you give it an undotted ext In-Reply-To: <1501010741.93.0.952054126016.issue31040@psf.upfronthosting.co.za> Message-ID: <1501011703.07.0.958772447921.issue31040@psf.upfronthosting.co.za> Changes by Daniel Watkins : ---------- pull_requests: +2922 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 15:46:43 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 25 Jul 2017 19:46:43 +0000 Subject: [issue31021] Clarify programming faq. In-Reply-To: <1500933050.31.0.733502304217.issue31021@psf.upfronthosting.co.za> Message-ID: <1501012003.06.0.948030349421.issue31021@psf.upfronthosting.co.za> R. David Murray added the comment: I think Terry and his OP are reacting to the fact that "-190 % 12 == -10" looks like it is saying that that expression is True in Python, which it is not (and that's the point). IMO, another issue is that "and then compilers that truncate i // j need to make i % j have the same sign as i." doesn't have enough connection in the naive reader's mind with "-190 % 12 == -10 is a bug waiting to bite" for easy comprehension. A potential fix to both these issues would be to say "if -190 % 12 were equal to -10 in Python (the way it is in most C programs), that would quite often be a bug waiting to happen in code using the % operator." ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 16:53:05 2017 From: report at bugs.python.org (Jonathan Halcrow) Date: Tue, 25 Jul 2017 20:53:05 +0000 Subject: [issue2636] Adding a new regex module (compatible with re) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1501015985.15.0.545524726506.issue2636@psf.upfronthosting.co.za> Changes by Jonathan Halcrow : ---------- nosy: -jhalcrow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 17:00:03 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 25 Jul 2017 21:00:03 +0000 Subject: [issue30304] TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7 In-Reply-To: <1494233409.78.0.688533240712.issue30304@psf.upfronthosting.co.za> Message-ID: <1501016403.27.0.0353388261223.issue30304@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 0666d0e50432e3b0109db96b8e48fb6c496bd49c by Mariatta (Aditya Hase) in branch '2.7': bpo-30304: Improve TestCase.assertMultiLineEqual docs (GH-2847) https://github.com/python/cpython/commit/0666d0e50432e3b0109db96b8e48fb6c496bd49c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 17:05:31 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 25 Jul 2017 21:05:31 +0000 Subject: [issue30190] unittest's assertAlmostEqual improved error message In-Reply-To: <1493323962.23.0.575947649634.issue30190@psf.upfronthosting.co.za> Message-ID: <1501016731.01.0.691161889354.issue30190@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Reopening as it needs backports for 2.7, 3.3, 3.4, 3.5 and 3.6. ---------- resolution: fixed -> stage: resolved -> backport needed status: closed -> pending versions: +Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 17:06:22 2017 From: report at bugs.python.org (Steve Dower) Date: Tue, 25 Jul 2017 21:06:22 +0000 Subject: [issue30721] Show expected input for right shift operator usage in custom "print" error message In-Reply-To: <1498022036.95.0.527028755561.issue30721@psf.upfronthosting.co.za> Message-ID: <1501016782.39.0.904457426783.issue30721@psf.upfronthosting.co.za> Steve Dower added the comment: The "op_slot == 96" looks suspicious - how is this value actually supposed to be calculated? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 17:06:29 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 25 Jul 2017 21:06:29 +0000 Subject: [issue30190] unittest's assertAlmostEqual improved error message In-Reply-To: <1493323962.23.0.575947649634.issue30190@psf.upfronthosting.co.za> Message-ID: <1501016789.09.0.326363246076.issue30190@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Sorry, I accidentally picked up the wrong thread. ---------- resolution: -> fixed stage: backport needed -> resolved status: pending -> closed versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 17:08:10 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 25 Jul 2017 21:08:10 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501016890.54.0.0658730370871.issue30119@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Reopening as it needs backports for 2.7, 3.3, 3.4, 3.5 and 3.6. ---------- resolution: duplicate -> stage: resolved -> backport needed status: closed -> pending versions: +Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 17:18:01 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 25 Jul 2017 21:18:01 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501017481.08.0.276065795652.issue31036@psf.upfronthosting.co.za> Larry Hastings added the comment: * I was told that blurb needed to be in the core-workflow repo, that this was better than checking it in to CPython itself. Okay. If you want to debate the point, loop in Brett Cannon, he's the one with the strong opinions. * Ned has taken over the 3.3 branch, and he's asked that we not bother to blurbify it (convert it to use blurb). My expectation is that we will blurbify all other active branches: 2.7 3.4 3.5 3.6 master. * As part of the release process this weekend, I blurbified the 3.4 and 3.5 branches. There were already NEWS items stored in the Misc/NEWS.d/next directory, so I had to do *something*, and Brett has been encouraging me to move a little faster, so... I figured it was best to start there, as people don't care so much about 3.4 and 3.5 anymore, and they're "my" branches (as RM) so I wouldn't be inconveniencing anyone else. I assume we'll get all the problems ironed out before the next 3.6 release. * When a branch is converted over to blurb, you'll have to use blurb to build the docs from a git checkout of that branch. * When a branch is converted over to blurb, Misc/NEWS will no longer be a checked-in file. It will only be generated, by the release manager when making a release, or for fun whenever somebody feels like generating it I guess. It's important to remove it, because it's an output file, and if we leave it checked in people will modify it by hand, and then those changes will be lost the next time it's generated. In the 3.4 and 3.5 branches Misc/NEWS has been deleted. * As Ned points out, blurb isn't necessary for tarballs released by the RM. My makefile-fu isn't up to the task, but essentially Doc/Makefile should run this logic (assuming cwd is Doc): if os.path.exists("../Misc/NEWS"): shutil.copy("../Misc/NEWS", "build/NEWS") else: os.system("blurb merge build/NEWS") * I honestly don't understand the disposition of the venv in Doc/Makefile. Is it used automatically? Isn't it? It seems to be used under 3.5--when I do a docs build it installs a bunch of packages--so why didn't blurb get installed for doko? What about 3.4, which predates the venv in Doc/Makefile? TBH I'm a big dummy when it comes to venv stuff. I'm hoping someone smart like Ned will figure it all out and make it sane, regular, and predictable. (Hint hint!) * Building the docs already requires a dozen packages (Sphinx, which in turn depends on markupsafe et al). I assumed requiring one more package, also installed from pip, was not the worst thing in the world. Is it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 17:19:52 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 25 Jul 2017 21:19:52 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501017592.59.0.34960767447.issue31036@psf.upfronthosting.co.za> Ned Deily added the comment: Working on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 17:21:02 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 25 Jul 2017 21:21:02 +0000 Subject: [issue30931] Race condition in asyncore may access the wrong dispatcher In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1501017662.84.0.401315779722.issue30931@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > Yes, this is a typical issue in asyncore if you don't protect your > subclass to handle double close. I use the same trick all over the place in pyftpdlib: https://github.com/giampaolo/pyftpdlib/blob/1268bb185cd63c657d78bc33309041628e62360a/pyftpdlib/handlers.py#L537 In practical terms, does this bug report aim to fix this issue? ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 17:25:55 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 25 Jul 2017 21:25:55 +0000 Subject: [issue30985] Set closing variable in asyncore at close In-Reply-To: <1500661589.01.0.75637783455.issue30985@psf.upfronthosting.co.za> Message-ID: <1501017955.94.0.0297198397751.issue30985@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I welcome this change as it avoids tricks like this one: https://github.com/giampaolo/pyftpdlib/blob/1268bb185cd63c657d78bc33309041628e62360a/pyftpdlib/handlers.py#L537 Any app using asyncore for anything other than an echo server eventually ends up doing the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 17:33:05 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 25 Jul 2017 21:33:05 +0000 Subject: [issue30304] TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7 In-Reply-To: <1494233409.78.0.688533240712.issue30304@psf.upfronthosting.co.za> Message-ID: <1501018385.3.0.304512352924.issue30304@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 17:33:24 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 25 Jul 2017 21:33:24 +0000 Subject: [issue30985] Set closing variable in asyncore at close In-Reply-To: <1500661589.01.0.75637783455.issue30985@psf.upfronthosting.co.za> Message-ID: <1501018404.34.0.594919024725.issue30985@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: On the other hand, due to the poor asyncore API, I think it's safer if we land this in 3.7 only. "closing" attribute was never documented so if there's code out there setting it to True that'll crash their app pretty quickly as sockets won't close. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 17:50:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 21:50:10 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1501019410.51.0.738070575839.issue30302@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue has a long history starting in 2015 with a thread on python-dev. Many messages were written on python-dev and on this issue. I will try to summarize. (I hate doing that, summarizing is a risk of missing important information or misunderstand someone.) The issue opens multiple questions: * Should we change repr? ** YES, Guido: "I still think the repr change to use keywords has a good chance for 3.6." and "Still, I can't be the only one to ever have been fooled by this, and it is definitely pretty arcane knowledge what the positional arguments to timedelta()." ** YES, Martin Panter: "I disagree that the positional timedelta parameters are well-known." ** YES, Victor Stinner ** NO, Tim Peter: "But I wouldn't change repr() - the internal representation is fully documented, and it's appropriate for repr() to reflect documented internals as directly as possible." ** NO, Serhiy: "The drawback is that this change increases the length of the repr. Users of datetime.timedelta know what arguments mean. If they don't know they always can look in the documentation or builtin help." ** NO, Alexander Belopolsky: msg297521 * Can changing repr break code? ** Guido: when we randomized hash, a lot of tests failed * Add a "-" prefix for negative result: -timedelta(seconds=1)? * (Related) Should repr(timedelta(seconds=60)) returns 'timedelta(minutes=1)'? ** NO, Guido: "I'm sure that one often catches people by surprise. However, I don't think we can fix that one without also fixing the values of the attributes -- in that example days is -1 and seconds is 86340 (which will *also* catch people by surprise). And changing that would be much, much harder for backwards compatibility reasons-- we'd have to set days to 0 and seconds to -60, and suddenly we have a much murkier invariant, instead of the crisp" ** NO, Guido: "Then please just trust me. If the repr() shows different numbers than the attributes things are worse than now. People will casually look at the repr() and assume they've seen what the attributes will return, and spend hours debugging code that relies on that incorrect assumption." ** NO, R. David Murray : "I'm with Haypo: the repr should show the *actual* value of the attributes." ** NO, Victor Stinner: "Don't make repr() implementation overcomplicated (...) use str()" Another remark of Alexander Belopolsky: * "Furthermore, "seconds=28747" is not that user-friendly. A friendlier representation would be "hours=7, minutes=59, seconds=7" and similar information is displayed when you print a timedelta: (...)" ** IHMO you should use str() and not repr() to format a value for humans. repr() is more designed for developers, to debug. Another interesting remark: the documentation of the constructor is incomplete and should be document parameters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 17:51:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 21:51:38 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1501019498.62.0.939363329375.issue30302@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset cc5a65cd9025280ea67ef4bbc2a8bfe31ced6c30 by Victor Stinner (Utkarsh Upadhyay) in branch 'master': bpo-30302 Make timedelta.__repr__ more informative. (#1493) https://github.com/python/cpython/commit/cc5a65cd9025280ea67ef4bbc2a8bfe31ced6c30 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 17:52:05 2017 From: report at bugs.python.org (Nir Soffer) Date: Tue, 25 Jul 2017 21:52:05 +0000 Subject: [issue30931] Race condition in asyncore may access the wrong dispatcher In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1501019525.87.0.717920760142.issue30931@psf.upfronthosting.co.za> Nir Soffer added the comment: > I use the same trick all over the place in pyftpdlib: > https://github.com/giampaolo/pyftpdlib/blob/1268bb185cd63c657d78bc33309041628e62360a/pyftpdlib/handlers.py#L537 This allow detection of closed sockets, but does not fix the issue of accessing the wrong dispatcher. > In practical terms, does this bug report aim to fix this issue? Yes, see the attached PR's. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 18:00:16 2017 From: report at bugs.python.org (Nir Soffer) Date: Tue, 25 Jul 2017 22:00:16 +0000 Subject: [issue30985] Set closing variable in asyncore at close In-Reply-To: <1500661589.01.0.75637783455.issue30985@psf.upfronthosting.co.za> Message-ID: <1501020016.02.0.934188759569.issue30985@psf.upfronthosting.co.za> Nir Soffer added the comment: Giampaolo, people using only 3.7 should probably use asyncio. Fixing asyncore is more important to those that can use only 2.7 (e.g.Centos/RHEL) or have to support both python 3 and 2. Do you think using _closed is safer for backport? This can also clash with existing code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 18:00:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 22:00:45 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1501020045.67.0.995869129042.issue30302@psf.upfronthosting.co.za> STINNER Victor added the comment: Do you think that repr(datetime.timedelta) should be documented in the Porting section of What's New in Python 3.7? https://docs.python.org/dev/whatsnew/3.7.html#porting-to-python-3-7 It was proposed in the middle of the python-dev thread. I have no opinion on that... or just a little -0 vote, if someone is impacted, it should be easy to notice it anymore, no? -- While we don't have an obvious consensus, I took the responsability of merging Utkarsh Upadhyay's contribution. He wrote that he is interested to pursue the effort by also enhancing the docstring: please, go ahead, write a new PR, I will help you! It was discussed to rewrite datetime.timedelta: only accept keywords in its constructor, store seconds=60 as minutes=1, etc. The problem is that it's too late to change the design. So I suggest to not waste time on discussing that, but focus the energy on making tiny changes to enhance the implemenatation without risking of breaking the world. While developers using regulary timedelta knows what means the 3 numbers, it seems clear that the other developers have to check for the documentation. IMHO having to check the documentation is an issue: adding keywords to repr() reduces the need of documentation, and so makes Python more usable. Sorry about the longer repr(): use str() or write your own formater? By the way, if you need a formatter working on Python 2.7-3.7: >>> def format_td(td): return 'timedelta(%s, %s, %s)' % (td.days, td.seconds, td.microseconds) ... >>> format_td(datetime.timedelta(seconds=1)) 'timedelta(0, 1, 0)' If someone disagree with my merge, I suggest to reopen a thread on python-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 18:01:16 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 25 Jul 2017 22:01:16 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1501020076.1.0.0538268020985.issue27099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There is a reason that I said, in msg266221, that I would experiment with moving 1 feature ;-). I knew from past experience that changing anything that affected user configuration would have to consider the effect on previous releases. A total 'clean break' now would mean not a Py2 versus Py3 set of files but a Py3.6.2- versus a Py3.6.3+ set of files and I will not do this. But it is OK with me that you plunged ahead to learn for yourself. I expect to use most of what you have done. I would like to get this into 3.6.3, whose release candidate is scheduled for late September. But see below. That I one reason why I have focused for the last month on getting config and configdialog ready for changes. When I said, in msg298982, that the extensions tab has 'a separate system for handling user changes', I meant for putting user changes into idleConf. IdleConf itself handles the 2 sets of 4 files (or the 4 pairs) uniformly. I intend to remove that separate system *before* working on this. The changes instance of the new config.OptionChanges is already initialized with an 'extensions' dictionary that corresponds to the idleConf.userCfg['extensions'] instance of IdleUserConfigParser. So, *do not change your patch to use the separate system*! I expect that we should just need to replace 'main' with 'extensions' in something like "changes.add_option('main', 'AutoComplete', 'popupwait', value)". Changes that impact users should have a net user benefit, either directly or indirectly. Moving menu entries, making the menu different in different releases, will bother some people, but I think a few changes will be justified. Moving the tab where non-key options are displayed and changed also makes successive releases different. The (potential) benefit is that it will be easier to select and check entries. I just discovered that one can currently set editor width, for instance, to the string "nonsense"!. So the other tabs are also deficient. The benefit needs to be that entries, both existing and added, *are* checked. Moving the file where non-key options are *stored* has no user benefit to counter the severe incompatibility problem. Satisfying my aesthetic sensibilities is not good enough to justify the breakage. Extension key-binding options are already displayed on the keys tab. The issue is saving *all* key changes to the key file. The user benefit is to make it easier to design a new custom keyset. Some people do this by copying a section into config-keys.cfg or a separate file and editing it in an editor with enough lines to see everything. This seems easier than laboriously scanning the box showing 10 bindings at a time and changing one at a time with the popup. But the editor method misses the extension binding. In any case, even after adding an error check from a 2009 submission, there are 9 remaining keys issues and as many potential issues on my list. Improving the keys tab for all bindings is as important as moving the storage of some. Changing existing non-buggy behavior is much more problemmatical than fixing buggy behavior or adding new behavior. So we could defer the above changes to 3.7. But I don't like that either. It deprives 3.6 users, which there will be for several years, of the benefits. Diverging the files would make backing other improvements to 3.6 harder and less likely. This issue is worse for the big change to tabbed windows. Proposed solution: make tabbed windows a 'beta preview' option for the 3.6.x release after a minimal version is ready. (There would be the option of leaving the option in 3.7, though perhaps as opt-out.) The same could be done with the changes in this issue. Make them opt-in in 3.6. Add 'Preview' before 'Help' with two items on the drop down: 'Explanation', and 'Selected'. Explanation would popup a text view window. Selected would set a variable. I am working on removing from ConfigDialog a class for each tab. When that is done, we put the opt-in changes for this issue in a subclass of each. Then ConfigDialog ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 18:08:22 2017 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 25 Jul 2017 22:08:22 +0000 Subject: [issue30985] Set closing variable in asyncore at close In-Reply-To: <1500661589.01.0.75637783455.issue30985@psf.upfronthosting.co.za> Message-ID: <1501020502.19.0.372377594392.issue30985@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 18:14:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 22:14:30 +0000 Subject: [issue30985] Set closing variable in asyncore at close In-Reply-To: <1500661589.01.0.75637783455.issue30985@psf.upfronthosting.co.za> Message-ID: <1501020870.84.0.0209426689677.issue30985@psf.upfronthosting.co.za> STINNER Victor added the comment: "Giampaolo, people using only 3.7 should probably use asyncio. Fixing asyncore is more important to those that can use only 2.7 (e.g.Centos/RHEL) or have to support both python 3 and 2." IMHO starting to use closing in asyncore *is* a backward incompatible change. We don't know how applications use this existing attribute. Maybe it's not set to a boolean. Maybe it uses a different policy. I would be ok to start using closing in Python 3.7, but I'm not confortable with backporting such change. I would be if would be add a new private attribute, as the proposed "_closed" name. Maybe nobody uses closing. Maybe people using closing have a similar usage. The thing is that we don't know, and according to what you wrote Nir, closing *is* used. What I dislike in asyncore is that subclassing is not prohibed, it seems wanted by design. Ok, but what if a subclass overrides completely a method and doesn't set "closing/_closed" anymore? That's another reason why I dislike the idea of making any change in asyncore *especially* in Python 2.7 which is now considered as "very stable". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 18:19:53 2017 From: report at bugs.python.org (Matthias Klose) Date: Tue, 25 Jul 2017 22:19:53 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501021193.02.0.742445069832.issue31036@psf.upfronthosting.co.za> Matthias Klose added the comment: > so why didn't blurb get installed for doko? it's not packaged, and I'm (and I think any other provider of distro packages) not using network access during the build. Sorry to say, but the assumption that pip should be used to be able to build core python seems to be the wrong direction. Packaging blurb sure is an option, but what kind of value has this as a distro package? only used for building cpython, so why not include it in cpython itself? I have two use cases: - building a distro package from a (pre)release tarball with a included NEWS file. I can handle that by just not calling blurb. - building a distro package from a release tarball + a diff for a branch. I haven't looked yet how I could do that, including a current NEWS file. For the included external C libraries we do have the option to either use the included version, or an external one. Why not do the same for blurb? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 18:42:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 22:42:04 +0000 Subject: [issue30931] Race condition in asyncore may access the wrong dispatcher In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1501022524.68.0.582786681671.issue30931@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not sure that it's a good idea to compare asyncore and asyncio. While their name are similar, their design are *very* different. I'm only talking about the kernel, the core event loop checking for file descriptors. In asyncio, when you close a transport, the transport is not *closed* immediately. It is scheduled to be closed as soon as possible: usually in the next loop iteration, but it can longer to complex transports like subprocesses or TLS connections. Thanks to this design, asyncio doesn't have the race condition described in this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 18:48:21 2017 From: report at bugs.python.org (Kevin Quick) Date: Tue, 25 Jul 2017 22:48:21 +0000 Subject: [issue26732] multiprocessing sentinel resource leak In-Reply-To: <1460325501.58.0.225914662536.issue26732@psf.upfronthosting.co.za> Message-ID: <1501022901.6.0.775608684847.issue26732@psf.upfronthosting.co.za> Kevin Quick added the comment: Thank you for the fix, pitrou! Regarding your comment regarding the behavior being expected with the "fork" method, I would suggest a documentation modification in the description of the fork method to add something to the effect of "All resources of the parent are inherited by the child process; this includes the ability of later children to act as the parent of earlier children via the various functions in this package." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 18:51:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 22:51:31 +0000 Subject: [issue30931] Race condition in asyncore may access the wrong dispatcher In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1501023091.27.0.766578489338.issue30931@psf.upfronthosting.co.za> STINNER Victor added the comment: If I understood correctly, to fix this race condition, there are two main constraints: (A) We must call handlers of dispatcher registered before calling select()/poll(): dispatchers can be closed and their file descriptor can be reused while we execute other dispatchers (B) Don't call closed dispatcher -- For (A), I only see one option: copy somehow the map, for example using: ready = [(map[fd], flags) for fd, flags in r] -- For (B), it's more tricky. The bpo-30985 proposes to start using the closing: I'm not sure that it's doable in a stable version like 3.6, or worse in 2.7, since existing code may use closing differently. http://bugs.python.org/issue30985#msg299154 I'm also concerned about subclassing: if a subclass overrides *completely* close(), we would fail to detect that the dispatcher was closed. Maybe this corner doesn't occur in the wild? I see a different approach: while iterating on "ready" objects, check again if map.get(fd) still is the expected dispatcher. If the file descriptor is no more registered in map: it was closed. If we get a new dispatcher: not only the previous dispatcher was closed, but a new dispatcher also got the same file descriptor and was registered in the map. Do you think that this approach would work? Would it be safer in term of backward compatibility? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 18:55:09 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 25 Jul 2017 22:55:09 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501023309.79.0.767771410006.issue30853@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +2923 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 18:56:36 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 25 Jul 2017 22:56:36 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501023396.97.0.856310234463.issue31036@psf.upfronthosting.co.za> Larry Hastings added the comment: > Sorry to say, but the assumption that pip should be used to be able to build core python seems to be the wrong direction. I'm not sure I understand your position. External tools are only permissible if Debian packages exist for them? And, it's not "core python", it's the Python documentation, which has always depended on external tools. The dependencies for CPython itself (the "python" executable) have not changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 18:59:51 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 25 Jul 2017 22:59:51 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501023591.88.0.874314655813.issue31036@psf.upfronthosting.co.za> Ned Deily added the comment: The good news is that the released tarballs starting now and going forward will already have a generated Misc/NEWS just like they always have had. So blurb is not needed if you are building docs from such tarballs (like 3.5.4rc1). We did forget about building docs directly from the tarball so we'll fix the Doc Makefile to use an existing Misc/NEWS file and not use blurb at all in that case. I think that should cover your first use case. (If you are building from a git repo, you will need to use blurb as Misc/NEWS is no longer a checked-in file. As I've tried to explain before, just running "make venv" and "make html" currently isn't sufficient; one needs to either activate the virtual env or fiddle with Doc Makefile variables PYTHON, SPHINXBUILD, and/or now BLURB. I'm trying to see if I can make that smarter.) Your second use case is more complicated, if I understand it correctly. If you are generating the diff from a repo, going forward there won't be a unified Misc/NEWS file in the repo, rather there will be individual files added to Misc/NEWS.d for each checkin with a NEWS entry and those individual files have metadata meaningful to blurb. When the release tarball is made, Misc/NEWS.d/* is removed and replaced by a blurb-generated Misc/NEWS file. So if you are adding upstream pre-release diffs, you would have to run blurb as part of the process of building the docs. But I don't think blurb currently is designed to to handle the case of combining an existing generated Misc/NEWS file (from the tarball) with additional NEWS.d files. So I guess one solution would be you need to build the docs from the Git repo or at least copy the Misc/NEWS.d from the repo at the release tag and add the NEWS.d files for the cherrypicked pre-release fixes to it and then run blurb on it. But I may have misunderstand and I should let Larry speak for blurb. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 19:04:09 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 25 Jul 2017 23:04:09 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501023849.08.0.0687901909655.issue31036@psf.upfronthosting.co.za> Ned Deily added the comment: (Of course the above also applies to installed copies of Misc/NEWS, like Debian's /usr/share/doc/pythonx.x/NEWS.gz. The vanilla main Python Makefile doesn't install NEWS.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 19:08:20 2017 From: report at bugs.python.org (Jaume) Date: Tue, 25 Jul 2017 23:08:20 +0000 Subject: [issue30931] Race condition in asyncore may access the wrong dispatcher In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1501024100.02.0.343256080334.issue30931@psf.upfronthosting.co.za> Jaume added the comment: There's an alternative fix which follows a similar approach to the one you mention: https://github.com/python/cpython/pull/2707/. I personally don't like too much to reuse again again an old variable as it's true that we don't know how people are using it (although I take they use it as a boolean since it's assigned to False). On the other side this approach copies the map when it's not strictly necessary to do use just because we can't do it the proper way by using closing, as shown in the PR using it: https://github.com/python/cpython/pull/2764/files ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 19:13:13 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 25 Jul 2017 23:13:13 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501024393.69.0.355065809036.issue31036@psf.upfronthosting.co.za> Larry Hastings added the comment: I guess it depends on what the upstream patches look like. If they're always coded against release tarballs and not against git repos, then they'll assume (correctly) that Misc/NEWS exists. In that case you shouldn't have to do anything. If the upstream patches are extracted from GitHub PRs, then they'd presumably have files in Misc/NEWS.d. You could just ignore them. blurb doesn't support combining Misc/NEWS.d files with an existing Misc/NEWS file in a single operation. But you could run "blurb split", breaking Misc/NEWS into constituent files in Misc/NEWS.d, and then "blurb merge", rebuilding Misc/NEWS from those constituent files in Misc/NEWS.d. Naturally this would pick up the new files from Misc/NEWS.d too. Currently blurb is designed for the CPython developer workflow, so operations like "blurb split" and "blurb merge" also automatically stage the files in git. I can add a flag to suppress this feature, if it's going to become common that "blurb split" and "blurb merge" are run on tarballs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 19:19:56 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 25 Jul 2017 23:19:56 +0000 Subject: [issue25910] Fixing links in documentation In-Reply-To: <1450530544.1.0.9187941337.issue25910@psf.upfronthosting.co.za> Message-ID: <1501024796.38.0.748511126277.issue25910@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +2924 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 19:21:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 23:21:08 +0000 Subject: [issue30931] Race condition in asyncore may access the wrong dispatcher In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1501024868.69.0.235256198967.issue30931@psf.upfronthosting.co.za> STINNER Victor added the comment: > There's an alternative fix which follows a similar approach to the one you mention: https://github.com/python/cpython/pull/2707/. Sorry, I'm slow to understand. Now that the bug and expected behaviour is better explained, I can now review correctly your PR and I like it :-) While you wrote you previous comment, I updated my PR to implement a similar idea: https://github.com/python/cpython/pull/2854 My code now detects if a dispatcher was closed, but also if it's file descriptor was reused by a newly registered dispatcher. Our PR are similar: * create a copy before starting to run handler * check if our copy is still consistent to the current map: if not, skip the dispatcher handler My PR is different: * It only creates a list of ready objects: it might be cheaper if only few file descriptors are ready, whereas the map is large... I don't think that it's a real performance bottleneck in practice, but well, I'm just trying to compare our implementations :-) ... To be honest, my PR is a copy of your other PR, not you wrote both versions in fact ;-) (that's why I credited you as co-author in my PR) * My PR has a simpler and more specific unit test: only testing the poll() function, no server, no client: just handlers. * My PR also tests when a dispatcher was only closed, not replaced. -- Good! It seems like slowly we converge to a solution, no? Now, it's more bikeshedding on the exact implementation ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 19:22:56 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 25 Jul 2017 23:22:56 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501024976.2.0.430160457664.issue31036@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +2925 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 19:24:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 23:24:08 +0000 Subject: [issue30985] Set closing variable in asyncore at close In-Reply-To: <1500661589.01.0.75637783455.issue30985@psf.upfronthosting.co.za> Message-ID: <1501025048.03.0.966291895507.issue30985@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like the closing attribute is not *required* to fix bpo-30931, asyncore race condition: http://bugs.python.org/issue30931#msg299162 Another approach doesn't rely on close() "implementation", but more on close() "expected behaviour" (remove the dispatcher file descriptor from map). IMHO this approach would reduce the risk of backward incompatibility. -- I'm still in favor of rejecting this feature request, *but* I would prefer to first wait until we agree how to fix bpo-30931 race condition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 19:25:53 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 25 Jul 2017 23:25:53 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501025153.07.0.607226935974.issue31036@psf.upfronthosting.co.za> Ned Deily added the comment: I just pushed PR 2874 (for 3.5) for review. I think it will solve the tarball problem. Review comments welcome. I'm still thinking about how to make blurb more easily "discoverable". That would be a separate PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 19:38:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 23:38:48 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501025928.75.0.921697811894.issue31036@psf.upfronthosting.co.za> STINNER Victor added the comment: If we provide a prebuilt Misc/NEWS in tarball, if Makefile doesn't need blurb if Misc/NEWS already exists, doko's issue is fixed: Debian package builder will not need blurb anymore (PR 2874). > If the upstream patches are extracted from GitHub PRs, then they'd presumably have files in Misc/NEWS.d. You could just ignore them. If a vendor don't want to rely on blurb, I think that it's acceptable tradeoff. Usually, each backported change is documented in a vendor specific changelog anyway. Maybe tomorrow, some Linux vendors will start using blurb, but I suggest to work step by step, and first focus on the Python 3.5 "regression" fixed by PR 2874. -- > But you could run "blurb split", breaking Misc/NEWS into constituent files in Misc/NEWS.d, and then "blurb merge", rebuilding Misc/NEWS from those constituent files in Misc/NEWS.d. I'm not following you. If you want to rebuild Misc/NEWS, why not just removing Misc/NEWS and then run blurb merge? I expect that in a tarball, Misc/NEWS and Misc/NEWS.d contain exactly the same entries. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 19:44:45 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 25 Jul 2017 23:44:45 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501026285.39.0.646579647205.issue31036@psf.upfronthosting.co.za> Ned Deily added the comment: > I expect that in a tarball, Misc/NEWS and Misc/NEWS.d contain exactly the same entries. They don't. See for yourself :) https://www.python.org/ftp/python/3.5.4/Python-3.5.4rc1.tgz ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 19:51:18 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 25 Jul 2017 23:51:18 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501026678.48.0.387843296871.issue31036@psf.upfronthosting.co.za> Larry Hastings added the comment: What you're missing is that Misc/NEWS.d is removed from tarballs. We ship Misc/NEWS in tarballs but *not* Misc/NEWS.d. If you start with a CPython tarball (e.g. 3.5.4rc1), and then apply vendor-specific patches on top of that, and those patches include news entries in Misc/NEWS.d, and you want to ship a unified Misc/NEWS file that contains those entries, then you'll have to use "blurb split" to repopulate Misc/NEWS.d from Misc/NEWS followed by "blurb merge" to reconstitute Misc/NEWS from Misc/NEWS.d. FWIW, right now any entries under "Misc/NEWS.d/next" would appear in Misc/NEWS under the heading "What's new in Python next?", rather than e.g. "What's new in Python 3.5.4 release candidate 1?". This would be a little curious. blurb is only set up to understand "next" and CPython version numbers there; convincing it to put something else there would be a non-trivial amount of work. On a related subject, I should mention something about blurb aggregated version files, e.g. "Misc/NEWS.d/3.5.4rc1.rst". blurb doesn't know how to append / prepend to those, nor does it know how to combine two of them together. It just isn't a feature I needed for CPython. My guess is adding support for this wouldn't be too bad, and it may yet be helpful for doko's use case. Something to keep in mind. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 19:57:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 23:57:59 +0000 Subject: [issue31019] multiprocessing.Pool should join "dead" processes In-Reply-To: <1500917798.24.0.0382753367873.issue31019@psf.upfronthosting.co.za> Message-ID: <1501027079.16.0.577942412496.issue31019@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2926 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 19:59:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 23:59:03 +0000 Subject: [issue31019] multiprocessing.Pool should join "dead" processes In-Reply-To: <1500917798.24.0.0382753367873.issue31019@psf.upfronthosting.co.za> Message-ID: <1501027143.42.0.286418634935.issue31019@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, I don't think that https://github.com/python/cpython/pull/2849 fixes the root issue. The root issue is that calling Process.is_alive() doesn't update the _children list if the process completes. I wrote a fix for that: https://github.com/python/cpython/pull/2875 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:07:14 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 26 Jul 2017 00:07:14 +0000 Subject: [issue30985] Set closing variable in asyncore at close In-Reply-To: <1500661589.01.0.75637783455.issue30985@psf.upfronthosting.co.za> Message-ID: <1501027634.87.0.876682327311.issue30985@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I would probably feel safer to use "__closed" for all python versions and adopt the same naming convention for any attribute we may want to add in the future. Kinda weird, but asyncore is probably the only case of deprecated module with bad API design which makes it risky to make any change to the class namespace. As such I consider using the ugly "__" prefix justifiable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:08:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 00:08:03 +0000 Subject: [issue31034] test_subprocess_send_signal() of test_asyncio hangs if SIGHUP is ignored In-Reply-To: <1500995470.63.0.711892851496.issue31034@psf.upfronthosting.co.za> Message-ID: <1501027683.09.0.464813780599.issue31034@psf.upfronthosting.co.za> STINNER Victor added the comment: Patch to test manually the fix: diff --git a/Lib/test/test_asyncio/__init__.py b/Lib/test/test_asyncio/__init__.py index 80a9eea..1418952 100644 --- a/Lib/test/test_asyncio/__init__.py +++ b/Lib/test/test_asyncio/__init__.py @@ -1,3 +1,4 @@ +import signal; signal.signal(signal.SIGHUP, signal.SIG_IGN) import os from test.support import load_package_tests, import_module ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:08:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 00:08:44 +0000 Subject: [issue31034] test_subprocess_send_signal() of test_asyncio hangs if SIGHUP is ignored In-Reply-To: <1500995470.63.0.711892851496.issue31034@psf.upfronthosting.co.za> Message-ID: <1501027724.15.0.831191360313.issue31034@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2927 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:10:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 00:10:33 +0000 Subject: [issue31009] test_multiprocessing_spawn hangs randomly on AMD64 Windows10 3.x and AMD64 Windows8 3.x In-Reply-To: <1500887712.38.0.66903662356.issue31009@psf.upfronthosting.co.za> Message-ID: <1501027833.89.0.776533005901.issue31009@psf.upfronthosting.co.za> STINNER Victor added the comment: Windows buildbots are green again, I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:11:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 00:11:37 +0000 Subject: [issue26732] multiprocessing sentinel resource leak In-Reply-To: <1460325501.58.0.225914662536.issue26732@psf.upfronthosting.co.za> Message-ID: <1501027896.99.0.195905331736.issue26732@psf.upfronthosting.co.za> STINNER Victor added the comment: Antoine: Do you want to backport your change 896145d9d266ee2758cfcd7691238cbc1f9e1ab8 to Python 3.6? If yes, don't forget to include my fix 302bbbe9ba5c72559913e2ea006c921f698a729d for Windows (bpo-31009). If you prefer, I can handle the backport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:12:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 00:12:47 +0000 Subject: [issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads In-Reply-To: <1499865976.69.0.386624022037.issue30908@psf.upfronthosting.co.za> Message-ID: <1501027967.0.0.869264725246.issue30908@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:14:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 00:14:33 +0000 Subject: [issue30885] test_subprocess hangs on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1499637524.07.0.247905249864.issue30885@psf.upfronthosting.co.za> Message-ID: <1501028073.91.0.552607797602.issue30885@psf.upfronthosting.co.za> STINNER Victor added the comment: test_subprocess passed on the last builds 56 (Jul 20) and 57 (Jul 25). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:20:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 00:20:45 +0000 Subject: [issue30778] test_bsddb3 crash on x86 Windows XP 2.7 In-Reply-To: <1498514316.81.0.754509003042.issue30778@psf.upfronthosting.co.za> Message-ID: <1501028445.45.0.722820361179.issue30778@psf.upfronthosting.co.za> STINNER Victor added the comment: I opened a thread on python-dev and it was decided to skip test_bsddb3 on Windows XP: https://mail.python.org/pipermail/python-dev/2017-July/148745.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:22:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 00:22:07 +0000 Subject: [issue30778] test_bsddb3 crash on x86 Windows XP 2.7 In-Reply-To: <1498514316.81.0.754509003042.issue30778@psf.upfronthosting.co.za> Message-ID: <1501028527.26.0.987212580288.issue30778@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2928 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:26:16 2017 From: report at bugs.python.org (Devin Jeanpierre) Date: Wed, 26 Jul 2017 00:26:16 +0000 Subject: [issue29505] Submit the re, json, & csv modules to oss-fuzz testing In-Reply-To: <1486587261.97.0.342323514088.issue29505@psf.upfronthosting.co.za> Message-ID: <1501028776.39.0.558879206228.issue29505@psf.upfronthosting.co.za> Changes by Devin Jeanpierre : ---------- pull_requests: +2929 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:32:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 00:32:45 +0000 Subject: [issue31019] multiprocessing.Pool should join "dead" processes In-Reply-To: <1500917798.24.0.0382753367873.issue31019@psf.upfronthosting.co.za> Message-ID: <1501029165.3.0.680780403147.issue31019@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2db64823c20538a6cfc6033661fab5711d2d4585 by Victor Stinner in branch 'master': bpo-31019: Fix multiprocessing.Process.is_alive() (#2875) https://github.com/python/cpython/commit/2db64823c20538a6cfc6033661fab5711d2d4585 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:33:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 00:33:49 +0000 Subject: [issue31034] test_subprocess_send_signal() of test_asyncio hangs if SIGHUP is ignored In-Reply-To: <1500995470.63.0.711892851496.issue31034@psf.upfronthosting.co.za> Message-ID: <1501029229.25.0.750846797089.issue31034@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset efe9fcbd2ca85ba9d6af6d95cc530a9c332f37c5 by Victor Stinner in branch '3.6': bpo-31034: Reliable signal handler for test_asyncio (#2867) (#2876) https://github.com/python/cpython/commit/efe9fcbd2ca85ba9d6af6d95cc530a9c332f37c5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:34:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 00:34:53 +0000 Subject: [issue31034] test_subprocess_send_signal() of test_asyncio hangs if SIGHUP is ignored In-Reply-To: <1500995470.63.0.711892851496.issue31034@psf.upfronthosting.co.za> Message-ID: <1501029293.91.0.624401144345.issue31034@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, I fixed Python 3.6 and master (future 3.7). Python 3.5 is slowly entering security-only fixes. I don't think that this corner case is improtant enough to justify a backport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:35:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 00:35:00 +0000 Subject: [issue31034] test_subprocess_send_signal() of test_asyncio hangs if SIGHUP is ignored In-Reply-To: <1500995470.63.0.711892851496.issue31034@psf.upfronthosting.co.za> Message-ID: <1501029300.55.0.665122458787.issue31034@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:54:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 00:54:06 +0000 Subject: [issue31041] test_handle_called_with_mp_queue() of test_logging: threading_cleanup() failed to cleanup Message-ID: <1501030445.94.0.683702784342.issue31041@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/625/steps/test/logs/stdio (...) test_output (test.test_logging.UnixSocketHandlerTest) ... ok test_output (test.test_logging.UnixDatagramHandlerTest) ... ok test_output (test.test_logging.UnixSysLogHandlerTest) ... ok test__all__ (test.test_logging.MiscTestCase) ... ok test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest) ... Warning -- threading_cleanup() failed to cleanup -1 threads after 4 sec (count: 0, dangling: 1) ok test_handle_called_with_queue_queue (test.test_logging.QueueListenerTest) ... ok test_no_messages_in_queue_after_stop (test.test_logging.QueueListenerTest) ... ok (...) See also bpo-30830: "HTTPHandlerTest of test_logging leaks a "dangling" thread on AMD64 FreeBSD CURRENT Non-Debug 3.x". Previously fixed warnings: bpo-30131. ---------- components: Tests keywords: buildbot messages: 299180 nosy: haypo priority: normal severity: normal status: open title: test_handle_called_with_mp_queue() of test_logging: threading_cleanup() failed to cleanup type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:54:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 00:54:16 +0000 Subject: [issue31041] test_handle_called_with_mp_queue() of test_logging: threading_cleanup() failed to cleanup, on AMD64 FreeBSD 10.x Shared 3.x In-Reply-To: <1501030445.94.0.683702784342.issue31041@psf.upfronthosting.co.za> Message-ID: <1501030456.39.0.867552368966.issue31041@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_handle_called_with_mp_queue() of test_logging: threading_cleanup() failed to cleanup -> test_handle_called_with_mp_queue() of test_logging: threading_cleanup() failed to cleanup, on AMD64 FreeBSD 10.x Shared 3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 21:26:47 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 01:26:47 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501032407.5.0.0561401346269.issue30119@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +haypo status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 21:27:08 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 01:27:08 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501032428.18.0.673061457911.issue30119@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 21:36:18 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 01:36:18 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1501032978.26.0.953202097061.issue23404@psf.upfronthosting.co.za> Ned Deily added the comment: There still might be time to get this into 3.5.4 final, if Larry agrees. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 21:39:51 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 01:39:51 +0000 Subject: [issue1732367] Document the constants in the socket module Message-ID: <1501033191.84.0.920597029923.issue1732367@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: georg.brandl -> versions: +Python 3.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 21:55:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 01:55:37 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501034137.75.0.220312420519.issue30119@psf.upfronthosting.co.za> STINNER Victor added the comment: What about rejecting also NUL byte? ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:07:02 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Jul 2017 02:07:02 +0000 Subject: [issue29505] Submit the re, json, & csv modules to oss-fuzz testing In-Reply-To: <1486587261.97.0.342323514088.issue29505@psf.upfronthosting.co.za> Message-ID: <1501034822.3.0.530235725772.issue29505@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As I read 583, they are planning to fuzz 3.6. Why not branch master? I think it more likely that we accidentally add a vulnerability to master then that we accidentally close one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:27:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 02:27:15 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1501036035.5.0.753398242783.issue26762@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2930 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:27:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 02:27:15 +0000 Subject: [issue31019] multiprocessing.Pool should join "dead" processes In-Reply-To: <1500917798.24.0.0382753367873.issue31019@psf.upfronthosting.co.za> Message-ID: <1501036035.63.0.302564957966.issue31019@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2931 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:32:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 02:32:34 +0000 Subject: [issue30891] importlib: _find_and_load() race condition on sys.modules[name] check In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1501036354.81.0.791702338763.issue30891@psf.upfronthosting.co.za> STINNER Victor added the comment: With Python 3.5.4rc1 released (3.5.4 will be the last 3.5 release accepting bug fixes), I'm not sure that it's still worth it to try to backport such changes to Python 3.5. The importlib is very important, any regression can be very important. I'm not sure that backporting the unit test is interesting. If the test fails, we will be unable to fix it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:37:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 02:37:08 +0000 Subject: [issue30845] [3.5] test_first_completed_some_already_completed() of test_concurrent_futures.ProcessPoolWaitTests: time.sleep() fails with "sleep length must be non-negative" in setUp() on x86 Tiger 3.5 In-Reply-To: <1499163547.99.0.882941259602.issue30845@psf.upfronthosting.co.za> Message-ID: <1501036628.01.0.661451625122.issue30845@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2932 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:37:49 2017 From: report at bugs.python.org (Daniel Liu) Date: Wed, 26 Jul 2017 02:37:49 +0000 Subject: [issue17560] problem using multiprocessing with really big objects? In-Reply-To: <1364399521.2.0.696890688109.issue17560@psf.upfronthosting.co.za> Message-ID: <1501036669.41.0.609020386385.issue17560@psf.upfronthosting.co.za> Daniel Liu added the comment: There's also the other multiprocessing limitation Antoine mentioned early on, where queues/pipes used a 32-bit signed integer to encode object length. Is there a way or plan to get around this limitation? ---------- nosy: +Daniel Liu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:43:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 02:43:37 +0000 Subject: [issue30713] Reject newline character (U+000A) in URLs in urllib.parse In-Reply-To: <1497972033.13.0.439611221466.issue30713@psf.upfronthosting.co.za> Message-ID: <1501037017.91.0.672230355331.issue30713@psf.upfronthosting.co.za> STINNER Victor added the comment: https://bugs.python.org/issue29606 was fixed in ftplib. urllib is not the right place to reject invalid inputs. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:43:55 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 02:43:55 +0000 Subject: [issue30500] [security] urllib connects to a wrong host In-Reply-To: <1496030652.64.0.90102082916.issue30500@psf.upfronthosting.co.za> Message-ID: <1501037035.25.0.104446017974.issue30500@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 052f9d6860c48c5abcff8e16212e77cf4249d66c by Ned Deily (Victor Stinner) in branch '3.3': [3.3] bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) (#2292) https://github.com/python/cpython/commit/052f9d6860c48c5abcff8e16212e77cf4249d66c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:48:01 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 02:48:01 +0000 Subject: [issue30500] [security] urllib connects to a wrong host In-Reply-To: <1496030652.64.0.90102082916.issue30500@psf.upfronthosting.co.za> Message-ID: <1501037281.35.0.87108283069.issue30500@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: -> haypo resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:48:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 02:48:17 +0000 Subject: [issue30595] test_queue_feeder_donot_stop_onexc() of test_multiprocessing_spawn fails randomly on x86 Windows7 3.x In-Reply-To: <1496907626.7.0.367274651848.issue30595@psf.upfronthosting.co.za> Message-ID: <1501037297.74.0.733708203448.issue30595@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2933 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:48:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 02:48:58 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1501037338.21.0.211350122343.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d0adfb25c5082046133a18fd185375508c1c334f by Victor Stinner in branch '3.6': [3.6] bpo-26762, bpo-31019: Backport multiprocessing fixes from master to 3.6 (#2879) https://github.com/python/cpython/commit/d0adfb25c5082046133a18fd185375508c1c334f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:48:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 02:48:58 +0000 Subject: [issue31019] multiprocessing.Pool should join "dead" processes In-Reply-To: <1500917798.24.0.0382753367873.issue31019@psf.upfronthosting.co.za> Message-ID: <1501037338.33.0.450043110035.issue31019@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d0adfb25c5082046133a18fd185375508c1c334f by Victor Stinner in branch '3.6': [3.6] bpo-26762, bpo-31019: Backport multiprocessing fixes from master to 3.6 (#2879) https://github.com/python/cpython/commit/d0adfb25c5082046133a18fd185375508c1c334f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:51:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 02:51:20 +0000 Subject: [issue31019] multiprocessing.Pool should join "dead" processes In-Reply-To: <1500917798.24.0.0382753367873.issue31019@psf.upfronthosting.co.za> Message-ID: <1501037480.21.0.386544970692.issue31019@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2934 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:53:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 02:53:22 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1501037602.79.0.457895967014.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, now test_multiprocessing_spawn should not "leak" processes nor threads anymore. I fixed Python 3.6 and master. I close the issue. I don't think that it's worth it to fix tests in 2.7, and 3.5 is entering security-only mode. Note: I will backport bpo-31019 to Python 2.7, since this issue changes the code, not tests. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:56:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 02:56:23 +0000 Subject: [issue29972] Skip tests known to fail on AIX In-Reply-To: <1491232460.4.0.914311825782.issue29972@psf.upfronthosting.co.za> Message-ID: <1501037783.59.0.721005749822.issue29972@psf.upfronthosting.co.za> STINNER Victor added the comment: The issue title is very generic. I skipped some tests. I may reopen a new issue if I see other tests that can be skipped on AIX. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:58:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 02:58:29 +0000 Subject: [issue26642] Replace stdout and stderr with simple standard printers at Python exit In-Reply-To: <1458911597.09.0.705997743741.issue26642@psf.upfronthosting.co.za> Message-ID: <1501037909.66.0.47897806392.issue26642@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not sure that it's correct to replace sys.stdout with a simple object which can use a different encoding. I prefer to just close this old issue (idea). ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 22:59:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 02:59:14 +0000 Subject: [issue25287] test_crypt fails on OpenBSD In-Reply-To: <1443682191.0.0.229033947807.issue25287@psf.upfronthosting.co.za> Message-ID: <1501037954.14.0.901420049498.issue25287@psf.upfronthosting.co.za> STINNER Victor added the comment: There is no more OpenBSD buildbot. I have no OpenBSD VM. I just close this old issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 23:00:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 03:00:47 +0000 Subject: [issue20657] OpenBSD: Merge patches In-Reply-To: <1392639207.52.0.881152822714.issue20657@psf.upfronthosting.co.za> Message-ID: <1501038047.37.0.796026403334.issue20657@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm sorry but there is no more OpenBSD buildbot. I have no more OpenBSD VM. I just close this old issue :-( ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 23:02:59 2017 From: report at bugs.python.org (Joseph Fox-Rabinovitz) Date: Wed, 26 Jul 2017 03:02:59 +0000 Subject: [issue31042] Inconsistency in documentation of operator.index Message-ID: <1501038179.61.0.173139487282.issue31042@psf.upfronthosting.co.za> New submission from Joseph Fox-Rabinovitz: The docs for [`operator.index`][1] and `operator.__index__` state that > Return *a* converted to an integer. Equivalent to `a.__index__()`. The first sentence is correct, but the second is not. First of all, we have the data model [docs][2]: > For custom classes, implicit invocations of special methods are only guaranteed to work correctly if defined on an object?s type, not in the object?s instance dictionary. Secondly, we can make a simple counter-example in code: ``` import operator class A: def __index__(self): return 0 a = A() a.__index__ = (lambda self: 1).__get__(a, type(a)) operator.index(a) ``` The result is of course zero and not one. I believe that the docs should read something more like one of the following to avoid being misleading: > Return *a* converted to an integer, if it is already an integral type. > Return *a* converted to an integer. Equivalent to `type(a).__index__(a)`. Or a combination of both: > Return *a* converted to an integer, if it is already an integral type. Equivalent to `type(a).__index__(a)`. [1]: https://docs.python.org/3/library/operator.html#operator.index [2]: https://docs.python.org/3/reference/datamodel.html#special-method-lookup ---------- assignee: docs at python components: Documentation messages: 299195 nosy: docs at python, madphysicist priority: normal severity: normal status: open title: Inconsistency in documentation of operator.index type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 23:03:19 2017 From: report at bugs.python.org (Joseph Fox-Rabinovitz) Date: Wed, 26 Jul 2017 03:03:19 +0000 Subject: [issue31042] Inconsistency in documentation of operator.index In-Reply-To: <1501038179.61.0.173139487282.issue31042@psf.upfronthosting.co.za> Message-ID: <1501038199.17.0.634077969946.issue31042@psf.upfronthosting.co.za> Changes by Joseph Fox-Rabinovitz : ---------- type: behavior -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 23:05:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 03:05:11 +0000 Subject: [issue30845] [3.5] test_first_completed_some_already_completed() of test_concurrent_futures.ProcessPoolWaitTests: time.sleep() fails with "sleep length must be non-negative" in setUp() on x86 Tiger 3.5 In-Reply-To: <1499163547.99.0.882941259602.issue30845@psf.upfronthosting.co.za> Message-ID: <1501038311.8.0.984706691578.issue30845@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a6f045224a03f9b5f940c80ee142a2a4b4a9c9d8 by Victor Stinner in branch '3.6': bpo-30845: Enhance test_concurrent_futures cleanup (#2564) (#2880) https://github.com/python/cpython/commit/a6f045224a03f9b5f940c80ee142a2a4b4a9c9d8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 23:07:32 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 03:07:32 +0000 Subject: [issue27945] Various segfaults with dict In-Reply-To: <1472852008.61.0.354257945943.issue27945@psf.upfronthosting.co.za> Message-ID: <1501038452.36.0.0793556050304.issue27945@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 8fbdab50fc8f2b71f19b54f3a0208cfbf2be7713 by Ned Deily (Serhiy Storchaka) in branch '3.3': [3.3] [3.5] bpo-27945: Fixed various segfaults with dict. (GH-1657) (GH-1678) (#2396) https://github.com/python/cpython/commit/8fbdab50fc8f2b71f19b54f3a0208cfbf2be7713 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 23:08:42 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 03:08:42 +0000 Subject: [issue27945] Various segfaults with dict In-Reply-To: <1472852008.61.0.354257945943.issue27945@psf.upfronthosting.co.za> Message-ID: <1501038522.89.0.403605677886.issue27945@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- priority: release blocker -> resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 23:28:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 03:28:33 +0000 Subject: [issue29606] urllib FTP protocol stream injection In-Reply-To: <1487609342.46.0.653185585548.issue29606@psf.upfronthosting.co.za> Message-ID: <1501039713.78.0.321594044092.issue29606@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, bpo-30119 is really the same bug. So I closed this one as a duplicate of bpo-30119. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> (ftplib) A remote attacker could possibly attack by containing the newline characters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 23:29:01 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 03:29:01 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501039741.74.0.891786556751.issue30119@psf.upfronthosting.co.za> STINNER Victor added the comment: I closed bpo-29606 as a duplicate of this bug. ---------- superseder: urllib FTP protocol stream injection -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 23:34:51 2017 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 26 Jul 2017 03:34:51 +0000 Subject: [issue28777] Add asyncio.Queue __aiter__, __anext__ methods In-Reply-To: <1479877132.48.0.693527153069.issue28777@psf.upfronthosting.co.za> Message-ID: <1501040091.76.0.424737570664.issue28777@psf.upfronthosting.co.za> Guido van Rossum added the comment: > > there's no way to end the loop on the producing side. > I might be missing something, but can't something similar be said of queue.get()? That's my point, actually. If you are wrapping the Queue protocol with __aiter__/__anext__ the caller would expect there's a way to signal to the latter that the loop is over (so it can raise StopAsyncIteration). But since .get() doesn't have a way to signal this, an async for-loop would not be able to terminate (other than through break). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 23:38:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 03:38:24 +0000 Subject: [issue30595] test_queue_feeder_donot_stop_onexc() of test_multiprocessing_spawn fails randomly on x86 Windows7 3.x In-Reply-To: <1496907626.7.0.367274651848.issue30595@psf.upfronthosting.co.za> Message-ID: <1501040304.88.0.954762756038.issue30595@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e42339d3a08a8fde3349722def85d7a8e49899be by Victor Stinner in branch '3.6': [3.6] bpo-30595: Fix multiprocessing.Queue.get(timeout) (#2027) (#2881) https://github.com/python/cpython/commit/e42339d3a08a8fde3349722def85d7a8e49899be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 23:41:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 03:41:27 +0000 Subject: [issue30595] test_queue_feeder_donot_stop_onexc() of test_multiprocessing_spawn fails randomly on x86 Windows7 3.x In-Reply-To: <1496907626.7.0.367274651848.issue30595@psf.upfronthosting.co.za> Message-ID: <1501040487.91.0.845052230508.issue30595@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2935 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 23:54:34 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 03:54:34 +0000 Subject: [issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699) In-Reply-To: <1416797425.29.0.948172439575.issue22928@psf.upfronthosting.co.za> Message-ID: <1501041274.01.0.911460398344.issue22928@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 8e88f6b5e2a35ee458c161aa3f2b7f1f17fb45d1 by Ned Deily (Serhiy Storchaka) in branch '3.3': [3.3] bpo-22928: Disabled HTTP header injections in http.client. (#2817) https://github.com/python/cpython/commit/8e88f6b5e2a35ee458c161aa3f2b7f1f17fb45d1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 23:55:37 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 26 Jul 2017 03:55:37 +0000 Subject: [issue31040] mimetypes.add_type should complain when you give it an undotted ext In-Reply-To: <1501010741.93.0.952054126016.issue31040@psf.upfronthosting.co.za> Message-ID: <1501041337.79.0.762868607524.issue31040@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 23:58:32 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 03:58:32 +0000 Subject: [issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699) In-Reply-To: <1416797425.29.0.948172439575.issue22928@psf.upfronthosting.co.za> Message-ID: <1501041512.46.0.923942755291.issue22928@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: georg.brandl -> priority: release blocker -> resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 00:06:20 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 04:06:20 +0000 Subject: [issue26657] Directory traversal with http.server and SimpleHTTPServer on windows In-Reply-To: <1459179015.77.0.509336394494.issue26657@psf.upfronthosting.co.za> Message-ID: <1501041980.45.0.892190852555.issue26657@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 7b92f9fa47df754b50c64aac84cf1c09693571af by Ned Deily (Victor Stinner) in branch '3.3': bpo-26657: Fix Windows directory traversal vulnerability with http.server (#782) (#2860) https://github.com/python/cpython/commit/7b92f9fa47df754b50c64aac84cf1c09693571af ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 00:10:04 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 04:10:04 +0000 Subject: [issue26657] Directory traversal with http.server and SimpleHTTPServer on windows In-Reply-To: <1459179015.77.0.509336394494.issue26657@psf.upfronthosting.co.za> Message-ID: <1501042204.54.0.389286536803.issue26657@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 00:23:38 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 04:23:38 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501043018.71.0.664622782627.issue30119@psf.upfronthosting.co.za> Ned Deily added the comment: Just FYI, if the backports to 3.5, 3.4, and 3.3 happen *really* fast, we *might* be able to get them into the current round of releases, if Larry approves for 3.5.4 final and 3.4.7 final. If the 3.3 backport doesn't happen soon, 3.3 will reach end of life without it. ---------- keywords: +security_issue nosy: +benjamin.peterson, georg.brandl, larry, ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 00:26:30 2017 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 26 Jul 2017 04:26:30 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501043190.77.0.560119670505.issue30119@psf.upfronthosting.co.za> Dong-hee Na added the comment: Okay, I will send backport today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 00:34:53 2017 From: report at bugs.python.org (Ammar Askar) Date: Wed, 26 Jul 2017 04:34:53 +0000 Subject: [issue1732367] Document the constants in the socket module Message-ID: <1501043693.69.0.157881829847.issue1732367@psf.upfronthosting.co.za> Ammar Askar added the comment: Gonna take this and its dependencies on, eta 2-4 days. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 00:35:59 2017 From: report at bugs.python.org (Devin Jeanpierre) Date: Wed, 26 Jul 2017 04:35:59 +0000 Subject: [issue29505] Submit the re, json, & csv modules to oss-fuzz testing In-Reply-To: <1486587261.97.0.342323514088.issue29505@psf.upfronthosting.co.za> Message-ID: <1501043759.86.0.64844280942.issue29505@psf.upfronthosting.co.za> Devin Jeanpierre added the comment: I think they misspoke, it's normal with fuzzing to test against master. The current draft of the code runs this git pull before building/launching any tests: git clone --depth 1 https://github.com/python/cpython.git cpython Speaking of which, I forgot to update this bug thread with the followup PR to actually run CPython's fuzz tests (when they exist): https://github.com/google/oss-fuzz/pull/731. That's where I grabbed the git clone statement from. I think that will be merged after some version of PR 2878 lands in CPython (still in code review / broken). For Python 2 I guess it's different, and we will test against the 2.7 branch, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 00:43:30 2017 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 26 Jul 2017 04:43:30 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501044210.42.0.528980636436.issue30119@psf.upfronthosting.co.za> Changes by Dong-hee Na : ---------- pull_requests: +2937 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 00:53:41 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 26 Jul 2017 04:53:41 +0000 Subject: [issue30841] A shadowing variable naming emitted for Python-ast.c In-Reply-To: <1499109660.71.0.721864284128.issue30841@psf.upfronthosting.co.za> Message-ID: <1501044821.2.0.8158970073.issue30841@psf.upfronthosting.co.za> Benjamin Peterson added the comment: What actually omits warnings about this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 00:58:24 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 04:58:24 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501045104.93.0.77361210969.issue30119@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset a4e774f86224cd8c997deaa4e71312cf1a7b023c by Ned Deily (Dong-hee Na) in branch '3.3': [3.3] bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal command (#1214) (#2885) https://github.com/python/cpython/commit/a4e774f86224cd8c997deaa4e71312cf1a7b023c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 01:04:41 2017 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 26 Jul 2017 05:04:41 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501045481.71.0.888386848065.issue30119@psf.upfronthosting.co.za> Changes by Dong-hee Na : ---------- pull_requests: +2938 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 01:12:06 2017 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 26 Jul 2017 05:12:06 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501045926.65.0.480345649637.issue30119@psf.upfronthosting.co.za> Changes by Dong-hee Na : ---------- pull_requests: +2939 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 02:26:47 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 26 Jul 2017 06:26:47 +0000 Subject: [issue31037] Results in section 4.4 break and continue In-Reply-To: <1500995709.73.0.36567687409.issue31037@psf.upfronthosting.co.za> Message-ID: <1501050407.26.0.853784501923.issue31037@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 02:26:47 2017 From: report at bugs.python.org (Yuan Chao Chou) Date: Wed, 26 Jul 2017 06:26:47 +0000 Subject: [issue30841] A shadowing variable naming emitted for Python-ast.c In-Reply-To: <1499109660.71.0.721864284128.issue30841@psf.upfronthosting.co.za> Message-ID: <1501050407.3.0.941623345842.issue30841@psf.upfronthosting.co.za> Yuan Chao Chou added the comment: This can be repro by setting -Wshadow-compatible-local when using gcc to compile Python-ast.c. An example on my machine: ? cpython git:(69c0db5050) ? gcc-7 -Wshadow-compatible-local -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I./Include -I. -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/Users/python/.pyenv/versions/3.6.1/include -I/usr/local/include -I/Users/python/.pyenv/versions/3.6.1/include/python3.6m -c Python/Python-ast.c -o build/temp.macosx-10.12-x86_64-3.6/Python-ast.o Python/Python-ast.c: In function 'obj2ast_stmt': Python/Python-ast.c:4586:25: warning: declaration of 'value' shadows a previous local [-Wshadow=compatible-local] expr_ty value; ^~~~~ Python/Python-ast.c:4570:17: note: shadowed declaration is here expr_ty value; ^~~~~ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 02:40:07 2017 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 26 Jul 2017 06:40:07 +0000 Subject: [issue30616] Cannot use functional API to create enum with zero values In-Reply-To: <1497029417.9.0.731294800985.issue30616@psf.upfronthosting.co.za> Message-ID: <1501051207.31.0.230122076856.issue30616@psf.upfronthosting.co.za> Changes by Dong-hee Na : ---------- pull_requests: +2940 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 02:53:25 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Jul 2017 06:53:25 +0000 Subject: [issue31003] IDLE: Add tests for help sources on configdialog general tab In-Reply-To: <1500967070.15.0.0149219336702.issue31003@psf.upfronthosting.co.za> Message-ID: <1501052005.32.0.0903747059274.issue31003@psf.upfronthosting.co.za> Terry J. Reedy added the comment: PR ready for test and review. ---------- nosy: +csabella, louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 03:03:38 2017 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 26 Jul 2017 07:03:38 +0000 Subject: [issue30616] Cannot use functional API to create enum with zero values In-Reply-To: <1497029417.9.0.731294800985.issue30616@psf.upfronthosting.co.za> Message-ID: <1501052618.65.0.504044989955.issue30616@psf.upfronthosting.co.za> Changes by Dong-hee Na : ---------- pull_requests: +2941 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 03:04:44 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 07:04:44 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501052684.05.0.262783010582.issue30119@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 19b2890014d3098147d16475c492a47a43893768 by Ned Deily (Dong-hee Na) in branch '3.5': [3.5] [security] bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal command (#1214) (#2887) https://github.com/python/cpython/commit/19b2890014d3098147d16475c492a47a43893768 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 03:05:44 2017 From: report at bugs.python.org (Naotoshi Seo) Date: Wed, 26 Jul 2017 07:05:44 +0000 Subject: [issue24954] No way to generate or parse timezone as produced by datetime.isoformat() In-Reply-To: <1440801281.72.0.545558404714.issue24954@psf.upfronthosting.co.za> Message-ID: <1501052744.37.0.053768672649.issue24954@psf.upfronthosting.co.za> Naotoshi Seo added the comment: Any progress here? I want `%:z` strftime. By the way, ruby strptime works as: ``` irb(main):008:0* Time.strptime('2015-01-01T01:01:01+09:00', '%Y-%m-%dT%H:%M:%S%z') => 2015-01-01 01:01:01 +0900 irb(main):009:0> Time.strptime('2015-01-01T01:01:01+0900', '%Y-%m-%dT%H:%M:%S%z') => 2015-01-01 01:01:01 +0900 irb(main):010:0> Time.strptime('2015-01-01T01:01:01UTC', '%Y-%m-%dT%H:%M:%S%z') => 2015-01-01 01:01:01 UTC irb(main):011:0> Time.strptime('2015-01-01T01:01:01Z', '%Y-%m-%dT%H:%M:%S%z') => 2015-01-01 01:01:01 UTC irb(main):020:0> Time.strptime('2015-01-01T01:01:01Asia/Tokyo', '%Y-%m-%dT%H:%M:%S%z') => 2015-01-01 01:01:01 +0900 ``` ``` irb(main):015:0* Time.strptime('2015-01-01T01:01:01+09:00', '%Y-%m-%dT%H:%M:%S%Z') => 2015-01-01 01:01:01 +0900 irb(main):016:0> Time.strptime('2015-01-01T01:01:01+0900', '%Y-%m-%dT%H:%M:%S%Z') => 2015-01-01 01:01:01 +0900 irb(main):017:0> Time.strptime('2015-01-01T01:01:01UTC', '%Y-%m-%dT%H:%M:%S%Z') => 2015-01-01 01:01:01 UTC irb(main):018:0> Time.strptime('2015-01-01T01:01:01Z', '%Y-%m-%dT%H:%M:%S%Z') => 2015-01-01 01:01:01 UTC irb(main):019:0> Time.strptime('2015-01-01T01:01:01Asia/Tokyo', '%Y-%m-%dT%H:%M:%S%Z') => 2015-01-01 01:01:01 +0900 ``` ---------- nosy: +sonots _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 03:54:11 2017 From: report at bugs.python.org (Wonsup Yoon) Date: Wed, 26 Jul 2017 07:54:11 +0000 Subject: [issue29456] bugs in unicodedata.normalize: u1176, u11a7 and u11c3 In-Reply-To: <1486355272.29.0.0894514518656.issue29456@psf.upfronthosting.co.za> Message-ID: <1501055651.3.0.211942985592.issue29456@psf.upfronthosting.co.za> Wonsup Yoon added the comment: Any updates? I need this fix for my project. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 04:15:34 2017 From: report at bugs.python.org (Arthur Darcet) Date: Wed, 26 Jul 2017 08:15:34 +0000 Subject: [issue31025] io.BytesIO: no way to get the length of the underlying buffer without copying data In-Reply-To: <1500984238.01.0.587335781014.issue31025@psf.upfronthosting.co.za> Message-ID: <1501056934.87.0.627514677577.issue31025@psf.upfronthosting.co.za> Arthur Darcet added the comment: BytesIO is heavily optimised to avoid copying bytes when it can. For case (1), if you want to modify the data, then there is no need to actually copy it before overwriting it, because no-one else is using it For case (2), if you want to change something, then you need to copy it first, otherwise the original bytes object would get modified Case (1): % python -m timeit -s "import io; b = io.BytesIO(b'0' * 2 ** 30)" "b.getbuffer()" 1000000 loops, best of 3: 0.201 usec per loop Case (2): python -m timeit -s "import io; a = b'0' * 2 ** 30; b = io.BytesIO(a)" "b.getbuffer()" 10 loops, best of 3: 54.5 msec per loop ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 05:38:54 2017 From: report at bugs.python.org (Segev Finer) Date: Wed, 26 Jul 2017 09:38:54 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1501061934.26.0.0920568037155.issue9566@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2942 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 05:47:57 2017 From: report at bugs.python.org (Matthias Klose) Date: Wed, 26 Jul 2017 09:47:57 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501062477.1.0.410198172159.issue31036@psf.upfronthosting.co.za> Matthias Klose added the comment: > I'm not sure I understand your position. External tools are only > permissible if Debian packages exist for them? for a package build to use them, yes. > And, it's not "core python", it's the Python documentation, which has > always depended on external tools. The dependencies for CPython itself > (the "python" executable) have not changed. afaict, the tools needed to build the documentation didn't change within subminor version updates. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 06:08:34 2017 From: report at bugs.python.org (Pierre Quentel) Date: Wed, 26 Jul 2017 10:08:34 +0000 Subject: [issue30576] http.server should support HTTP compression (gzip) In-Reply-To: <1496691724.59.0.955308322691.issue30576@psf.upfronthosting.co.za> Message-ID: <1501063714.47.0.282540689063.issue30576@psf.upfronthosting.co.za> Pierre Quentel added the comment: @martin.panter For HTTP/1.0, since chunked transfer is not supported, and storage in a temporary file is also not an option, I see 2 possible solutions : - give up compressing big files - it would be a pity, compression is actually made for them... - compress the file 2 times : a first time just to compute the content length, without storing or sending anything, and a second time to send the gzipped data after all headers have been sent If there is a 3rd solution I'd be glad to know ; otherwise I prefer the second one, in spite of the waste of CPU. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 06:20:49 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Wed, 26 Jul 2017 10:20:49 +0000 Subject: [issue31043] Tests running twice. Message-ID: <1501064449.34.0.054163573258.issue31043@psf.upfronthosting.co.za> New submission from Utkarsh Upadhyay: Due to a rebase artifact (sorry!), the tests for the datetime module are being run twice: test_datetime.py: [...] cls.tearDownClass = tearDownClass all_test_classes.extend(test_classes) all_test_classes.extend(test_classes) def test_main(): run_unittest(*all_test_classes) [...] Fix coming shortly. ---------- components: Tests messages: 299218 nosy: musically_ut priority: normal severity: normal status: open title: Tests running twice. type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 06:21:38 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Wed, 26 Jul 2017 10:21:38 +0000 Subject: [issue31043] Tests running twice. In-Reply-To: <1501064449.34.0.054163573258.issue31043@psf.upfronthosting.co.za> Message-ID: <1501064498.78.0.060634132628.issue31043@psf.upfronthosting.co.za> Changes by Utkarsh Upadhyay : ---------- pull_requests: +2943 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 06:46:21 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 26 Jul 2017 10:46:21 +0000 Subject: [issue31043] Tests running twice. In-Reply-To: <1501064449.34.0.054163573258.issue31043@psf.upfronthosting.co.za> Message-ID: <1501065981.94.0.829861988742.issue31043@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset ede9084476f88f5a86c7eaaac33cdd938e4cce93 by INADA Naoki (Utkarsh Upadhyay) in branch 'master': bpo-31043: fixed test_datetime run twice. (GH-2891) https://github.com/python/cpython/commit/ede9084476f88f5a86c7eaaac33cdd938e4cce93 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 06:59:58 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 26 Jul 2017 10:59:58 +0000 Subject: [issue31043] Tests running twice. In-Reply-To: <1501064449.34.0.054163573258.issue31043@psf.upfronthosting.co.za> Message-ID: <1501066798.81.0.00793929358512.issue31043@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 07:46:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 11:46:30 +0000 Subject: [issue31044] FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT Debug 3.x Message-ID: <1501069590.31.0.999059356649.issue31044@psf.upfronthosting.co.za> New submission from STINNER Victor: The test failed in the build 632 (Wed Jul 26 10:47:01 2017) for the first time. http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/632/steps/test/logs/stdio == CPython 3.7.0a0 (heads/master:ede9084476, Jul 26 2017, 20:49:33) [GCC 4.2.1 Compatible FreeBSD Clang 5.0.0 (trunk 308421)] == FreeBSD-12.0-CURRENT-amd64-64bit-ELF little-endian == hash algorithm: siphash24 64bit == cwd: /usr/home/buildbot/python/3.x.koobs-freebsd-current/build/build/test_python_23542 == CPU count: 2 == encodings: locale=US-ASCII, FS=ascii 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=1, verbose=0, bytes_warning=2, quiet=0, hash_randomization=1, isolated=0) Using random seed 9341910 ... ====================================================================== FAIL: test_makedev (test.test_posix.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_posix.py", line 543, in test_makedev self.assertEqual(posix.makedev(major, minor), dev) AssertionError: 1292118443 != 954774858155 ---------- components: Tests messages: 299220 nosy: haypo priority: normal severity: normal status: open title: FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT Debug 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 07:46:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 11:46:35 +0000 Subject: [issue31044] FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT Debug 3.x In-Reply-To: <1501069590.31.0.999059356649.issue31044@psf.upfronthosting.co.za> Message-ID: <1501069595.04.0.923081485335.issue31044@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 07:49:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 11:49:18 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1501069758.78.0.766217943103.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c52cea49544621b612c7f17f45a0c2b8b61a6c67 by Victor Stinner (Utkarsh Upadhyay) in branch '3.6': [3.6] bpo-30822: Fix testing of datetime module. (GH-2530) (GH-2783) (#2816) https://github.com/python/cpython/commit/c52cea49544621b612c7f17f45a0c2b8b61a6c67 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 07:52:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 11:52:55 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1501069975.14.0.111730677418.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, I merged the change in the 3.6 branch. I decided to not merge the 3.5 change, since it's now too late: 3.5 slowly enters a new security-only fixes: https://github.com/python/cpython/pull/2815 Thanks Utkarsh Upadhyay for your work on datetime, not only this issue, but also repr(timedelta) (and maybe also timedelta constructor doc later? ;-)). ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 07:58:20 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Wed, 26 Jul 2017 11:58:20 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1501070300.21.0.182506118132.issue30822@psf.upfronthosting.co.za> Utkarsh Upadhyay added the comment: Thanks Victor! \o/ Secretly, I'm just happy that my legacy will not be a commit which broke all (?) the build-bots and had to be reverted. :P W.r.t. the docs; in retrospect, that'll probably have a larger impact on the end-users and is less likely to cause disagreement. I probably should have led with that. :) ~ ut ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 08:04:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 12:04:59 +0000 Subject: [issue30822] Python implementation of datetime module is not being tested correctly. In-Reply-To: <1498866468.86.0.743233238239.issue30822@psf.upfronthosting.co.za> Message-ID: <1501070699.21.0.154847045616.issue30822@psf.upfronthosting.co.za> STINNER Victor added the comment: > Secretly, I'm just happy that my legacy will not be a commit which broke all (?) the build-bots and had to be reverted. :P Reverting is a new policy that we decided last June: https://mail.python.org/pipermail/python-committers/2017-June/004588.html Sorry that your commit was the first guilty, but honestly, it was a wise decision since it allowed to discuss how to handle tzdata without the pressure of broken buildbots. Nowadays, Python relies much more on CI for pull requests than before the migration to GitHub. Well, read the thread if you want to know the full rationale. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 08:10:29 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 26 Jul 2017 12:10:29 +0000 Subject: [issue30188] test_nntplib: random EOFError in setUpClass() In-Reply-To: <1493305628.27.0.924756319794.issue30188@psf.upfronthosting.co.za> Message-ID: <1501071029.32.0.55715628204.issue30188@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +2944 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 08:11:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 12:11:27 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501071087.75.0.257600070731.issue30119@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8c2d4cf092c5f0335e7982392a33927579c4d512 by Victor Stinner (Dong-hee Na) in branch '3.6': [3.6] bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal command (#1214) (#2886) https://github.com/python/cpython/commit/8c2d4cf092c5f0335e7982392a33927579c4d512 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 08:12:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 12:12:55 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501071175.49.0.677632926717.issue30119@psf.upfronthosting.co.za> STINNER Victor added the comment: @corona10: Cool, 3.3, 3.5, 3.6 and master are fixed. Would you mind to create also backports for 2.7 and 3.4, please? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 08:14:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 12:14:37 +0000 Subject: [issue31044] FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT In-Reply-To: <1501069590.31.0.999059356649.issue31044@psf.upfronthosting.co.za> Message-ID: <1501071277.63.0.43038089157.issue31044@psf.upfronthosting.co.za> STINNER Victor added the comment: The test fails on Debug but also Non-Debug buildbots, master and 3.6 branches. It looks more like a change on the buildbot, maybe a FreeBSD upgrade? ---------- title: FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT Debug 3.x -> FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 08:22:33 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 26 Jul 2017 12:22:33 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501071753.73.0.626598611153.issue30119@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > What about rejecting also NUL byte? I don't it would make any difference at this point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 08:51:29 2017 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 26 Jul 2017 12:51:29 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501073489.96.0.965398138415.issue30119@psf.upfronthosting.co.za> Changes by Dong-hee Na : ---------- pull_requests: +2945 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 09:03:48 2017 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 26 Jul 2017 13:03:48 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501074228.48.0.869072157138.issue30119@psf.upfronthosting.co.za> Changes by Dong-hee Na : ---------- pull_requests: +2946 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 09:09:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 13:09:21 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501074561.58.0.59434625942.issue30119@psf.upfronthosting.co.za> STINNER Victor added the comment: Victor> What about rejecting also NUL byte? Giampaolo Rodola'> I don't it would make any difference at this point. I asked because I read that filenames containing newlines can be escaped using \n\0. So it seems like "embedded" NUL bytes have a special semantic in FTP. http://bugs.python.org/issue29606#msg292677 I have no opinion on NUL bytes. It's just that I saw them mentionned somewhere in the discussion, but I failed to see a rationale to accept or reject them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 09:16:02 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 26 Jul 2017 13:16:02 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501074962.7.0.970921259215.issue30119@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: AFAIK its only use case is to escape \r and \n. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 10:00:05 2017 From: report at bugs.python.org (Dmitry K) Date: Wed, 26 Jul 2017 14:00:05 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1501077605.47.0.991656306754.issue30876@psf.upfronthosting.co.za> Dmitry K added the comment: test_concurrency (test.test_import.ImportTests) seems to fail, too, with a similar error: ModuleNotFoundError: No module named 'package' Apparently, this happens because the LIBSUBDIRS variable in Makefile doesn't include all the subdirectories of test/test_import/data. Adding the following two lines fixed the issue for me: test/test_import/data/package \ test/test_import/data/package2 \ Should I submit a patch? ---------- nosy: +vaultah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 10:05:11 2017 From: report at bugs.python.org (Marco Buttu) Date: Wed, 26 Jul 2017 14:05:11 +0000 Subject: [issue31021] Clarify programming faq. In-Reply-To: <1500933050.31.0.733502304217.issue31021@psf.upfronthosting.co.za> Message-ID: <1501077911.49.0.145769909881.issue31021@psf.upfronthosting.co.za> Marco Buttu added the comment: Terry thanks for opening this issue. The title of the FAQ makes me think that the section wants to clarify why -22 // 10 returns -3. I am a bit confused, maybe because -22//10 == -3 does not surprise me, and so I do not understand the point :( This seems to me a section about the module rather than floor division. If the section wants to clarify the floor division behavior in Python, IMHO at the beginning of the section we have to explain why -22//10 == -3 may surprise the reader (it is not clear to me, so maybe it could not surprise other readers too), and then the reasons that justify why to have -22//10 == -3. ---------- nosy: +marco.buttu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 10:09:58 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 26 Jul 2017 14:09:58 +0000 Subject: [issue31025] io.BytesIO: no way to get the length of the underlying buffer without copying data In-Reply-To: <1500984238.01.0.587335781014.issue31025@psf.upfronthosting.co.za> Message-ID: <1501078198.97.0.558838834103.issue31025@psf.upfronthosting.co.za> R. David Murray added the comment: So you are saying that BytesIO has code that checks that its argument only has a single reference and modifies the string in place when it can if so? You can't depend on that in any other implementation of Python, and shouldn't depend on it in CPython either. Even in CPython you can't guarantee that case 1 is case 1, since the argument could conceivably be an interned string. So the seek approach is the only one that makes semantic sense, I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 10:10:14 2017 From: report at bugs.python.org (Julien Palard) Date: Wed, 26 Jul 2017 14:10:14 +0000 Subject: [issue31045] Add a language switch to the Python documentation Message-ID: <1501078214.01.0.529111921671.issue31045@psf.upfronthosting.co.za> New submission from Julien Palard: A language switch, like the actual version switch, should allow to change from a translation to another. I mean jumping from docs.python.org/3/ to docs.python.org/fr/3/ and so on. It's already discussed in PEP 545. ---------- messages: 299234 nosy: mdk priority: normal pull_requests: 2947 severity: normal status: open title: Add a language switch to the Python documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 10:43:27 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 26 Jul 2017 14:43:27 +0000 Subject: [issue30188] test_nntplib: random EOFError in setUpClass() In-Reply-To: <1493305628.27.0.924756319794.issue30188@psf.upfronthosting.co.za> Message-ID: <1501080207.71.0.251012620506.issue30188@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 067931dd95ddfa34297be9c602a796d9f8d9bea3 by INADA Naoki in branch 'master': bpo-30188: fix TypeError in test_nntplib (GH-2892) https://github.com/python/cpython/commit/067931dd95ddfa34297be9c602a796d9f8d9bea3 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 10:45:35 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 26 Jul 2017 14:45:35 +0000 Subject: [issue31038] test_runpy causes running all Python tests when run directly In-Reply-To: <1500999449.61.0.732584715877.issue31038@psf.upfronthosting.co.za> Message-ID: <1501080335.32.0.66947337459.issue31038@psf.upfronthosting.co.za> Nick Coghlan added the comment: This is a result of a known quirk in the way sys.path entry execution works: the search for "__main__.py" isn't constrained specifically to sys.path[0]. That's almost entirely a bad thing, but I'd been ignoring it because I hadn't thought of a nice way of fixing it that didn't require some substantial changes to the import system APIs. However, it just occurred to me that I may have been overcomplicating matters: we don't need to keep runpy from *finding* a __main__.py from outside sys.path[0] in this case, we just need to keep it from *running* it. That means that after we find the candidate module spec for __main__, we can introduce a new constraint: if os.path.commonpath([sys.path[0], spec.origin]) != sys.path[0]: raise RuntimeError(...) It might still be a little fiddly to decide exactly when to enforce the constraint, but it should still be much easier than attempting to constrain the search for the spec directly. ---------- nosy: +brett.cannon, eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 10:52:02 2017 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 26 Jul 2017 14:52:02 +0000 Subject: [issue24954] No way to generate or parse timezone as produced by datetime.isoformat() In-Reply-To: <1440801281.72.0.545558404714.issue24954@psf.upfronthosting.co.za> Message-ID: <1501080722.03.0.735283383652.issue24954@psf.upfronthosting.co.za> Guido van Rossum added the comment: Alexander, can you summarize the status of this issue? Maybe we can move forward for 3.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 10:56:47 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 26 Jul 2017 14:56:47 +0000 Subject: [issue30721] Show expected input for right shift operator usage in custom "print" error message In-Reply-To: <1498022036.95.0.527028755561.issue30721@psf.upfronthosting.co.za> Message-ID: <1501081007.24.0.369416189845.issue30721@psf.upfronthosting.co.za> Nick Coghlan added the comment: Checking how we do it elsewhere, `NB_SLOT(nb_rshift)` looks like the right replacement. That's a compiler-dependent struct field offset calculation, so a discrepancy there could easily be the cause of a Windows-only failure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 11:06:58 2017 From: report at bugs.python.org (Daniel Watkins) Date: Wed, 26 Jul 2017 15:06:58 +0000 Subject: [issue31040] mimetypes.add_type should complain when you give it an undotted ext In-Reply-To: <1501010741.93.0.952054126016.issue31040@psf.upfronthosting.co.za> Message-ID: <1501081618.37.0.44621693769.issue31040@psf.upfronthosting.co.za> Changes by Daniel Watkins : ---------- pull_requests: +2948 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 11:28:51 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 26 Jul 2017 15:28:51 +0000 Subject: [issue24954] No way to generate or parse timezone as produced by datetime.isoformat() In-Reply-To: <1440801281.72.0.545558404714.issue24954@psf.upfronthosting.co.za> Message-ID: <1501082931.43.0.427449744264.issue24954@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This issue is waiting for the final decision on #5288. If sub-minute offsets support is accepted, I still don't think we need %::z because %:z can simply add non-zero :seconds as needed. There are also some review comments on the latest patch that have not been addressed. Overall this is an easy issue and it would be quite doable to get it resolved for 3.7. ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 11:32:21 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 26 Jul 2017 15:32:21 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1501083141.26.0.315666631994.issue5288@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 11:48:36 2017 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 26 Jul 2017 15:48:36 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1501084116.03.0.87873328587.issue5288@psf.upfronthosting.co.za> Guido van Rossum added the comment: I haven't reviewed the code, but given Tim Peters' response (which matches my own gut feeling) we should just allow/support tz offsets with second-precision (and deal with the default formatting issues in a backwards compatible way, of course). Hope the patches aren't too stale -- good luck moving them to GitHub! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 11:49:33 2017 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 26 Jul 2017 15:49:33 +0000 Subject: [issue24954] No way to generate or parse timezone as produced by datetime.isoformat() In-Reply-To: <1440801281.72.0.545558404714.issue24954@psf.upfronthosting.co.za> Message-ID: <1501084173.51.0.179944160255.issue24954@psf.upfronthosting.co.za> Guido van Rossum added the comment: Please do! I have no opinion on %::z but maybe you can find inspiration in the Zen of Python. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 11:50:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 15:50:40 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501084240.97.0.499929969721.issue30119@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e5eae474c431af2880a68f6329840b9288fc4bc1 by Victor Stinner (Dong-hee Na) in branch '2.7': [2.7] bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal command (#1214) (#2894) https://github.com/python/cpython/commit/e5eae474c431af2880a68f6329840b9288fc4bc1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 11:52:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 15:52:38 +0000 Subject: [issue30595] test_queue_feeder_donot_stop_onexc() of test_multiprocessing_spawn fails randomly on x86 Windows7 3.x In-Reply-To: <1496907626.7.0.367274651848.issue30595@psf.upfronthosting.co.za> Message-ID: <1501084358.69.0.996026896693.issue30595@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ec9a7127b8196dc5ef27c5ee2772ecea7cbb32df by Victor Stinner in branch '2.7': [3.6] bpo-30595: Fix multiprocessing.Queue.get(timeout) (#2027) (#2881) (#2883) https://github.com/python/cpython/commit/ec9a7127b8196dc5ef27c5ee2772ecea7cbb32df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 11:54:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 15:54:28 +0000 Subject: [issue30595] test_queue_feeder_donot_stop_onexc() of test_multiprocessing_spawn fails randomly on x86 Windows7 3.x In-Reply-To: <1496907626.7.0.367274651848.issue30595@psf.upfronthosting.co.za> Message-ID: <1501084468.87.0.540513701064.issue30595@psf.upfronthosting.co.za> STINNER Victor added the comment: I fixed multiprocessing.Queue.get(timeout) in 2.7, 3.6 and master. I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 11:54:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 15:54:47 +0000 Subject: [issue31019] multiprocessing.Pool should join "dead" processes In-Reply-To: <1500917798.24.0.0382753367873.issue31019@psf.upfronthosting.co.za> Message-ID: <1501084487.9.0.71479977876.issue31019@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b65cb8a35641675d44af84c9b18c40c6094f03ef by Victor Stinner in branch '2.7': bpo-31019: Fix multiprocessing.Process.is_alive() (#2875) (#2882) https://github.com/python/cpython/commit/b65cb8a35641675d44af84c9b18c40c6094f03ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 11:55:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 15:55:41 +0000 Subject: [issue31019] multiprocessing.Pool should join "dead" processes In-Reply-To: <1500917798.24.0.0382753367873.issue31019@psf.upfronthosting.co.za> Message-ID: <1501084541.62.0.923363829409.issue31019@psf.upfronthosting.co.za> STINNER Victor added the comment: I fixed multiprocessing.Process.is_alive() in 2.7, 3.6 and master. I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 11:55:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 15:55:54 +0000 Subject: [issue30778] test_bsddb3 crash on x86 Windows XP 2.7 In-Reply-To: <1498514316.81.0.754509003042.issue30778@psf.upfronthosting.co.za> Message-ID: <1501084554.32.0.233891061885.issue30778@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0cba38d207dc233707b09787e6618cfca44cc2b7 by Victor Stinner in branch '2.7': bpo-30778: Skip test_bsddb3 on Windows XP (#2877) https://github.com/python/cpython/commit/0cba38d207dc233707b09787e6618cfca44cc2b7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 11:56:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 15:56:49 +0000 Subject: [issue30778] test_bsddb3 crash on x86 Windows XP 2.7 In-Reply-To: <1498514316.81.0.754509003042.issue30778@psf.upfronthosting.co.za> Message-ID: <1501084609.03.0.867342284787.issue30778@psf.upfronthosting.co.za> STINNER Victor added the comment: test_bsddb3 is now skipped on Windows XP (on Python 2.7). ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 11:58:27 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 26 Jul 2017 15:58:27 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1501084707.57.0.706403308056.issue9566@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset e7bc7aac3d4a7d92aa5913006b0198820882ca59 by Steve Dower (Segev Finer) in branch 'master': bpo-9566: Fix a warning in Python/getargs.c (#2890) https://github.com/python/cpython/commit/e7bc7aac3d4a7d92aa5913006b0198820882ca59 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 12:00:53 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 26 Jul 2017 16:00:53 +0000 Subject: [issue30916] Pre-build OpenSSL and Tcl/Tk for Windows In-Reply-To: <1499899065.59.0.916676241363.issue30916@psf.upfronthosting.co.za> Message-ID: <1501084853.78.0.990268569509.issue30916@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- pull_requests: -2894 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 12:01:28 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 26 Jul 2017 16:01:28 +0000 Subject: [issue30916] Pre-build OpenSSL and Tcl/Tk for Windows In-Reply-To: <1499899065.59.0.916676241363.issue30916@psf.upfronthosting.co.za> Message-ID: <1501084888.96.0.450450641239.issue30916@psf.upfronthosting.co.za> Steve Dower added the comment: That buildbot has recovered with other changes, so I'm closing this. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 12:05:36 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 26 Jul 2017 16:05:36 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1501085136.0.0.291379871772.issue5288@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- priority: low -> versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 12:11:17 2017 From: report at bugs.python.org (Dmitry Kazakov) Date: Wed, 26 Jul 2017 16:11:17 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1501085477.87.0.475818619239.issue30876@psf.upfronthosting.co.za> Dmitry Kazakov added the comment: Please ignore my last message, I didn't notice the existing pull request... Sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 12:39:28 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 26 Jul 2017 16:39:28 +0000 Subject: [issue31046] ensurepip does not honour the value of $(prefix) Message-ID: <1501087168.72.0.253170854096.issue31046@psf.upfronthosting.co.za> New submission from Xavier de Gaye: When cross-compiling, the local Python interpreter that is used to run ensurepip may not have the same value of sys.prefix as the value of the 'prefix' variable that is set in the Makefile. With the following values used to install Python locally for a later copy to the files hierarchy owned by the 'termux' application on an Android device: DESTDIR=/tmp/android prefix=/data/data/com.termux/files/usr/local 'make install' causes ensurepip to install pip in $(DESTDIR)/usr/local instead of the expected $(DESTDIR)/$(prefix) where is installed the standard library. The attached patch fixes the problem. The patch was implemented assuming that pip uses distutils for the installation (note that setup.py also uses the --prefix option in the Makefile), but I know nothing about pip so forgive me if the patch is wrong and please just assume it is just a way to demonstrate the problem. ---------- components: Cross-Build files: ensurepip_prefix.diff keywords: patch messages: 299252 nosy: Alex.Willmer, dstufft, martin.panter, ncoghlan, xdegaye priority: normal severity: normal status: open title: ensurepip does not honour the value of $(prefix) type: behavior versions: Python 3.7 Added file: http://bugs.python.org/file47041/ensurepip_prefix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 12:47:29 2017 From: report at bugs.python.org (Christoph Reiter) Date: Wed, 26 Jul 2017 16:47:29 +0000 Subject: [issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False Message-ID: <1501087649.97.0.982453892523.issue31047@psf.upfronthosting.co.za> New submission from Christoph Reiter: On Windows os.path.abspath(" ") == " " While that's not a valid Windows path, similar invalid paths like "" or "?" etc all produce an absolute path. Tested on 2.7 and 3.6 ---------- components: Windows messages: 299253 nosy: lazka, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows: os.path.isabs(os.path.abspath(" ")) == False versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 13:00:36 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 26 Jul 2017 17:00:36 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1501088436.77.0.586907512029.issue5288@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- pull_requests: +2949 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 13:06:40 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 26 Jul 2017 17:06:40 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1501088800.75.0.118899894387.issue5288@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Most of the code supporting arbitrary offsets has already been committed. The only part left was to remove the checks and implement printing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 13:11:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 17:11:16 +0000 Subject: [issue30778] test_bsddb3 crash on x86 Windows XP 2.7 In-Reply-To: <1498514316.81.0.754509003042.issue30778@psf.upfronthosting.co.za> Message-ID: <1501089076.19.0.826531934694.issue30778@psf.upfronthosting.co.za> STINNER Victor added the comment: Reopen since we got a similar issue on Windows 7: http://buildbot.python.org/all/builders/x86%20Windows7%202.7/builds/242/steps/test/logs/stdio (...) 0:35:07 [398/403] test_generators passed -- running: test_bsddb3 (1233 sec) 0:35:07 [399/403] test_MimeWriter passed -- running: test_bsddb3 (1234 sec) 0:35:08 [400/403] test_macostools skipped -- running: test_bsddb3 (1234 sec) test_macostools skipped -- No module named MacOS 0:35:18 [401/403] test_winsound passed -- running: test_bsddb3 (1244 sec) 0:35:18 [402/403] test_old_mailbox passed -- running: test_bsddb3 (1245 sec) command timed out: 1200 seconds without output running ['Tools\\buildbot\\test.bat', '-j2'], attempting to kill running: test_bsddb3 (1275 sec) running: test_bsddb3 (1305 sec) running: test_bsddb3 (1335 sec) (...) running: test_bsddb3 (2415 sec) running: test_bsddb3 (2445 sec) 0:55:30 [403/403/1] test_bsddb3 crashed program finished with exit code 1 elapsedTime=3342.189000 ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 13:44:32 2017 From: report at bugs.python.org (Segev Finer) Date: Wed, 26 Jul 2017 17:44:32 +0000 Subject: [issue31048] ResourceWarning in test_asyncio.test_events..ProactorEventLoopTests.test_create_server_ssl_verify_failed Message-ID: <1501091072.67.0.693498013368.issue31048@psf.upfronthosting.co.za> New submission from Segev Finer: >python -X tracemalloc=30 -m unittest test.test_asyncio.test_events.ProactorEventLoopTests.test_create_server_ssl_verify_failed Running Debug|x64 interpreter... lib\asyncio\sslproto.py:330: ResourceWarning: unclosed transport source=self) Object allocated at (most recent call first): File "lib\asyncio\sslproto.py", lineno 435 self, self._app_protocol) File "lib\asyncio\proactor_events.py", lineno 401 server_side, server_hostname) File "lib\asyncio\proactor_events.py", lineno 507 extra={'peername': addr}, server=server) File "lib\asyncio\events.py", lineno 122 self._callback(*self._args) File "lib\asyncio\base_events.py", lineno 1413 handle._run() File "lib\asyncio\base_events.py", lineno 420 self._run_once() File "lib\asyncio\base_events.py", lineno 453 self.run_forever() File "lib\test\test_asyncio\test_events.py", lineno 1099 self.loop.run_until_complete(f_c) File "lib\unittest\case.py", lineno 615 testMethod() File "lib\unittest\case.py", lineno 663 return self.run(*args, **kwds) File "lib\unittest\suite.py", lineno 122 test(result) File "lib\unittest\suite.py", lineno 84 return self.run(*args, **kwds) File "lib\unittest\suite.py", lineno 122 test(result) File "lib\unittest\suite.py", lineno 84 return self.run(*args, **kwds) File "lib\unittest\runner.py", lineno 176 test(result) File "lib\unittest\main.py", lineno 256 self.result = testRunner.run(self.test) File "lib\unittest\main.py", lineno 95 self.runTests() File "lib\unittest\__main__.py", lineno 18 main(module=None) File "lib\runpy.py", lineno 85 exec(code, run_globals) File "lib\runpy.py", lineno 193 "__main__", mod_spec) . ---------------------------------------------------------------------- Ran 1 test in 1.408s OK ---------- components: Tests, Windows messages: 299256 nosy: Segev Finer, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: ResourceWarning in test_asyncio.test_events..ProactorEventLoopTests.test_create_server_ssl_verify_failed type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 14:07:35 2017 From: report at bugs.python.org (Shea Craig) Date: Wed, 26 Jul 2017 18:07:35 +0000 Subject: [issue31049] macOS Python package receipts do not have version numbers Message-ID: <1501092455.87.0.102149463172.issue31049@psf.upfronthosting.co.za> New submission from Shea Craig: The Python installer package for macOS is versioned, however, the included sub packages have no version information. This results in the receipts having no version. Many enterprise software management tools rely on the receipt information to determine whether something is present and whether it's due for an update. We use Munki, are are currently working around this issue, but ideally the subpackages would have the version info included. $ for PKG in $(pkgutil --pkgs | grep org.python);do pkgutil --pkg-info $PKG;done package-id: org.python.Python.PythonApplications-3.6 version: 0 volume: / location: Applications install-time: 1494351483 package-id: org.python.Python.PythonDocumentation-3.6 version: 0 volume: / location: Library/Frameworks/Python.framework/Versions/3.6/Resources/English.lproj/Documentation install-time: 1494351483 package-id: org.python.Python.PythonFramework-3.6 version: 0 volume: / location: Library/Frameworks/Python.framework install-time: 1494351483 package-id: org.python.Python.PythonUnixTools-3.6 version: 0 volume: / location: usr/local/bin install-time: 1494351483 ---------- components: macOS messages: 299257 nosy: Shea Craig, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: macOS Python package receipts do not have version numbers versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 14:31:33 2017 From: report at bugs.python.org (Nir Soffer) Date: Wed, 26 Jul 2017 18:31:33 +0000 Subject: [issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor In-Reply-To: <1500593003.51.0.725099647676.issue30980@psf.upfronthosting.co.za> Message-ID: <1501093893.37.0.0437420317808.issue30980@psf.upfronthosting.co.za> Changes by Nir Soffer : ---------- pull_requests: +2950 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 14:33:59 2017 From: report at bugs.python.org (Nir Soffer) Date: Wed, 26 Jul 2017 18:33:59 +0000 Subject: [issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor In-Reply-To: <1500593003.51.0.725099647676.issue30980@psf.upfronthosting.co.za> Message-ID: <1501094039.8.0.227948118643.issue30980@psf.upfronthosting.co.za> Changes by Nir Soffer : ---------- pull_requests: +2951 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 14:43:30 2017 From: report at bugs.python.org (Nir Soffer) Date: Wed, 26 Jul 2017 18:43:30 +0000 Subject: [issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor In-Reply-To: <1500593003.51.0.725099647676.issue30980@psf.upfronthosting.co.za> Message-ID: <1501094610.44.0.384366882533.issue30980@psf.upfronthosting.co.za> Changes by Nir Soffer : ---------- pull_requests: +2952 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 14:58:42 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Jul 2017 18:58:42 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1501095522.49.0.179683334527.issue31004@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- dependencies: +IDLE: configdialog -- factor out Tracer subclass _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 14:59:01 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Jul 2017 18:59:01 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1501095541.32.0.104535929751.issue31004@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 15:09:34 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 19:09:34 +0000 Subject: [issue31049] macOS Python package receipts do not have version numbers In-Reply-To: <1501092455.87.0.102149463172.issue31049@psf.upfronthosting.co.za> Message-ID: <1501096174.03.0.337602873158.issue31049@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report. Issue24502 has already reported this issue. Feel free to add yourself to the Nosy List there. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> OS X installer provides flat sub-packages with no version numbers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 15:10:21 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Jul 2017 19:10:21 +0000 Subject: [issue24502] OS X installer provides flat sub-packages with no version numbers In-Reply-To: <1435173121.58.0.153613185242.issue24502@psf.upfronthosting.co.za> Message-ID: <1501096221.22.0.731041355693.issue24502@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 15:18:52 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Jul 2017 19:18:52 +0000 Subject: [issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog Message-ID: <1501096732.49.0.178704546574.issue31050@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Followup to 31003, tests, and 30853, tracers, similar to 31004, FontTab. After creating new class, we can change names without worry about clashing with names elsewhere in ConfigDialog. ---------- messages: 299259 nosy: csabella, terry.reedy priority: normal severity: normal status: open title: IDLE, configdialog: Factor out GenTab class from ConfigDialog _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 15:19:10 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Jul 2017 19:19:10 +0000 Subject: [issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog In-Reply-To: <1501096732.49.0.178704546574.issue31050@psf.upfronthosting.co.za> Message-ID: <1501096750.62.0.743397859176.issue31050@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: -> terry.reedy components: +IDLE stage: -> needs patch type: -> enhancement versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 16:11:46 2017 From: report at bugs.python.org (Larry Hastings) Date: Wed, 26 Jul 2017 20:11:46 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501099906.62.0.517262338907.issue31036@psf.upfronthosting.co.za> Larry Hastings added the comment: We changed *revision control systems* "within subminor version updates". If your argument is "you mustn't add a new tool used to build the documentation until 3.7", you're not going to win that argument, you should try another tactic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 16:19:51 2017 From: report at bugs.python.org (Larry Hastings) Date: Wed, 26 Jul 2017 20:19:51 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501100391.37.0.243565412678.issue31036@psf.upfronthosting.co.za> Larry Hastings added the comment: And, in the past, I'm not aware that the availability of tools in the Debian ecosystem has been a strong determining factor in the choice of tooling for CPython. In particular, I'm not aware of any tool in the Debian package ecosystem that would solve the problem blurb solves, much less in exactly the way blurb does it. In fact, there was no existing tool anywhere that solved the *exact* problem we had. So we wrote our own. And obviously a newly written tool isn't going to have a Debian package. So your argument "you should only choose external dependencies that already have Debian packages" isn't going to work either, as that is not and has never been a rule in CPython development. I'm pretty sure blurb is going to remain a part of the CPython toolchain. The slight inconvenience you have registered here is so far not enough of a negative vote to outweigh the groundswell of positive support. I suggest you redirect your energies to solving the problem rather than complaining about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 16:26:38 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Jul 2017 20:26:38 +0000 Subject: [issue31051] IDLE, configdialog, General tab: re-arrange, test user entries Message-ID: <1501100798.06.0.368470665591.issue31051@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Fix bugs and enhance the page. The three little frames are too much, and in the wrong order. Proposal: Window to open at startup: O Shell O Editor Initial size: Width [_] Height [] When run code in editor: ... (see bpo-19042 for possible change) This compression will make room for former extension options (#27099). Tk variable startup_editor should be BooleanVar. Size vars should be IntVars. Accepting *and saving* 'nonsense' as a size is a bug (idlfConf issues a warning when reading). Sizes should be at least 1. Changing to spinbox would ensure this. Or validate entry on each char (only accept ascii digits). For helplist, Up and Down keys move selection indicator but *do not move the internal selection*. Delete key deletes the internal selection, not the item highlighted. Fix should be similar to fix for fontlist. ---------- assignee: terry.reedy components: IDLE messages: 299262 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE, configdialog, General tab: re-arrange, test user entries type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 16:50:58 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Jul 2017 20:50:58 +0000 Subject: [issue31051] IDLE, configdialog, General tab: re-arrange, test user entries In-Reply-To: <1501100798.06.0.368470665591.issue31051@psf.upfronthosting.co.za> Message-ID: <1501102258.55.0.425079112552.issue31051@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In comment for 31003, Cheryl pointed to https://stackoverflow.com/questions/4140437/interactively-validating-entry-widget-content-in-tkinter#4140988 That prompted me to grep for 'validatecommand'. "validatecommand=is_int" is used on the extension tab. The function is at the end of the file. We just need to modify to is_pos_int and use it the same way. is_int allows blanks. That should mean to accept the default, whatever is it. A blank should be turned back to the default. is_int checks that int(entry) does not raise value error. I believe int now accept non-ascii digits. We should check that that such pass through configparser okay. (I believe they should, as I believe it just calls int on the string read.) Or only store the ascii version. I suspect that tk wants ascii digits, The confusion of converting between strings and non-string objects is exacerbated by tk wanting strings (which it converts to C byte encodings) and tkinter doing automatic conversions. ---------- nosy: +csabella, louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 16:55:28 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Jul 2017 20:55:28 +0000 Subject: [issue31051] IDLE, configdialog, General tab: re-arrange, test user entries In-Reply-To: <1501100798.06.0.368470665591.issue31051@psf.upfronthosting.co.za> Message-ID: <1501102528.07.0.262124227037.issue31051@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In 31003, Cheryl pointed out that loading helplist could use enumerate. https://github.com/python/cpython/pull/2859#pullrequestreview-52461722 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 17:41:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Jul 2017 21:41:32 +0000 Subject: [issue31051] IDLE, configdialog, General tab: re-arrange, test user entries In-Reply-To: <1501100798.06.0.368470665591.issue31051@psf.upfronthosting.co.za> Message-ID: <1501105292.93.0.0173478750532.issue31051@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Common code in tests: test_helplist_item_actions functions have common code that could be factored out into a non-test_ method (especially if settings not needed for one of them is added, like setting anchor). The listbox simulated click code in test_source_selected is copied from FontTest.test_fontlist_mouse. Make global click_listbox(item-to-add). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 17:48:00 2017 From: report at bugs.python.org (Eryk Sun) Date: Wed, 26 Jul 2017 21:48:00 +0000 Subject: [issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False In-Reply-To: <1501087649.97.0.982453892523.issue31047@psf.upfronthosting.co.za> Message-ID: <1501105680.02.0.216302914016.issue31047@psf.upfronthosting.co.za> Eryk Sun added the comment: The generic abspath implementation could be moved into the genericpath module, where it will be common to both posixpath and ntpath: def abspath(path): """Return an absolute path.""" path = os.fspath(path) if not isabs(path): if isinstance(path, bytes): cwd = os.getcwdb() else: cwd = os.getcwd() path = join(cwd, path) return normpath(path) Then replace it in ntpath if nt._getfullpathname is defined, but with a fallback to the generic implementation if OSError is raised (e.g. for " "): try: from nt import _getfullpathname except ImportError: pass else: def abspath(path): """Return an absolute path.""" try: return _getfullpathname(path) except OSError: return genericpath.abspath(path) This _getfullpathname version also skips the redundant fspath and normpath calls. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 18:17:59 2017 From: report at bugs.python.org (Segev Finer) Date: Wed, 26 Jul 2017 22:17:59 +0000 Subject: [issue30916] Pre-build OpenSSL and Tcl/Tk for Windows In-Reply-To: <1499899065.59.0.916676241363.issue30916@psf.upfronthosting.co.za> Message-ID: <1501107479.0.0.355872810864.issue30916@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2953 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 18:18:01 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 26 Jul 2017 22:18:01 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1501107481.85.0.0968267076466.issue9566@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 679b566622ec811c5e5d580f6a538f7a43006e05 by Steve Dower (Segev Finer) in branch 'master': bpo-9566: Fix some Windows x64 compiler warnings (#2492) https://github.com/python/cpython/commit/679b566622ec811c5e5d580f6a538f7a43006e05 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 18:19:20 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 26 Jul 2017 22:19:20 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1501107560.03.0.31960202597.issue9566@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 5cff6379797967faabbb834a9eb154c3f0839489 by Steve Dower (Segev Finer) in branch 'master': bpo-9566: Fixed _ssl module warnings (#2495) https://github.com/python/cpython/commit/5cff6379797967faabbb834a9eb154c3f0839489 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 18:26:13 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Jul 2017 22:26:13 +0000 Subject: [issue31003] IDLE: Add tests for help sources on configdialog general tab In-Reply-To: <1500967070.15.0.0149219336702.issue31003@psf.upfronthosting.co.za> Message-ID: <1501107973.66.0.578097954829.issue31003@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Coverage up to 63%. Will update on another issue as update here will require another CI round. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 18:49:28 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 26 Jul 2017 22:49:28 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1501109368.57.0.725946646903.issue5288@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 19:10:00 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Jul 2017 23:10:00 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501110600.86.0.858894417903.issue30853@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 45bf723c6c591ec56a18dad8150ae89797450d8b by Terry Jan Reedy (csabella) in branch 'master': bpo-30853: IDLE: Factor a VarTrace class from configdialog.ConfigDialog. (#2872) https://github.com/python/cpython/commit/45bf723c6c591ec56a18dad8150ae89797450d8b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 19:12:34 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Jul 2017 23:12:34 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501110754.89.0.642301185059.issue30853@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2954 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 19:15:28 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Jul 2017 23:15:28 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501110928.93.0.311972199914.issue30853@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I will include new blurb with PR that uses this with font vars. I might do this tonight. Test coverage of class is 100%. ---------- stage: test needed -> needs patch versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 19:17:07 2017 From: report at bugs.python.org (Segev Finer) Date: Wed, 26 Jul 2017 23:17:07 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1501111027.97.0.0636172189601.issue9566@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2955 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 19:24:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 23:24:54 +0000 Subject: [issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor In-Reply-To: <1500593003.51.0.725099647676.issue30980@psf.upfronthosting.co.za> Message-ID: <1501111494.94.0.918428369693.issue30980@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 29094cec7cddd561cac16ce93443ca72d740de4d by Victor Stinner (Nir Soffer) in branch '2.7': bpo-30980: Fix double close in asyncore.file_wrapper (#2789) (#2900) https://github.com/python/cpython/commit/29094cec7cddd561cac16ce93443ca72d740de4d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 19:27:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 23:27:10 +0000 Subject: [issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor In-Reply-To: <1500593003.51.0.725099647676.issue30980@psf.upfronthosting.co.za> Message-ID: <1501111630.87.0.576939077453.issue30980@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 25de5baf3eaebddbf879aacf49c0f614f922dc42 by Victor Stinner (Nir Soffer) in branch '3.6': bpo-30980: Fix double close in asyncore.file_wrapper (#2789) (#2898) https://github.com/python/cpython/commit/25de5baf3eaebddbf879aacf49c0f614f922dc42 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 19:27:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 23:27:36 +0000 Subject: [issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor In-Reply-To: <1500593003.51.0.725099647676.issue30980@psf.upfronthosting.co.za> Message-ID: <1501111656.12.0.262073296898.issue30980@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +Library (Lib) resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 19:34:21 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 26 Jul 2017 23:34:21 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501112061.84.0.932383796809.issue30853@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Thanks! I can try the font vars if you like. One question I keep forgetting to ask -- I can't figure out how remove_var_callbacks gets called. I've grepped for the name and didn't find it anywhere. I don't know what I'm missing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 19:36:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 23:36:05 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1501112165.0.0.388048881105.issue9566@psf.upfronthosting.co.za> STINNER Victor added the comment: > New changeset 679b566622ec811c5e5d580f6a538f7a43006e05 by Steve Dower (Segev Finer) in branch 'master': > bpo-9566: Fix some Windows x64 compiler warnings (#2492) > https://github.com/python/cpython/commit/679b566622ec811c5e5d580f6a538f7a43006e05 This change broke AMD64 Windows7 SP1 3.x buildbot, see the logs for all errors: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/796/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 19:37:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 23:37:25 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1501112245.7.0.486752670026.issue9566@psf.upfronthosting.co.za> STINNER Victor added the comment: Two other broken buildbots: http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/967/steps/test/logs/stdio http://buildbot.python.org/all/builders/AMD64%20Windows10%203.x/builds/997/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 19:37:48 2017 From: report at bugs.python.org (Segev Finer) Date: Wed, 26 Jul 2017 23:37:48 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1501112268.27.0.672075590942.issue9566@psf.upfronthosting.co.za> Segev Finer added the comment: @haypo https://github.com/python/cpython/pull/2904 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 19:43:32 2017 From: report at bugs.python.org (zoof) Date: Wed, 26 Jul 2017 23:43:32 +0000 Subject: [issue31052] smtplib not honoring bcc header Message-ID: <1501112612.68.0.83618950649.issue31052@psf.upfronthosting.co.za> New submission from zoof: When I try sending an email, using smtplib, with the bcc header set, the bcc header is included in messages send to the "to" and "cc" addresses. According to section 4.5.3 of rfc 822: > The contents of this field are not included in copies of the message sent to the primary and secondary recipients. So this behavior is incorrect. It should not be up to the mail client to ignore the bcc field. Here's a script that can replicate the problem: #!/usr/bin/env python import smtplib from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText body = "this is a test" #craft the message fromaddr = 'ned at example.com' server = smtplib.SMTP('smtp.example.com', 587) p = 'Hunter2!' subject = "test" toaddr = "foo at example.com" ccaddr = "bar at example.com" bccaddr = "baz at example.com" msg = MIMEMultipart() msg['cc'] = ccaddr msg['bcc'] = bccaddr msg['From'] = fromaddr msg['To'] = toaddr msg['Subject'] = subject msg.attach(MIMEText(body, 'plain')) #send the message server.starttls() server.login(fromaddr, p) text = msg.as_string() server.sendmail(fromaddr, toaddr, text) server.quit() ---------- components: Library (Lib) messages: 299278 nosy: zoof priority: normal severity: normal status: open title: smtplib not honoring bcc header type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 20:40:55 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 27 Jul 2017 00:40:55 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1501116055.02.0.00837460993332.issue31004@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +2956 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 20:42:07 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 27 Jul 2017 00:42:07 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1501116127.07.0.505376322314.issue31004@psf.upfronthosting.co.za> Cheryl Sabella added the comment: PR is for step 1 since VarTrace is needed for step 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 20:53:15 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 27 Jul 2017 00:53:15 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501116795.75.0.99304392412.issue30853@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 0243bea55dc340067247e635442f2a227705315a by Terry Jan Reedy in branch '3.6': [3.6] bpo-30853: IDLE: Factor a VarTrace class from configdialog.ConfigDialog. (GH-2872) (#2903) https://github.com/python/cpython/commit/0243bea55dc340067247e635442f2a227705315a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 20:54:42 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 27 Jul 2017 00:54:42 +0000 Subject: [issue31003] IDLE: Add tests for help sources on configdialog general tab In-Reply-To: <1500967070.15.0.0149219336702.issue31003@psf.upfronthosting.co.za> Message-ID: <1501116882.17.0.886229876717.issue31003@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 2bc8f0e6867f59e5e8444b2bde99bb0fa3dbefc8 by Terry Jan Reedy in branch 'master': bpo-31003: IDLE - Add more tests for General tab (#2859) https://github.com/python/cpython/commit/2bc8f0e6867f59e5e8444b2bde99bb0fa3dbefc8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 20:57:05 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 27 Jul 2017 00:57:05 +0000 Subject: [issue31003] IDLE: Add tests for help sources on configdialog general tab In-Reply-To: <1500967070.15.0.0149219336702.issue31003@psf.upfronthosting.co.za> Message-ID: <1501117025.69.0.30340809172.issue31003@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2957 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 21:17:36 2017 From: report at bugs.python.org (KINEBUCHI Tomohiko) Date: Thu, 27 Jul 2017 01:17:36 +0000 Subject: [issue31053] Unnecessary argument in command example Message-ID: <1501118256.7.0.957994269182.issue31053@psf.upfronthosting.co.za> New submission from KINEBUCHI Tomohiko: The command example running venv module for Windows has an unnecessary argument. The following two command examples should be equivalent:: :: c:\>c:\Python35\python -m venv c:\path\to\myenv :: c:\>python -m venv myenv c:\path\to\myenv (from https://docs.python.org/3/library/venv.html#creating-virtual-environments) ---------- assignee: docs at python components: Documentation messages: 299282 nosy: cocoatomo, docs at python priority: normal severity: normal status: open title: Unnecessary argument in command example versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 21:20:02 2017 From: report at bugs.python.org (KINEBUCHI Tomohiko) Date: Thu, 27 Jul 2017 01:20:02 +0000 Subject: [issue31053] Unnecessary argument in command example In-Reply-To: <1501118256.7.0.957994269182.issue31053@psf.upfronthosting.co.za> Message-ID: <1501118402.93.0.67275244722.issue31053@psf.upfronthosting.co.za> Changes by KINEBUCHI Tomohiko : ---------- pull_requests: +2958 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 21:24:41 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 27 Jul 2017 01:24:41 +0000 Subject: [issue29256] Windows select() errors out when given no fds to select on, which breaks SelectSelector In-Reply-To: <1484264538.85.0.902649207203.issue29256@psf.upfronthosting.co.za> Message-ID: <1501118681.7.0.345511474929.issue29256@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 21:30:15 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 27 Jul 2017 01:30:15 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501119015.82.0.242893696244.issue30853@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Go ahead. If it works with font, add general tab. CD.remove_var_callbacks is currently only called in test_configdialog.tearDownModule. I added the call to prevent getting a TclError for each callback after the test finished. .destroy does not destroy callbacks. I presume remove_var_callbacks was written to be called in self.cancel. Then perhaps someone discovered that there was no visible effect of deleting it, perhaps because TclErrors are caught and ignored. I want to put it, or the new equivalent, into cancel, before destroy. And make sure to add to teardownmodule. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 21:32:43 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 27 Jul 2017 01:32:43 +0000 Subject: [issue29214] Standard open() does not allow to specify file permissions. In-Reply-To: <1483971421.1.0.906896747438.issue29214@psf.upfronthosting.co.za> Message-ID: <1501119163.0.0.939814185426.issue29214@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 21:41:28 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 27 Jul 2017 01:41:28 +0000 Subject: [issue31003] IDLE: Add tests for help sources on configdialog general tab In-Reply-To: <1500967070.15.0.0149219336702.issue31003@psf.upfronthosting.co.za> Message-ID: <1501119688.63.0.711616039307.issue31003@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 0c4c65104c951c70f3a2a2fd1a45bdf6540f3a8e by Terry Jan Reedy in branch '3.6': [3.6] bpo-31003: IDLE - Add more tests for General tab (GH-2859) (#2906) https://github.com/python/cpython/commit/0c4c65104c951c70f3a2a2fd1a45bdf6540f3a8e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 21:41:32 2017 From: report at bugs.python.org (Antony Lee) Date: Thu, 27 Jul 2017 01:41:32 +0000 Subject: [issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument In-Reply-To: <1399160288.58.0.274862722075.issue21423@psf.upfronthosting.co.za> Message-ID: <1501119692.17.0.869099344132.issue21423@psf.upfronthosting.co.za> Antony Lee added the comment: For cross-referencing purposes: I have proposed in http://bugs.python.org/issue25293 to allow passing a Thread/Process subclass as argument instead of an initializer function, which would both handle Mark Dickinson's comment (http://bugs.python.org/issue21423#msg218040) about passing the thread object as argument, and also allow for finalization. ---------- nosy: +Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 21:42:24 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 27 Jul 2017 01:42:24 +0000 Subject: [issue31003] IDLE: Add tests for help sources on configdialog general tab In-Reply-To: <1500967070.15.0.0149219336702.issue31003@psf.upfronthosting.co.za> Message-ID: <1501119744.68.0.00277298895452.issue31003@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- Removed message: http://bugs.python.org/msg299269 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 21:42:51 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 27 Jul 2017 01:42:51 +0000 Subject: [issue31003] IDLE: Add tests for help sources on configdialog general tab In-Reply-To: <1500967070.15.0.0149219336702.issue31003@psf.upfronthosting.co.za> Message-ID: <1501119771.23.0.773306479194.issue31003@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 21:46:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 27 Jul 2017 01:46:48 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501120008.78.0.234934223939.issue30853@psf.upfronthosting.co.za> Terry J. Reedy added the comment: See in you can install blurb into 3.6 or even 3.5, (pip should work) and run it to add the blurb file. I will fill in the body. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 22:40:42 2017 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 27 Jul 2017 02:40:42 +0000 Subject: [issue20754] Distribution.parse_config_files uses interpolation since Python 3 In-Reply-To: <1393201670.58.0.749043113933.issue20754@psf.upfronthosting.co.za> Message-ID: <1501123242.9.0.722300006615.issue20754@psf.upfronthosting.co.za> Jason R. Coombs added the comment: While investigating https://github.com/pypa/setuptools/issues/1062, I discovered that the implementation in the attached patch is insufficient. The 'parse_config_files' calls ConfigParser.__init__ in two places, before the for loop and at the end of each loop iteration. The parameters to both calls needs to be the same, or the BasicInterpolation behavior is revived. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 22:53:36 2017 From: report at bugs.python.org (Zachary Ware) Date: Thu, 27 Jul 2017 02:53:36 +0000 Subject: [issue31037] Results in section 4.4 break and continue In-Reply-To: <1500995709.73.0.36567687409.issue31037@psf.upfronthosting.co.za> Message-ID: <1501124016.56.0.37149095485.issue31037@psf.upfronthosting.co.za> Zachary Ware added the comment: We just received another report about this on docs@: https://mail.python.org/pipermail/docs/2017-July/032314.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 23:15:21 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 27 Jul 2017 03:15:21 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1501125321.48.0.280734717993.issue9566@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset a80e985c493d2ab9df0832c99d9ddb798d2e66cf by Steve Dower (Segev Finer) in branch 'master': bpo-9566: Change HANDLE argument parsing to unsigned in msvcrtmodule.c (#2904) https://github.com/python/cpython/commit/a80e985c493d2ab9df0832c99d9ddb798d2e66cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 23:18:33 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 27 Jul 2017 03:18:33 +0000 Subject: [issue31046] ensurepip does not honour the value of $(prefix) In-Reply-To: <1501087168.72.0.253170854096.issue31046@psf.upfronthosting.co.za> Message-ID: <1501125513.6.0.602633735463.issue31046@psf.upfronthosting.co.za> Nick Coghlan added the comment: This looks like the right technical fix to me (see https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-prefix), but I'd like Donald to confirm that before we merge anything. Making this change will also require an update to the ensurepip docs: https://docs.python.org/3/library/ensurepip.html#command-line-interface ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 23:20:36 2017 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 27 Jul 2017 03:20:36 +0000 Subject: [issue20754] Distribution.parse_config_files uses interpolation In-Reply-To: <1393201670.58.0.749043113933.issue20754@psf.upfronthosting.co.za> Message-ID: <1501125636.75.0.648641169612.issue20754@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Ack. The interpolation behavior was also present in Python 2.7. I missed that when I found this ticket and assumed it was similar to issue 20120. In this ticket, the user is requesting that distutils actually change the behavior from performing interpolation to no longer performing it. This change is apparent now that Setuptools has a proper test for the desired behavior. ---------- title: Distribution.parse_config_files uses interpolation since Python 3 -> Distribution.parse_config_files uses interpolation versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 23:21:07 2017 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 27 Jul 2017 03:21:07 +0000 Subject: [issue20754] Distribution.parse_config_files uses interpolation In-Reply-To: <1393201670.58.0.749043113933.issue20754@psf.upfronthosting.co.za> Message-ID: <1501125667.75.0.156280885618.issue20754@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Given that it's a change in behavior and not a bugfix, I don't see how this change could go into anything but the next release. ---------- versions: -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 00:34:53 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 27 Jul 2017 04:34:53 +0000 Subject: [issue31052] smtplib not honoring bcc header In-Reply-To: <1501112612.68.0.83618950649.issue31052@psf.upfronthosting.co.za> Message-ID: <1501130093.46.0.935287955631.issue31052@psf.upfronthosting.co.za> R. David Murray added the comment: smtplib in 2.7 doesn't know anything about RFC822 or any of the replacement RFCs. sendmail accepts a *string*, and doesn't understand or modify anything about that string except the newlines. It is your responsibility not to *add* the BCC header. What you want to do is put the BCC (and CC!) recipients in your toaddr list passed to sendmail, and *not* add a BCC header. In Python3 smtplib has a send_message method that accepts a Message object, and that method uses the BCC to inform where to send the message and strips the header before sending. That is, smtplib's send_message method *does* implement RFC5322 behaviors. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 03:32:14 2017 From: report at bugs.python.org (Ekrem Saban) Date: Thu, 27 Jul 2017 07:32:14 +0000 Subject: [issue31054] Python 2.7.8 Release does not update the system Path variable Message-ID: <1501140734.16.0.246037908584.issue31054@psf.upfronthosting.co.za> New submission from Ekrem Saban: The Python 2.7.8 installer should also modify the system path variable so that typing "python" in any command window would not result in an error: "The command "python" is either written wrong or could not be found." ---------- components: Installation messages: 299294 nosy: Ekrem Saban priority: normal severity: normal status: open title: Python 2.7.8 Release does not update the system Path variable type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 03:56:16 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 27 Jul 2017 07:56:16 +0000 Subject: [issue31001] IDLE: Add tests for configdialog highlight tab Message-ID: <1501142176.86.0.974376804307.issue31001@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2959 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 04:37:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Jul 2017 08:37:23 +0000 Subject: [issue30502] Fix buffer handling of OBJ_obj2txt In-Reply-To: <1496042353.91.0.558550525758.issue30502@psf.upfronthosting.co.za> Message-ID: <1501144643.17.0.861460597979.issue30502@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2960 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 05:21:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 09:21:28 +0000 Subject: [issue31028] test_pydoc fails when run directly In-Reply-To: <1500985258.67.0.797354625815.issue31028@psf.upfronthosting.co.za> Message-ID: <1501147288.96.0.487134259042.issue31028@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fd46561167af6cd697191dd7ebb8c2fef5ad6493 by Victor Stinner in branch 'master': bpo-31028: Fix test_pydoc when run directly (#2864) https://github.com/python/cpython/commit/fd46561167af6cd697191dd7ebb8c2fef5ad6493 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 05:24:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Jul 2017 09:24:39 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1501147479.82.0.706799401697.issue30814@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d5ed47dea25e04a3a144eddf99a4ac4a29242dbc by Serhiy Storchaka in branch 'master': bpo-30814, bpo-30876: Add new import test files to projects. (#2851) https://github.com/python/cpython/commit/d5ed47dea25e04a3a144eddf99a4ac4a29242dbc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 05:24:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Jul 2017 09:24:40 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1501147480.04.0.155471542944.issue30876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d5ed47dea25e04a3a144eddf99a4ac4a29242dbc by Serhiy Storchaka in branch 'master': bpo-30814, bpo-30876: Add new import test files to projects. (#2851) https://github.com/python/cpython/commit/d5ed47dea25e04a3a144eddf99a4ac4a29242dbc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 05:25:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 09:25:54 +0000 Subject: [issue31028] test_pydoc fails when run directly In-Reply-To: <1500985258.67.0.797354625815.issue31028@psf.upfronthosting.co.za> Message-ID: <1501147554.76.0.902957429844.issue31028@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2961 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 05:26:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 09:26:48 +0000 Subject: [issue31028] test_pydoc fails when run directly In-Reply-To: <1500985258.67.0.797354625815.issue31028@psf.upfronthosting.co.za> Message-ID: <1501147608.84.0.542928735984.issue31028@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2962 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 05:34:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Jul 2017 09:34:25 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1501148065.57.0.601622425505.issue30940@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In the documentation: For a general Python object ``number``, ``round(number, ndigits)`` delegates to ``number.__round__(ndigits)``. Mark, is it worth to mention explicitly that round(number) and round(number, None) delegate to number.__round__()? The custom __round__() method should support calling without the argument, but it can not support calling with None. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 05:40:04 2017 From: report at bugs.python.org (Thomas Mortensson) Date: Thu, 27 Jul 2017 09:40:04 +0000 Subject: [issue29640] _PyThreadState_Init and fork race leads to inconsistent key list In-Reply-To: <1487927038.37.0.851881550844.issue29640@psf.upfronthosting.co.za> Message-ID: <1501148404.12.0.281235459048.issue29640@psf.upfronthosting.co.za> Thomas Mortensson added the comment: Hey, any status update on this bug? Suffered a similar issue on a Centos 6.5 kernel when spawning multiple processes in a Twisted environment. Is this PR targeted for inclusion into the source tree? Thanks, Tom ---------- nosy: +Thomas Mortensson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 05:43:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Jul 2017 09:43:07 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1501148587.9.0.798758291205.issue30814@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2963 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 05:43:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Jul 2017 09:43:08 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1501148588.06.0.82935743725.issue30876@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2964 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 05:48:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Jul 2017 09:48:27 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1501148907.55.0.605498330691.issue30876@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +2965 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 05:53:58 2017 From: report at bugs.python.org (Segev Finer) Date: Thu, 27 Jul 2017 09:53:58 +0000 Subject: [issue31048] ResourceWarning in test_asyncio.test_events..ProactorEventLoopTests.test_create_server_ssl_verify_failed In-Reply-To: <1501091072.67.0.693498013368.issue31048@psf.upfronthosting.co.za> Message-ID: <1501149238.93.0.447018889173.issue31048@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- components: +asyncio nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 06:11:09 2017 From: report at bugs.python.org (Segev Finer) Date: Thu, 27 Jul 2017 10:11:09 +0000 Subject: [issue31048] ResourceWarning in test_asyncio.test_events.ProactorEventLoopTests.test_create_server_ssl_verify_failed In-Reply-To: <1501091072.67.0.693498013368.issue31048@psf.upfronthosting.co.za> Message-ID: <1501150269.9.0.12376558016.issue31048@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- title: ResourceWarning in test_asyncio.test_events..ProactorEventLoopTests.test_create_server_ssl_verify_failed -> ResourceWarning in test_asyncio.test_events.ProactorEventLoopTests.test_create_server_ssl_verify_failed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 06:11:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 10:11:28 +0000 Subject: [issue30931] Race condition in asyncore may access the wrong dispatcher In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1501150288.86.0.562044123793.issue30931@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, wow, the discussion on this issue, bpo-30985, PR 2854, PR 2804, etc. was very productive. We identified much more race conditions than the first one that I spotted. (Bug 1) The dispatcher A closes the dispatcher B. Currently, asyncore calls the handlers of the dispatcher B. Technically, the close() method of a dispatcher closes immediately a socket object. So it's very likely that handlers of the dispatcher B fails on recv(), send(), or any other operation on the socket. There is also a risk that somehow dispatcher B tries to closes again the socket (technically, socket, pipe or something else) and gets a OSError(EBADF) or worse: closes an unrelated socket! (Bug 2) Similar to (Bug 1), but the subtle coming from the current implementation causes even worse bugs. The dispatcher A closes the dispatcher B, and then the dispatcher A (or another dispatcher, it doesn't matter who make that) creates a new dispatcher C which reuses the same file descriptor than the old closed file descriptor of dispatcher B. The consequence is that handlers of dispatcher C are called even if the socket is not ready to read or to write. Since sockets are non-blocking, recv() and send() are likely to fail with BlockingIOError. These errors are usually correctly handled in asynchronous code, but they can cause bugs. More generally, calling handlers when the socket is not ready can cause many kinds of bugs. (Bug 3) If a socket is ready to read and ready to write, handle_read() and handle_write() handlers are expected to be called. The problem is when handle_read() (first called handler) closes the dispatcher. It was decided to not call handle_write() is that case. (Bug 4) Ok, this one is the best one :-) When a socket is ready, asyncore calls methods like handle_write_event(). These methods usually call a single handler like handle_write(), *but* sometimes can call multiple handlers like handle_connect() followed by handle_write(). If a first handler closes the dispatcher, the following handler may fail badly on trying to use a closed socket. IMHO (Bug 3) and (Bug 4) are less surprising than (Bug 1) or (Bug 2) since they are determistic and so less "race condition". Since these bugs are determistic, I expect that applications are already written to handle these corner cases, somehow. The simplest option is to catch and ignore errors, asyncore already ignores many errors for us. For example asyncore already ignores EBADF, whereas IMHO it hides a design issue (the 4 bugs I just listed). Technically, fixing (Bug 3) using my PR 2854 design (check if map[fd] is still the same dispatcher) is safe since it doesn't rely at all on the actual implementation of asyncore handle_xxx_event() (which can be overriden) not handle_xxx() methods defined by third party code. Fixing (Bug 4) is more complex since it requires to decide how to detect that a dispatcher was closed (it seems like "dispatcher._fileno is None" test is the best choice), and to modify handle_xxx_event() methods, whereas these methods can and *are* overridden in subclasses. -- About backward compatibility, in short, fixing any of these bug changes the exact behaviour, since fixing all these bugs require to *not* call a handler if the dispatcher was closed. *If* a specific application requires that handlers are called anyway, changes are likely to break these applications. A workaround for these applications is to copy asyncore.py from an old Python version to keep the exact same behaviour. Another smoother workaround is to monkey-patch poll() and poll2(), and maybe also override handle_xxx_event() methods, to restore the old behaviour. I don't want to add a flag to re-enable the old behaviour, since it seems like we all agree that the described bugs are clearly very bad design bugs and that they must be fixed. -- Another option, Nir will probably not like it, is to consider that asyncore is dead and will not be fixed. That's not my favorite option. Nir explained that on Python 2.7, asyncore is the most convenient module for his use case, he deeply rely on it, and so "just want" to fix know bugs. -- I suggest to use this bpo to fix (Bug 1), (Bug 2) and (Bug 3), since they can all be fixed in poll() and poll2() with the same design, like my PR 2854. For (Bug 4), I suggest to use bpo-30985 where we already discussed many options how to detect that a dispatcher was closed. I have no strong opinion on this bug, if it should be fixed or not. IMHO it's less important and applications already know how handle the bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 06:14:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 10:14:20 +0000 Subject: [issue30931] Race condition in asyncore may access the wrong dispatcher In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1501150460.56.0.0387463307971.issue30931@psf.upfronthosting.co.za> STINNER Victor added the comment: Much shorter summary: * Handlers of dispatcher must not be called if the dispatcher was called. * If a dispatcher is closed between the execution of two of his handlers, the next handlers should not be called My PR 2854 adds 3 unit tests to verify this behaviour of 3 different "race conditions". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 06:16:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Jul 2017 10:16:03 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1501150563.38.0.784896140915.issue30814@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 95b16a9705d6b4d31c016c014e59744fc33d53ea by Serhiy Storchaka in branch '3.6': [3.6] bpo-30814, bpo-30876: Add new import test files to projects. (GH-2851). (#2912) https://github.com/python/cpython/commit/95b16a9705d6b4d31c016c014e59744fc33d53ea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 06:16:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Jul 2017 10:16:03 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1501150563.59.0.900257908106.issue30876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 95b16a9705d6b4d31c016c014e59744fc33d53ea by Serhiy Storchaka in branch '3.6': [3.6] bpo-30814, bpo-30876: Add new import test files to projects. (GH-2851). (#2912) https://github.com/python/cpython/commit/95b16a9705d6b4d31c016c014e59744fc33d53ea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 06:16:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Jul 2017 10:16:23 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1501150583.26.0.868962409644.issue30876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f9fbed19a964e55ee703005823d8a7408f83d7f4 by Serhiy Storchaka in branch '3.5': [3.5] bpo-30876: Add new import test files to projects. (GH-2851). (#2913) https://github.com/python/cpython/commit/f9fbed19a964e55ee703005823d8a7408f83d7f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 06:18:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Jul 2017 10:18:26 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1501150706.85.0.333533696416.issue30876@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 27 06:19:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Jul 2017 10:19:01 +0000 Subject: [issue30814] Import dotted name as alias breaks with concurrency In-Reply-To: <1498820988.28.0.530762803635.issue30814@psf.upfronthosting.co.za> Message-ID: <1501150741.63.0.348585330499.issue30814@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 06:25:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 10:25:47 +0000 Subject: [issue30891] importlib: _find_and_load() race condition on sys.modules[name] check In-Reply-To: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> Message-ID: <1501151147.08.0.834914008538.issue30891@psf.upfronthosting.co.za> STINNER Victor added the comment: Victor: > I'm not sure that backporting the unit test is interesting. If the test fails, we will be unable to fix it. Serhiy closed his PR: https://github.com/python/cpython/pull/2645#event-1181495893 So now I close this issue. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 06:28:02 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Jul 2017 10:28:02 +0000 Subject: [issue29902] copy breaks staticmethod In-Reply-To: <1490447804.79.0.661284691694.issue29902@psf.upfronthosting.co.za> Message-ID: <1501151282.93.0.840267703075.issue29902@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 08:45:26 2017 From: report at bugs.python.org (Paul Hammant) Date: Thu, 27 Jul 2017 12:45:26 +0000 Subject: [issue31055] All Sphinx generated pages could have a new "Edit This Page" link adjacent to the existing "Show Source" Message-ID: <1501159526.11.0.527058516666.issue31055@psf.upfronthosting.co.za> New submission from Paul Hammant: Show Source links to: https://github.com/python/cpython/blob/path/to/resource.rst Edit This Page would link to https://github.com/python/cpython/edit/path/to/resource.rst And yes, GitHub does the right thing if you're not ordinarily permitted to change python/cpython ---------- assignee: docs at python components: Documentation messages: 299306 nosy: Paul Hammant, docs at python priority: normal severity: normal status: open title: All Sphinx generated pages could have a new "Edit This Page" link adjacent to the existing "Show Source" versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 09:31:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 13:31:11 +0000 Subject: [issue30885] test_subprocess hangs on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1499637524.07.0.247905249864.issue30885@psf.upfronthosting.co.za> Message-ID: <1501162271.19.0.00991516002327.issue30885@psf.upfronthosting.co.za> STINNER Victor added the comment: test_subprocess also hangs on this Python 3.5 build. It's the only test not listed in the output: http://buildbot.python.org/all/builders/AMD64%20Windows10%203.5/builds/356/steps/test/logs/stdio ... 1:01:45 [395/398] test_codecmaps_tw 1:01:47 [396/398] test_grammar 1:01:48 [397/398] test_posix test_posix skipped -- No module named 'posix' command timed out: 1200 seconds without output running ['Tools\\buildbot\\test.bat', '-x64', '-j2', '--timeout', '900'], attempting to kill program finished with exit code 1 elapsedTime=4915.543000 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 10:07:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 14:07:36 +0000 Subject: [issue31044] FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT In-Reply-To: <1501069590.31.0.999059356649.issue31044@psf.upfronthosting.co.za> Message-ID: <1501164456.41.0.517654066354.issue31044@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm able to reproduce the bug on koobs's FreeBSD CURRENT: * stat() returns st_dev = 0xde4d0429ab * major(0xde4d0429ab) returns 0x29 * minor(0xde4d0429ab) returns 0x4d0400ab minor() truncates most significant bits. major/minor are defined in sys/types.h: https://github.com/freebsd/freebsd/blob/master/sys/sys/types.h#L372 #define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ #define minor(x) ((int)((x)&0xffff00ff)) /* minor number */ The definition of minor() confirms that most significant bits are truncated by "& 0xffff00ff". I'm surprised that stat().st_dev returns a device larger than INT_MAX: 0xde4d0429ab. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 10:08:04 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 27 Jul 2017 14:08:04 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501164484.94.0.601538099386.issue30853@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +2966 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 10:13:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 14:13:00 +0000 Subject: [issue31044] FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT In-Reply-To: <1501069590.31.0.999059356649.issue31044@psf.upfronthosting.co.za> Message-ID: <1501164780.06.0.378307513229.issue31044@psf.upfronthosting.co.za> STINNER Victor added the comment: os.stat() seems correct, st_dev and st_ino are the same than the system command "stat": CURRENT-amd64% ./python -c 'import os; st=os.stat("setup.py"); print(st)' os.stat_result(st_mode=33188, st_ino=2384528, st_dev=954774858155, st_nlink=1, st_uid=1003, st_gid=1003, st_size=99944, st_atime=1501162007, st_mtime=1501162007, st_ctime=1501162007) CURRENT-amd64% stat setup.py 954774858155 2384528 -rw-r--r-- 1 haypo haypo 18446744073709551615 99944 "Jul 27 23:26:47 2017" "Jul 27 23:26:47 2017" "Jul 27 23:26:47 2017" "Jul 27 23:26:47 2017" 100352 79 0x800 setup.py The used filesystem for /home is ZFS: CURRENT-amd64% df . Filesystem 1K-blocks Used Avail Capacity Mounted on storage/home 17041752 11205517 5836235 66% /usr/home CURRENT-amd64% mount|grep home storage/home on /usr/home (zfs, local, noatime, nfsv4acls) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 10:16:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 14:16:40 +0000 Subject: [issue31044] FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT In-Reply-To: <1501069590.31.0.999059356649.issue31044@psf.upfronthosting.co.za> Message-ID: <1501165000.79.0.0927133153098.issue31044@psf.upfronthosting.co.za> STINNER Victor added the comment: The problem is more the major(), minor() and makedev() commands: CURRENT-amd64% ./python Python 3.7.0a0 (heads/master:d5ed47dea2, Jul 28 2017, 00:10:54) [GCC 4.2.1 Compatible FreeBSD Clang 5.0.0 (trunk 308421)] on freebsd12 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> dev=954774858155; os.makedev(os.major(dev), os.minor(dev)) 1292118443 "makedev, major, minor -- device number conversion" doc on FreeBSD CURRENT: https://www.freebsd.org/cgi/man.cgi?query=makedev&apropos=0&sektion=0&manpath=FreeBSD+12-current&arch=default&format=html SYNOPSIS #include dev_t makedev(int major, int minor); int major(dev_t dev); int minor(dev_t dev); DESCRIPTION The makedev() macro allows a unique device number to be generated based on its major and minor number. The major() and minor() macros can be used to obtain the original numbers from the device number dev. In previous implementations of FreeBSD all block and character devices were uniquely identified by a pair of major and minor numbers. The major number referred to a certain device class (e.g. disks, TTYs) while the minor number identified an instance within the device class. Later ver- sions of FreeBSD automatically generate a unique device number for each character device visible in /dev/. These numbers are not divided in device classes. On FreeBSD these macros are only used by utilities that need to exchange numbers with other operating systems that may use different encodings for dev_t, but also applications that present these numbers to the user in a more conventional way. RETURN VALUES The major() macro returns a device major number that has a value between 0 and 255. The minor() macro returns a device minor number whose value can span the complete range of an int. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 10:20:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 14:20:08 +0000 Subject: [issue31044] FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT In-Reply-To: <1501069590.31.0.999059356649.issue31044@psf.upfronthosting.co.za> Message-ID: <1501165208.42.0.675193650919.issue31044@psf.upfronthosting.co.za> STINNER Victor added the comment: Confirmation that minor() truncates high bits: CURRENT-amd64% ./python -c 'import os; print(hex(os.minor(0xaabbccddff)))' 0xbbcc00ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 10:21:02 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 27 Jul 2017 14:21:02 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501165262.7.0.0702238205286.issue30853@psf.upfronthosting.co.za> Cheryl Sabella added the comment: The font vars went well, so I also added general vars. I created the blurb. I didn't know if it would work with no body, so I just put a placeholder. I did have another question. Instead of just one tracers.add() method, I was wondering if there's an advantage to having one called add_callback(var, callback) and a separate one called add_default(var, config)? Design-wise, I don't know which is the preferred way, but changing the existing code seemed a little hackish. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 10:25:21 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 27 Jul 2017 14:25:21 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501165521.94.0.06604876242.issue30853@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Just as an FYI with blurb, I installed it in the same venv as coverage, so I was able to run it with 3.7. It's really cool. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 10:34:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 14:34:18 +0000 Subject: [issue31044] FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT In-Reply-To: <1501069590.31.0.999059356649.issue31044@psf.upfronthosting.co.za> Message-ID: <1501166058.23.0.0107489753078.issue31044@psf.upfronthosting.co.za> STINNER Victor added the comment: At May 23, the dev_t type changed from 32 bits to 64 bits on FreeBSD in the kernel, but minor() wasn't updated. I reported a bug to FreeBSD: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221048 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 10:37:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 14:37:16 +0000 Subject: [issue31044] FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT In-Reply-To: <1501069590.31.0.999059356649.issue31044@psf.upfronthosting.co.za> Message-ID: <1501166236.44.0.687703796159.issue31044@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2967 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 10:55:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 14:55:58 +0000 Subject: [issue31044] FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT In-Reply-To: <1501069590.31.0.999059356649.issue31044@psf.upfronthosting.co.za> Message-ID: <1501167358.09.0.903874574284.issue31044@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 12953ffe12ac781332b384c36b25d12216b1db62 by Victor Stinner in branch 'master': bpo-31044: Skip test_posix.test_makedev() on FreeBSD (#2915) https://github.com/python/cpython/commit/12953ffe12ac781332b384c36b25d12216b1db62 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 10:56:35 2017 From: report at bugs.python.org (Joey DiGiorgio) Date: Thu, 27 Jul 2017 14:56:35 +0000 Subject: [issue31056] Import Module Not Working According To Documentation Python 3.6.2 Message-ID: <1501167395.04.0.978474352938.issue31056@psf.upfronthosting.co.za> New submission from Joey DiGiorgio: I am running Windows 7 and Python 3.6.2 trying to import module A from withing module B where both Module A and B are located in the same directory. I get the ModuleNotFoundError. I try the exact same setup with Python 3.5.2 and get no errors and I get the expected behavior. For more details about the exact process I went through and everything I tried, see the StackOverflow post I made about it here: https://stackoverflow.com/questions/45336678/python-3-import-module-not-working-according-to-docs?noredirect=1#comment77637921_45336678 ---------- components: Windows messages: 299316 nosy: MrJman006, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Import Module Not Working According To Documentation Python 3.6.2 type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 11:05:53 2017 From: report at bugs.python.org (Thomas Thurman) Date: Thu, 27 Jul 2017 15:05:53 +0000 Subject: [issue31057] pydoc for tempfile.TemporaryDirectory should say it returns the name Message-ID: <1501167953.07.0.778065697758.issue31057@psf.upfronthosting.co.za> New submission from Thomas Thurman: Currently the pydoc for tempfile.TemporaryDirectory begins "Create and return a temporary directory." It doesn't explain anywhere *what* it returns (in fact, it returns the name of the directory as a string). The return type is further obscured by TemporaryDirectory being a context manager. ---------- assignee: docs at python components: Documentation messages: 299317 nosy: Thomas Thurman, docs at python priority: normal severity: normal status: open title: pydoc for tempfile.TemporaryDirectory should say it returns the name type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 11:09:45 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Jul 2017 15:09:45 +0000 Subject: [issue31057] pydoc for tempfile.TemporaryDirectory should say it returns the name In-Reply-To: <1501167953.07.0.778065697758.issue31057@psf.upfronthosting.co.za> Message-ID: <1501168185.4.0.263909514681.issue31057@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +2968 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 11:13:29 2017 From: report at bugs.python.org (Paul Moore) Date: Thu, 27 Jul 2017 15:13:29 +0000 Subject: [issue31056] Import Module Not Working According To Documentation Python 3.6.2 In-Reply-To: <1501167395.04.0.978474352938.issue31056@psf.upfronthosting.co.za> Message-ID: <1501168409.9.0.609688432061.issue31056@psf.upfronthosting.co.za> Paul Moore added the comment: I've tested this on Python 3.6.1 and Python 3.6.2 on Windows 7, 64-bit, and it works as expected. I don't see the problem here - do you have any unusual environment settings or config? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 11:44:15 2017 From: report at bugs.python.org (David Hoyes) Date: Thu, 27 Jul 2017 15:44:15 +0000 Subject: [issue27715] call-matcher breaks if a method is mocked with spec=True In-Reply-To: <1470710605.81.0.432461136624.issue27715@psf.upfronthosting.co.za> Message-ID: <1501170255.24.0.0254627180696.issue27715@psf.upfronthosting.co.za> David Hoyes added the comment: I came across a different failing test case, which looks a lot like the same issue: ``` from unittest import mock class Foo(object): def __call__(self, x): return x m = mock.create_autospec(Foo, instance=True) m(7) m.assert_called_once_with(7) ``` In mock 1.0.1 this passes, but in Python 3.5 we get this error: ``` TypeError: missing a required argument: 'x' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "euhpc/tmp/mockbug.py", line 12, in m.assert_called_once_with(7) File "/usr/lib/python3.5/unittest/mock.py", line 803, in assert_called_once_with return self.assert_called_with(*args, **kwargs) File "/usr/lib/python3.5/unittest/mock.py", line 792, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: Expected call: mock(7) Actual call: mock(7) ``` ---------- nosy: +David Hoyes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 12:00:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 16:00:36 +0000 Subject: [issue31044] FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT In-Reply-To: <1501069590.31.0.999059356649.issue31044@psf.upfronthosting.co.za> Message-ID: <1501171236.58.0.46959847402.issue31044@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2970 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 12:00:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 16:00:38 +0000 Subject: [issue31044] FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT In-Reply-To: <1501069590.31.0.999059356649.issue31044@psf.upfronthosting.co.za> Message-ID: <1501171238.29.0.939419622347.issue31044@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2971 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 12:05:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 16:05:46 +0000 Subject: [issue31028] test_pydoc fails when run directly In-Reply-To: <1500985258.67.0.797354625815.issue31028@psf.upfronthosting.co.za> Message-ID: <1501171546.79.0.202489490885.issue31028@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fd6736d17901e539d6a9ddf50a9927a3a97a9c06 by Victor Stinner in branch '2.7': bpo-31028: Fix test_pydoc when run directly (#2864) (#2911) https://github.com/python/cpython/commit/fd6736d17901e539d6a9ddf50a9927a3a97a9c06 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 12:05:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 16:05:48 +0000 Subject: [issue31028] test_pydoc fails when run directly In-Reply-To: <1500985258.67.0.797354625815.issue31028@psf.upfronthosting.co.za> Message-ID: <1501171548.77.0.631510865314.issue31028@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d019c7965d411b2132f68ed6bb33e538b4d9eba3 by Victor Stinner in branch '3.6': bpo-31028: Fix test_pydoc when run directly (#2864) (#2910) https://github.com/python/cpython/commit/d019c7965d411b2132f68ed6bb33e538b4d9eba3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 12:11:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 16:11:40 +0000 Subject: [issue31028] test_pydoc fails when run directly In-Reply-To: <1500985258.67.0.797354625815.issue31028@psf.upfronthosting.co.za> Message-ID: <1501171900.64.0.775531399726.issue31028@psf.upfronthosting.co.za> STINNER Victor added the comment: Bug fixed in Python 2.7, 3.6 and master. ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 12:25:14 2017 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 27 Jul 2017 16:25:14 +0000 Subject: [issue30640] NULL + 1 in _PyFunction_FastCallDict() In-Reply-To: <1497278279.18.0.370213389584.issue30640@psf.upfronthosting.co.za> Message-ID: <1501172714.51.0.324830888752.issue30640@psf.upfronthosting.co.za> Changes by Zackery Spytz : ---------- pull_requests: +2972 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 12:42:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 16:42:13 +0000 Subject: [issue31044] FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT In-Reply-To: <1501069590.31.0.999059356649.issue31044@psf.upfronthosting.co.za> Message-ID: <1501173733.88.0.434287483822.issue31044@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 54cb3400e500f99bd57a0273aa7ef84ffd37558e by Victor Stinner in branch '3.6': bpo-31044: Skip test_posix.test_makedev() on FreeBSD (#2915) (#2917) https://github.com/python/cpython/commit/54cb3400e500f99bd57a0273aa7ef84ffd37558e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 12:44:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 16:44:46 +0000 Subject: [issue31044] FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT In-Reply-To: <1501069590.31.0.999059356649.issue31044@psf.upfronthosting.co.za> Message-ID: <1501173886.07.0.624037117398.issue31044@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c2f7fb61511456c62877592988b31714cb8ba266 by Victor Stinner in branch '2.7': [2.7] bpo-31044: Skip test_posix.test_makedev() on FreeBSD (#2915) (#2918) https://github.com/python/cpython/commit/c2f7fb61511456c62877592988b31714cb8ba266 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 12:45:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 27 Jul 2017 16:45:12 +0000 Subject: [issue31044] FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT In-Reply-To: <1501069590.31.0.999059356649.issue31044@psf.upfronthosting.co.za> Message-ID: <1501173912.05.0.0171457845866.issue31044@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 13:03:21 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 27 Jul 2017 17:03:21 +0000 Subject: [issue31055] All Sphinx generated pages could have a new "Edit This Page" link adjacent to the existing "Show Source" In-Reply-To: <1501159526.11.0.527058516666.issue31055@psf.upfronthosting.co.za> Message-ID: <1501175001.75.0.253826202483.issue31055@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: I don't think we should add this link. When we make edits to the docs, even simple typo fixes, it should first be done in the master branch, instead of the maintenance branches (e.g. 2.7, 3.5 or 3.6). If "Edit This Page" link takes you to edit the documentation in branches other than "master", that's not desirable workflow. If "Edit This Page" link takes you to edit the master branch, it can be confusing to the contributor since the content on "master" might be different. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 13:08:47 2017 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 27 Jul 2017 17:08:47 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1501175327.11.0.429124196613.issue30940@psf.upfronthosting.co.za> Mark Dickinson added the comment: [Serhiy] > is it worth to mention explicitly that round(number) and round(number, None) > delegate to number.__round__()? Yes, if we can find a non-clunky wording that does that. The current wording does seem to misleadingly suggest that the delegation to `__round__` only happens for the two-argument version of round. How about just: > For a general Python object ``number``, ``round`` delegates to > ``number.__round__``. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 13:11:06 2017 From: report at bugs.python.org (Segev Finer) Date: Thu, 27 Jul 2017 17:11:06 +0000 Subject: [issue31048] ResourceWarning in test_asyncio.test_events.ProactorEventLoopTests.test_create_server_ssl_verify_failed In-Reply-To: <1501091072.67.0.693498013368.issue31048@psf.upfronthosting.co.za> Message-ID: <1501175466.86.0.887378389769.issue31048@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2973 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 13:18:35 2017 From: report at bugs.python.org (Segev Finer) Date: Thu, 27 Jul 2017 17:18:35 +0000 Subject: [issue30222] make_zip.py had a bug when setting up full 64 bit distribution. In-Reply-To: <1493665158.27.0.48978585861.issue30222@psf.upfronthosting.co.za> Message-ID: <1501175915.54.0.789122790849.issue30222@psf.upfronthosting.co.za> Segev Finer added the comment: Since PR 2750 is merged, I think this can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 13:22:57 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 27 Jul 2017 17:22:57 +0000 Subject: [issue31057] pydoc for tempfile.TemporaryDirectory should say it returns the name In-Reply-To: <1501167953.07.0.778065697758.issue31057@psf.upfronthosting.co.za> Message-ID: <1501176177.35.0.425309176807.issue31057@psf.upfronthosting.co.za> R. David Murray added the comment: It actually returns the path, since "name" often means the last component of the path. Just saying "path" might be confused with pathlib, though. So I guess we'd have to say "returning its path as a string", which sounds awkward. The original wording is in fact accurate, since most people will understand "the directory" as the directory path as a string. I'm not sure this change would be an improvement. I'm not saying no, though. I guess you'd say I'm -0 on changing it. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 13:23:27 2017 From: report at bugs.python.org (Segev Finer) Date: Thu, 27 Jul 2017 17:23:27 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1501176207.96.0.762188888675.issue9566@psf.upfronthosting.co.za> Segev Finer added the comment: The only warnings that remain are: 1. The one from gcmodule.c due to dtrace, which is handled in PR 2852. 2. The peephole warnings which I'm not sure about. Are overflows possible there or not? That is, if there are already internal caps that prevent them. If they are possible, it might require a larger change to support EXTENDED_ARG in some places. i.e. can the consts table really grow larger than `unsigned int` or can a jump target be large enough to overflow? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 13:57:41 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 27 Jul 2017 17:57:41 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1501178261.61.0.952399539735.issue5288@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: In PR 2896, I've modified %z formatting code to output sub-minute data if present. I think %z parsing should be also modified to accept sub-minute data, but I would like to do it in the context of issue 24954. Thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 13:59:34 2017 From: report at bugs.python.org (Paul Goins) Date: Thu, 27 Jul 2017 17:59:34 +0000 Subject: [issue31058] FileFinder fails to find modules for import if modules are created at runtime and don't result in a directory mtime update Message-ID: <1501178374.54.0.548179478476.issue31058@psf.upfronthosting.co.za> New submission from Paul Goins: If modules are added to a package namespace at runtime, there is a chance that they will not be properly detected if adding the module does not also result in an update to the parent directory's st_mtime attribute. This manifests in not being able to import the module in question, despite it clearly existing on disk and despite being to import it via a new Python interpreter if a second one is opened in parallel. Attached is a SSCCE which reproduces this issue. On my Windows dev machine, it works flawlessly on Python 2.7 and 3.6. However, on a Linux VM, it works on Python 2.7 yet fails fairly consistently on Python 3.6. I'm working around the issue by walking sys.path_importer_cache and resetting FileFinder._path_mtime to 0, forcing the cache to be recreated on the next call to FileFinder.find_spec(). This bug is admittedly a bit of a corner case, but I did end up spend many hours trying to figure out what was going on, so whether or not this gets fixed, I hope this may be useful info to someone. Thanks for your attention. ---------- components: Library (Lib) files: import_tester.py messages: 299331 nosy: pdgoins priority: normal severity: normal status: open title: FileFinder fails to find modules for import if modules are created at runtime and don't result in a directory mtime update type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47042/import_tester.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 14:13:39 2017 From: report at bugs.python.org (Sergey Kostyuk) Date: Thu, 27 Jul 2017 18:13:39 +0000 Subject: [issue31059] asyncio.StreamReader.read hangs if n<0 Message-ID: <1501179219.52.0.217830379676.issue31059@psf.upfronthosting.co.za> New submission from Sergey Kostyuk: Good day Maybe I misunderstood something, but I'm failed to fetch any data by calling asyncio.StreamReader.read if `n` is less than zero (or left default). It just hangs in the loop forever (see line number 614 of asyncio/streams.py: https://github.com/python/cpython/blob/3e56ff0/Lib/asyncio/streams.py#L614). If `n` is equal to any positive value - coroutine works as expected and returns if there is any data in socket buffer. Even if available data size is less than `n` bytes. Expected behavior: collect all data from the buffer and return Current behavior: hangs in the loop forever if n < 0 My usage sample: https://git.io/v7nJq ---------- components: asyncio messages: 299332 nosy: Sergey Kostyuk, yselivanov priority: normal severity: normal status: open title: asyncio.StreamReader.read hangs if n<0 type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 14:21:21 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 27 Jul 2017 18:21:21 +0000 Subject: [issue30222] make_zip.py had a bug when setting up full 64 bit distribution. In-Reply-To: <1493665158.27.0.48978585861.issue30222@psf.upfronthosting.co.za> Message-ID: <1501179681.22.0.789481042838.issue30222@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 14:31:45 2017 From: report at bugs.python.org (John Nagle) Date: Thu, 27 Jul 2017 18:31:45 +0000 Subject: [issue24954] No way to generate or parse timezone as produced by datetime.isoformat() In-Reply-To: <1440801281.72.0.545558404714.issue24954@psf.upfronthosting.co.za> Message-ID: <1501180305.13.0.745366455315.issue24954@psf.upfronthosting.co.za> John Nagle added the comment: As the original author of the predecessor bug report (issue 15873) in 2012, I would suggest that there's too much bikeshedding here. I filed this bug because there was no usable ISO8601 date parser available. PyPi contained four slightly different buggy ones, and three more versions were found later. I suggested following RFC3339, "Date and Time on the Internet: Timestamps", section 5.6, which specifies a clear subset of ISO8601. Five years later, I suggest just going with that. Fancier variations belong in non-standard libraries. Date parsing should not be platform-dependent. Using an available C library was convenient, but not portable. Let's get this done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 14:34:23 2017 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 27 Jul 2017 18:34:23 +0000 Subject: [issue30995] Support logging.getLogger(style='{') In-Reply-To: <1500773395.26.0.78055303667.issue30995@psf.upfronthosting.co.za> Message-ID: <1501180463.42.0.234023950812.issue30995@psf.upfronthosting.co.za> Vinay Sajip added the comment: > You only have to make sure they do not use this logger without knowing about new format, which can be done in various ways (like prefixing the name of the logger, for example). That's the problem, right there. I don't think the ways of doing this are bulletproof and require too much cooperation between third-party libraries. > using non-legacy formatting in logging message is really cumbersome I don't see how it's "really cumbersome". A simple approach is outlined in http://plumberjack.blogspot.co.uk/2010/10/supporting-alternative-formatting.html So that logging using brace formatting could be as simple as logger.misc(__('User {} logged in', username)) which is also described in the documentation here: https://docs.python.org/3.3/howto/logging-cookbook.html#use-of-alternative-formatting-styles ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 14:37:04 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 27 Jul 2017 18:37:04 +0000 Subject: [issue31060] IDLE: Finish rearranging ConfigDialog methods Message-ID: <1501180623.98.0.16109771975.issue31060@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Finish rearranging the methods of configdialog.ConfigDialog to group together methods pertaining to each tab and the button block. Doing so has and will help in writing tests. It is also preparation for splitting ConfigDialog, which currently has more than 70 methods, into multiple more maintainable classes. #30993, pr2831 moved the methods pertaining to the font tab right after create_font_tab. #31003, pr2859 did the same for methods pertaining to the general tab. In both case, the generated diff had a + block at the new location and - block at the old locations. When I did the same for the highlight tab for #31001, the number of methods and lines moved was perhaps doubled, which meant that more of the other lines changed position. The result was a huge diff, by default unrendered, that deleted and inserted most of the lines in the file. Adding real edits on top of this would result in a worse huge diff. So I decided instead to open this issue and finish method movement (for the dialog, button group, and keys group) to the extent I can now. (The order within groups may be adjusted later as tests are written and knowledge about the methods is gained.) ---------- assignee: terry.reedy components: IDLE messages: 299335 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Finish rearranging ConfigDialog methods type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 14:39:21 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 27 Jul 2017 18:39:21 +0000 Subject: [issue31060] IDLE: Finish rearranging ConfigDialog methods In-Reply-To: <1501180623.98.0.16109771975.issue31060@psf.upfronthosting.co.za> Message-ID: <1501180761.56.0.601434696788.issue31060@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2974 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 14:52:48 2017 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 27 Jul 2017 18:52:48 +0000 Subject: [issue30522] Allow replacing a logging.StreamHandler's stream In-Reply-To: <1496218150.64.0.987173470763.issue30522@psf.upfronthosting.co.za> Message-ID: <1501181568.1.0.136700438842.issue30522@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- pull_requests: +2975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 15:01:58 2017 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 27 Jul 2017 19:01:58 +0000 Subject: [issue31055] All Sphinx generated pages could have a new "Edit This Page" link adjacent to the existing "Show Source" In-Reply-To: <1501175001.75.0.253826202483.issue31055@psf.upfronthosting.co.za> Message-ID: Fred L. Drake, Jr. added the comment: On Thu, Jul 27, 2017 at 1:03 PM, Mariatta Wijaya wrote: > I don't think we should add this link. > > When we make edits to the docs, even simple typo fixes, it should first be done > in the master branch, instead of the maintenance branches (e.g. 2.7, 3.5 or 3.6). > > If "Edit This Page" link takes you to edit the documentation in branches other > than "master", that's not desirable workflow. > > If "Edit This Page" link takes you to edit the master branch, it can be confusing > to the contributor since the content on "master" might be different. I wonder if a better solution lies somewhere between the original suggestion and just not including such a link. If the link went to an edit form with the version of the content the user was reading, and includes an explanation of the multiple-versions issue, it might prove reasonable to try applying the diff between the modified and original text to the HEADs of each maintenance branch. If the diff doesn't apply, the (possibly new) contributor can be offered a chance to deal with edits to each version (which might be a bit much). At any rate, the diff could be used to construct a temporary branch, b.p.o issue, and PR. This would allow us to provide the contributor with a way to see that their suggested changes are being considered, and we're less likely to lose them in a wall of email. There'd be a bit of work to make all this play out, though. -Fred ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 15:04:23 2017 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 27 Jul 2017 19:04:23 +0000 Subject: [issue31055] All Sphinx generated pages could have a new "Edit This Page" link adjacent to the existing "Show Source" In-Reply-To: Message-ID: Fred L. Drake, Jr. added the comment: On Thu, Jul 27, 2017 at 3:01 PM, Fred L. Drake, Jr. wrote: > If the link went to an edit form with the version of the content the > user was reading, > and includes an explanation of the multiple-versions issue, it might > prove reasonable Egads, look at that formatting! Somedays I miss my VT-100 terminals and sane line handling. -Fred ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 15:34:27 2017 From: report at bugs.python.org (Paul Hammant) Date: Thu, 27 Jul 2017 19:34:27 +0000 Subject: [issue31055] All Sphinx generated pages could have a new "Edit This Page" link adjacent to the existing "Show Source" In-Reply-To: <1501159526.11.0.527058516666.issue31055@psf.upfronthosting.co.za> Message-ID: <1501184067.23.0.531150312881.issue31055@psf.upfronthosting.co.za> Paul Hammant added the comment: Hi folks, I'm not explaining Github's non-commiter contribution process very well. Click this link everyone - https://github.com/BuildRadiator/BuildRadiator/edit/master/README.md - pretend to make a contribution to one of my projects :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 15:39:34 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 27 Jul 2017 19:39:34 +0000 Subject: [issue24954] No way to generate or parse timezone as produced by datetime.isoformat() In-Reply-To: <1440801281.72.0.545558404714.issue24954@psf.upfronthosting.co.za> Message-ID: <1501184374.16.0.684377873239.issue24954@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: John, An RFC3339 parser is beyond the scope of this issue which is limited to adding str[fp]time code(s) to produce and consume RFC3339-formatted timezones. We can still have fromisoformat() constructor implemented in 3.7, but someone needs to address the issues raised at #15873. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 15:44:13 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 27 Jul 2017 19:44:13 +0000 Subject: [issue31042] Inconsistency in documentation of operator.index In-Reply-To: <1501038179.61.0.173139487282.issue31042@psf.upfronthosting.co.za> Message-ID: <1501184653.06.0.83925182062.issue31042@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This seems like a generic issue for magic methods and is already covered by "for custom classes, implicit invocations of special methods are only guaranteed to work correctly if defined on an object?s type, not in the object?s instance dictionary." While you're technically correct with suggesting "Equivalent to `type(a).__index__(a)`", I don't think this is an improvement. It makes the docs safe against overly pedantic readings, but it also reduces the intelligibility for everyday users. The usual approach in the docs is to say "a[b] <==> a.__getitem__(b)" rather than "a[b] <==> type(a).__getitem__(a, b)". The latter is more correct but it is also less helpful. For the most part, this style of presentation has worked well for a lot of people for a long time. I recommend closing this or not doing any more than changing "Equivalent to:" to "Roughly equivalent to:". ---------- nosy: +rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 15:47:49 2017 From: report at bugs.python.org (Larry Hastings) Date: Thu, 27 Jul 2017 19:47:49 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501184869.07.0.185964350903.issue30119@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset 2a5a26c87e82c7d9a348792891feccd1b5e9a769 by larryhastings (Dong-hee Na) in branch '3.4': [3.4] bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal command (#1214) (#2893) https://github.com/python/cpython/commit/2a5a26c87e82c7d9a348792891feccd1b5e9a769 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 15:50:06 2017 From: report at bugs.python.org (Larry Hastings) Date: Thu, 27 Jul 2017 19:50:06 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501185006.2.0.17932861321.issue31036@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset 3de144890ad3bc50694368a1b33be6d7f3a780b3 by larryhastings (Ned Deily) in branch '3.5': [3.5] bpo-31036: use an existing Misc/NEWS rather than trying to use blurb (#2874) https://github.com/python/cpython/commit/3de144890ad3bc50694368a1b33be6d7f3a780b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 15:56:23 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 27 Jul 2017 19:56:23 +0000 Subject: [issue31055] All Sphinx generated pages could have a new "Edit This Page" link adjacent to the existing "Show Source" In-Reply-To: <1501159526.11.0.527058516666.issue31055@psf.upfronthosting.co.za> Message-ID: <1501185383.81.0.287532055472.issue31055@psf.upfronthosting.co.za> R. David Murray added the comment: No, we understand the process, the problem is that except for the 'dev' docs, the link would be to a branch other than master. That's the problem that we're discussing. Maybe instead of an edit link on non-dev docs we could have a message saying that if you want to propose a change you can use the edit link on the 'dev' version of the docs? Maybe with a link or button that would take them to the dev version of the page? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 16:04:34 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 27 Jul 2017 20:04:34 +0000 Subject: [issue31042] Inconsistency in documentation of operator.index In-Reply-To: <1501038179.61.0.173139487282.issue31042@psf.upfronthosting.co.za> Message-ID: <1501185874.04.0.828360482221.issue31042@psf.upfronthosting.co.za> R. David Murray added the comment: I agree with Raymond. I'm not sure that adding roughly is going to decrease the possibility of confusion, but I won't object to it. In a way, it's too bad we didn't make the attribute lookup machinery look up all dunder methods on the class, so that a.__index__ would call the class method. I think backward compatibility prevented that. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 16:09:18 2017 From: report at bugs.python.org (Joseph Fox-Rabinovitz) Date: Thu, 27 Jul 2017 20:09:18 +0000 Subject: [issue31042] Inconsistency in documentation of operator.index In-Reply-To: <1501185874.04.0.828360482221.issue31042@psf.upfronthosting.co.za> Message-ID: Joseph Fox-Rabinovitz added the comment: I brought up the issue because it was really a point of confusion for me. Could we make the change to "Roughly equivalent" and make that a link to https://docs.python.org/3/reference/datamodel.html#special-method-lookup? That would make it clear how the lookup is actually done. While I agree that making the docs unnecessarily pedantic is probably a bad thing, I am going to guess that I am not the only person that looks to them for technical accuracy. Regards, -Joe On Thu, Jul 27, 2017 at 4:04 PM, R. David Murray wrote: > > R. David Murray added the comment: > > I agree with Raymond. I'm not sure that adding roughly is going to > decrease the possibility of confusion, but I won't object to it. > > In a way, it's too bad we didn't make the attribute lookup machinery look > up all dunder methods on the class, so that a.__index__ would call the > class method. I think backward compatibility prevented that. > > ---------- > nosy: +r.david.murray > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 16:16:30 2017 From: report at bugs.python.org (Alexander Mohr) Date: Thu, 27 Jul 2017 20:16:30 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module Message-ID: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> New submission from Alexander Mohr: I have a project in a prod environment which heavily uses asyncio and a threadpool. It uses the threadpool to run CPU heavy tasks (in this case populating a defaultdict) to avoid blocking the main thread (no async code in thread). For some time now my service has been randomly crashing at the same place in the thread which does the dict updating. I've finally got both the python and native stack traces, and based on the information presented it looked very similar to the issue found by the devs at home-assistant (https://github.com/home-assistant/home-assistant/issues/7752#issuecomment-305100009, which points to https://github.com/home-assistant/home-assistant/pull/7848). So I tried their fix of disabling the "_asyncio" module, and lo and behold python no longer segfaults. Per the stacktrace it's crashing in PyObject_GC_Del, and the only place this is used in the asyncio module seems to be here: https://github.com/python/cpython/blob/master/Modules/_asynciomodule.c#L996 does anyone have any idea why it's crashing on this line? Are there thread protections missing in this file? I'm trying to reproduce this in a testcase but it's proving very difficult as I'm guessing it's timing related. ---------- components: asyncio files: native___python_crash_stacks.txt messages: 299346 nosy: thehesiod, yselivanov priority: normal severity: normal status: open title: asyncio segfault when using threadpool and "_asyncio" native module type: crash versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file47043/native___python_crash_stacks.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 16:19:44 2017 From: report at bugs.python.org (Alexander Mohr) Date: Thu, 27 Jul 2017 20:19:44 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501186784.33.0.923973297822.issue31061@psf.upfronthosting.co.za> Alexander Mohr added the comment: btw I've seen this issue in 3.5.2 + 3.6.2 on debian jessie + stretch ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 16:21:28 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 27 Jul 2017 20:21:28 +0000 Subject: [issue31060] IDLE: Finish regrouping ConfigDialog methods In-Reply-To: <1501180623.98.0.16109771975.issue31060@psf.upfronthosting.co.za> Message-ID: <1501186888.1.0.979346214909.issue31060@psf.upfronthosting.co.za> Terry J. Reedy added the comment: After finishing the patch, I expect that the highlight and keys groups will need some changes. ---------- title: IDLE: Finish rearranging ConfigDialog methods -> IDLE: Finish regrouping ConfigDialog methods _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 16:24:00 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 27 Jul 2017 20:24:00 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501187040.63.0.374578651731.issue31061@psf.upfronthosting.co.za> Yury Selivanov added the comment: Interesting. A code to reproduce this crash would help tremendously. So far this is the first time I hear about this crash. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 16:47:50 2017 From: report at bugs.python.org (Nir Soffer) Date: Thu, 27 Jul 2017 20:47:50 +0000 Subject: [issue30931] Race condition in asyncore may access the wrong dispatcher In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1501188470.35.0.795180407709.issue30931@psf.upfronthosting.co.za> Nir Soffer added the comment: Victor, I mostly agree with you, but I think we have here several bugs, and we should do the minimal fix for each of them. Your PR is too big, trying to fix too much. (Bug 1) The dispatcher A closes the dispatcher B. Currently, asyncore calls the handlers of the dispatcher B. We don't have such bug now - if dispatcher B is closed, it is not in the map, and current code will skip the fd when checking: for fd in r: obj = map.get(fd) if obj is None: continue (Bug 2) Dispatcher A close Dispatcher B, create Dispatcher C. C get may use the same fd as B. If B was ready, asyncore may get C from the map and access it instead of B. This issue is reported in this bug. (Bug 3) if handle_read() closed the dispatcher, asyncore will call handle_write() on a closed dispatcher. This is a very old bug with asyncore.readwrite(). (Bug 4) handle_xxx_event() internal methods may call multiple handle_xxx() user methods, again not checking if dispatcher was closed after each invocation. Same, very old bug. So I suggest that we fix *only* bug 2 in https://github.com/python/cpython/pull/2854. The issue in readwrite() can be solved with the approach you suggest, but I prefer to make small an careful steps so we don't introduce regressions in stable versions. Also, there is already too much noise here an in the various PRs about this issue, better file bugs for the rest of the issues and discuss them separately. This commit https://github.com/python/cpython/pull/2854/commits/bbd2d09ab999fa2214cbbd2589ae3642facd3057 Looks fine with the test_poll_close_replace_dispatchers test added in the later commit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 17:11:45 2017 From: report at bugs.python.org (Kevin Chen) Date: Thu, 27 Jul 2017 21:11:45 +0000 Subject: [issue31062] socket.makefile does not handle line buffering Message-ID: <1501189905.94.0.421716043749.issue31062@psf.upfronthosting.co.za> New submission from Kevin Chen: File objects generated with socket.makefile and that attempt to use line buffering appear to not actually use line buffering, at least for writing. In this example, the string does not appear to be written until the flush call. First, set up a socket: $ nc -l -U /tmp/foo Then: Python 3.6.2 (default, Jul 26 2017, 01:41:27) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) >>> s.connect("/tmp/foo") >>> f = s.makefile("rw", buffering=1) >>> f.write("asdf\n") 5 >>> f.flush() The following patch appears to fix the problem: --- socket.py.orig 2017-07-25 21:41:39.974554944 -0400 +++ socket.py 2017-07-27 17:02:58.223353418 -0400 @@ -253,7 +253,11 @@ buffer = io.BufferedWriter(raw, buffering) if binary: return buffer - text = io.TextIOWrapper(buffer, encoding, errors, newline) + line_buffering = False + if buffering == 1: + line_buffering = True + text = io.TextIOWrapper(buffer, encoding, errors, newline, + line_buffering) text.mode = mode return text ---------- components: Library (Lib) messages: 299351 nosy: kchen priority: normal severity: normal status: open title: socket.makefile does not handle line buffering type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 18:28:05 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 27 Jul 2017 22:28:05 +0000 Subject: [issue31060] IDLE: Finish regrouping ConfigDialog methods In-Reply-To: <1501180623.98.0.16109771975.issue31060@psf.upfronthosting.co.za> Message-ID: <1501194485.65.0.365992412483.issue31060@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset b1660800f4f519dbfab9e5a4ad3eae1cfabab3ed by Terry Jan Reedy in branch 'master': bpo-31060: IDLE: Finish regrouping ConfigDialog methods (#2908) https://github.com/python/cpython/commit/b1660800f4f519dbfab9e5a4ad3eae1cfabab3ed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 18:31:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 27 Jul 2017 22:31:27 +0000 Subject: [issue31060] IDLE: Finish regrouping ConfigDialog methods In-Reply-To: <1501180623.98.0.16109771975.issue31060@psf.upfronthosting.co.za> Message-ID: <1501194687.36.0.306578779721.issue31060@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2976 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 18:31:53 2017 From: report at bugs.python.org (Mitar) Date: Thu, 27 Jul 2017 22:31:53 +0000 Subject: [issue30995] Support logging.getLogger(style='{') In-Reply-To: <1500773395.26.0.78055303667.issue30995@psf.upfronthosting.co.za> Message-ID: <1501194713.91.0.985713536092.issue30995@psf.upfronthosting.co.za> Mitar added the comment: > That's the problem, right there. I don't think the ways of doing this are bulletproof and require too much cooperation between third-party libraries. Which third-party libraries? The thing I am proposing works for that particular file you call getLogger with. In my files I already have: logger = logging.getLogger(__name__) Changing that to: logger = logging.getLogger(__name__, style='{') seems easy and backwards compatible. How will I break any other 3rd party use by doing this? It is my code in my file. The only issue is that you have to make sure you are not passing object on. But that again, is your code, so you should know what you are passing on. We could also add logger.defaultStyle() to return the same logger, with default style, so that you can pass it on to other function which might expect a logger, if you want that. Or, you could define: defaultLogger = logging.getLogger(__name__) logger = logging.getLogger(__name__, style='{') at the beginning of the file, and then use logger in the file, and pass defaultLogger on. There are so many options to address your concerns. > I don't see how it's "really cumbersome". A simple approach is outlined in Simple approach by everywhere in my code having to use __ now? So I have _ for string translations, and __ for logging. This is cumbersome. Because it could be solved by having it only once in the file. Not that I have to call it manually everywhere in the file. > which is also described in the documentation here: Yes, I have read it, used it, didn't like it. So I thought about it and it feels pretty easy to provide a capacity to have a default style applied to the whole file. Instead of manually having to call __. It would effectively be the same internally. Just cleaner code. Do not repeat yourself. Repeating __ everywhere is repeating myself a lot. I would like this style. Let this be specified only once. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 19:13:28 2017 From: report at bugs.python.org (paul j3) Date: Thu, 27 Jul 2017 23:13:28 +0000 Subject: [issue28734] argparse: successive parsing wipes out nargs=? values In-Reply-To: <1479483675.86.0.774570236197.issue28734@psf.upfronthosting.co.za> Message-ID: <1501197208.01.0.593485856439.issue28734@psf.upfronthosting.co.za> paul j3 added the comment: The problem described here is restricted to `?` and `*' positionals, and is caused by the subtle way in which 'empty' optional positionals are handled. The regular handling of defaults at the start of `parse_known_args` works fine. The default is only written to the namespace if something isn't there already. if not hasattr(namespace, action.dest): if action.default is not SUPPRESS: setattr(namespace, action.dest, action.default) But a positional with ? or * is always 'seen' because an empty list of strings satisfies the nargs pattern. 'get_values()' has special handling for this case: if not arg_strings and action.nargs == OPTIONAL: .... value = action.default That is, it replaces the empty list with the 'default'. But take_action(), which does the actual saving, is conditional: # take the action if we didn't receive a SUPPRESS value # (e.g. from a default) if argument_values is not SUPPRESS: action(self, namespace, argument_values, option_string) That explains why 'default=SUPPRESS' solves this issue. It's enough to satisfy the OP's situation, but I don't think it's a robust fix. I don't have a patch idea yet, but this probably should be reopened so there's a record of the potential problem. More on the complications raised by these 'seen default actions' in http://bugs.python.org/issue18943 ---------- nosy: +paul.j3 status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 19:16:10 2017 From: report at bugs.python.org (paul j3) Date: Thu, 27 Jul 2017 23:16:10 +0000 Subject: [issue18943] argparse: default args in mutually exclusive groups In-Reply-To: <1378458002.17.0.371205806782.issue18943@psf.upfronthosting.co.za> Message-ID: <1501197370.14.0.62886428829.issue18943@psf.upfronthosting.co.za> paul j3 added the comment: Another manifestation of the complications in handling '?' positionals is in http://bugs.python.org/issue28734 argparse: successive parsing wipes out nargs=? values ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 19:31:48 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 27 Jul 2017 23:31:48 +0000 Subject: [issue31020] Add support for custom compressor in tarfile In-Reply-To: <1500930321.52.0.338757047173.issue31020@psf.upfronthosting.co.za> Message-ID: <1501198308.74.0.227865019539.issue31020@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Adding lars.gustaebel who is listed as maintainer for tarfile. ---------- nosy: +Mariatta, lars.gustaebel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 19:31:57 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 27 Jul 2017 23:31:57 +0000 Subject: [issue31020] Add support for custom compressor in tarfile In-Reply-To: <1500930321.52.0.338757047173.issue31020@psf.upfronthosting.co.za> Message-ID: <1501198317.04.0.87181711853.issue31020@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 19:35:17 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 27 Jul 2017 23:35:17 +0000 Subject: [issue31020] Add support for custom compressor in tarfile In-Reply-To: <1500930321.52.0.338757047173.issue31020@psf.upfronthosting.co.za> Message-ID: <1501198517.54.0.86918354008.issue31020@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Adding serhiy.storchaka who recently made changes to tarfile. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 20:25:43 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 28 Jul 2017 00:25:43 +0000 Subject: [issue31020] Add support for custom compressor in tarfile In-Reply-To: <1500930321.52.0.338757047173.issue31020@psf.upfronthosting.co.za> Message-ID: <1501201543.45.0.143352681995.issue31020@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 20:50:41 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 00:50:41 +0000 Subject: [issue31060] IDLE: Finish regrouping ConfigDialog methods In-Reply-To: <1501180623.98.0.16109771975.issue31060@psf.upfronthosting.co.za> Message-ID: <1501203041.78.0.810203868371.issue31060@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 2cbb6733bfe54e87622a6372f83b73bddf3c4078 by Terry Jan Reedy in branch '3.6': [3.6] bpo-31060: IDLE: Finish regrouping ConfigDialog methods (GH-2908) (#2925) https://github.com/python/cpython/commit/2cbb6733bfe54e87622a6372f83b73bddf3c4078 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 20:51:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 00:51:27 +0000 Subject: [issue31060] IDLE: Finish regrouping ConfigDialog methods In-Reply-To: <1501180623.98.0.16109771975.issue31060@psf.upfronthosting.co.za> Message-ID: <1501203087.91.0.0122808475387.issue31060@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 23:33:42 2017 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Jul 2017 03:33:42 +0000 Subject: [issue28600] shutdown_asyncgens In-Reply-To: <1478197741.66.0.256167531264.issue28600@psf.upfronthosting.co.za> Message-ID: <1501212822.33.0.252977869001.issue28600@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- title: asyncio: Optimize loop.call_soon -> shutdown_asyncgens _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 23:34:23 2017 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Jul 2017 03:34:23 +0000 Subject: [issue28600] asyncio: Optimize loop.call_soon In-Reply-To: <1478197741.66.0.256167531264.issue28600@psf.upfronthosting.co.za> Message-ID: <1501212863.44.0.584603866857.issue28600@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- title: shutdown_asyncgens -> asyncio: Optimize loop.call_soon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 23:45:31 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 03:45:31 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501213531.37.0.970286327339.issue30853@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A minor change. Complete the path by adding the other var-trace pairs and after checking carefully, I will be ready to push. I prefer one easy to remember short-name function to two longer-named functions. However, the docstring should specify the tuple as idleConf config-type, section, and option names. Either *add* or *make_callback* could check len = 3 and callback[0] in idleConf.config_types, with a test added. "changing the existing code seemed a little hackish": I don't understand exactly what you think is hackish. There might be people who would prefer (possibly as less hakish) def add(tkvar, parent, cb_info): var = tkvar(parent) if isinstance(callback, tuple): callback = self.make_callback(var, cb_info) else: callback = cb_info self.untraced.append((var, callback)) return var I don't know if this would make the add calls readable, but is does factor the var calls into one place, replaces () with ',' (at the cost of passing one more reference), and avoids the hackish return of an input. It also simplifies the code in a way by making it 'flatter' instead of nested. Did I miss something? What do you think? The parameter name change is an independent idea that should satisfy someone who objects to calling something an x that is not an x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 00:07:50 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Jul 2017 04:07:50 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1501214870.22.0.23137981705.issue30119@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- priority: release blocker -> resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 00:09:37 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Jul 2017 04:09:37 +0000 Subject: [issue31058] FileFinder fails to find modules for import if modules are created at runtime and don't result in a directory mtime update In-Reply-To: <1501178374.54.0.548179478476.issue31058@psf.upfronthosting.co.za> Message-ID: <1501214977.01.0.446585716906.issue31058@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +brett.cannon, eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 00:26:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Jul 2017 04:26:44 +0000 Subject: [issue31020] Add support for custom compressor in tarfile In-Reply-To: <1500930321.52.0.338757047173.issue31020@psf.upfronthosting.co.za> Message-ID: <1501216004.59.0.304116527145.issue31020@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You can pass a custom file object that implements a custom compression to the TarFile constructor. I don't see a need in other way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 00:38:36 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Jul 2017 04:38:36 +0000 Subject: [issue31054] Python 2.7.8 Release does not update the system Path variable In-Reply-To: <1501140734.16.0.246037908584.issue31054@psf.upfronthosting.co.za> Message-ID: <1501216716.96.0.135068647701.issue31054@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- components: +Windows -Installation nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 00:56:36 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Jul 2017 04:56:36 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501217796.03.0.657922609004.issue31036@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +2977 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 01:02:07 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Jul 2017 05:02:07 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501218127.41.0.304783853744.issue31036@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 362e9fb0de4321bf265dbca290f7dc1f383a4a47 by Ned Deily in branch '3.4': [3.5] bpo-31036: use an existing Misc/NEWS rather than trying to use blurb (#2874) (#2926) https://github.com/python/cpython/commit/362e9fb0de4321bf265dbca290f7dc1f383a4a47 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 01:05:16 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 05:05:16 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1501218316.1.0.0561741970695.issue31004@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I may have changed the Font group since the copy was made. So unless merges since are carefully checked, the configdialog part of Step 1 should be redone. I think the latter would be easier. Since #30853 might be merged tomorrow, I will 'freeze' the font/indent code unless I hear otherwise, or there is an unexpected delay. When this is merged, I will do the same for the general part. And so on. In Step 2, delete 'Modify code as desired.' I must have forgotten the synchonization problem. We don't want to modify the copy until it can be htested. As soon as the copy *is* changed, the original is no longer a complete backup. I thought of saying that FontPage should subclass Frame, like we have done before. But TabbedPageSet creates a Frame for each page name. So ConfigDialog, the only user, is expected to pass names, then retrieve the blank frames to fill in. We could change that, but not now unless we really need to. It should be possible to replace the blank frame, but there are at least two references to replace. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 01:10:01 2017 From: report at bugs.python.org (Hyun Jae Moon) Date: Fri, 28 Jul 2017 05:10:01 +0000 Subject: [issue31063] List Comprehension Bug Message-ID: <1501218601.65.0.342766588948.issue31063@psf.upfronthosting.co.za> New submission from Hyun Jae Moon: Please check the photo attached. This was tested on Python 3.6.0. It seems that there is a bug in list comprehension. The list b should include 84 as well according to the code I wrote. I believe this is a quite severe bug. Thank you very much. ---------- components: macOS files: Screen Shot 2017-07-27 at 9.59.40 PM.png messages: 299363 nosy: hyunjaemoon, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: List Comprehension Bug type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47044/Screen Shot 2017-07-27 at 9.59.40 PM.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 01:27:18 2017 From: report at bugs.python.org (Tim Peters) Date: Fri, 28 Jul 2017 05:27:18 +0000 Subject: [issue31063] List Comprehension Bug In-Reply-To: <1501218601.65.0.342766588948.issue31063@psf.upfronthosting.co.za> Message-ID: <1501219638.36.0.991291374403.issue31063@psf.upfronthosting.co.za> Tim Peters added the comment: This isn't a bug. 84 appears twice in the list, the first time at index 9. The .index() method finds the first (leftmost; smallest index) occurrence. Since 9 isn't even, the `if` test isn't satisfied, so 84 does not appear in the result. ---------- nosy: +tim.peters resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 01:39:01 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 28 Jul 2017 05:39:01 +0000 Subject: [issue31063] List Comprehension Bug In-Reply-To: <1501218601.65.0.342766588948.issue31063@psf.upfronthosting.co.za> Message-ID: <1501220341.77.0.111200200488.issue31063@psf.upfronthosting.co.za> Steven D'Aprano added the comment: In the future, please do not post screenshots, please copy and paste the text. Screenshots are hard or impossible for the blind or visually impaired to see, but they can use a screen reader to work with text. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 02:01:09 2017 From: report at bugs.python.org (Pierre Quentel) Date: Fri, 28 Jul 2017 06:01:09 +0000 Subject: [issue30576] http.server should support HTTP compression (gzip) In-Reply-To: <1496691724.59.0.955308322691.issue30576@psf.upfronthosting.co.za> Message-ID: <1501221669.23.0.675269217767.issue30576@psf.upfronthosting.co.za> Pierre Quentel added the comment: @martin.panter Please forget my previous message. There is a 3rd solution, and you gave it : no Content-Length and close the connection when all (compressed) data has been sent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 02:06:44 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 06:06:44 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1501222004.78.0.820350874244.issue31004@psf.upfronthosting.co.za> Terry J. Reedy added the comment: For steps 2 and 3, setUpClass will have to create or retrieve a reverence to the page class instance. For page functions, 'dialog' will have to be changed to 'self.page'. For hightlight and key pages, I will write the tests using 'self.page', which would start as a synonym for 'dialog' (set in setUpClass). I might convert GeneralTest before you copy it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 02:30:57 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Jul 2017 06:30:57 +0000 Subject: [issue29585] site.py imports relatively large `sysconfig` module. In-Reply-To: <1487325423.07.0.0763065668443.issue29585@psf.upfronthosting.co.za> Message-ID: <1501223457.19.0.771914486146.issue29585@psf.upfronthosting.co.za> Ned Deily added the comment: test_get_path fails on macOS installed framework builds: ====================================================================== FAIL: test_get_path (test.test_site.HelperFunctionsTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/nad/Projects/PyDev/active/dev/3x/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.7/lib/python3.7/test/test_site.py", line 188, in test_get_path sysconfig.get_path('purelib', os.name + '_user')) AssertionError: '/Users/nad/Library/pytest_10.12/3.7/lib/python/site-packages' != '/Users/nad/Library/pytest_10.12/3.7/lib/python3.7/site-packages' - /Users/nad/Library/pytest_10.12/3.7/lib/python/site-packages + /Users/nad/Library/pytest_10.12/3.7/lib/python3.7/site-packages ? +++ ---------------------------------------------------------------------- Ran 27 tests in 0.471s FAILED (failures=1, skipped=4) ---------- nosy: +ned.deily resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 02:43:24 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Jul 2017 06:43:24 +0000 Subject: [issue28095] test_startup_imports of test_site fails on OS X due to new import of enum in re In-Reply-To: <1473653670.12.0.946485115884.issue28095@psf.upfronthosting.co.za> Message-ID: <1501224204.38.0.310536441134.issue28095@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +2978 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 02:43:24 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Jul 2017 06:43:24 +0000 Subject: [issue29585] site.py imports relatively large `sysconfig` module. In-Reply-To: <1487325423.07.0.0763065668443.issue29585@psf.upfronthosting.co.za> Message-ID: <1501224204.46.0.57843342555.issue29585@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +2979 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 02:44:04 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 28 Jul 2017 06:44:04 +0000 Subject: [issue31064] test_ossaudiodev fails under padsp (Linux PulseAudio OSS emulation) Message-ID: <1501224244.81.0.688971970175.issue31064@psf.upfronthosting.co.za> New submission from Nick Coghlan: On current Fedora systems, test_ossaudiodev is implicitly skipped even when the audio resource is enabled due to the absence of the `/test/dsp` device: ``` $ ./python -m test -v -uaudio test_ossaudiodev [...] 0:00:00 load avg: 0.33 [1/1] test_ossaudiodev test_ossaudiodev skipped -- [Errno 2] No such file or directory: '/dev/dsp' test_ossaudiodev skipped 1 test skipped: test_ossaudiodev Total duration: 31 ms Tests result: SUCCESS ``` And while PulseAudio does provide an OpenSoundSystem emulation mode, it apparently isn't sufficient for the Python extension module's needs: ``` $ padsp ./python -m test -v -uaudio test_ossaudiodev [...] 0:00:00 load avg: 0.41 [1/1] test_ossaudiodev test_mixer_methods (test.test_ossaudiodev.OSSAudioDevTests) ... ok test_on_closed (test.test_ossaudiodev.OSSAudioDevTests) ... ok test_playback (test.test_ossaudiodev.OSSAudioDevTests) ... ERROR test_set_parameters (test.test_ossaudiodev.OSSAudioDevTests) ... ERROR test_with (test.test_ossaudiodev.OSSAudioDevTests) ... ok ====================================================================== ERROR: test_playback (test.test_ossaudiodev.OSSAudioDevTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ncoghlan/devel/cpython/Lib/test/test_ossaudiodev.py", line 148, in test_playback self.play_sound_file(*sound_info) File "/home/ncoghlan/devel/cpython/Lib/test/test_ossaudiodev.py", line 54, in play_sound_file dsp.bufsize() OSError: [Errno 22] Invalid argument ====================================================================== ERROR: test_set_parameters (test.test_ossaudiodev.OSSAudioDevTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ncoghlan/devel/cpython/Lib/test/test_ossaudiodev.py", line 153, in test_set_parameters self.set_parameters(dsp) File "/home/ncoghlan/devel/cpython/Lib/test/test_ossaudiodev.py", line 103, in set_parameters if (dsp.setfmt(fmt) == fmt and OSError: [Errno 22] Invalid argument ---------------------------------------------------------------------- Ran 5 tests in 0.016s FAILED (errors=2) test test_ossaudiodev failed test_ossaudiodev failed 1 test failed: test_ossaudiodev Total duration: 55 ms Tests result: FAILURE [ncoghlan at thechalk cpython]$ padsp ./python -m test -uaudio test_ossaudiodev Run tests sequentially 0:00:00 load avg: 0.42 [1/1] test_ossaudiodev test test_ossaudiodev failed -- multiple errors occurred; run in verbose mode for details test_ossaudiodev failed 1 test failed: test_ossaudiodev Total duration: 35 ms Tests result: FAILURE ``` The reason I'm filing this here rather than downstream in Fedora is because I'm uncertain whether or not we actually need to worry about it: the module's presumably been broken in practice on Linux for years, and I only noticed it today due to a discussion about Python easter eggs that got me wondering why it had been so long since I'd heard the audio file of Guido speaking when running the tests with `-uall`. ---------- messages: 299369 nosy: barry, encukou, ncoghlan priority: normal severity: normal status: open title: test_ossaudiodev fails under padsp (Linux PulseAudio OSS emulation) type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 02:44:59 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 28 Jul 2017 06:44:59 +0000 Subject: [issue31064] test_ossaudiodev fails under padsp (Linux PulseAudio OSS emulation) In-Reply-To: <1501224244.81.0.688971970175.issue31064@psf.upfronthosting.co.za> Message-ID: <1501224299.8.0.771434862126.issue31064@psf.upfronthosting.co.za> Nick Coghlan added the comment: Adding Matthias to the nosy list as Debian Python maintainer. ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 03:02:13 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Jul 2017 07:02:13 +0000 Subject: [issue29585] site.py imports relatively large `sysconfig` module. In-Reply-To: <1487325423.07.0.0763065668443.issue29585@psf.upfronthosting.co.za> Message-ID: <1501225333.23.0.91226013553.issue29585@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset c22bd58d933efaec26d1f77f263b2845473b7e15 by Ned Deily in branch 'master': bpo-28095: Re-enable temporarily disabled part of test_startup_imports on macOS (#2927) https://github.com/python/cpython/commit/c22bd58d933efaec26d1f77f263b2845473b7e15 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 03:02:13 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Jul 2017 07:02:13 +0000 Subject: [issue28095] test_startup_imports of test_site fails on OS X due to new import of enum in re In-Reply-To: <1473653670.12.0.946485115884.issue28095@psf.upfronthosting.co.za> Message-ID: <1501225333.37.0.956666668974.issue28095@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset c22bd58d933efaec26d1f77f263b2845473b7e15 by Ned Deily in branch 'master': bpo-28095: Re-enable temporarily disabled part of test_startup_imports on macOS (#2927) https://github.com/python/cpython/commit/c22bd58d933efaec26d1f77f263b2845473b7e15 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 03:11:45 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Jul 2017 07:11:45 +0000 Subject: [issue28095] test_startup_imports of test_site fails on OS X due to new import of enum in re In-Reply-To: <1473653670.12.0.946485115884.issue28095@psf.upfronthosting.co.za> Message-ID: <1501225905.58.0.427574230371.issue28095@psf.upfronthosting.co.za> Ned Deily added the comment: The changes for bpo-29585 to speed up startup removed the import of _osx_support, and of re, from site.py so the disabled test does not fail in 3.7 and is now re-enabled. It's not appropriate to try to backport the startup speedup changes to 3.6, so the disabled portion of the test remains disabled on 3.6.x macOS. ---------- priority: deferred blocker -> resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 03:57:42 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 28 Jul 2017 07:57:42 +0000 Subject: [issue31058] FileFinder fails to find modules for import if modules are created at runtime and don't result in a directory mtime update In-Reply-To: <1501178374.54.0.548179478476.issue31058@psf.upfronthosting.co.za> Message-ID: <1501228662.96.0.244579784334.issue31058@psf.upfronthosting.co.za> Nick Coghlan added the comment: This is a known limitation of the import caching mechanism, and is the key reason https://docs.python.org/3/library/importlib.html#importlib.invalidate_caches is offered as a supported public API. Ideally, the code that is dynamically creating packages at runtime will be calling that itself, but if it isn't, then the integrating application needs to take care of calling it at appropriate points in the program execution. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 04:25:38 2017 From: report at bugs.python.org (insomniacslk) Date: Fri, 28 Jul 2017 08:25:38 +0000 Subject: [issue31020] Add support for custom compressor in tarfile In-Reply-To: <1500930321.52.0.338757047173.issue31020@psf.upfronthosting.co.za> Message-ID: <1501230338.12.0.621614478477.issue31020@psf.upfronthosting.co.za> insomniacslk added the comment: The documentation should be updated to suggest that a custom file-like object can be passed to have custom compressors then. However this sounds very hacky and definitely not a feature that can be easily passed to the user. Hence the reason for a cleaner, explicitly advertised interface. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 04:30:26 2017 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 28 Jul 2017 08:30:26 +0000 Subject: [issue30995] Support logging.getLogger(style='{') In-Reply-To: <1500773395.26.0.78055303667.issue30995@psf.upfronthosting.co.za> Message-ID: <1501230626.03.0.311473085089.issue30995@psf.upfronthosting.co.za> Vinay Sajip added the comment: > Which third-party libraries? > It is my code in my file. If a feature is added to logging, anyone can use it. If people put style-specific loggers in libraries they write, and other people then use those libraries, then there may be a need for them to worry about which style the library loggers use. Perhaps you don't log to loggers in other people's modules, but it's something which is allowed in logging, and useful in some scenarios. > Yes, I have read it, used it, didn't like it. These things are matters of opinion and taste. It doesn't seem cumbersome to me, but it seems cumbersome to you. Well, you can subclass Logger to add the new functionality and use it in your code. Why don't you try doing that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 05:07:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 09:07:44 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1501232864.43.0.481288257403.issue5288@psf.upfronthosting.co.za> STINNER Victor added the comment: James Henstridge: > The Olson time zone database (used by most UNIX systems and Mac OS X) has a number of time zones with historic offsets that use second resolution (from before those locations switched to a rounded offset from GMT). Ok for increasing the resolution to seconds. But PR 2896 increases the resolution to microseconds. What is the rationale for supporting microseconds? I would prefer to only accept microseconds=0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 06:30:57 2017 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Jul 2017 10:30:57 +0000 Subject: [issue31065] Documentation for Popen.poll is unclear Message-ID: <1501237857.05.0.15004204926.issue31065@psf.upfronthosting.co.za> New submission from Mark Dickinson: The documentation for Popen.poll says: > Check if child process has terminated. Set and return returncode attribute. This requires the reader to guess that if the child process has not terminated, the call returns immediately, with a return value of ``None``. It would be good to be explicit about this. ---------- assignee: docs at python components: Documentation messages: 299378 nosy: docs at python, mark.dickinson priority: normal severity: normal status: open title: Documentation for Popen.poll is unclear versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 06:31:17 2017 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Jul 2017 10:31:17 +0000 Subject: [issue31065] Documentation for Popen.poll is unclear In-Reply-To: <1501237857.05.0.15004204926.issue31065@psf.upfronthosting.co.za> Message-ID: <1501237877.79.0.806607624697.issue31065@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 07:16:21 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 28 Jul 2017 11:16:21 +0000 Subject: [issue29585] site.py imports relatively large `sysconfig` module. In-Reply-To: <1487325423.07.0.0763065668443.issue29585@psf.upfronthosting.co.za> Message-ID: <1501240581.45.0.0636833208522.issue29585@psf.upfronthosting.co.za> INADA Naoki added the comment: https://docs.python.org/3.6/library/site.html#site.USER_SITE > ~/Library/Python/X.Y/lib/python/site-packages for Mac framework builds So it seems I broke sysconfig.get_path('purelib', 'posix_user'). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 07:20:22 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 28 Jul 2017 11:20:22 +0000 Subject: [issue29585] site.py imports relatively large `sysconfig` module. In-Reply-To: <1487325423.07.0.0763065668443.issue29585@psf.upfronthosting.co.za> Message-ID: <1501240822.96.0.230468077193.issue29585@psf.upfronthosting.co.za> INADA Naoki added the comment: https://github.com/python/cpython/pull/136/files - if sys.platform == 'darwin': - from sysconfig import get_config_var - if get_config_var('PYTHONFRAMEWORK'): - USER_SITE = get_path('purelib', 'osx_framework_user') - return USER_SITE + if USER_SITE is None: + USER_SITE = _get_path(userbase) OK, I need to use `osx_framework_user` instead of os.name + '_user' on framework build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 07:27:37 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 28 Jul 2017 11:27:37 +0000 Subject: [issue29585] site.py imports relatively large `sysconfig` module. In-Reply-To: <1487325423.07.0.0763065668443.issue29585@psf.upfronthosting.co.za> Message-ID: <1501241257.21.0.413794409082.issue29585@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +2980 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 07:58:44 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Fri, 28 Jul 2017 11:58:44 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1501243124.35.0.157217087998.issue30302@psf.upfronthosting.co.za> Changes by Utkarsh Upadhyay : ---------- pull_requests: +2981 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 08:00:22 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Fri, 28 Jul 2017 12:00:22 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1501243222.32.0.72623248592.issue30302@psf.upfronthosting.co.za> Utkarsh Upadhyay added the comment: Thanks for the merge haypo! \o/ I've also created a PR for adding an entry to 'Porting to Python 3.7' in the documentation; I see no harm in including it in the documentation just-in-case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 08:02:06 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 28 Jul 2017 12:02:06 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501243326.24.0.433739181095.issue30853@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Instead 'hackish', maybe I should have used 'magic'. The overloading just wasn't obvious to me, meaning I have: self.font_bold = tracers.add(BooleanVar(parent), self.var_changed_font) self.space_num = tracers.add(IntVar(parent), ('main', 'Indent', 'num-spaces')) We defined VarTrace as being (var, callback) pairs and the second example isn't sending a function. So, even though I understand what we're doing, I wanted to ask about using different names for my own education. I was even thinking of a different interface -- add(var, callback=default, config=None) If config was specified even for the non-default callbacks, then each var could have its config defined at create time instead of in the var_changed* function. This wouldn't work for theme/keys `name` and `name2` though (I think that's the only one with two add_option calls). If the callback didn't have a changes.add_option, then it can send None for config. I hadn't thought of separating `parent`, but I like that idea. It fits in with the rest of how the widgets are created. So, if both changes were incorporated: self.font_bold = tracers.add(parent, BooleanVar, callback=self.var_changed_font, config=('main', 'EditorWindow', 'font-bold')) self.space_num = tracers.add(parent, IntVar, callback=default, config=('main', 'Indent', 'num-spaces')) Maybe that expands VarTrace too much? Or maybe instead of (var, callback) pairs, it's a dictionary? tracers = {var: (callback, config)} And then the non-default var_changed methods could use: changes.add_option(*tracers[var].config, value) Wouldn't work for var_changed_font because that has the three add_option calls. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 08:28:22 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 28 Jul 2017 12:28:22 +0000 Subject: [issue29585] site.py imports relatively large `sysconfig` module. In-Reply-To: <1487325423.07.0.0763065668443.issue29585@psf.upfronthosting.co.za> Message-ID: <1501244902.92.0.479698443667.issue29585@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset ba9ddb7eea39a651ba7f1ab3eb012e4129c03620 by INADA Naoki in branch 'master': bpo-29585: fix test fail on macOS Framework build (GH-2928) https://github.com/python/cpython/commit/ba9ddb7eea39a651ba7f1ab3eb012e4129c03620 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 08:35:27 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 28 Jul 2017 12:35:27 +0000 Subject: [issue29585] site.py imports relatively large `sysconfig` module. In-Reply-To: <1487325423.07.0.0763065668443.issue29585@psf.upfronthosting.co.za> Message-ID: <1501245327.45.0.419841154569.issue29585@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 08:42:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 12:42:59 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1501245779.26.0.427781180572.issue30302@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8e45318b0d8df9340ac41b1d0447ffc83c7f5102 by Victor Stinner (Utkarsh Upadhyay) in branch 'master': bpo-30302: Update WhatsNew and documentation. (#2929) https://github.com/python/cpython/commit/8e45318b0d8df9340ac41b1d0447ffc83c7f5102 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 09:14:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 13:14:47 +0000 Subject: [issue31066] FAIL: test_last_modified (test.test_httpservers.SimpleHTTPServerTestCase), on AMD64 Windows8.1 Non-Debug 3.x Message-ID: <1501247687.43.0.10310040726.issue31066@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%203.x/builds/985/steps/test/logs/stdio ====================================================================== FAIL: test_last_modified (test.test_httpservers.SimpleHTTPServerTestCase) Checks that the datetime returned in Last-Modified response header ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\3.x.ware-win81-release\build\lib\test\test_httpservers.py", line 512, in test_last_modified self.assertEqual(last_modif_header, self.last_modif_header) AssertionError: 'Fri, 28 Jul 2017 01:20:09 GMT' != 'Fri, 28 Jul 2017 01:20:06 GMT' - Fri, 28 Jul 2017 01:20:09 GMT ? ^ + Fri, 28 Jul 2017 01:20:06 GMT ? ^ ---------- components: Tests messages: 299385 nosy: haypo priority: normal severity: normal status: open title: FAIL: test_last_modified (test.test_httpservers.SimpleHTTPServerTestCase), on AMD64 Windows8.1 Non-Debug 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 09:41:49 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 28 Jul 2017 13:41:49 +0000 Subject: [issue31057] pydoc for tempfile.TemporaryDirectory should say it returns the name In-Reply-To: <1501167953.07.0.778065697758.issue31057@psf.upfronthosting.co.za> Message-ID: <1501249309.22.0.467333987047.issue31057@psf.upfronthosting.co.za> R. David Murray added the comment: Boy, I wasn't thinking very clearly when I wrote that. As pointed out on the PR, tempfile.TemporaryDirectory of course returns a TemporaryDirectory object. That's in the nature of Python. I was reading so poorly that I didn't even notice it was the docstring you were modifying :( The main docs phrase this more clearly, especially the sentence that says the name can be retrieved from the name property (and I see I was wrong, it does use 'name', not 'path'). We don't want to copy all of the text from there, but it could be used as a model to improve the phrasing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 09:48:31 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 28 Jul 2017 13:48:31 +0000 Subject: [issue31065] Documentation for Popen.poll is unclear In-Reply-To: <1501237857.05.0.15004204926.issue31065@psf.upfronthosting.co.za> Message-ID: <1501249711.42.0.803022914515.issue31065@psf.upfronthosting.co.za> R. David Murray added the comment: Yes we can add "otherwise return None". However it is pretty clear as is, since "poll" implies an immediate return, and if there's no return code to return, the logical value in Python to get back is None :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 10:20:25 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 28 Jul 2017 14:20:25 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501251625.16.0.681385638843.issue30853@psf.upfronthosting.co.za> Cheryl Sabella added the comment: "Either *add* or *make_callback* could check len = 3 and callback[0] in idleConf.config_types, with a test added." I didn't add this because I wasn't sure what you wanted to happen if it wasn't right. I suspect it should fail gracefully (not break IDLE), but in what way? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 10:40:36 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 28 Jul 2017 14:40:36 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1501252836.13.0.858624563183.issue5288@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Victor, Tim called for removal of all restrictions on the offsets. See msg248468. I left the range restriction intact because we have some algorithms that rely on that, but in general I agree with Tim. There is nothing to be gained from restricting the offsets. It is just some extra code to enforce gratuitous limitations. Note that Olson's database limits its precision to seconds for historical reasons. The mean solar time offsets that they record are known to subsecond precision. I did add a few lines of code to support subsecond formatting, but at some point we should be able to unify timedelta and timezone formatting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 10:42:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 14:42:52 +0000 Subject: [issue31067] test_subprocess.test_leak_fast_process_del_killed() fails randomly on AMD64 FreeBSD 10.x Shared 3.6 Message-ID: <1501252972.97.0.198077467946.issue31067@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.6/builds/355/steps/test/logs/stdio ====================================================================== FAIL: test_leak_fast_process_del_killed (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/test_subprocess.py", line 2434, in test_leak_fast_process_del_killed self.assertRaises(OSError, os.waitpid, pid, 0) AssertionError: OSError not raised by waitpid ---------- components: Tests messages: 299390 nosy: haypo priority: normal severity: normal status: open title: test_subprocess.test_leak_fast_process_del_killed() fails randomly on AMD64 FreeBSD 10.x Shared 3.6 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 10:54:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 14:54:46 +0000 Subject: [issue31067] test_subprocess.test_leak_fast_process_del_killed() fails randomly on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1501252972.97.0.198077467946.issue31067@psf.upfronthosting.co.za> Message-ID: <1501253686.44.0.301397749979.issue31067@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2982 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 10:59:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 14:59:47 +0000 Subject: [issue31068] test_ttk_guionly hangs on AMD64 Windows8.1 Refleaks 2.7 Message-ID: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> New submission from STINNER Victor: Builds: * 52: build interrupted after 132 hours * 53: test_ttk_guionly passed * 54: test_ttk_guionly passed * 55: build interrupted after 14 hours Example: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%202.7/builds/52/steps/test/logs/stdio ... running: test_ttk_guionly (472605 sec) running: test_ttk_guionly (472635 sec) running: test_ttk_g command interrupted, attempting to kill program finished with exit code 1 elapsedTime=475847.190000 ---------- components: Tests, Tkinter messages: 299391 nosy: haypo priority: normal severity: normal status: open title: test_ttk_guionly hangs on AMD64 Windows8.1 Refleaks 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 11:02:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 15:02:05 +0000 Subject: [issue31069] test_multiprocessing_spawn leaked a process on AMD64 Windows8.1 Refleaks 3.x Message-ID: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> New submission from STINNER Victor: It's just a warning, but later I would like to make a buildbot fail on such warnings, so I would like to first fix all these warnings. http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.x/builds/59/steps/test/logs/stdio 0:46:17 [119/406] test_multiprocessing_spawn passed (2667 sec) -- running: test_asyncio (290 sec), test_userstring (54 sec), test_regrtest (471 sec) beginning 6 repetitions 123456 ...Warning -- Dangling processes: {} ... ---------- components: Tests messages: 299392 nosy: haypo priority: normal severity: normal status: open title: test_multiprocessing_spawn leaked a process on AMD64 Windows8.1 Refleaks 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 11:03:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 15:03:41 +0000 Subject: [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb on AMD64 Windows8.1 Refleaks 3.x Message-ID: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> New submission from STINNER Victor: See bpo-bpo-30891 and bpo-30876 for recent changes in importlib. http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.x/builds/57/steps/test/logs/stdio 1:33:30 [312/406/2] test_threaded_import passed (30 sec) -- running: test_decimal (826 sec), test_set (84 sec), test_mmap (1151 sec) beginning 6 repetitions 123456 ...Exception ignored in: .cb at 0x000000813CA18EB8> Traceback (most recent call last): File "", line 176, in cb KeyError: ('random',) ... ---------- components: Tests messages: 299393 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: test_threaded_import: KeyError ignored in _get_module_lock..cb on AMD64 Windows8.1 Refleaks 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 11:06:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 15:06:57 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1501254417.35.0.258765107468.issue5288@psf.upfronthosting.co.za> STINNER Victor added the comment: > I did add a few lines of code to support subsecond formatting, but at some point we should be able to unify timedelta and timezone formatting. My concern is that it makes timestamp parsing more complex because we would have to handle the theorical case of timezone with microsecond precision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 11:10:46 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 28 Jul 2017 15:10:46 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1501254646.2.0.45707561088.issue5288@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > My concern is that it makes timestamp parsing more complex To the contrary. The timezone field can now be parsed the same way as the time field plus the sign. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 11:29:27 2017 From: report at bugs.python.org (=?utf-8?q?Josef_Kemetm=C3=BCller?=) Date: Fri, 28 Jul 2017 15:29:27 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1501255767.95.0.881729040525.issue1222585@psf.upfronthosting.co.za> Josef Kemetm?ller added the comment: python-3.4-distutils-C++.patch with changes of Erik Hvatum applied. ---------- nosy: +Josef Kemetm?ller Added file: http://bugs.python.org/file47045/python-3.x-distutils-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 11:30:51 2017 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Jul 2017 15:30:51 +0000 Subject: [issue31065] Documentation for Popen.poll is unclear In-Reply-To: <1501237857.05.0.15004204926.issue31065@psf.upfronthosting.co.za> Message-ID: <1501255851.06.0.919390227129.issue31065@psf.upfronthosting.co.za> Mark Dickinson added the comment: Right, after following the source, I realise that `poll` is indeed returning `self.returncode` in all cases, and if the process hasn't terminated yet then `self.returncode` is still at its initial value of `None`. I can think of other ways that the result could potentially be indicated, though: when I poll, I'm asking whether the child process is still running or not, so a boolean result wouldn't be unreasonable. Or perhaps an exception (like doing `get(block=False)` on a queue does). I don't there's a good reason not to be explicit here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 11:31:22 2017 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Jul 2017 15:31:22 +0000 Subject: [issue31065] Documentation for Popen.poll is unclear In-Reply-To: <1501237857.05.0.15004204926.issue31065@psf.upfronthosting.co.za> Message-ID: <1501255882.39.0.529552641249.issue31065@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I don't there's I don't *think* there's ... Stupid fingers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 11:44:14 2017 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Jul 2017 15:44:14 +0000 Subject: [issue29070] Integration tests for pty.spawn on Linux and all other platforms In-Reply-To: <1482684225.17.0.467768789806.issue29070@psf.upfronthosting.co.za> Message-ID: <1501256654.01.0.162854229248.issue29070@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +2983 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 11:44:14 2017 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Jul 2017 15:44:14 +0000 Subject: [issue26228] pty.spawn hangs on FreeBSD 9.3, 10.x In-Reply-To: <1453953861.58.0.104331734212.issue26228@psf.upfronthosting.co.za> Message-ID: <1501256654.15.0.60425964212.issue26228@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +2984 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 11:51:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 15:51:11 +0000 Subject: [issue31041] test_handle_called_with_mp_queue() of test_logging: threading_cleanup() failed to cleanup, on AMD64 FreeBSD 10.x Shared 3.x In-Reply-To: <1501030445.94.0.683702784342.issue31041@psf.upfronthosting.co.za> Message-ID: <1501257071.46.0.0955559412996.issue31041@psf.upfronthosting.co.za> STINNER Victor added the comment: I ran "./python -m test -v test_logging --fail-env-changed -F" in 3 terminals on the FreeBSD 10 buildbot, and I failed to reproduce the bug. I ran my test for 5 minutes. Maybe threading_cleanup() should call support.gc_collect(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 11:57:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 15:57:39 +0000 Subject: [issue31066] FAIL: test_last_modified (test.test_httpservers.SimpleHTTPServerTestCase), on AMD64 Windows8.1 Non-Debug 3.x In-Reply-To: <1501247687.43.0.10310040726.issue31066@psf.upfronthosting.co.za> Message-ID: <1501257459.91.0.642468781049.issue31066@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +2985 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 12:00:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 16:00:16 +0000 Subject: [issue31066] FAIL: test_last_modified (test.test_httpservers.SimpleHTTPServerTestCase), on AMD64 Windows8.1 Non-Debug 3.x In-Reply-To: <1501247687.43.0.10310040726.issue31066@psf.upfronthosting.co.za> Message-ID: <1501257616.7.0.0570389636843.issue31066@psf.upfronthosting.co.za> STINNER Victor added the comment: I can reproduce the failure if I insert time.sleep(1) after os.fstat(). Attached PR should fix the race condition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 12:00:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 16:00:25 +0000 Subject: [issue31067] test_subprocess.test_leak_fast_process_del_killed() fails randomly on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1501252972.97.0.198077467946.issue31067@psf.upfronthosting.co.za> Message-ID: <1501257625.11.0.490553414117.issue31067@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset cc42c121eb5346f673247f95dac575aadb77d66c by Victor Stinner in branch 'master': bpo-31067: test_subprocess calls reap_children() (#2931) https://github.com/python/cpython/commit/cc42c121eb5346f673247f95dac575aadb77d66c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 12:03:22 2017 From: report at bugs.python.org (Stefan Pochmann) Date: Fri, 28 Jul 2017 16:03:22 +0000 Subject: [issue31071] Bad error message about maps not iterable Message-ID: <1501257802.36.0.460267167585.issue31071@psf.upfronthosting.co.za> New submission from Stefan Pochmann: Python 3.6 makes it sound like maps aren't iterable: >>> map(str, *map(int, [[]])) Traceback (most recent call last): File "", line 1, in map(str, *map(int, [[]])) TypeError: type object argument after * must be an iterable, not map More, including a likely explanation, in my question and its answer here: https://stackoverflow.com/q/45363330/1672429 Apparently the TypeError from int([]) gets mistaken for a TypeError indicating non-iterability of the map object. ---------- messages: 299402 nosy: Stefan Pochmann priority: normal severity: normal status: open title: Bad error message about maps not iterable type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 12:04:54 2017 From: report at bugs.python.org (=?utf-8?q?Josef_Kemetm=C3=BCller?=) Date: Fri, 28 Jul 2017 16:04:54 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1501257894.64.0.0050191044904.issue1222585@psf.upfronthosting.co.za> Josef Kemetm?ller added the comment: python-3.4-distutils-C++.patch with Erik Hvatum's suggestions applied. ---------- Added file: http://bugs.python.org/file47046/python-3.x-distutils-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 12:15:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 16:15:04 +0000 Subject: [issue31066] FAIL: test_last_modified (test.test_httpservers.SimpleHTTPServerTestCase), on AMD64 Windows8.1 Non-Debug 3.x In-Reply-To: <1501247687.43.0.10310040726.issue31066@psf.upfronthosting.co.za> Message-ID: <1501258504.58.0.448813918681.issue31066@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 28ce07ae9e34c70eea6b52515c7e00001cefd41e by Victor Stinner in branch 'master': bpo-31066: Fix test_httpservers.test_last_modified() (#2933) https://github.com/python/cpython/commit/28ce07ae9e34c70eea6b52515c7e00001cefd41e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 12:19:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 16:19:12 +0000 Subject: [issue31066] FAIL: test_last_modified (test.test_httpservers.SimpleHTTPServerTestCase), on AMD64 Windows8.1 Non-Debug 3.x In-Reply-To: <1501247687.43.0.10310040726.issue31066@psf.upfronthosting.co.za> Message-ID: <1501258752.76.0.0239933011984.issue31066@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 12:19:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 16:19:47 +0000 Subject: [issue29654] SimpleHTTPRequestHandler should support browser cache In-Reply-To: <1488057635.77.0.128841709763.issue29654@psf.upfronthosting.co.za> Message-ID: <1501258787.82.0.643432361437.issue29654@psf.upfronthosting.co.za> STINNER Victor added the comment: FYI there was a race condition, impacting Windows. I just fixed it: bpo-31066, commit 28ce07ae9e34c70eea6b52515c7e00001cefd41e. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 12:22:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 16:22:41 +0000 Subject: [issue31022] ERROR: testRegularFile (test.test_socket.SendfileUsingSendTest) random failure on AppVeyor In-Reply-To: <1500942970.9.0.437902553095.issue31022@psf.upfronthosting.co.za> Message-ID: <1501258961.54.0.44084110028.issue31022@psf.upfronthosting.co.za> STINNER Victor added the comment: I tried to reproduce the bug on my Windows 8.1 VM. I ran the test more than 1,000 times. In parallel, I ran "python -m test -j0 -rW" to increase the system load, but it wasn't enough to reproduce the bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 12:38:17 2017 From: report at bugs.python.org (Paul Goins) Date: Fri, 28 Jul 2017 16:38:17 +0000 Subject: [issue31058] FileFinder fails to find modules for import if modules are created at runtime and don't result in a directory mtime update In-Reply-To: <1501178374.54.0.548179478476.issue31058@psf.upfronthosting.co.za> Message-ID: <1501259897.57.0.935471724979.issue31058@psf.upfronthosting.co.za> Paul Goins added the comment: Ack; missed that. Thanks, and sorry for the noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 12:45:13 2017 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Jul 2017 16:45:13 +0000 Subject: [issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors In-Reply-To: <1496753379.54.0.823104830335.issue30581@psf.upfronthosting.co.za> Message-ID: <1501260313.03.0.860100038164.issue30581@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +2986 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 12:48:54 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 28 Jul 2017 16:48:54 +0000 Subject: [issue31065] Documentation for Popen.poll is unclear In-Reply-To: <1501237857.05.0.15004204926.issue31065@psf.upfronthosting.co.za> Message-ID: <1501260534.47.0.141191243833.issue31065@psf.upfronthosting.co.za> R. David Murray added the comment: Agreed. Explicit is good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 12:50:52 2017 From: report at bugs.python.org (Irmen de Jong) Date: Fri, 28 Jul 2017 16:50:52 +0000 Subject: [issue31072] add filter to zipapp Message-ID: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> New submission from Irmen de Jong: As briefly discussed on comp.lang.python, I propose to add an optional filter callback function to zipapp.create_archive. The function could perhaps work like the os.walk generator or maybe just lets you to return a simple boolean for every folder/file that it wants to include in the zip. My use case is that I sometimes don't want to include every file in the root folder into the zip file (I want to be able to skip temporary or irrelevant folders such as .git/.svn, .tox, .tmp and sometimes want to avoid including *.pyc/*.pyo files). Right now, I first have to manually clean up the folder before I can use zipapp.create_archive. (Instead of providing a filter callback fuction, another approach may be to provide your own dir/file generator instead, that fully replaces the internal file listing logic of zipapp.create_archive?) ---------- assignee: paul.moore components: Library (Lib) keywords: easy messages: 299409 nosy: irmen, paul.moore priority: normal severity: normal status: open title: add filter to zipapp type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 13:06:29 2017 From: report at bugs.python.org (Paul Moore) Date: Fri, 28 Jul 2017 17:06:29 +0000 Subject: [issue31072] add filter to zipapp In-Reply-To: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> Message-ID: <1501261589.15.0.913821735469.issue31072@psf.upfronthosting.co.za> Paul Moore added the comment: I'd propose an extra argument to zipapp.create_archive, include_file=None (feel free to bikeshed on the name). If the argument is not None, then it should be a callable which will be called with a pathlib.Path object for each file that's selected for inclusion in the archive. The function should return a boolean - False means don't include this file. Because the create_archive function only gets a list of files internally (it uses Path.rglob()), the callable won't get passed directories, only the actual files (but it can of course check the full path to see what directory the file is in). The include_file argument is ignored when copying anything other than a filesystem directory (i.e., when the source argument is a filename or an open file object). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 13:07:53 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 28 Jul 2017 17:07:53 +0000 Subject: [issue31071] *args unpacking can mask TypeErrors In-Reply-To: <1501257802.36.0.460267167585.issue31071@psf.upfronthosting.co.za> Message-ID: <1501261673.24.0.0735683261231.issue31071@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the report. Retitling because this has nothing to do with map: >>> def foo(*args): ... raise TypeError('fake') ... yield 1 ... >>> foo(1, *foo()) Traceback (most recent call last): File "", line 1, in TypeError: foo() argument after * must be an iterable, not generator >>> foo(*foo()) Traceback (most recent call last): File "", line 1, in File "", line 2, in foo TypeError: fake ---------- nosy: +r.david.murray stage: -> needs patch title: Bad error message about maps not iterable -> *args unpacking can mask TypeErrors versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 13:24:34 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 28 Jul 2017 17:24:34 +0000 Subject: [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv In-Reply-To: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> Message-ID: <1501262674.72.0.608682012314.issue31024@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: The fact that it is a class is an implementation detail and may change before Python 3.7 beta (situation is the same for Callable). Guido explicitly doesn't like to "advertise" it as a class yet. Unless he changed his mind, I would propose to close the issue, and instead consider treating this special case in Sphinx. ---------- nosy: +gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 13:32:26 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 28 Jul 2017 17:32:26 +0000 Subject: [issue31006] typing.NamedTuple should add annotations to its constructor (__new__) parameters. In-Reply-To: <1500887267.27.0.393959457135.issue31006@psf.upfronthosting.co.za> Message-ID: <1501263146.17.0.304540943695.issue31006@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: This looks like a reasonable idea, if it is possible to implement this without complications. Would you like to submit a PR at https://github.com/python/typing ? (We have a separate upstream repo for typing while it is provisional.) ---------- nosy: +levkivskyi stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 13:33:21 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 28 Jul 2017 17:33:21 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1501222004.78.0.820350874244.issue31004@psf.upfronthosting.co.za> Message-ID: Cheryl Sabella added the comment: OK, once 30853 is merged, I'll recopy the font code into the class. On Fri, Jul 28, 2017 at 2:06 AM, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > For steps 2 and 3, setUpClass will have to create or retrieve a reverence > to the page class instance. For page functions, 'dialog' will have to be > changed to 'self.page'. For hightlight and key pages, I will write the > tests using 'self.page', which would start as a synonym for 'dialog' (set > in setUpClass). I might convert GeneralTest before you copy it. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 13:43:16 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Jul 2017 17:43:16 +0000 Subject: [issue30992] Invalid PGP Key Prevents Archive Validation In-Reply-To: <1500738803.82.0.333391248268.issue30992@psf.upfronthosting.co.za> Message-ID: <1501263796.53.0.389073439925.issue30992@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report. I have opened https://github.com/python/pythondotorg/pull/1109 to remove the obsolete MD5 key from the pubkeys file. Until the updated file is deployed and the website page updated, another workaround may be to use the --allow-weak-digest-algos option of gpg: gpg --import --allow-weak-digest-algos pubkeys.txt In general, problems with the python.org website should be reported on its issue tracker: https://www.python.org/about/help/ https://github.com/python/pythondotorg/issues ---------- nosy: +ned.deily resolution: -> third party stage: -> resolved status: open -> closed type: security -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 13:49:02 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 28 Jul 2017 17:49:02 +0000 Subject: [issue31056] Import Module Not Working According To Documentation Python 3.6.2 In-Reply-To: <1501167395.04.0.978474352938.issue31056@psf.upfronthosting.co.za> Message-ID: <1501264142.42.0.29299575353.issue31056@psf.upfronthosting.co.za> Brett Cannon added the comment: I also can't reproduce on Python 3.6 on Windows 10, so I'm closing this. Looking at your SO question I noticed you didn't specify `python3` but `python` which suggests a venv, so I'm wondering if that's mucking with things? You also don't need to add __init__.py as long as you're executing within the directory (which it seems you are based on how you explained things). Basically you should be able to print out sys.path and see if the directory containing your code is listed there. If it isn't then something wonky is going on with your environment. But if you are executing the code from outside the directory then do realize that Python 3 no longer supports implicit relative imports so module_a won't be picked up in a package context (that would require `from . import module_a`). ---------- nosy: +brett.cannon resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 13:50:23 2017 From: report at bugs.python.org (Dirkjan Ochtman) Date: Fri, 28 Jul 2017 17:50:23 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1501264223.83.0.36958761054.issue1222585@psf.upfronthosting.co.za> Changes by Dirkjan Ochtman : ---------- nosy: -djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 13:56:50 2017 From: report at bugs.python.org (Irmen de Jong) Date: Fri, 28 Jul 2017 17:56:50 +0000 Subject: [issue31072] add filter to zipapp In-Reply-To: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> Message-ID: <1501264610.7.0.945682588552.issue31072@psf.upfronthosting.co.za> Irmen de Jong added the comment: That sounds fine to me. I guess the paths passed to the function should be relative to the root folder being zipped? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 14:26:22 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 28 Jul 2017 18:26:22 +0000 Subject: [issue26732] multiprocessing sentinel resource leak In-Reply-To: <1460325501.58.0.225914662536.issue26732@psf.upfronthosting.co.za> Message-ID: <1501266382.51.0.125206383248.issue26732@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Victor, you can try to backport the fix, it should be interesting, though I suspect you will run into conflicts :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 14:27:51 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 28 Jul 2017 18:27:51 +0000 Subject: [issue26732] multiprocessing sentinel resource leak In-Reply-To: <1460325501.58.0.225914662536.issue26732@psf.upfronthosting.co.za> Message-ID: <1501266471.31.0.603785559173.issue26732@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Kevin: > Regarding your comment regarding the behavior being expected with the "fork" method, I would suggest a documentation modification in the description of the fork method to add something to the effect of "All resources of the parent are inherited by the child process; this includes the ability of later children to act as the parent of earlier children via the various functions in this package." I would rather keep the latter part ("the ability of later children to act as the parent of earlier children via the various functions in this package") an implementation detail rather than a documented feature. Who knows, perhaps some day we'll change the implementation so that those are not inherited anymore. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 14:41:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 18:41:03 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501267263.46.0.403421007034.issue30853@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 5b59154c0d3d91c0766b9177f6b737b1abcbf3f6 by Terry Jan Reedy (csabella) in branch 'master': bpo-30853: IDLE: Convert font and general vars to use VarTrace (#2914) https://github.com/python/cpython/commit/5b59154c0d3d91c0766b9177f6b737b1abcbf3f6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 14:43:05 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 18:43:05 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501267385.67.0.968035502629.issue30853@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2987 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 15:03:46 2017 From: report at bugs.python.org (Alexander Mohr) Date: Fri, 28 Jul 2017 19:03:46 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501268626.5.0.228188591541.issue31061@psf.upfronthosting.co.za> Alexander Mohr added the comment: so looks like disabling the _asyncio module just caused the crash to happen less often, closing and will continue investigating after a get a core file ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 15:11:04 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 28 Jul 2017 19:11:04 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501269064.22.0.814845222873.issue31061@psf.upfronthosting.co.za> Yury Selivanov added the comment: > so looks like disabling the _asyncio module just caused the crash to happen less often, closing and will continue investigating after a get a core file Interesting. So it crashes even with pure Python Future/Task implementations? Another idea to debug this is to try to see what happens when you run your code with CFuture and PyTask, and with PyFuture/CTask. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 15:17:24 2017 From: report at bugs.python.org (Paul Moore) Date: Fri, 28 Jul 2017 19:17:24 +0000 Subject: [issue31072] add filter to zipapp In-Reply-To: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> Message-ID: <1501269444.09.0.826270553917.issue31072@psf.upfronthosting.co.za> Paul Moore added the comment: Yes, they can be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 15:24:23 2017 From: report at bugs.python.org (Steve Holden) Date: Fri, 28 Jul 2017 19:24:23 +0000 Subject: [issue26732] multiprocessing sentinel resource leak In-Reply-To: <1460325501.58.0.225914662536.issue26732@psf.upfronthosting.co.za> Message-ID: <1501269863.57.0.589591820828.issue26732@psf.upfronthosting.co.za> Steve Holden added the comment: IIRC sockets can be marked as inheritable or not. It seems to me it would be a useful enhancement to allow the same determination for the pipes. ---------- nosy: +holdenweb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 15:29:15 2017 From: report at bugs.python.org (Joey DiGiorgio) Date: Fri, 28 Jul 2017 19:29:15 +0000 Subject: [issue31056] Import Module Not Working According To Documentation Python 3.6.2 In-Reply-To: <1501167395.04.0.978474352938.issue31056@psf.upfronthosting.co.za> Message-ID: <1501270155.14.0.590428526194.issue31056@psf.upfronthosting.co.za> Joey DiGiorgio added the comment: I will mark the question appropriately as python3. I don't fully understand your comment about venv. If you mean virtual environment or something, that is not the case. I am running an a standard Windows 7 install with Python3 as the only Python install on my path (I used the embedded zip package). I did print sys.path and got the value of "WorkingDir" which is what I expected. I am running Python 3 from within "WorkingDir" and only trying to import a module that is within "WorkingDir". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 15:29:58 2017 From: report at bugs.python.org (Alexander Mohr) Date: Fri, 28 Jul 2017 19:29:58 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501270198.61.0.450746564565.issue31061@psf.upfronthosting.co.za> Alexander Mohr added the comment: the problem with this crash is that it only happens periodically in our prod environment :( If I try running the exact same docker container with the same inputs locally it doesn't reproduce, so frustrating. I've created a whole workflow now for deploying with a debug python to get a core file with symbols. Hopefully have some more info w/in a day. Thanks for the tips! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 15:30:57 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 28 Jul 2017 19:30:57 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501270257.39.0.111379205319.issue31061@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thank you for trying to get to the bottom of this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 15:42:17 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 19:42:17 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501270937.98.0.473878761679.issue30853@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2988 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 15:42:45 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 19:42:45 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501270965.91.0.173338312281.issue30853@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 02f88d2a411a6a789b33be281adfc3570c49efd5 by Terry Jan Reedy in branch '3.6': [3.6] bpo-30853: IDLE: Convert font and general vars to use VarTrace (GH-2914) (#2935) https://github.com/python/cpython/commit/02f88d2a411a6a789b33be281adfc3570c49efd5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 15:45:26 2017 From: report at bugs.python.org (Paul Moore) Date: Fri, 28 Jul 2017 19:45:26 +0000 Subject: [issue31056] Import Module Not Working According To Documentation Python 3.6.2 In-Reply-To: <1501167395.04.0.978474352938.issue31056@psf.upfronthosting.co.za> Message-ID: <1501271126.05.0.998871771015.issue31056@psf.upfronthosting.co.za> Paul Moore added the comment: OK, so the problem is that no-one here (or as far as I can see on the SO discussion, either) can reproduce your issue. So we have to assume that it's something wrong with your environment, and not a Python issue. If you can produce an example that allows us to reproduce the issue, then we'll be able to comment further, but as things stand there's no evidence that it's a Python problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 15:51:07 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 19:51:07 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501271467.66.0.892102593519.issue30853@psf.upfronthosting.co.za> Terry J. Reedy added the comment: IDLE *will* fail if idleConf.SetOption is called with a wrong config-type (KeyError) or the wrong number of other arguments (TypeError). I did not add the check because it does not cover the non-default callbacks (the majority), let alone all the other idleConf calls. The important thing is to make sure that every callback gets called in a test (and indeed, eventually, that every line is executed). Enhancing the doc string should be enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 15:51:27 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Jul 2017 19:51:27 +0000 Subject: [issue30992] Invalid PGP Key Prevents Archive Validation In-Reply-To: <1500738803.82.0.333391248268.issue30992@psf.upfronthosting.co.za> Message-ID: <1501271487.79.0.304229125502.issue30992@psf.upfronthosting.co.za> Ned Deily added the comment: P.S., the pubkeys.txt file on python.org and the "OpenPGP Public Keys" section of https://www.python.org/downloads/ have now been updated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 15:51:54 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 19:51:54 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1501271514.64.0.315703273608.issue31004@psf.upfronthosting.co.za> Terry J. Reedy added the comment: When replying by email, snip the quote. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 15:54:40 2017 From: report at bugs.python.org (Antony Lee) Date: Fri, 28 Jul 2017 19:54:40 +0000 Subject: [issue31006] typing.NamedTuple should add annotations to its constructor (__new__) parameters. In-Reply-To: <1500887267.27.0.393959457135.issue31006@psf.upfronthosting.co.za> Message-ID: <1501271680.33.0.706323837259.issue31006@psf.upfronthosting.co.za> Antony Lee added the comment: I'll just repost the issue there for now (https://github.com/python/typing/issues/454). May work on a patch at some point (looks relatively simple) but no guarantees, so if someone else wants to take over feel free to do so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 16:19:04 2017 From: report at bugs.python.org (Will S) Date: Fri, 28 Jul 2017 20:19:04 +0000 Subject: [issue28053] parameterize what serialization is used in multiprocessing In-Reply-To: <1473454734.41.0.810069156927.issue28053@psf.upfronthosting.co.za> Message-ID: <1501273144.17.0.139090868084.issue28053@psf.upfronthosting.co.za> Will S added the comment: Just to follow up in case anyone comes across my last message later: I just had to change the last line from multiprocessing.reducer = pickle2reducer.Pickle2Reducer() to multiprocessing.context._default_context.reducer = pickle2reducer.Pickle2Reducer() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 16:38:03 2017 From: report at bugs.python.org (Joey DiGiorgio) Date: Fri, 28 Jul 2017 20:38:03 +0000 Subject: [issue31056] Import Module Not Working According To Documentation Python 3.6.2 In-Reply-To: <1501167395.04.0.978474352938.issue31056@psf.upfronthosting.co.za> Message-ID: <1501274283.39.0.571635405248.issue31056@psf.upfronthosting.co.za> Joey DiGiorgio added the comment: I understand your comments. I will be at computer that has not ever had Python installed in about an hour and will try it there to see if I can produce an example showing the issue. I just found it weird that Python 3.5.2 worked just fine in the same environment using exactly the same steps with only the system path environment variable changed. That is why I filed this issue. I will report back. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 16:51:47 2017 From: report at bugs.python.org (Andrew Pinkham) Date: Fri, 28 Jul 2017 20:51:47 +0000 Subject: [issue31073] Change metadata handling in check command Message-ID: <1501275107.85.0.857178760457.issue31073@psf.upfronthosting.co.za> New submission from Andrew Pinkham: The new warehouse uses the author_email field to create a mailto link. Donald Stufft recommended leaving out the author_email field while still specifying the author field should a maintainer wish to have their name associated without their email. Conversation with Donald: https://github.com/pypa/warehouse/issues/2155 Unfortunately, specifying author but not author_email causes the `setup.py check` command to throw an error. "check: missing meta-data: if 'author' supplied, 'author_email' must be supplied too" I would like to remove that check from being performed given the recommended fix for warehouse. The logic that performs this check is currently in the distutils check command. https://github.com/python/cpython/blob/master/Lib/distutils/command/check.py Additionally, AFAICT, it is impossible to disable the metadata check in distutils. I would also like to add a negative option to allow the metadata check to be skipped. ---------- components: Distutils messages: 299436 nosy: dstufft, jambonrose, merwok priority: normal severity: normal status: open title: Change metadata handling in check command versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 16:53:14 2017 From: report at bugs.python.org (Joel Hillacre) Date: Fri, 28 Jul 2017 20:53:14 +0000 Subject: [issue30788] email.policy.SMTP.fold() issue for long filenames with spaces In-Reply-To: <1498593521.18.0.236128551176.issue30788@psf.upfronthosting.co.za> Message-ID: <1501275194.94.0.307161387566.issue30788@psf.upfronthosting.co.za> Joel Hillacre added the comment: Just wanted to ping this and see if there was someone available to review my PR associated with this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 17:00:05 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 21:00:05 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501275605.03.0.391938573882.issue30853@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 5d0f30aae5fccc99690923fc5c7cb58de8ad7eec by Terry Jan Reedy in branch 'master': bpo-30853: IDLE - touch-up configdialog.VarTrace and tests. (#2936) https://github.com/python/cpython/commit/5d0f30aae5fccc99690923fc5c7cb58de8ad7eec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 17:02:46 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 21:02:46 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501275766.13.0.550728272327.issue30853@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2989 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 18:36:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 22:36:32 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501281392.47.0.157619533255.issue30853@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset ecc80b3f1b56f1e4df9e592f8527e622a6b45e01 by Terry Jan Reedy in branch '3.6': [3.6] bpo-30853: IDLE - touch-up configdialog.VarTrace and tests. (GH-2936) (#2937) https://github.com/python/cpython/commit/ecc80b3f1b56f1e4df9e592f8527e622a6b45e01 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 18:37:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 22:37:27 +0000 Subject: [issue30853] IDLE: configdialog -- factor out Tracer subclass In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501281447.47.0.444933460241.issue30853@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 18:39:16 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 22:39:16 +0000 Subject: [issue30853] IDLE: configdialog -- factor out VarTrace class In-Reply-To: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> Message-ID: <1501281556.36.0.574295231935.issue30853@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- title: IDLE: configdialog -- factor out Tracer subclass -> IDLE: configdialog -- factor out VarTrace class _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 19:17:04 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 23:17:04 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1501283824.34.0.887824359169.issue30781@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2990 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 19:34:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Jul 2017 23:34:56 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1501284896.52.0.181732620191.issue30781@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New PR replaces the custom TabbedPageSet with ttk.Notebook. On Windows, with default settings, the look is nearly identical, but the selected tab is more obvious. A method call (note.enable_traversal) will enable navigation between tabs with cntl-tab and cntl-shift-tab. This will work a bit better with extracted page classes. On the otherhand, attaching the frame to a notebook instead of the one disables one of the simulated mouse clicks. I added the remaining part of tkinter.test.support.simulate_click(sp??) to no avail (not surprising since designed for Xwindows. I also moved the location of the simulated click. Using ttk.Frame requires the padx, pady to padding change in PR2654. Please test on linuxes (and mac if possible). Does the tabset look at least as good? Does the test run if the #s are removed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 20:02:53 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 00:02:53 +0000 Subject: [issue28734] argparse: successive parsing wipes out nargs=? values In-Reply-To: <1479483675.86.0.774570236197.issue28734@psf.upfronthosting.co.za> Message-ID: <1501286573.73.0.735076495568.issue28734@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +bethard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 20:12:20 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 29 Jul 2017 00:12:20 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1501287140.68.0.613218868372.issue30781@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Looks good under Ubuntu. The height of the window is longer, so everything is a bit stretched out. That helps on the Keys tab, but not so much on Highlights or Extensions. It's not awful, but there's unneeded (for now?) empty space. One thing that's different is that there is an initial focus selected on each tab when switching tabs, but then focus is lost when moving back to another tab. Example: When the config dialog is opened, focus is on the fonts, like it was after Louie's change. However, when I first click 'Keys', there is a box around 'Use a Built-in Key Set', even if it isn't selected. So, that's new (there was no focus before). When I then click back to 'Fonts', the fontlist doesn't have focus anymore. Before this change, fontlist still had focus after switching to another tab and then going back to fonts. Might be why the test isn't working. All the tests pass, but I get the error if I uncomment the helplist tests: ====================================================================== FAIL: test_source_selected (idlelib.idle_test.test_configdialog.GeneralTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cheryl/cpython/Lib/idlelib/idle_test/test_configdialog.py", line 315, in test_source_selected self.assertEqual(helplist.get('anchor'), 'source') AssertionError: '' != 'source' + source ---------------------------------------------------------------------- ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 20:14:22 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 00:14:22 +0000 Subject: [issue31026] test_dbm fails when run directly In-Reply-To: <1500984617.08.0.739686632306.issue31026@psf.upfronthosting.co.za> Message-ID: <1501287262.58.0.273795913231.issue31026@psf.upfronthosting.co.za> Terry J. Reedy added the comment: OK on Windows, skipping test_whichdb_ndbm (neither _dbm nor _gdbm are present.) ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 20:17:14 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 00:17:14 +0000 Subject: [issue31027] test_listcomps fails when run directly In-Reply-To: <1500985041.62.0.809402011924.issue31027@psf.upfronthosting.co.za> Message-ID: <1501287434.55.0.0688410666201.issue31027@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On Windows, fresh 3.7, python -m test.test_listcomps fails same way. python -m test test_listcomps is okay. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 20:31:28 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 00:31:28 +0000 Subject: [issue31030] sys.executable can be not normalized In-Reply-To: <1500986510.69.0.620251860274.issue31030@psf.upfronthosting.co.za> Message-ID: <1501288288.6.0.887131282398.issue31030@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On Windows, sys.executable is normalized before or during startup. C:\Programs\Python36>Lib\..\python -m test test_sys prints test_executable (__main__.SysModuleTest) ... ok C:\Programs\Python36>Lib\..\python -c "import sys; print(sys.executable)" C:\Programs\Python36\python.exe ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 20:38:23 2017 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 29 Jul 2017 00:38:23 +0000 Subject: [issue31027] test_listcomps fails when run directly In-Reply-To: <1500985041.62.0.809402011924.issue31027@psf.upfronthosting.co.za> Message-ID: <1501288703.43.0.96980567841.issue31027@psf.upfronthosting.co.za> Changes by Zackery Spytz : ---------- pull_requests: +2991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 21:59:19 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 01:59:19 +0000 Subject: [issue31042] Inconsistency in documentation of operator.index In-Reply-To: <1501038179.61.0.173139487282.issue31042@psf.upfronthosting.co.za> Message-ID: <1501293559.2.0.226846388631.issue31042@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To me, 'roughly' is wrong. Either the equivalence is exact, or it is completely absent . There is no 'nearly' or 'roughly' about this situation. This is difference from iterator_class_x(args) being mathematically equivalent to generator_function_y(args) in the sense of yielding *exactly* the same sequence of objects, but being different in the Python sense that type(iterator_class_x) != type(generator_function_y). Note: even in this case, I was once in favor of changing 'equivalent' to 'roughly equivalent' in the itertools doc. I now regret that because 'roughly' could be misunderstood. I think that 'mathematically equivalent' or 'equivalent when iterated' or 'equivalent*' would be better, with an explanatory note at the top. As for this issue, __index__ is a reserved name. https://docs.python.org/3/reference/lexical_analysis.html#reserved-classes-of-identifiers a.__index__ = is an unauthorized use of a *reserved* word and the effect of such usage is not and need not be documented. The entry for __*__ does include "*Any* use of __*__ names, in any context, that does not follow explicitly documented use, is subject to breakage without warning." To me, that says that the effect of the reserved-word assignment is undefined. It could be made to raise an exception. To be even clearer, I believe we should explicitly state what I consider implicit: something like "Any such use breaks these manuals, in the sense that it may make statements herein untrue. These manuals assume that reserved names are used as specified." ---------- nosy: +terry.reedy stage: -> needs patch type: -> enhancement versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 22:02:56 2017 From: report at bugs.python.org (Matheus Vieira Portela) Date: Sat, 29 Jul 2017 02:02:56 +0000 Subject: [issue30802] datetime.datetime.strptime('200722', '%Y%U') In-Reply-To: <1498726688.6.0.920894490968.issue30802@psf.upfronthosting.co.za> Message-ID: <1501293776.91.0.590279101668.issue30802@psf.upfronthosting.co.za> Matheus Vieira Portela added the comment: Agreed that we should attain to ISO 8601, as it solves two questions that occurred in this thread: - According to the specification, it is clear that a week must start on Monday and end on Sunday. Hence datetime.strptime('201726', '%Y%U') could be safely assigned to 2017/06/26 without ambiguity - It also makes clear on what to do when a week overlaps two years. IMHO there is no reason to not implement this feature and remove the requirement of using %U with the year and day of the week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 22:25:57 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 02:25:57 +0000 Subject: [issue31045] Add a language switch to the Python documentation In-Reply-To: <1501078214.01.0.529111921671.issue31045@psf.upfronthosting.co.za> Message-ID: <1501295157.05.0.590341581163.issue31045@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I left out 2.7 because I don't know if the 2.7 docs have been or will be included. I am looking forward to this because I know someone who programs in Python and is also looking to learn 'professional' Japanese, including CS. I myself might try the Spanish translations, if there are any. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, terry.reedy stage: -> patch review type: -> enhancement versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 22:31:53 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 02:31:53 +0000 Subject: [issue31054] Python 2.7.8 Release does not update the system Path variable In-Reply-To: <1501140734.16.0.246037908584.issue31054@psf.upfronthosting.co.za> Message-ID: <1501295513.14.0.550989933186.issue31054@psf.upfronthosting.co.za> Terry J. Reedy added the comment: We are guessing that you are using Windows. The 2.7.8 installer is years old and will not be changed. The same is true for any released installer. I believe that the 2.7 installers already give one the *option* to change the path. If so, this issue should be closed. Please try out the 2.7.13 installer. Changing the path should not be done automatically. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 22:57:41 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 29 Jul 2017 02:57:41 +0000 Subject: [issue31054] Python 2.7.8 Release does not update the system Path variable In-Reply-To: <1501140734.16.0.246037908584.issue31054@psf.upfronthosting.co.za> Message-ID: <1501297061.63.0.250216919934.issue31054@psf.upfronthosting.co.za> Steve Dower added the comment: Correct. This is already in newer installers. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 23:01:08 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 29 Jul 2017 03:01:08 +0000 Subject: [issue31056] Import Module Not Working According To Documentation Python 3.6.2 In-Reply-To: <1501167395.04.0.978474352938.issue31056@psf.upfronthosting.co.za> Message-ID: <1501297268.12.0.497014985756.issue31056@psf.upfronthosting.co.za> Steve Dower added the comment: The embeddable ZIP is not an "install" - it's a tool for including in your own application. Run the actual installer and try again, or use the package on nuget.org if you need to achieve zero system impact (which it sounds like you don't if you're modifying PATH). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 00:19:31 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 04:19:31 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1501301971.93.0.967530249341.issue30781@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I did not try to match the height in that commit. I wanted to see what would happen if we enlarge the dialog to accommodate more widgets. It is now about 10% larger. The highlight sample looks better with a bit more room. The font sample works better in that the box does not expand until it has to. The total size does not change. Focus traversal has been neglected on C.D., which is a bit of a bug. On the original, the focus disappears and comes back. On the notebook it visibly cycles around one tab, including the tab. I changed takefocus to True for fontlist and helplist. When focus is on a tab, Left and Right change tabs. With the enable call, Cntl_Tab and Cntl-Shift-Tab always work to change tabs. I decided to push this in spite of the test problem. It is easy to check that helplist clicking work on htest. Maybe fixing up and down on helplist, as done with fontlist, will somehow help. This is a usability bug, not a test bug. I should make the boxes identical before giving up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 00:30:31 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 04:30:31 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1501302631.75.0.620935571882.issue31004@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I will push Notebook when CI passes. We can then do Step 2 for class FontPage(Frame). Consider the font code frozen for now. Pass 'note', not the dialog, as the parent. This makes tab switching work better. Create the highlight frame first and pass it as a second argument to FontPage. Adding set_samples to load_font_config should solve the initial font problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 00:30:57 2017 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Jul 2017 04:30:57 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1501302657.6.0.474214900911.issue30302@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +2992 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 00:49:41 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 04:49:41 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1501303781.23.0.483564483585.issue30781@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset b331f80b4765c3201674a7ca8b35c9d4a65efe79 by Terry Jan Reedy in branch 'master': bpo-30781: IDLE - Use ttk Notebook in ConfigDialog (#2938) https://github.com/python/cpython/commit/b331f80b4765c3201674a7ca8b35c9d4a65efe79 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 00:51:39 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 04:51:39 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1501303899.11.0.91345533891.issue30781@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2993 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 00:58:36 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 04:58:36 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1501304316.25.0.674559231596.issue30781@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The 'this' in 'this is a usability bug' refers to the fact that up and down move the blue selection highlight but not the selection, so that delete does not necessarily delete what appears to be selected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 01:28:07 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 05:28:07 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1501306087.83.0.484272205139.issue30781@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 8364feff6730f54063116b607605167d9027ce85 by Terry Jan Reedy in branch '3.6': [3.6] bpo-30781: IDLE - Use ttk Notebook in ConfigDialog (GH-2938) (#2944) https://github.com/python/cpython/commit/8364feff6730f54063116b607605167d9027ce85 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 01:36:54 2017 From: report at bugs.python.org (Eryk Sun) Date: Sat, 29 Jul 2017 05:36:54 +0000 Subject: [issue31030] sys.executable can be not normalized In-Reply-To: <1500986510.69.0.620251860274.issue31030@psf.upfronthosting.co.za> Message-ID: <1501306614.37.0.902030491795.issue31030@psf.upfronthosting.co.za> Eryk Sun added the comment: Terry, the Windows implementation calls GetModuleFileNameW to get the executable's fully-qualified path from the loader. However, depending on how Python is started, this could be a \\?\ path, which leads to a bug in the startup code that determines the prefix path based on the landmark "lib\os.py". Probably the easiest solution would be to normalize the executable path to remove the \\?\ or \\.\ prefix. This prefix isn't useful here anyway since Windows doesn't properly support running programs from long paths, not even in Windows 10. I'll open a new issue for this. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 02:31:56 2017 From: report at bugs.python.org (=?utf-8?b?QmVybsOhdCBHw6Fib3I=?=) Date: Sat, 29 Jul 2017 06:31:56 +0000 Subject: [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv In-Reply-To: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> Message-ID: <1501309916.38.0.350799957087.issue31024@psf.upfronthosting.co.za> Bern?t G?bor added the comment: I agree we should not advertise the type. However, whatever its type is should be in sync in what we put inside objects.inv. That's sort of a encoded binary black box for the user; the Sphinx tool included. It maps standard library elements to URLs. This ticket is about fix objects.inv to have the Tuple in the correct bucket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 02:32:24 2017 From: report at bugs.python.org (Julien Palard) Date: Sat, 29 Jul 2017 06:32:24 +0000 Subject: [issue31045] Add a language switch to the Python documentation In-Reply-To: <1501078214.01.0.529111921671.issue31045@psf.upfronthosting.co.za> Message-ID: <1501309944.02.0.49293039737.issue31045@psf.upfronthosting.co.za> Julien Palard added the comment: @terry About Japanese translation, Inada Naoki is the coordinator, their repository is created (https://github.com/python/python-docs-ja) they just have to push now. Once this language switch fully tested / implemented / released, it will be easy to add a language. Rules to add a language to the picker are described in PEP 545 (translation have to meet criterias like having a fully translated tutorial). Spannish translation exist too, here https://github.com/PyAr/tutorial/commits/master but I don't remember if they contacted us about porting it to docs.python.org. FYI I try to document which language is at which step of landing to d.p.o here: https://mdk.fr/blog/python-documentation-translation.html, coordinators are documented here: https://docs.python.org/devguide/experts.html#documentation-translations FTR I'm currently testing the new switchers locally, I should be able to remove the "WIP" soon. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 02:36:00 2017 From: report at bugs.python.org (Eryk Sun) Date: Sat, 29 Jul 2017 06:36:00 +0000 Subject: [issue31074] Startup failure if executable is a \\?\ path on Windows Message-ID: <1501310160.44.0.769037276135.issue31074@psf.upfronthosting.co.za> New submission from Eryk Sun: search_for_prefix in PC/getpathp.c sets the wrong path when Python is started with a \\?\ path on Windows, which results in the following crash: >>> subprocess.call(r'"\\?\C:\Program Files\Python36\python.exe"') Fatal Python error: Py_Initialize: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' Current thread 0x00000b40 (most recent call first): 3221226505 The problem is due to the implementation of join(), which calls PathCchCombineEx, which strips the \\?\ prefix from the joined path. Consequently in gotlandmark(), setting `prefix[n] = '\0'` nulls the wrong index because the value of n includes the original \\?\ prefix. Breakpoint 0 hit python36_d!gotlandmark: 00000000`6cc1a920 48894c2408 mov qword ptr [rsp+8],rcx ss:000000c2`9a9ee920={python36_d!prefix (00000000`6cf697d0)} 1:005> du python36_d!prefix 00000000`6cf697d0 "\\?\C:\Program Files\Python36" 1:005> pc python36_d!gotlandmark+0x15: 00000000`6cc1a935 e8e60a0000 call python36_d!wcsnlen_s (00000000`6cc1b420) 1:005> pc python36_d!gotlandmark+0x2b: 00000000`6cc1a94b e890010000 call python36_d!join (00000000`6cc1aae0) 1:005> p python36_d!gotlandmark+0x30: 00000000`6cc1a950 33d2 xor edx,edx 1:005> du python36_d!prefix 00000000`6cf697d0 "C:\Program Files\Python36\lib\os" 00000000`6cf69810 ".py" 1:005> pt python36_d!gotlandmark+0x7b: 00000000`6cc1a99b c3 ret 1:005> du python36_d!prefix 00000000`6cf697d0 "C:\Program Files\Python36\lib" I think the simplest solution is to remove the \\?\ prefix from the executable path that's returned by GetModuleFileNameW in get_progpath(). AFAIK, no version of Windows can reliably run programs from long paths, and the current MAXPATHLEN (256) doesn't allow it anyway. The only reason to use \\?\ for the executable path would be to avoid the normal DOS/Windows path normalization rules -- e.g. removing trailing dots and spaces or using DOS device names such as "con.exe". That's not really a practical concern. ---------- components: Interpreter Core, Windows messages: 299459 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: test needed status: open title: Startup failure if executable is a \\?\ path on Windows type: crash versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 05:19:19 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 29 Jul 2017 09:19:19 +0000 Subject: [issue17560] problem using multiprocessing with really big objects? In-Reply-To: <1364399521.2.0.696890688109.issue17560@psf.upfronthosting.co.za> Message-ID: <1501319959.21.0.393971854907.issue17560@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > There's also the other multiprocessing limitation Antoine mentioned early on, where queues/pipes used a 32-bit signed integer to encode object length. > Is there a way or plan to get around this limitation? As I said above in https://bugs.python.org/issue17560#msg185345, it should be easy to improve the current protocol to allow for larger than 2GB data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 05:52:24 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 29 Jul 2017 09:52:24 +0000 Subject: [issue30931] Race condition in asyncore may access the wrong dispatcher In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1501321944.19.0.198946757365.issue30931@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: +1, I would push https://github.com/python/cpython/pull/2854/ first and fix the race condition only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 05:53:08 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 29 Jul 2017 09:53:08 +0000 Subject: [issue30931] Race condition in asyncore may access the wrong dispatcher In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> Message-ID: <1501321988.65.0.346535164322.issue30931@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- assignee: -> giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 06:12:41 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 29 Jul 2017 10:12:41 +0000 Subject: [issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors In-Reply-To: <1496753379.54.0.823104830335.issue30581@psf.upfronthosting.co.za> Message-ID: <1501323161.92.0.218558005692.issue30581@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 06:21:42 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 29 Jul 2017 10:21:42 +0000 Subject: [issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors In-Reply-To: <1496753379.54.0.823104830335.issue30581@psf.upfronthosting.co.za> Message-ID: <1501323702.72.0.707461605672.issue30581@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: MS documentation is not clear on what function should be used as there are many returning different values. Here it is being suggested to use GetLogicalProcessorInformationEx: https://stackoverflow.com/questions/31209256/reliable-way-to-programmatically-get-the-number-of-cores-on-windows ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 06:31:55 2017 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 29 Jul 2017 10:31:55 +0000 Subject: [issue30842] pyenv activate for bash and tcsh In-Reply-To: <1499110607.19.0.325548288138.issue30842@psf.upfronthosting.co.za> Message-ID: <1501324315.77.0.215747082975.issue30842@psf.upfronthosting.co.za> Vinay Sajip added the comment: This needs further thought as to how to implement. For example, readlink -f isn't supported on OS X. If a patch were available which works across platforms, that would potentially speed up resolution of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 07:28:16 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 29 Jul 2017 11:28:16 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1501327696.99.0.256848201237.issue30781@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I wonder if the usability bug is related to issue25684, even though it's a different widget. The reason I'm suggesting that is that I had converted the DynOptionMenu to be a ttk.OptionMenu in configdialog, but when I did that, that selection of a target tag on the highlight screen and the clicking of a target within highlight_sample didn't stay in sync, and that sounds very much like what it happening in helplist. My patch for 25684 fixed the reported issue, but also fixed what I was seeing in configdialog. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 08:24:17 2017 From: report at bugs.python.org (Marcos Soutullo) Date: Sat, 29 Jul 2017 12:24:17 +0000 Subject: [issue31075] Collections - ChainMap - Documentation example wrong order line Message-ID: <1501331057.19.0.539549352975.issue31075@psf.upfronthosting.co.za> New submission from Marcos Soutullo: Hello, I have been taking a look into your ChainMap collections documentation (https://docs.python.org/3.6/library/collections.html?highlight=collections#collections.ChainMap), specifically the third code example on "8.3.1.1. ChainMap Examples and Recipes" that clearly describe and illustrate a use case for the ChainMap class. However, I found a very small code issue in regards to how the sample code (line 7) is presented to the reader. Please refer to the code compilation below: Line 7 >>> d['x'] # Get first key in the chain of contexts raise KeyError(key) KeyError: 'x' Line 8 >>> d['x'] d['x'] = 1 # Set value in current context The key named 'x' had not been initialised yet and of course, the compiler is complaining. It should be the other way around. Line 8 >>> d['x'] = 1 # Set value in current context Line 7 >>> d['x'] # Get first key in the chain of contexts Many thanks for the great work you do with Python, Marcos S. ---------- assignee: docs at python components: Documentation messages: 299465 nosy: Marcos Soutullo, docs at python priority: normal severity: normal status: open title: Collections - ChainMap - Documentation example wrong order line type: compile error versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 09:26:02 2017 From: report at bugs.python.org (Arnon Sela) Date: Sat, 29 Jul 2017 13:26:02 +0000 Subject: [issue30842] pyenv activate for bash and tcsh In-Reply-To: <1499110607.19.0.325548288138.issue30842@psf.upfronthosting.co.za> Message-ID: <1501334762.86.0.797069525799.issue30842@psf.upfronthosting.co.za> Arnon Sela added the comment: readlink -f can be replaced by the following sequence: pushd $fullpath fullpath=$(pwd -P) popd Please note that: [[ $called != $0 ]] && fullpath="${BASH_SOURCE[@]}" || fullpath=$0 Should be replaced with: [[ $called != $0 ]] && fullpath="${BASH_SOURCE[0]}" || fullpath=$0 0 instead of @ - that was a misspelling. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 09:49:27 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 29 Jul 2017 13:49:27 +0000 Subject: [issue31074] Startup failure if executable is a \\?\ path on Windows In-Reply-To: <1501310160.44.0.769037276135.issue31074@psf.upfronthosting.co.za> Message-ID: <1501336167.22.0.438580083189.issue31074@psf.upfronthosting.co.za> Steve Dower added the comment: Sounds like the right fix. We should increase the maximum path length though, since 3.6 and later can work with much longer paths on Win10 through normal APIs and without prefix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 09:51:19 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 29 Jul 2017 13:51:19 +0000 Subject: [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv In-Reply-To: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> Message-ID: <1501336279.21.0.830935804956.issue31024@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: > This ticket is about fix objects.inv to have the Tuple in the correct bucket. If you know how to do this without breaking the python docs system (so that Tuple and Callable will not have a "class" prefix on https://docs.python.org/3/library/typing.html) then I think it is OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 09:59:07 2017 From: report at bugs.python.org (=?utf-8?b?QmVybsOhdCBHw6Fib3I=?=) Date: Sat, 29 Jul 2017 13:59:07 +0000 Subject: [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv In-Reply-To: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> Message-ID: <1501336747.58.0.591995384423.issue31024@psf.upfronthosting.co.za> Bern?t G?bor added the comment: I would need to know who and how maintains the https://docs.python.org/3.6/objects.inv file. Do you have any idea? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 10:01:45 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 29 Jul 2017 14:01:45 +0000 Subject: [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv In-Reply-To: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> Message-ID: <1501336905.52.0.73279392489.issue31024@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: > Do you have any idea? Unfortunately no. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 10:15:08 2017 From: report at bugs.python.org (Tom Forbes) Date: Sat, 29 Jul 2017 14:15:08 +0000 Subject: [issue31076] http.server should correctly handle HTTP 1.1 responses without a content-length Message-ID: <1501337708.36.0.932974346055.issue31076@psf.upfronthosting.co.za> New submission from Tom Forbes: The builtin http.server module does not support HTTP keep-alive when sending a response without a content-length. This causes any clients to hang waiting on more response data, while the server hangs waiting for the client to send another request. This is documented (https://docs.python.org/3/library/http.server.html#http.server.BaseHTTPRequestHandler.protocol_version), but it is confusing. As far as I can tell the fix would be pretty simple: If no content-length header is set then close the connection regardless of the keep-alive header (Keep-alive is advisory and servers can close the connection at-will, regardless of what the client sends). If a response contains an inaccurate content-length header there is nothing we can do, but if none is present the server (and clients) should not just hang. ---------- components: Library (Lib) messages: 299471 nosy: Tom Forbes priority: normal severity: normal status: open title: http.server should correctly handle HTTP 1.1 responses without a content-length type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 10:43:29 2017 From: report at bugs.python.org (Pierre Quentel) Date: Sat, 29 Jul 2017 14:43:29 +0000 Subject: [issue29654] SimpleHTTPRequestHandler should support browser cache In-Reply-To: <1501258787.82.0.643432361437.issue29654@psf.upfronthosting.co.za> Message-ID: Pierre Quentel added the comment: Thanks for telling me. I must have run the test hundreds of times now, on a Windows 7 PC, and this bug never occured. Just for my information, why do you add temp.flush() in the "with" block ? I thought the context manager took care of this. 2017-07-28 18:19 GMT+02:00 STINNER Victor : > > STINNER Victor added the comment: > > FYI there was a race condition, impacting Windows. I just fixed it: > bpo-31066, commit 28ce07ae9e34c70eea6b52515c7e00001cefd41e. > > ---------- > nosy: +haypo > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 11:09:27 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 29 Jul 2017 15:09:27 +0000 Subject: [issue31076] http.server should correctly handle HTTP 1.1 responses without a content-length In-Reply-To: <1501337708.36.0.932974346055.issue31076@psf.upfronthosting.co.za> Message-ID: <1501340967.93.0.206443197133.issue31076@psf.upfronthosting.co.za> Martin Panter added the comment: The trouble is you would also have to parse the Transfer-Encoding field, and have special logic for responses where Content-Length is not needed or irrelevant (certain combinations of method and status code). And even then you risk breaking rare or custom methods and status codes. All this seems complex and at the wrong layer. A server shouldn?t be parsing the header fields it just generated. Perhaps there could be a new HTTP 1.1 mode (separate from protocol_version) that still closed the connection by default, but had a clearer API for keeping the connection open that the programmer can use in the right circumstances. But I had this thought before (see Issue 21224), and it didn?t seem beneficial. What?s your use case? Why not just stick with HTTP 1.0, or update the server code to either close the connection or use chunked encoding? ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 12:05:57 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 16:05:57 +0000 Subject: [issue31027] test_listcomps fails when run directly In-Reply-To: <1500985041.62.0.809402011924.issue31027@psf.upfronthosting.co.za> Message-ID: <1501344357.52.0.752661774247.issue31027@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset ceb93f4540981e3f9af66bd936920186aba813fc by Terry Jan Reedy (Zackery Spytz) in branch 'master': bpo-31027: Fix test_listcomps failure when run directly (#2939) https://github.com/python/cpython/commit/ceb93f4540981e3f9af66bd936920186aba813fc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 12:07:50 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 16:07:50 +0000 Subject: [issue31027] test_listcomps fails when run directly In-Reply-To: <1500985041.62.0.809402011924.issue31027@psf.upfronthosting.co.za> Message-ID: <1501344470.21.0.741967209951.issue31027@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2994 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 12:43:14 2017 From: report at bugs.python.org (Damon Atkins) Date: Sat, 29 Jul 2017 16:43:14 +0000 Subject: [issue31077] Windows Installer Version Message-ID: <1501346593.98.0.592003481581.issue31077@psf.upfronthosting.co.za> New submission from Damon Atkins: The Windows installer for example titles the software as Display Name:Python 3.5.3 (64-bit) Display Version: 3.5.3150.0 The default install folder is C:\Program Files\Python35 There is no consistency It looks like the 3150 been shorten to 3 If you look at Python 2.7.2 it has a display version of 2.7.13150 Suggest Display Name:Python 3.5 (64-bit) Display Version: 3.5.3150.0 C:\Program Files\Python3.5 or C:\Program Files\Python3.5.3150 OR Display Name:Python 3.5.3150 (64-bit) Display Version: 3.5.3150.0 C:\Program Files\Python3.5.3150 OR Display Name:Python 3.5.3 (64-bit) Display Version: 3.5.3.3150 C:\Program Files\Python3.5.3 Alse seems that Python 3 installer is placing one entery in the 'Users' registry for uninstall and the rest of the entries in 'System' registry for uninstall I suggest if the files are installed in C:\Program Files then their should be no 'User' registry entries. ---------- components: Windows messages: 299475 nosy: Damon Atkins, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows Installer Version type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 12:57:08 2017 From: report at bugs.python.org (Chris Wilcox) Date: Sat, 29 Jul 2017 16:57:08 +0000 Subject: [issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors In-Reply-To: <1496753379.54.0.823104830335.issue30581@psf.upfronthosting.co.za> Message-ID: <1501347428.37.0.940068139703.issue30581@psf.upfronthosting.co.za> Chris Wilcox added the comment: I agree that the MS Docs for this are a bit confusing. I ended up reaching out to the guy who authored the GetMaximumProcessorCount function. I had also written an implementation that iterated over GetProcessorInformationEx and he advised against it. One of the things that makes this interesting is that in 32 bit processes (wow64) your processor is simulated to fit in the confines of that old system. This method will only report 32 cores under 32 bit as that is all the program can access in 32 bit mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 12:57:08 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 29 Jul 2017 16:57:08 +0000 Subject: [issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors In-Reply-To: <1496753379.54.0.823104830335.issue30581@psf.upfronthosting.co.za> Message-ID: <1501347428.37.0.940068139703.issue30581@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I agree that the MS Docs for this are a bit confusing. I ended up reaching out to the guy who authored the GetMaximumProcessorCount function. I had also written an implementation that iterated over GetProcessorInformationEx and he advised against it. One of the things that makes this interesting is that in 32 bit processes (wow64) your processor is simulated to fit in the confines of that old system. This method will only report 32 cores under 32 bit as that is all the program can access in 32 bit mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 12:57:08 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 29 Jul 2017 16:57:08 +0000 Subject: [issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors In-Reply-To: <1496753379.54.0.823104830335.issue30581@psf.upfronthosting.co.za> Message-ID: <1501347428.55.0.52336004102.issue30581@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: About GetMaximumProcessorCount, MS doc states that it returns the "maximum number of logical processors that a processor group or the system can have", so maybe it also includes "empty" CPU sockets. GetActiveProcessorCount, on the other hand, returns "the number of active processors in a processor group or in the system", which adds even more confusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 13:03:26 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 29 Jul 2017 17:03:26 +0000 Subject: [issue31075] Collections - ChainMap - Documentation example wrong order line In-Reply-To: <1501331057.19.0.539549352975.issue31075@psf.upfronthosting.co.za> Message-ID: <1501347806.7.0.116646851984.issue31075@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -0 The code block was originally intended to just be a table of patterns, not meant to be executed sequentially. It followed the traditional presentation order (__getitem__, __setitem__, followed by __delitem__). If we do change this, then the subsequent "k in d" example should also be changed to "'x' in d" because k isn't defined. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger priority: normal -> low resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 13:14:45 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 29 Jul 2017 17:14:45 +0000 Subject: [issue17560] problem using multiprocessing with really big objects? In-Reply-To: <1364399521.2.0.696890688109.issue17560@psf.upfronthosting.co.za> Message-ID: <1501348485.33.0.852022904861.issue17560@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Davin, when you write-up a blog post, I think it would be helpful to mention that creating really large objects with multi-processing is mostly an anti-pattern (the cost of pickling and interprocess communication tends to drown-out the benefits of parallel processing). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 13:15:27 2017 From: report at bugs.python.org (Chris Wilcox) Date: Sat, 29 Jul 2017 17:15:27 +0000 Subject: [issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors In-Reply-To: <1496753379.54.0.823104830335.issue30581@psf.upfronthosting.co.za> Message-ID: <1501348527.36.0.66333975374.issue30581@psf.upfronthosting.co.za> Chris Wilcox added the comment: I was reviewing the docs for the os module and cpu_count should always return the number of cpus on the system, not the usable CPUs. GetMaximumProcessorCount returns a simulated count in WoW64. I have reached back out to the Windows API dev and will see if GetLogicalProcessorInformationEx will allow us to do this. He had thought that my solution that way had other limitations under WoW64. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 14:36:44 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 18:36:44 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1501353404.22.0.61260320256.issue30781@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I will check for anything even vaguely related. In any case, your comment reminded me to give your PR a boost. Too bad it will miss 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 14:38:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 18:38:27 +0000 Subject: [issue31027] test_listcomps fails when run directly In-Reply-To: <1500985041.62.0.809402011924.issue31027@psf.upfronthosting.co.za> Message-ID: <1501353507.23.0.396182242136.issue31027@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset b26cc82b2252dd54e73661a026b32e7808fef945 by Terry Jan Reedy in branch '3.6': [3.6] bpo-31027: Fix test_listcomps failure when run directly (GH-2939) (#2945) https://github.com/python/cpython/commit/b26cc82b2252dd54e73661a026b32e7808fef945 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 14:39:40 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 18:39:40 +0000 Subject: [issue31027] test_listcomps fails when run directly In-Reply-To: <1500985041.62.0.809402011924.issue31027@psf.upfronthosting.co.za> Message-ID: <1501353580.51.0.771260514919.issue31027@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: -> terry.reedy resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 15:18:15 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 19:18:15 +0000 Subject: [issue30803] Truth value of sets not properly documented In-Reply-To: <1498743378.1.0.0570911503542.issue30803@psf.upfronthosting.co.za> Message-ID: <1501355895.76.0.858204738308.issue30803@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset caa1280d1ee5f828f346b585169a7592371d3faa by Terry Jan Reedy (Peter Thomassen) in branch 'master': bpo-30803: clarify truth value testing documentation (#2508) https://github.com/python/cpython/commit/caa1280d1ee5f828f346b585169a7592371d3faa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 15:18:46 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 29 Jul 2017 19:18:46 +0000 Subject: [issue31075] Collections - ChainMap - Documentation example wrong order line In-Reply-To: <1501331057.19.0.539549352975.issue31075@psf.upfronthosting.co.za> Message-ID: <1501355926.05.0.988642537874.issue31075@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Many thanks for the great work you do with Python, Thanks for the kudos. Also, thanks for the close reading of the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 15:21:59 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 19:21:59 +0000 Subject: [issue30803] Truth value of sets not properly documented In-Reply-To: <1498743378.1.0.0570911503542.issue30803@psf.upfronthosting.co.za> Message-ID: <1501356119.25.0.957645813868.issue30803@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2995 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 17:02:07 2017 From: report at bugs.python.org (Segev Finer) Date: Sat, 29 Jul 2017 21:02:07 +0000 Subject: [issue31078] pdb's debug command (Pdb.do_debug) doesn't use rawinput even if the parent pdb uses rawinput Message-ID: <1501362127.96.0.48372316228.issue31078@psf.upfronthosting.co.za> New submission from Segev Finer: This is caused by https://github.com/python/cpython/blob/caa1280d1ee5f828f346b585169a7592371d3faa/Lib/pdb.py#L1096 which always passes our own current stdin and stdout, and this triggers the conditional in https://github.com/python/cpython/blob/caa1280d1ee5f828f346b585169a7592371d3faa/Lib/pdb.py#L144-L145. self.stdin and self.stdout are initialized to sys.stdin and sys.stdout respectively when not passed explicitly: https://github.com/python/cpython/blob/caa1280d1ee5f828f346b585169a7592371d3faa/Lib/cmd.py#L87-L94. See Also: https://github.com/ipython/ipython/pull/10721 ---------- components: Library (Lib) messages: 299485 nosy: Segev Finer priority: normal severity: normal status: open title: pdb's debug command (Pdb.do_debug) doesn't use rawinput even if the parent pdb uses rawinput type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 17:05:58 2017 From: report at bugs.python.org (Segev Finer) Date: Sat, 29 Jul 2017 21:05:58 +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: <1501362358.98.0.639671181026.issue9325@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- nosy: +Segev Finer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 17:06:02 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 29 Jul 2017 21:06:02 +0000 Subject: [issue31077] Windows Installer Version In-Reply-To: <1501346593.98.0.592003481581.issue31077@psf.upfronthosting.co.za> Message-ID: <1501362362.21.0.408672408239.issue31077@psf.upfronthosting.co.za> Steve Dower added the comment: Please file separate bugs for each of your concerns, and ensure Python 3.6/3.7 and 2.7 are separate as these are fundamentally different installers and will have different bugs. Other versions will not be changed at this point. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 17:07:50 2017 From: report at bugs.python.org (Segev Finer) Date: Sat, 29 Jul 2017 21:07:50 +0000 Subject: [issue31078] pdb's debug command (Pdb.do_debug) doesn't use rawinput even if the parent pdb uses rawinput In-Reply-To: <1501362127.96.0.48372316228.issue31078@psf.upfronthosting.co.za> Message-ID: <1501362470.02.0.894287274477.issue31078@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +2996 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 17:44:26 2017 From: report at bugs.python.org (Shubha Ramani) Date: Sat, 29 Jul 2017 21:44:26 +0000 Subject: [issue31074] Startup failure if executable is a \\?\ path on Windows In-Reply-To: <1501310160.44.0.769037276135.issue31074@psf.upfronthosting.co.za> Message-ID: <1501364666.37.0.964429707204.issue31074@psf.upfronthosting.co.za> Shubha Ramani added the comment: May I take resolve this issue and submit a patch ? ---------- nosy: +shubha_bloodhound _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 18:56:08 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 22:56:08 +0000 Subject: [issue30803] Truth value of sets not properly documented In-Reply-To: <1498743378.1.0.0570911503542.issue30803@psf.upfronthosting.co.za> Message-ID: <1501368968.53.0.247570275874.issue30803@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 4c7b368de7bcabdd821059c023c46c9d85668d3f by Terry Jan Reedy in branch '3.6': [3.6] bpo-30803: clarify truth value testing documentation (GH-2508) (#2946) https://github.com/python/cpython/commit/4c7b368de7bcabdd821059c023c46c9d85668d3f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 18:56:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 22:56:48 +0000 Subject: [issue30803] Truth value of sets not properly documented In-Reply-To: <1498743378.1.0.0570911503542.issue30803@psf.upfronthosting.co.za> Message-ID: <1501369008.93.0.546581612553.issue30803@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 18:56:58 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Jul 2017 22:56:58 +0000 Subject: [issue30803] Truth value of sets not properly documented In-Reply-To: <1498743378.1.0.0570911503542.issue30803@psf.upfronthosting.co.za> Message-ID: <1501369018.71.0.629315913792.issue30803@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 20:15:29 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 30 Jul 2017 00:15:29 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1501373729.69.0.207712746424.issue31004@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I'm pushing step 2 with an error in the test. It's on the keydown in test_fontlist_key. I just didn't want to hold you up from looking at the rest of it because of one test. I did run into a bunch of other issues/questions while doing this. I didn't add tracers.attach() to the FontPage class. So, I had to call it in the FontPageTest. Well, I then also added a detach so it wouldn't carry to the other tests and of course all the other tests broke. So, I added setup/teardown of tracers in all the test classes. I don't know if that was the right way to go or if adding tracers.attach to FontPage and then just leaving everything attached would be ok. Also, I tried to minimize the change from `d=dialog` to `d = self.page`, so I kept the name `d`. Adding set_samples to load_font_cfg upped the called count to 4 in test_load_font_cfg because the tracers are attached when it's called. I think you mentioned that test needs to be changed with them detached, but I wasn't sure if you wanted that changed now or later. In FontPage, I tried not to change code yet, so I keep the name `parent` even though `note` will be passed in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 22:03:17 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 02:03:17 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1501380197.55.0.918109404995.issue31004@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am going to work on this now. Tracers should be on for the duration of the test class except for the load test. d = self.page is what I planned initially. Argument note is bound to parameter parent and that will remain the name. The one error I see in PageFont before testing is adding or leaving "frame = Frame(self.parent)". Now that FontPage is a frame, 'frame = self' (we can later replace 'frame' with 'self' as the parent argument in calls that follow). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 23:47:30 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 03:47:30 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1501386450.88.0.892184145421.issue30781@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I fixed the test problem by selecting the General page in the class setup with d.note.select(3). Then the focus_force to a widget on the page must have worked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 01:53:57 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 05:53:57 +0000 Subject: [issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog In-Reply-To: <1501096732.49.0.178704546574.issue31050@psf.upfronthosting.co.za> Message-ID: <1501394037.49.0.0300559035775.issue31050@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Now that we know what we are doing, we can simplify the steps. These assume that #21004, PR2905, which prepares create_widgets and fixes the GeneralTest that was broken by Notebook, has been merged. For configdialog: * copy general block after FontPage; * add 'class GenPage(Frame):' and def __init__ modeled on FontPage.__init__, but no highlight parameter; * replace 'frame = dialog.tabpages...' at top of create_page_general with 'frame = self'; * comment out old code; * in create_widgets change 'self.create_page_general' to 'GenPage(note)'. For test_configdialog: * change 'GeneralTest' to 'GenPageTest * change setUpClass similarly as in FontPageTest; * change test functions similarly as in FontPageTest and otherwise as needed to keep tests passing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 01:55:02 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 05:55:02 +0000 Subject: [issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog In-Reply-To: <1501096732.49.0.178704546574.issue31050@psf.upfronthosting.co.za> Message-ID: <1501394102.71.0.926194953783.issue31050@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- dependencies: +IDLE, configdialog: Factor out FontTab class from ConfigDialog _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 02:31:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 06:31:56 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1501396316.17.0.24374110078.issue30928@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2997 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 05:00:00 2017 From: report at bugs.python.org (Huan Wang) Date: Sun, 30 Jul 2017 09:00:00 +0000 Subject: [issue24827] round(1.65, 1) return 1.6 with decimal In-Reply-To: <1439002924.0.0.989734122739.issue24827@psf.upfronthosting.co.za> Message-ID: <1501405200.93.0.756387412251.issue24827@psf.upfronthosting.co.za> Huan Wang added the comment: Hello, I was confused by the decimal module. The problem is that I want to from decimal import Decimal, ROUND_HALF_UP def rounded(number, n): ''' Round the digits after the n_th decimal point by using decimal module in python. For example: 2.453 is rounded by the function of deal_round(2.453, 1), it will return 2.5. 2.453 is rounded by the function of deal_round(2.453, 2), it will return 2.45. ''' val = Decimal(number) acc = str(n) # n = 0.1 or 0.01 or 0.001 return Decimal(val.quantize(Decimal(acc), rounding=ROUND_HALF_UP)) for x in np.arange(1.0, 4.01, 0.01): rounded_val = rounded(x, 0.1) print("{:}\t{:}".format(x, rounded_val)) The results obtained from the numpy array looks fine, but if I directly used rounded(1.45, 0.1), it yielded Decimal('1.4'), rather than Decimal('1.5'). I think it would be a bug. ---------- nosy: +Huan versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 05:36:36 2017 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 30 Jul 2017 09:36:36 +0000 Subject: [issue30962] Add caching to logging.Logger.isEnabledFor() In-Reply-To: <1500409493.45.0.605739415496.issue30962@psf.upfronthosting.co.za> Message-ID: <1501407396.01.0.912138068849.issue30962@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset 78c18a9b9a1445f7c755929917a790ba02b4a5e0 by Vinay Sajip (Avram Lubkin) in branch 'master': bpo-30962: Added caching to Logger.isEnabledFor() (GH-2752) https://github.com/python/cpython/commit/78c18a9b9a1445f7c755929917a790ba02b4a5e0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 05:41:48 2017 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 30 Jul 2017 09:41:48 +0000 Subject: [issue30522] Allow replacing a logging.StreamHandler's stream In-Reply-To: <1496218150.64.0.987173470763.issue30522@psf.upfronthosting.co.za> Message-ID: <1501407708.05.0.886103833462.issue30522@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset 2543f50033208c1a8df04999082b11aa09e82a04 by Vinay Sajip in branch 'master': bpo-30522: Implemented a method to allow setting a logging.StreamHander's stream. (GH-2921) https://github.com/python/cpython/commit/2543f50033208c1a8df04999082b11aa09e82a04 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 05:44:33 2017 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 30 Jul 2017 09:44:33 +0000 Subject: [issue30522] Allow replacing a logging.StreamHandler's stream In-Reply-To: <1496218150.64.0.987173470763.issue30522@psf.upfronthosting.co.za> Message-ID: <1501407873.4.0.0721364639156.issue30522@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 05:44:55 2017 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 30 Jul 2017 09:44:55 +0000 Subject: [issue30962] Add caching to logging.Logger.isEnabledFor() In-Reply-To: <1500409493.45.0.605739415496.issue30962@psf.upfronthosting.co.za> Message-ID: <1501407895.69.0.550148867221.issue30962@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 06:25:25 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 10:25:25 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1501410325.91.0.630184856271.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset c3aa47f655abe564a2c2fb6d091ab19bdc0113b5 by Terry Jan Reedy in branch 'master': bpo-30928: Update IDLE News.txt. (#2948) https://github.com/python/cpython/commit/c3aa47f655abe564a2c2fb6d091ab19bdc0113b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 06:41:09 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 10:41:09 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1501411269.31.0.524520890131.issue30928@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2998 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 07:27:45 2017 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 30 Jul 2017 11:27:45 +0000 Subject: [issue24827] round(1.65, 1) return 1.6 with decimal In-Reply-To: <1439002924.0.0.989734122739.issue24827@psf.upfronthosting.co.za> Message-ID: <1501414065.91.0.90985112241.issue24827@psf.upfronthosting.co.za> Mark Dickinson added the comment: Huan, This isn't a bug: see the earlier comments from Zachary Ware on this issue for explanations. When you compute `rounded(1.45, 0.1)`, you convert the *float* 1.45 to a Decimal instance. Thanks to the What You See Is Not What You Get nature of binary floating point, the actual value stored for 1.45 is: 1.4499999999999999555910790149937383830547332763671875 Conversion from float to Decimal is exact, so the Decimal value you're working with is also a touch under 1.45: >>> from decimal import Decimal >>> Decimal(1.45) Decimal('1.4499999999999999555910790149937383830547332763671875') And so it correctly rounds down to `1.4`. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 07:45:01 2017 From: report at bugs.python.org (Huan Wang) Date: Sun, 30 Jul 2017 11:45:01 +0000 Subject: [issue24827] round(1.65, 1) return 1.6 with decimal In-Reply-To: <1439002924.0.0.989734122739.issue24827@psf.upfronthosting.co.za> Message-ID: <1501415101.56.0.895500821038.issue24827@psf.upfronthosting.co.za> Huan Wang added the comment: Hi Mark, Thank you for your reply. I went over again the answer from Zachary Ware published on 2015-08-08 09:36. I got the point that it is better to use string type of number. >>> from decimal import Decimal, ROUND_HALF_UP >>> Decimal("1.45") Decimal('1.45') >>> Decimal(Decimal("1.45").quantize(Decimal("0.1"), rounding=ROUND_HALF_UP)) Decimal('1.5') I think it is better to make a tip in the Python tutorial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 08:08:19 2017 From: report at bugs.python.org (devurandom) Date: Sun, 30 Jul 2017 12:08:19 +0000 Subject: [issue29504] blake2: compile error with -march=bdver2 In-Reply-To: <1486574963.2.0.72017577066.issue29504@psf.upfronthosting.co.za> Message-ID: <1501416499.0.0.776532525608.issue29504@psf.upfronthosting.co.za> Changes by devurandom : ---------- nosy: +devurandom _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 11:40:28 2017 From: report at bugs.python.org (paul j3) Date: Sun, 30 Jul 2017 15:40:28 +0000 Subject: [issue31012] suggestion: allow termination argument in argparse to be specified as argument In-Reply-To: <1500903609.87.0.148585957188.issue31012@psf.upfronthosting.co.za> Message-ID: <1501429228.66.0.700748691144.issue31012@psf.upfronthosting.co.za> Changes by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 11:47:22 2017 From: report at bugs.python.org (paul j3) Date: Sun, 30 Jul 2017 15:47:22 +0000 Subject: [issue29670] argparse: does not respect required args pre-populated into namespace In-Reply-To: <1488227590.23.0.0462095560451.issue29670@psf.upfronthosting.co.za> Message-ID: <1501429642.72.0.738060927032.issue29670@psf.upfronthosting.co.za> paul j3 added the comment: Another pre-existing namespace issue http://bugs.python.org/issue28734 When positional nargs='?' or '*', the default (or []) overwrites the namespace value. That's because the posiitonals are always 'seen' (by an empty string), and `get_values` has special handling. This action interacts with `take_action` and the handling of mutually_exclusive_groups. ---------- versions: +Python 3.7 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 12:27:18 2017 From: report at bugs.python.org (vinsci) Date: Sun, 30 Jul 2017 16:27:18 +0000 Subject: [issue31079] mathematically wrong results from int and long bit_length methods Message-ID: <1501432038.15.0.969151408213.issue31079@psf.upfronthosting.co.za> New submission from vinsci: It takes as many bits to store the number 0 as the number 1, but the implementation claims it takes no bits at all to store a 0. >>> (1).bit_length() == (0).bit_length() and True or False False It takes one extra bit to store the sign for negative numbers, but this isn't reflected in the implementations. >>> (-1).bit_length() == 1 + (1).bit_length() and True or False False ---------- components: Library (Lib) messages: 299500 nosy: vinsci priority: normal severity: normal status: open title: mathematically wrong results from int and long bit_length methods type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 12:38:39 2017 From: report at bugs.python.org (Stefan Krah) Date: Sun, 30 Jul 2017 16:38:39 +0000 Subject: [issue31079] mathematically wrong results from int and long bit_length methods In-Reply-To: <1501432038.15.0.969151408213.issue31079@psf.upfronthosting.co.za> Message-ID: <1501432719.7.0.098353595473.issue31079@psf.upfronthosting.co.za> Stefan Krah added the comment: Look at Include/longobject.h and https://docs.python.org/3/library/stdtypes.html?highlight=bit_length#int.bit_length . ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 13:10:10 2017 From: report at bugs.python.org (Preston Landers) Date: Sun, 30 Jul 2017 17:10:10 +0000 Subject: [issue31080] Allow `logging.config.fileConfig` to accept kwargs Message-ID: <1501434610.41.0.267137622883.issue31080@psf.upfronthosting.co.za> New submission from Preston Landers: The function `logging.config.fileConfig` accepts `args` but it would be nice if it also accepted `kwargs`. A simple patch seems to do it: diff --git a/Lib/logging/config.py b/Lib/logging/config.py index d692514..4672b48 100644 --- a/Lib/logging/config.py +++ b/Lib/logging/config.py @@ -145,7 +145,9 @@ def _install_handlers(cp, formatters): klass = _resolve(klass) args = section["args"] args = eval(args, vars(logging)) - h = klass(*args) + kwargs = section.get("kwargs", '{}') + kwargs = eval(kwargs, vars(logging)) + h = klass(*args, **kwargs) if "level" in section: level = section["level"] h.setLevel(level) Unless there are any objections I plan to submit a pull request. In my use case I have a Pyramid service which uses `concurrent-log-handler` and it seems better to be able to name keyword args for file configuration. ---------- components: Library (Lib) messages: 299502 nosy: planders priority: normal severity: normal status: open title: Allow `logging.config.fileConfig` to accept kwargs type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 13:34:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 17:34:27 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1501436067.28.0.352787902946.issue31004@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 9397e2a87ed6e0e724ad71a0c751553620cb775e by Terry Jan Reedy (csabella) in branch 'master': bpo-31004: IDLE: Factor out FontPage class from configdialog (step 1) (#2905) https://github.com/python/cpython/commit/9397e2a87ed6e0e724ad71a0c751553620cb775e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 13:35:49 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 17:35:49 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1501436149.0.0.143597437989.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset c9c85321df7803137a413d26db41aaa377b13d79 by Terry Jan Reedy in branch '3.6': [3.6] bpo-30928: Update IDLE News.txt. (GH-2948) (#2949) https://github.com/python/cpython/commit/c9c85321df7803137a413d26db41aaa377b13d79 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 13:38:24 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 17:38:24 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1501436304.07.0.661587926449.issue31004@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +2999 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 13:53:26 2017 From: report at bugs.python.org (vinsci) Date: Sun, 30 Jul 2017 17:53:26 +0000 Subject: [issue31079] mathematically wrong results from int and long bit_length methods In-Reply-To: <1501432038.15.0.969151408213.issue31079@psf.upfronthosting.co.za> Message-ID: <1501437206.72.0.680767190169.issue31079@psf.upfronthosting.co.za> vinsci added the comment: >>> (0).bit_length.__doc__ "int.bit_length() -> int\n\nNumber of bits necessary to represent self in binary.\n>>> bin(37)\n'0b100101'\n>>> (37).bit_length()\n6" The library documentation has clearly been written in disregard of the advertised functionality in the docstrings of the methods. The documentation is just echoing the flaws of the unit tests. For the Python 3 variant of this issue, it can be added that the library documentation wrongly states that the method is "New in version 3.1.". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 14:02:45 2017 From: report at bugs.python.org (Stefan Krah) Date: Sun, 30 Jul 2017 18:02:45 +0000 Subject: [issue31079] mathematically wrong results from int and long bit_length methods In-Reply-To: <1501432038.15.0.969151408213.issue31079@psf.upfronthosting.co.za> Message-ID: <1501437765.03.0.0427913084472.issue31079@psf.upfronthosting.co.za> Stefan Krah added the comment: Thank you for your expertise. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 14:59:52 2017 From: report at bugs.python.org (Scott Colby) Date: Sun, 30 Jul 2017 18:59:52 +0000 Subject: [issue31081] Release Build Failure on Ubuntu 14.04 Message-ID: <1501441191.63.0.0444121805519.issue31081@psf.upfronthosting.co.za> New submission from Scott Colby: After downloading and decompressing the latest 3.6.2 source release, I attempted to build as follows: $ ./configure --enable-optimizations --enable-ipv6 # seems fine $ make -s -j$(nproc) At the end of the build I have this error reported: Failed to build these modules: _socket Following modules built successfully but were removed because they could not be imported: _asyncio _ssl Scrolling up, I see that the _asyncio and _ssl failures are due to _socket being missing. Scrolling up further, I see several warnings and errors, to wit: *a series of tests that seem to go okay* 0:05:14 load avg: 0.62 [161/405] test_hash 0:05:15 load avg: 0.65 [162/405] test_hashlib Fatal Python error: Segmentation fault Current thread 0x00002afbece8e380 (most recent call first): File "/usr/local/src/python/Python-3.6.2/Lib/test/support/__init__.py", line 1508 in gc_collect File "/usr/local/src/python/Python-3.6.2/Lib/test/libregrtest/save_env.py", line 271 in __exit__ File "/usr/local/src/python/Python-3.6.2/Lib/test/libregrtest/runtest.py", line 172 in runtest_inner File "/usr/local/src/python/Python-3.6.2/Lib/test/libregrtest/runtest.py", line 137 in runtest File "/usr/local/src/python/Python-3.6.2/Lib/test/libregrtest/main.py", line 374 in run_tests_sequential File "/usr/local/src/python/Python-3.6.2/Lib/test/libregrtest/main.py", line 454 in run_tests File "/usr/local/src/python/Python-3.6.2/Lib/test/libregrtest/main.py", line 530 in _main File "/usr/local/src/python/Python-3.6.2/Lib/test/libregrtest/main.py", line 504 in main File "/usr/local/src/python/Python-3.6.2/Lib/test/libregrtest/main.py", line 573 in main File "/usr/local/src/python/Python-3.6.2/Lib/test/regrtest.py", line 46 in _main File "/usr/local/src/python/Python-3.6.2/Lib/test/regrtest.py", line 50 in File "/usr/local/src/python/Python-3.6.2/Lib/runpy.py", line 85 in _run_code File "/usr/local/src/python/Python-3.6.2/Lib/runpy.py", line 193 in _run_module_as_main Segmentation fault (core dumped) After this, the build seems to think all the tests are done and continues with "Rebuilding with profile guided optimizations:". There are a lot of warnings here, mostly about missing execution counts, which I assume comes from 3/4 of the tests not being run. Later on, however, we have this gem: /usr/local/src/python/Python-3.6.2/Modules/socketmodule.c:7693:1: internal compiler error: in edge_badness, at ipa-inline.c:895 } ^ Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Preprocessed source stored into /tmp/ccMFxPIP.out file, please attach this to your bugreport. ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/_usr_lib_gcc_x86_64-linux-gnu_4.8_cc1.1000.crash' I have gcc (Ubuntu 4.8.4-2ubuntu~14.04.3) 4.8.4 I'm new to building Python and even newer to reporting bugs here, so please let me know what additional information I should provide or steps I should take. ---------- components: Build files: ccMFxPIP.out messages: 299507 nosy: scolby33 priority: normal severity: normal status: open title: Release Build Failure on Ubuntu 14.04 type: compile error versions: Python 3.6 Added file: http://bugs.python.org/file47048/ccMFxPIP.out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 15:00:53 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 19:00:53 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1501441253.1.0.98726957676.issue31004@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 7582226a92481ca63dedbfe14ef465d1349d66a9 by Terry Jan Reedy in branch '3.6': [3.6] bpo-31004: IDLE: Factor out FontPage class from configdialog (step 1) (GH-2905) (#2950) https://github.com/python/cpython/commit/7582226a92481ca63dedbfe14ef465d1349d66a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 15:09:44 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 30 Jul 2017 19:09:44 +0000 Subject: [issue31081] Release Build Failure on Ubuntu 14.04 In-Reply-To: <1501441191.63.0.0444121805519.issue31081@psf.upfronthosting.co.za> Message-ID: <1501441784.02.0.20125135676.issue31081@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, as the log you posted shows, this seems to be a gcc bug. Of course, I don't know if the gcc project still accepts bug reports for gcc 4.8, but we're unlikely to be able to help you here. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 15:15:21 2017 From: report at bugs.python.org (Scott Colby) Date: Sun, 30 Jul 2017 19:15:21 +0000 Subject: [issue31081] Release Build Failure on Ubuntu 14.04 In-Reply-To: <1501441191.63.0.0444121805519.issue31081@psf.upfronthosting.co.za> Message-ID: <1501442121.79.0.475175597222.issue31081@psf.upfronthosting.co.za> Scott Colby added the comment: You make a fair point. I didn't realize that my version of gcc was so far behind. Perhaps I ought to seek out a binary distribution of Python 3.6, since upgrading the whole of gcc doesn't seem quite worth my time. If you don't think there is anything else to be done on Python's end, feel free to mark this resolved in some way. (And indeed, the entire 4.8 series is no longer maintained.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 15:15:23 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 30 Jul 2017 19:15:23 +0000 Subject: [issue29256] Windows select() errors out when given no fds to select on, which breaks SelectSelector In-Reply-To: <1484264538.85.0.902649207203.issue29256@psf.upfronthosting.co.za> Message-ID: <1501442123.02.0.35783254693.issue29256@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 15:18:05 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 30 Jul 2017 19:18:05 +0000 Subject: [issue31081] Release Build Failure on Ubuntu 14.04 In-Reply-To: <1501441191.63.0.0444121805519.issue31081@psf.upfronthosting.co.za> Message-ID: <1501442285.02.0.408247356218.issue31081@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, if it's really a compiler bug, there's nothing we can do against it. You should still be able to build without the --with-optimizations flag, which will give you a build perhaps 20% slower but still fully functional. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 15:19:07 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 30 Jul 2017 19:19:07 +0000 Subject: [issue31081] Release Build Failure on Ubuntu 14.04 In-Reply-To: <1501441191.63.0.0444121805519.issue31081@psf.upfronthosting.co.za> Message-ID: <1501442347.52.0.0185839704298.issue31081@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 15:23:35 2017 From: report at bugs.python.org (Alexander Mohr) Date: Sun, 30 Jul 2017 19:23:35 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501442615.12.0.442606068918.issue31061@psf.upfronthosting.co.za> Alexander Mohr added the comment: ok got a full debug core file, let me know what other information I can provide. ---------- status: closed -> open Added file: http://bugs.python.org/file47049/python crash.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 15:24:49 2017 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 30 Jul 2017 19:24:49 +0000 Subject: [issue30842] pyenv activate for bash and tcsh In-Reply-To: <1499110607.19.0.325548288138.issue30842@psf.upfronthosting.co.za> Message-ID: <1501442689.4.0.716787188439.issue30842@psf.upfronthosting.co.za> Vinay Sajip added the comment: Note that the activate script currently also works with /bin/sh (using . venv-dir/bin/activate) but pushd and popd are not supported there, and introducing them would presumably break this script on /bin/sh. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 15:35:34 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 19:35:34 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1501443334.22.0.615601545277.issue31004@psf.upfronthosting.co.za> Terry J. Reedy added the comment: At last! On to the next one. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 15:39:28 2017 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 30 Jul 2017 19:39:28 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501443568.79.0.0663067596644.issue31061@psf.upfronthosting.co.za> Yury Selivanov added the comment: >ok got a full debug core file, let me know what other information I can provide. Thank you. Does the crash happen with python versions of Tasks and Future? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 15:39:53 2017 From: report at bugs.python.org (Alexander Mohr) Date: Sun, 30 Jul 2017 19:39:53 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501443593.14.0.552521899649.issue31061@psf.upfronthosting.co.za> Alexander Mohr added the comment: this is the comment on the assert: /* Python's cyclic gc should never see an incoming refcount * of 0: if something decref'ed to 0, it should have been * deallocated immediately at that time. * Possible cause (if the assert triggers): a tp_dealloc * routine left a gc-aware object tracked during its teardown * phase, and did something-- or allowed something to happen -- * that called back into Python. gc can trigger then, and may * see the still-tracked dying object. Before this assert * was added, such mistakes went on to allow gc to try to * delete the object again. In a debug build, that caused * a mysterious segfault, when _Py_ForgetReference tried * to remove the object from the doubly-linked list of all * objects a second time. In a release build, an actual * double deallocation occurred, which leads to corruption * of the allocator's internal bookkeeping pointers. That's * so serious that maybe this should be a release-build * check instead of an assert? */ I've also attached a file that's similar to the code we run in production, however couldn't get it to reproduce the crash. In the datafile it uses it has some tuples like the following: StationTuple = namedtuple('StationTuple', ['stationname', 'stationsubtype', 's2id']) ---------- Added file: http://bugs.python.org/file47050/python_crash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 15:46:38 2017 From: report at bugs.python.org (Alexander Mohr) Date: Sun, 30 Jul 2017 19:46:38 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501443998.01.0.460747674266.issue31061@psf.upfronthosting.co.za> Alexander Mohr added the comment: hmm, how would I do that? btw I'm not 100% sure this is due to asyncio. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 16:12:09 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 30 Jul 2017 20:12:09 +0000 Subject: [issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog In-Reply-To: <1501096732.49.0.178704546574.issue31050@psf.upfronthosting.co.za> Message-ID: <1501445529.8.0.196780045244.issue31050@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Made all the changes without any issue. One thing - I noticed that the var_changed_autosave, etc for the General tab were back, even though they aren't used by VarTrace. I know I had deleted them, so I'm not sure how they came back. Unless you re-added them? That's what happened to me yesterday -- changes I knew I had made were back again. Anyway, if you want them back, sorry about deleting them again. I just figured it was something that happened on my end. Also, I snuck in a change to the Notebook. I know it should be in its own PR. If you like it, I can leave it here or make a new PR. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 16:14:31 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 30 Jul 2017 20:14:31 +0000 Subject: [issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog In-Reply-To: <1501096732.49.0.178704546574.issue31050@psf.upfronthosting.co.za> Message-ID: <1501445671.1.0.130512454283.issue31050@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 16:29:18 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 20:29:18 +0000 Subject: [issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog In-Reply-To: <1501096732.49.0.178704546574.issue31050@psf.upfronthosting.co.za> Message-ID: <1501446558.15.0.458400148823.issue31050@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Above, I left out the last step, "* remove old general block". The old configdialog had an unwritten and undocumented template and rules for pages on the dialog. It went something like the following. # def create_widgets(): * Pick names for the pages. They are both tab labels and page ids. * Send names to tabbed_pages. * Call create_page_name functions. # def load_configs(): * Call each load_name_config. # def create_page_name(): for each name. * Extract frame from tabbed_pages using name. * Define tk vars. * Create subframes and widgets * Pack widgets # def var_changed_var_name(), for each tk var * Perhaps send change to changes dict. # def other_method():, for each name, semi-sorted # def load_name_config() for each name. # Tack on extensions mostly ignoring the above. What I said in the message above is that we have redefined the template well enough to follow it. We have a mostly abstract template. class NamePage(Frame): def __init__(self, master): super().__init__(master) self.create_page_name() self.load_name_cfg() ... Note that the parameter is 'master', not 'parent', as is standard for widgets. It is also not saved, as it is not needed. TkVars for the page can use self as master. I considered making that an actual base class. But there is little common code; it does not quite fit FontPage; and would require uniform 'create_page' and 'load_cfg' names. The more specific names are easier to find with ^F ;-). I do want to add a comment block above FontPage giving the design. I also want to change FontPage to use self as master for tk vars and other widgets. Lets freeze the General page block until this is done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 17:06:27 2017 From: report at bugs.python.org (Stefan Pochmann) Date: Sun, 30 Jul 2017 21:06:27 +0000 Subject: [issue31082] reduce takes iterable, not just sequence Message-ID: <1501448787.5.0.80084797494.issue31082@psf.upfronthosting.co.za> New submission from Stefan Pochmann: functools.reduce has a parameter called "iterable" and it only needs to be an iterable, not a sequence. The paragraph documenting it says "sequence" instead of "iterable" six times: https://docs.python.org/3/library/functools.html#functools.reduce The help shown by executing "help(functools.reduce)" in Python additionally actually names the parameter "sequence" in the signature. ---------- assignee: docs at python components: Documentation messages: 299520 nosy: Stefan Pochmann, docs at python priority: normal severity: normal status: open title: reduce takes iterable, not just sequence type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 17:06:51 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 21:06:51 +0000 Subject: [issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog In-Reply-To: <1501096732.49.0.178704546574.issue31050@psf.upfronthosting.co.za> Message-ID: <1501448811.5.0.139724869401.issue31050@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I did not refresh this before writing the above. It still applies, including deleting the commented out code once tests pass. See review. Whoops: I forgot that using make_default means that we can (and should) delete the replaced var_changed defs. I added the one for space_num back because I mistakenly thought it was needed to make the test pass. I will open a new issue to add a comment documenting the new TabPage(Frame) class design. The new rules will include using default var_changes when possible. Patch will include adjusting FontTab to follow the new rules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 17:28:44 2017 From: report at bugs.python.org (Alexander Mohr) Date: Sun, 30 Jul 2017 21:28:44 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501450124.43.0.0497087857027.issue31061@psf.upfronthosting.co.za> Alexander Mohr added the comment: btw got slightly difference stacktrace on second core file ---------- Added file: http://bugs.python.org/file47051/python crash2.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 17:35:16 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 21:35:16 +0000 Subject: [issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog In-Reply-To: <1501096732.49.0.178704546574.issue31050@psf.upfronthosting.co.za> Message-ID: <1501450516.3.0.667845675067.issue31050@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I intentionally left using non-default options other than traversal for a new issue or issues, after we finish ttk replacement. I imagine there will be discussions about choices, and I will invite other participants. I would like to direct visual design discussions, as opposed to internal implementation discussion, to idle_dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 17:50:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 21:50:03 +0000 Subject: [issue31083] IDLE: document new TabPage(Frame) design for configdialog Message-ID: <1501451403.71.0.908658123964.issue31083@psf.upfronthosting.co.za> New submission from Terry J. Reedy: We are in the process of moving blocks of ConfigDialog methods pertaining to one tab page to a separate class. FontPage is more or less done. GenPage is in process. This issue is about documenting the generic structure of the classes in a comment block. The following is extracted from msg299519 of #31050. # class TabPage(Frame): # def __init__(self, master): # super().__init__(master) # self.create_page_tab() # self.load_tab_cfg() # def create_page_tab(): # ... The rest will be an adaptation of the description of the old design in the same message plus what we have actually done so far. This issue includes editing FontPage to conform to the documented design. ---------- assignee: terry.reedy components: IDLE messages: 299524 nosy: csabella, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: document new TabPage(Frame) design for configdialog type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 17:52:10 2017 From: report at bugs.python.org (favll) Date: Sun, 30 Jul 2017 21:52:10 +0000 Subject: [issue31084] QueueHandler not formatting messages Message-ID: <1501451530.82.0.0352443251136.issue31084@psf.upfronthosting.co.za> New submission from favll: QueueHandler does not seem to format messages when setting a Formatter and attaching the QueueHandler to a logger. See attachement for a concise example. According to the internal documentation of the QueueHandler's prepare method it is expected that self.format(record) will format the message and put the message into record.message. However, this is not the case and self.format(record) only returns the message. So this should be ab easy fix. ---------- components: Library (Lib) files: queue_handler_bug.py messages: 299525 nosy: favll priority: normal severity: normal status: open title: QueueHandler not formatting messages type: behavior versions: Python 3.7 Added file: http://bugs.python.org/file47052/queue_handler_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 17:57:27 2017 From: report at bugs.python.org (Alexander Mohr) Date: Sun, 30 Jul 2017 21:57:27 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1501451847.1.0.884644643436.issue26617@psf.upfronthosting.co.za> Alexander Mohr added the comment: I'm tracking something very similar issue to this in bug: http://bugs.python.org/issue31061 Given its similarities, anyone have any ideas? Based on the second callstack I'm starting to think this is an issue with defaultdict ---------- nosy: +thehesiod _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 18:00:36 2017 From: report at bugs.python.org (favll) Date: Sun, 30 Jul 2017 22:00:36 +0000 Subject: [issue31084] QueueHandler not formatting messages In-Reply-To: <1501451530.82.0.0352443251136.issue31084@psf.upfronthosting.co.za> Message-ID: <1501452036.86.0.191700641553.issue31084@psf.upfronthosting.co.za> Changes by favll : ---------- pull_requests: +3001 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 18:02:07 2017 From: report at bugs.python.org (Arnon Sela) Date: Sun, 30 Jul 2017 22:02:07 +0000 Subject: [issue30842] pyenv activate for bash and tcsh In-Reply-To: <1499110607.19.0.325548288138.issue30842@psf.upfronthosting.co.za> Message-ID: <1501452127.74.0.454403415485.issue30842@psf.upfronthosting.co.za> Arnon Sela added the comment: The procedure: pushd $fullpath fullpath=$(pwd -P) popd Can be made sh (and other shells) friendly by: here=$PWD # or $(pwd) cd $fullpath fullpath=$(pwd -P) cd $here More to write, but should work, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 18:39:20 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 22:39:20 +0000 Subject: [issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog In-Reply-To: <1501096732.49.0.178704546574.issue31050@psf.upfronthosting.co.za> Message-ID: <1501454360.16.0.17302272825.issue31050@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset e8eb17b2c11dcd1550a94b175e557c234a804482 by Terry Jan Reedy (csabella) in branch 'master': bpo-31050: IDLE: Factor GenPage class from ConfigDialog (#2952) https://github.com/python/cpython/commit/e8eb17b2c11dcd1550a94b175e557c234a804482 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 18:41:31 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 22:41:31 +0000 Subject: [issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog In-Reply-To: <1501096732.49.0.178704546574.issue31050@psf.upfronthosting.co.za> Message-ID: <1501454491.56.0.541484950806.issue31050@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3003 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 19:02:54 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 23:02:54 +0000 Subject: [issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog In-Reply-To: <1501096732.49.0.178704546574.issue31050@psf.upfronthosting.co.za> Message-ID: <1501455774.05.0.903388436906.issue31050@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 8c4e5be1dfb4d1c74e8cc7ac925e3196818e07ac by Terry Jan Reedy in branch '3.6': [3.6] bpo-31050: IDLE: Factor GenPage class from ConfigDialog (GH-2952) (#2955) https://github.com/python/cpython/commit/8c4e5be1dfb4d1c74e8cc7ac925e3196818e07ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 19:07:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 23:07:56 +0000 Subject: [issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog In-Reply-To: <1501096732.49.0.178704546574.issue31050@psf.upfronthosting.co.za> Message-ID: <1501456076.4.0.0579825233808.issue31050@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Much easier the 2nd time ;-) ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 20:12:15 2017 From: report at bugs.python.org (Kevin Quick) Date: Mon, 31 Jul 2017 00:12:15 +0000 Subject: [issue26732] multiprocessing sentinel resource leak In-Reply-To: <1460325501.58.0.225914662536.issue26732@psf.upfronthosting.co.za> Message-ID: <1501459935.37.0.759924853324.issue26732@psf.upfronthosting.co.za> Kevin Quick added the comment: Hi Antoine, > ... an implementation detail rather than a documented feature I understand your desire, but this is a leaky abstraction and I would still suggest that it should be more clear that the fork method will inherit *all* resources from the parent, including multiprocessing internal resources related to other processes. This is potentially important if there are (a) large numbers of processes to be created and (b) for security aspects. Regards, Kevin ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 21:05:54 2017 From: report at bugs.python.org (Isaac Morland) Date: Mon, 31 Jul 2017 01:05:54 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically Message-ID: <1501463154.41.0.0907519926767.issue31085@psf.upfronthosting.co.za> New submission from Isaac Morland: I would like to have the possibility of creating a namedtuple type without explicitly giving it a name. I see two major use cases for this: 1) Automatic creation of namedtuples for things like CSV files with headers (see #1818) or SQL results (see #13299). In this case at the point of calling namedtuple I have column headings (or otherwise automatically-determined attribute names), but there probably isn't a specific class name that makes sense to use. 2) Subclassing from a namedtuple invocation; I obviously need to name my subclass, but the name passed to the namedtuple invocation is essentially useless. My idea is to allow giving None for the typename parameter of namedtuple, like this: class MyCustomBehaviourNamedtuple (namedtuple (None, ['a', 'b'])): ... In this case namedtuple will generate a name based on the field names. This should be backward compatible because right now passing None raises a TypeError. So there is no change if a non-None typename is passed, and an exception is replaced by computing a default typename if None is passed. Patch to follow. ---------- components: Library (Lib) messages: 299532 nosy: Isaac Morland priority: normal severity: normal status: open title: Add option for namedtuple to name its result type automatically type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 21:10:38 2017 From: report at bugs.python.org (Isaac Morland) Date: Mon, 31 Jul 2017 01:10:38 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501463154.41.0.0907519926767.issue31085@psf.upfronthosting.co.za> Message-ID: <1501463438.2.0.996733770324.issue31085@psf.upfronthosting.co.za> Isaac Morland added the comment: I'm hoping to make a pull request but while I figure that out here is the diff: diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 8408255..62cf708 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -384,7 +384,6 @@ def namedtuple(typename, field_names, *, verbose=False, rename=False, module=Non if isinstance(field_names, str): field_names = field_names.replace(',', ' ').split() field_names = list(map(str, field_names)) - typename = str(typename) if rename: seen = set() for index, name in enumerate(field_names): @@ -394,6 +393,10 @@ def namedtuple(typename, field_names, *, verbose=False, rename=False, module=Non or name in seen): field_names[index] = '_%d' % index seen.add(name) + if typename is None: + typename = '__'.join (field_names) + else: + typename = str(typename) for name in [typename] + field_names: if type(name) is not str: raise TypeError('Type names and field names must be strings') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 21:11:49 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 31 Jul 2017 01:11:49 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501463154.41.0.0907519926767.issue31085@psf.upfronthosting.co.za> Message-ID: <1501463509.2.0.902293848206.issue31085@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 21:19:07 2017 From: report at bugs.python.org (Isaac Morland) Date: Mon, 31 Jul 2017 01:19:07 +0000 Subject: [issue31086] Add namedattrgetter function which acts like attrgetter but uses namedtuple Message-ID: <1501463947.14.0.101425417299.issue31086@psf.upfronthosting.co.za> New submission from Isaac Morland: This is meant to replace my proposal in #30020 to change attrgetter to use namedtuple. By creating a new function implemented in Python, I avoid making changes to the existing attrgetter, which means that both the need of implementing a C version and the risk of changing the performance or other characteristics of the existing function are eliminated. My suggestion is to put this in the collections module next to namedtuple. This eliminates the circular import problem and is a natural fit as it is an application of namedtuple. ---------- components: Library (Lib) messages: 299534 nosy: Isaac Morland priority: normal severity: normal status: open title: Add namedattrgetter function which acts like attrgetter but uses namedtuple type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 21:21:23 2017 From: report at bugs.python.org (Isaac Morland) Date: Mon, 31 Jul 2017 01:21:23 +0000 Subject: [issue31086] Add namedattrgetter function which acts like attrgetter but uses namedtuple In-Reply-To: <1501463947.14.0.101425417299.issue31086@psf.upfronthosting.co.za> Message-ID: <1501464083.62.0.710684821005.issue31086@psf.upfronthosting.co.za> Isaac Morland added the comment: Here is the diff. Note that I assume implementation of #31085, which allows me to push determination of a name for the namedtuple down into namedtuple itself: diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 62cf708..d507d23 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -14,7 +14,8 @@ list, set, and tuple. ''' -__all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList', +__all__ = ['deque', 'defaultdict', 'namedtuple', 'namedattrgetter', + 'UserDict', 'UserList', 'UserString', 'Counter', 'OrderedDict', 'ChainMap'] # For backwards compatibility, continue to make the collections ABCs @@ -23,7 +24,7 @@ from _collections_abc import * import _collections_abc __all__ += _collections_abc.__all__ -from operator import itemgetter as _itemgetter, eq as _eq +from operator import itemgetter as _itemgetter, attrgetter as _attrgetter, eq as _eq from keyword import iskeyword as _iskeyword import sys as _sys import heapq as _heapq @@ -451,6 +452,14 @@ def namedtuple(typename, field_names, *, verbose=False, rename=False, module=Non return result +def namedattrgetter (attr, *attrs): + ag = _attrgetter (attr, *attrs) + + if attrs: + nt = namedtuple (None, (attr,) + attrs, rename=True) + return lambda obj: nt._make (ag (obj)) + else: + return ag ######################################################################## ### Counter ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 00:14:24 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 31 Jul 2017 04:14:24 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501463154.41.0.0907519926767.issue31085@psf.upfronthosting.co.za> Message-ID: <1501474464.14.0.287255549752.issue31085@psf.upfronthosting.co.za> Steven D'Aprano added the comment: If you don't care about the name, just pass '_' for it. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 00:31:00 2017 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Jul 2017 04:31:00 +0000 Subject: [issue30987] Support for ISO-TP protocol in SocketCAN In-Reply-To: <1500696791.75.0.683510511028.issue30987@psf.upfronthosting.co.za> Message-ID: <1501475460.38.0.116081751552.issue30987@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3004 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 01:01:57 2017 From: report at bugs.python.org (Alex) Date: Mon, 31 Jul 2017 05:01:57 +0000 Subject: [issue31087] asyncio.create_subprocess_* do not honor `encoding` Message-ID: <1501477317.46.0.791551033282.issue31087@psf.upfronthosting.co.za> New submission from Alex: Regardless of the value of `encoding`, StreamReaders returned for the `asyncio.subprocess.Process`'s `stdout` and `stderr` would be in binary mode. import sys import asyncio import subprocess async def main(): sp = await asyncio.create_subprocess_exec('ls', '-la', stdin=None, stdout=subprocess.PIPE, encoding='utf8') await sp.wait() data = await sp.stdout.read() print(data) print(isinstance(data, bytes)) loop = asyncio.get_event_loop() loop.run_until_complete(main()) There are two naive solutions: - `create_subprocess_*` could explicitly raise when provided any `encoding` and `errors` (like it now does with `universal_newlines`). - or implement encoding conversions for StreamReaders (and StreamWriters), and forward those. Of course it would be better to have conversions, but I don't know how those will have to deal with decoding partially available data - e.g. returning in the middle of surrogate pair, or having only half a codepoint for UTF16. There should likely cache partial data to process at the next read, but this would require rewriting codecs to support partial decode... seems like it's not that easy :( ---------- messages: 299537 nosy: toriningen priority: normal severity: normal status: open title: asyncio.create_subprocess_* do not honor `encoding` _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 01:02:20 2017 From: report at bugs.python.org (Alex) Date: Mon, 31 Jul 2017 05:02:20 +0000 Subject: [issue31087] asyncio.create_subprocess_* do not honor `encoding` In-Reply-To: <1501477317.46.0.791551033282.issue31087@psf.upfronthosting.co.za> Message-ID: <1501477340.94.0.632906167141.issue31087@psf.upfronthosting.co.za> Changes by Alex : ---------- components: +asyncio nosy: +yselivanov versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 01:26:22 2017 From: report at bugs.python.org (Ethan Furman) Date: Mon, 31 Jul 2017 05:26:22 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501463154.41.0.0907519926767.issue31085@psf.upfronthosting.co.za> Message-ID: <1501478782.54.0.96096546187.issue31085@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 01:39:16 2017 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 31 Jul 2017 05:39:16 +0000 Subject: [issue30640] NULL + 1 in _PyFunction_FastCallDict(), PyEval_EvalCodeEx() In-Reply-To: <1497278279.18.0.370213389584.issue30640@psf.upfronthosting.co.za> Message-ID: <1501479556.09.0.953231487539.issue30640@psf.upfronthosting.co.za> Zackery Spytz added the comment: As mentioned in PR 2919, this is an issue in PyEval_EvalCodeEx() as well. ---------- nosy: +ZackerySpytz title: NULL + 1 in _PyFunction_FastCallDict() -> NULL + 1 in _PyFunction_FastCallDict(), PyEval_EvalCodeEx() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 02:14:23 2017 From: report at bugs.python.org (Julien Palard) Date: Mon, 31 Jul 2017 06:14:23 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501481663.79.0.0925669454157.issue31036@psf.upfronthosting.co.za> Julien Palard added the comment: I added blurb to the docs build script (https://github.com/python/docsbuild-scripts/commit/06375b6d74f6d5613fcd48030b3af8032854c87d), so 3.5 should build soon. The requirements looks automatically pulled from psf-salt https://github.com/python/psf-salt/blob/master/salt/docs/init.sls#L42 but I don't know at which "frequency". ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 03:15:26 2017 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 31 Jul 2017 07:15:26 +0000 Subject: [issue24827] round(1.65, 1) return 1.6 with decimal In-Reply-To: <1439002924.0.0.989734122739.issue24827@psf.upfronthosting.co.za> Message-ID: <1501485326.66.0.506158983888.issue24827@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I think it is better to make a tip in the Python tutorial. I'd recommend opening a separate issue (or pull request, if you're feeling adventurous) for that; this issue is old and closed, and it's unlikely many will be following it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 04:41:49 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 31 Jul 2017 08:41:49 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501463154.41.0.0907519926767.issue31085@psf.upfronthosting.co.za> Message-ID: <1501490509.66.0.377119147887.issue31085@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with Steven. ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 04:54:33 2017 From: report at bugs.python.org (Masayuki Yamamoto) Date: Mon, 31 Jul 2017 08:54:33 +0000 Subject: [issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX In-Reply-To: <1447861816.88.0.632584646231.issue25658@psf.upfronthosting.co.za> Message-ID: <1501491273.5.0.388896074978.issue25658@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: Since previous comment, I've studied the switch for show/hide implementation detail. As the result, I have understood the Py_BUILD_CORE macro hasn't been generally used for hiding implementation detail (and Py_LIMITED_API does the part). Therefore, I withdraw previous proposal for implementation detail, and I'm going to fix PEP a few. After that, I'd like to post to python-dev to know the developer's view of the PEP draft. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 04:56:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Jul 2017 08:56:26 +0000 Subject: [issue29654] SimpleHTTPRequestHandler should support browser cache In-Reply-To: <1488057635.77.0.128841709763.issue29654@psf.upfronthosting.co.za> Message-ID: <1501491386.47.0.377106243712.issue29654@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Victor! I suppose temp.flush() is a remnant of other (unsuccessful) attempt to fix a race condition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 05:09:05 2017 From: report at bugs.python.org (=?utf-8?q?Lum=C3=ADr_Balhar?=) Date: Mon, 31 Jul 2017 09:09:05 +0000 Subject: [issue29144] Implicit namespace packages in Python 3.6 In-Reply-To: <1483468021.78.0.379899829208.issue29144@psf.upfronthosting.co.za> Message-ID: <1501492145.23.0.664579028526.issue29144@psf.upfronthosting.co.za> Lum?r Balhar added the comment: Thank you for the replies. I created an issue [0] on setuptools GitHub (without reply yet) because I also think that setuptools should install pkg_resources-style __init__.py files. [0] https://github.com/pypa/setuptools/issues/1097 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 05:11:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Jul 2017 09:11:12 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1501492272.95.0.944945534265.issue30940@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > For a general Python object ``number``, ``round`` delegates to > ``number.__round__``. This also can be not clear. See a discussion in issue31042. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 05:16:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Jul 2017 09:16:15 +0000 Subject: [issue31028] test_pydoc fails when run directly In-Reply-To: <1500985258.67.0.797354625815.issue31028@psf.upfronthosting.co.za> Message-ID: <1501492575.73.0.0511156088473.issue31028@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Victor. But please don't forget to edit commit messages before merging. Commit messages of above commits look confusing. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 05:23:02 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 31 Jul 2017 09:23:02 +0000 Subject: [issue31086] Add namedattrgetter function which acts like attrgetter but uses namedtuple In-Reply-To: <1501463947.14.0.101425417299.issue31086@psf.upfronthosting.co.za> Message-ID: <1501492982.45.0.110240109166.issue31086@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The principal use case for attrgetter() was to work with key-functions for sorted/min/max/groupby/nsmallest/nlargest. Secondarily, it worked nicely with map() and filter() as a field extractor in a chain of iterators. Neither these use cases would benefit from creating a namedtuple. What are your use cases that are creating a need for a variant of attrgetter that returns namedtuples? Also, how would this be useful with rename=True? The user of the result wouldn't know the fields names in advance and hence wouldn't be able to access them. Do you know of any cases where someone has used this recipe is real code? Has it been tried out on users other than yourself? ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 05:30:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Jul 2017 09:30:11 +0000 Subject: [issue25684] ttk.OptionMenu radiobuttons aren't unique between two instances of OptionMenu In-Reply-To: <1448040288.53.0.198369542776.issue25684@psf.upfronthosting.co.za> Message-ID: <1501493411.75.0.264503517292.issue25684@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a568e5273382a5dca0c27274f7d8e34c41a87d4d by Serhiy Storchaka (csabella) in branch 'master': bpo-25684: ttk.OptionMenu radiobuttons weren't unique (#2276) https://github.com/python/cpython/commit/a568e5273382a5dca0c27274f7d8e34c41a87d4d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 05:41:31 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 31 Jul 2017 09:41:31 +0000 Subject: [issue30999] statistics module: add "key" keyword argument to median, mode, ... In-Reply-To: <1500847822.23.0.66362631161.issue30999@psf.upfronthosting.co.za> Message-ID: <1501494091.42.0.428220806685.issue30999@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I don't think it makes sense to add key arguments to mode, mean, > variance etc. I'm having trouble thinking of what that would > even mean I concur. This proposal bends the concept of a key-function to where it is no longer obvious what it does. > I've given this some more thought, and I think that a "key" > argument would make sense for a general selection function. Yes, that would make sense: select(A, k, key=somefunc) == sorted(A, key=somefunc)[k] ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 06:31:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Jul 2017 10:31:51 +0000 Subject: [issue31071] *args unpacking can mask TypeErrors In-Reply-To: <1501257802.36.0.460267167585.issue31071@psf.upfronthosting.co.za> Message-ID: <1501497111.09.0.82148760431.issue31071@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +3005 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 06:32:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Jul 2017 10:32:38 +0000 Subject: [issue31071] *args unpacking can mask TypeErrors In-Reply-To: <1501257802.36.0.460267167585.issue31071@psf.upfronthosting.co.za> Message-ID: <1501497158.07.0.974304531545.issue31071@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka components: +Interpreter Core nosy: +serhiy.storchaka stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 06:35:42 2017 From: report at bugs.python.org (INADA Naoki) Date: Mon, 31 Jul 2017 10:35:42 +0000 Subject: [issue29519] weakref spewing exceptions during finalization when combined with multiprocessing In-Reply-To: <1486701306.85.0.363188055849.issue29519@psf.upfronthosting.co.za> Message-ID: <1501497342.78.0.258970395408.issue29519@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +3006 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 06:38:33 2017 From: report at bugs.python.org (INADA Naoki) Date: Mon, 31 Jul 2017 10:38:33 +0000 Subject: [issue29519] weakref spewing exceptions during finalization when combined with multiprocessing In-Reply-To: <1486701306.85.0.363188055849.issue29519@psf.upfronthosting.co.za> Message-ID: <1501497513.33.0.523292829639.issue29519@psf.upfronthosting.co.za> INADA Naoki added the comment: [gsutil](https://github.com/GoogleCloudPlatform/gsutil) shows massive "Exception ... ignored" message from this regression. https://twitter.com/minimum2scp/status/890021408482316289 I think we should backport this fix to Python 2.7.14. ---------- nosy: +inada.naoki versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 07:08:42 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 31 Jul 2017 11:08:42 +0000 Subject: [issue25684] ttk.OptionMenu radiobuttons aren't unique between two instances of OptionMenu In-Reply-To: <1448040288.53.0.198369542776.issue25684@psf.upfronthosting.co.za> Message-ID: <1501499322.52.0.782645441678.issue25684@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3007 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 07:56:35 2017 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 31 Jul 2017 11:56:35 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1501502195.45.0.26156654927.issue30940@psf.upfronthosting.co.za> Mark Dickinson added the comment: > This also can be not clear. Sure. But if it comes down to a clear, mostly accurate description that helps people understand versus a harder-to-read nitpick-proof statement, I'd rather see the former. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 08:28:23 2017 From: report at bugs.python.org (Isaac Morland) Date: Mon, 31 Jul 2017 12:28:23 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501463154.41.0.0907519926767.issue31085@psf.upfronthosting.co.za> Message-ID: <1501504103.48.0.228111534121.issue31085@psf.upfronthosting.co.za> Isaac Morland added the comment: I want a meaningful name to appear in debugging output generated by repr() or str(), not just _ all over the place. I just don't want to specifically come up with the meaningful name myself. Right now I pass in the same generated name ('__'.join (field_names)) to the constructor, but this means I need to repeat that logic in any other similar application, and I would have to put in special handling if any of my attribute names required renaming. I would rather be explicit that I'm not providing a specific name. With your '_' suggestion it looks like a magic value - why '_'? By specifying None, it's obvious at the call point that I'm explicitly declining to provide a name, and then the code generates a semi-meaningful name automatically. Also, please note that I moved the place where typename is assigned to after the part where it handles the rename stuff, so the generated names automatically incorporate a suitable default and remain valid identifiers. I'm having trouble seeing the downside here. I'm adding one "is None" check and one line of code to the existing procedure. I can't believe I'm the only person who has wanted to skip making up a type name but still wanted something vaguely meaningful in debug output. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 08:39:16 2017 From: report at bugs.python.org (Isaac Morland) Date: Mon, 31 Jul 2017 12:39:16 +0000 Subject: [issue31086] Add namedattrgetter function which acts like attrgetter but uses namedtuple In-Reply-To: <1501463947.14.0.101425417299.issue31086@psf.upfronthosting.co.za> Message-ID: <1501504756.77.0.554623457588.issue31086@psf.upfronthosting.co.za> Isaac Morland added the comment: Maybe the issue is that I work with SQL constantly. In SQL, if I say "SELECT a, b, c FROM t" and table t has columns a, b, c, d, e, f, I can still select a, b, and c from the result. So to me it is natural that getting a bunch of attributes returns something (row or object, depending on the context), where the attributes are still labelled. I understand why this was rejected as a universal change to attrgetter - in particular, I didn't re-evaluate the appropriateness of the change once I realized that attrgetter has a C implementation - but I don't understand why this isn't considered a natural option to provide. Using rename=True is just a way of having it not blow up if an attribute name requiring renaming is supplied. I agree that actually using such an attribute requires either guessing the name generated by the rename logic in namedtuple or using numeric indexing. If namedtuple didn't have rename=True then I wouldn't try to re-implement it but since it does I figure it's worth typing ", rename=True" once - it's hardly going to hurt anything. Finally as to use cases, I agree that if the only thing one is doing is sorting it doesn't matter. But with groupby it can be very useful. Say I have an iterator providing objects with fields (heading_id, heading_text, item_id, item_text). I want to display each heading, followed by its items. So, I groupby attrgetter ('heading_id', 'heading_text'), and write a loop something like this: for heading, items in groupby (source, attrgetter ('heading_id', 'heading_text')): # display heading # refer to heading.heading_id and heading.heading_text for item in items: # display item # refer to item.item_id and item.item_text Except I can't, because heading doesn't have attribute names. If I replace attrgetter with namedattrgetter then I'm fine. How would you write this? In the past I've used items[0] but that is (a) ugly and (b) requires "items = list(items)" which is just noise. I feel like depending on what is being done with map and filter you could have a similar situation where you want to refer to the specific fields of the tuple coming back from the function returned by attrgetter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 08:53:04 2017 From: report at bugs.python.org (INADA Naoki) Date: Mon, 31 Jul 2017 12:53:04 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501463154.41.0.0907519926767.issue31085@psf.upfronthosting.co.za> Message-ID: <1501505584.79.0.37655752839.issue31085@psf.upfronthosting.co.za> INADA Naoki added the comment: When subclassing, current __repr__ uses `self.__class__.__name__`. So you get meaningful name already. When automatic generation, I recommend you to use some wrapper to cache same namedtuple, since creating namedtuple on the fly is costly job. I'm afraid "unnnamed" namedtuple may lead people to use namedtuple on the fly, like lambda. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 08:59:50 2017 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 31 Jul 2017 12:59:50 +0000 Subject: [issue31088] regrtest.py: "${test_file_name} skipped" message printed twice for each ${test_file_name} Message-ID: <1501505990.76.0.255583071807.issue31088@psf.upfronthosting.co.za> New submission from Arfrever Frehtes Taifersar Arahesis: Since some change during last 3 months, regrtest.py on 2.7 branch prints "${test_file_name} skipped" message twice for each ${test_file_name}, firstly directly after given ${test_file_name}, and secondly after the following test. Example: 0:00:06 [ 17/401] test_abc 0:00:06 [ 18/401] test_abstract_numbers 0:00:06 [ 19/401] test_aepack test_aepack skipped -- No module named aetypes 0:00:06 [ 20/401] test_aifc -- test_aepack skipped 0:00:06 [ 21/401] test_al test_al skipped -- No module named al 0:00:06 [ 22/401] test_anydbm -- test_al skipped 0:00:08 [ 23/401] test_applesingle test_applesingle skipped -- No module named MacOS 0:00:08 [ 24/401] test_argparse -- test_applesingle skipped 0:00:14 [ 25/401] test_array 0:00:15 [ 26/401] test_ascii_formatd 0:00:15 [ 27/401] test_ast ---------- assignee: haypo components: Tests messages: 299555 nosy: Arfrever, haypo priority: normal severity: normal status: open title: regrtest.py: "${test_file_name} skipped" message printed twice for each ${test_file_name} versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 10:24:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Jul 2017 14:24:43 +0000 Subject: [issue30640] NULL + 1 in _PyFunction_FastCallDict(), PyEval_EvalCodeEx() In-Reply-To: <1497278279.18.0.370213389584.issue30640@psf.upfronthosting.co.za> Message-ID: <1501511083.94.0.492547713856.issue30640@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c6ea8974e2d939223bfd6d64ee13ec89c090d2e0 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-30640: Fix undefined behavior in _PyFunction_FastCallDict() and PyEval_EvalCodeEx() (#2919) https://github.com/python/cpython/commit/c6ea8974e2d939223bfd6d64ee13ec89c090d2e0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 10:26:52 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 31 Jul 2017 14:26:52 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1501511212.67.0.464796297337.issue5288@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: New changeset 018d353c1c8c87767d2335cd884017c2ce12e045 by Alexander Belopolsky in branch 'master': Closes issue bpo-5288: Allow tzinfo objects with sub-minute offsets. (#2896) https://github.com/python/cpython/commit/018d353c1c8c87767d2335cd884017c2ce12e045 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 10:27:55 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 31 Jul 2017 14:27:55 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1501511275.93.0.438844448879.issue5288@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- resolution: -> fixed stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 10:43:18 2017 From: report at bugs.python.org (Robert) Date: Mon, 31 Jul 2017 14:43:18 +0000 Subject: [issue31089] email.utils.parseaddr fails on odd double quotes in multiline header Message-ID: <1501512198.85.0.996248445964.issue31089@psf.upfronthosting.co.za> New submission from Robert: email.utils.parseaddr() does not successfully parse a field value into a (comment, address) pair if the FROM header has 2 lines (or more) containing odd number of double quotes in each of them. The address in such tuple is not e-mail address but a part of comment. For example: "=?UTF-8?Q?Anita_=W4=86ieckli=C5=84ska_|_PATO_Nieruch?= =?UTF-8?Q?omo=C5=9Bci?=" is parsed into: ('', '=?UTF-8?Q?Anita_=W4=86ieckli=C5=84ska_|_PATO_Nieruch?=') Full example on Python 2.7.12, email 4.0.2: Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from email.utils import parseaddr >>> parseaddr('"=?UTF8?Q?Anita_=W4=86ieckli=C5=84ska_|_PATO_Nieruch?=\r\n =?UTF-8?Q?omo=C5=9Bci?=" ') ('', '=?UTF-8?Q?Anita_=W4=86ieckli=C5=84ska_|_PATO_Nieruch?=') When double quotes or \r\n are removed, header is parsed without problems. The same issue exists on python 3.5.2 and email 6.0.0a1. >From headers analysis I know that e-mail was made in Outlook 14.0 then send through Exim 4.87 to outlook.com servers. ---------- messages: 299558 nosy: robertus priority: normal severity: normal status: open title: email.utils.parseaddr fails on odd double quotes in multiline header versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 10:43:59 2017 From: report at bugs.python.org (Robert) Date: Mon, 31 Jul 2017 14:43:59 +0000 Subject: [issue31089] email.utils.parseaddr fails on odd double quotes in multiline header In-Reply-To: <1501512198.85.0.996248445964.issue31089@psf.upfronthosting.co.za> Message-ID: <1501512239.61.0.351859372812.issue31089@psf.upfronthosting.co.za> Changes by Robert : ---------- components: +email nosy: +barry, r.david.murray type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 10:44:19 2017 From: report at bugs.python.org (Sriram) Date: Mon, 31 Jul 2017 14:44:19 +0000 Subject: [issue31090] import error for numpy Message-ID: <1501512259.67.0.420176146977.issue31090@psf.upfronthosting.co.za> New submission from Sriram: When i tried to import numpy for any program in VS 2017, it returns with Import Error. Traceback (most recent call last): File "C:\Program Files\Python36\lib\site-packages\numpy\core\__init__.py", line 16, in from . import multiarray ImportError: DLL load failed: The specified procedure could not be found. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Sriram Sudharsan\documents\visual studio 2017\Projects\TestApp1\TestApp1\TestApp1.py", line 1, in import numpy as np File "C:\Program Files\Python36\lib\site-packages\numpy\__init__.py", line 142, in from . import add_newdocs File "C:\Program Files\Python36\lib\site-packages\numpy\add_newdocs.py", line 13, in from numpy.lib import add_newdoc File "C:\Program Files\Python36\lib\site-packages\numpy\lib\__init__.py", line 8, in from .type_check import * File "C:\Program Files\Python36\lib\site-packages\numpy\lib\type_check.py", line 11, in import numpy.core.numeric as _nx File "C:\Program Files\Python36\lib\site-packages\numpy\core\__init__.py", line 26, in raise ImportError(msg) ImportError: Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy. If you're working with a numpy git repo, try `git clean -xdf` (removes all files not under version control). Otherwise reinstall numpy. Original error was: DLL load failed: The specified procedure could not be found. Press any key to continue . . . ---------- components: Library (Lib) files: Capture.JPG messages: 299559 nosy: SriramSudharsan priority: normal severity: normal status: open title: import error for numpy versions: Python 3.6 Added file: http://bugs.python.org/file47053/Capture.JPG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 10:49:04 2017 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 31 Jul 2017 14:49:04 +0000 Subject: [issue31090] import error for numpy In-Reply-To: <1501512259.67.0.420176146977.issue31090@psf.upfronthosting.co.za> Message-ID: <1501512544.04.0.799342148376.issue31090@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hi Sriram, NumPy is a third party package, not maintained by the Python core developers; you likely need to report this on the NumPy bug tracker (though it's probably worthwhile asking on the NumPy user mailing lists first). Closing here, since this almost certainly isn't a core Python issue. ---------- nosy: +mark.dickinson resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 11:08:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Jul 2017 15:08:28 +0000 Subject: [issue30732] json.dumps() lacks information about RecursionError related to default function In-Reply-To: <1498124337.07.0.93184881583.issue30732@psf.upfronthosting.co.za> Message-ID: <1501513708.86.0.204679329842.issue30732@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: simplejson behaves the same. I thought default() was allowed to return only instances of types directly supported by JSON encoder (type(None), bool, int, float, list, tuple, dict). Is there a reason of allowing to call default() more than once on the same root object? ---------- nosy: +bob.ippolito, ezio.melotti, rhettinger, serhiy.storchaka versions: -Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 11:08:47 2017 From: report at bugs.python.org (Joey DiGiorgio) Date: Mon, 31 Jul 2017 15:08:47 +0000 Subject: [issue31056] Import Module Not Working According To Documentation Python 3.6.2 In-Reply-To: <1501167395.04.0.978474352938.issue31056@psf.upfronthosting.co.za> Message-ID: <1501513727.36.0.0402582556004.issue31056@psf.upfronthosting.co.za> Joey DiGiorgio added the comment: I have tried from 3 computers now and have been able to reproduce the issue with the same set of files described in my stackoverflow post. Here is a .zip package with all of the files I used in all 3 tests. The python package is the Windows 32bit embedded zip package downloaded from the Python site. https://drive.google.com/file/d/0B0tT3_X-iMNzY2VMTkQ4X04zNWM/view?usp=sharing ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 11:09:16 2017 From: report at bugs.python.org (Joey DiGiorgio) Date: Mon, 31 Jul 2017 15:09:16 +0000 Subject: [issue31056] Import Module Not Working According To Documentation Python 3.6.2 In-Reply-To: <1501167395.04.0.978474352938.issue31056@psf.upfronthosting.co.za> Message-ID: <1501513756.61.0.994181190764.issue31056@psf.upfronthosting.co.za> Joey DiGiorgio added the comment: I run the test.bat file and get the import error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 11:20:01 2017 From: report at bugs.python.org (Paul Moore) Date: Mon, 31 Jul 2017 15:20:01 +0000 Subject: [issue31056] Import Module Not Working According To Documentation Python 3.6.2 In-Reply-To: <1501167395.04.0.978474352938.issue31056@psf.upfronthosting.co.za> Message-ID: <1501514401.03.0.0810638975273.issue31056@psf.upfronthosting.co.za> Paul Moore added the comment: OK, so this is the first time (I believe) you have mentioned that you are using the embedded distribution - which is not designed for general scripting use, but very specifically for embedding Python in a custom application. Can you reproduce with the standard installer? I don't see any obvious reason why the embedded distribution would be different in this regard, but I'll give it a try when I can. BTW, please can you upload your testcase here? I don't have access to Google Drive on this PC (firewall limitations) so I'll need you to do that before I can access it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 11:26:28 2017 From: report at bugs.python.org (Paul Moore) Date: Mon, 31 Jul 2017 15:26:28 +0000 Subject: [issue31056] Import Module Not Working According To Documentation Python 3.6.2 In-Reply-To: <1501167395.04.0.978474352938.issue31056@psf.upfronthosting.co.za> Message-ID: <1501514788.88.0.635814884346.issue31056@psf.upfronthosting.co.za> Paul Moore added the comment: Hmm, never mind. This is expected behaviour because the embedded distribution includes a ".pth" file which overrides the standard sys.path. For details, see https://docs.python.org/3.6/using/windows.html#finding-modules and https://docs.python.org/3.6/using/windows.html#embedded-distribution Once again, please understand that the embedded distribution is *not* intended as a "portable version" of Python. It's a specialised distribution for a particular purpose. If you want a "copy and use" version of Python, I believe there's one available via nuget, but it's not supported by the Python core devs, and I don't have any details for you, other than this. So to confirm, Python is working as documented and there's no bug here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 11:27:37 2017 From: report at bugs.python.org (Joey DiGiorgio) Date: Mon, 31 Jul 2017 15:27:37 +0000 Subject: [issue31056] Import Module Not Working According To Documentation Python 3.6.2 In-Reply-To: <1501167395.04.0.978474352938.issue31056@psf.upfronthosting.co.za> Message-ID: <1501514857.54.0.370744608764.issue31056@psf.upfronthosting.co.za> Joey DiGiorgio added the comment: Steve Dower, I understand the purpose of the embedded package. The test was also tried by calling the python executable without modifying the path and the same thing happens. i.e. %~dp0\Python_Embedded_Windows_32bit_v3.6.2\python main.py in the zip package I provided. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 11:32:37 2017 From: report at bugs.python.org (Paul Moore) Date: Mon, 31 Jul 2017 15:32:37 +0000 Subject: [issue31056] Import Module Not Working According To Documentation Python 3.6.2 In-Reply-To: <1501167395.04.0.978474352938.issue31056@psf.upfronthosting.co.za> Message-ID: <1501515157.57.0.114819759766.issue31056@psf.upfronthosting.co.za> Paul Moore added the comment: I'm not Steve, but thanks for the compliment :-) You're still running an embedded Python. There's a _python36.pth file next to the executable, that's causing the behaviour you're seeing (and it's there by design - it's what makes the embedded distribution behave the way it does). Unless you can reproduce with the standard distribution, this isn't a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 11:32:47 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 31 Jul 2017 15:32:47 +0000 Subject: [issue31089] email.utils.parseaddr fails on odd double quotes in multiline header In-Reply-To: <1501512198.85.0.996248445964.issue31089@psf.upfronthosting.co.za> Message-ID: <1501515167.06.0.374969537962.issue31089@psf.upfronthosting.co.za> R. David Murray added the comment: parseaddr does what you expect if the message has been read using universal newline mode (ie: the linesep is \n): >>> parseaddr('"=?UTF-8?Q?Anita_=W4=86ieckli=C5=84ska_|_PATO_Nieruch?=\n =?UTF-8?Q?omo=C5=9Bci?=" "') ('=?UTF-8?Q?Anita_=W4=86ieckli=C5=84ska_|_PATO_Nieruch?=\n =?UTF-8?Q?omo=C5=9Bci?=', 'anita.wiecklinska at pato.com.pl') I suppose this wouldn't be *that* hard to fix. If it isn't too complex and you want to propose a patch I'll take a look. In any case it works fine in python3 using the new policies: >>> from email import message_from_string as mfs >>> from email.policy import default >>> m = mfs('From: "=?UTF-8?Q?Anita_=W4=86ieckli=C5=84ska_|_PATO_Nieruch?=\r\n =?UTF-8?Q?omo=C5=9Bci?=" "\r\n\r\ntest', policy=default) >>> m['from'].addresses (Address(display_name='Anita =W4\udc86ieckli?ska | PATO Nieruch omo?ci', username='anita.wiecklinska', domain='pato.com.pl'),) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 11:41:58 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 31 Jul 2017 15:41:58 +0000 Subject: [issue31089] email.utils.parseaddr fails on odd double quotes in multiline header In-Reply-To: <1501512198.85.0.996248445964.issue31089@psf.upfronthosting.co.za> Message-ID: <1501515718.13.0.0952509703862.issue31089@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I take it back. With \n it retains the \n in the decoded name field. There is a bug of some sort here (\r\n should be treated the same as \n, I think, whatever way it is treated). I don't think this is worth addressing, given that the new policies provide a much better API for interacting with Messages, and you can in fact easily unfold the line before parsing it if you need to do it in 2.7: >>> parseaddr(''.join(m['from'].splitlines())) ('=?UTF-8?Q?Anita_=W4=86ieckli=C5=84ska_|_PATO_Nieruch?= =?UTF-8?Q?omo=C5=9Bci?=', 'anita.wiecklinska at pato.com.pl') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 12:15:24 2017 From: report at bugs.python.org (Sriram) Date: Mon, 31 Jul 2017 16:15:24 +0000 Subject: [issue31090] import error for numpy In-Reply-To: <1501512259.67.0.420176146977.issue31090@psf.upfronthosting.co.za> Message-ID: <1501517724.46.0.7684912605.issue31090@psf.upfronthosting.co.za> Sriram added the comment: Yes, i just found that after creating the issue, Sorry. Anyhow thanks for quick response, i have addressed this to numpy team. https://github.com/numpy/numpy/issues/9501 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 12:22:51 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 31 Jul 2017 16:22:51 +0000 Subject: [issue25684] ttk.OptionMenu radiobuttons aren't unique between two instances of OptionMenu In-Reply-To: <1448040288.53.0.198369542776.issue25684@psf.upfronthosting.co.za> Message-ID: <1501518171.42.0.132924086986.issue25684@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3008 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 13:29:13 2017 From: report at bugs.python.org (Yaron de Leeuw) Date: Mon, 31 Jul 2017 17:29:13 +0000 Subject: [issue26253] tarfile in stream mode always set zlib compression level to 9 In-Reply-To: <1454288123.43.0.462874591937.issue26253@psf.upfronthosting.co.za> Message-ID: <1501522153.79.0.264109116459.issue26253@psf.upfronthosting.co.za> Changes by Yaron de Leeuw : ---------- pull_requests: +3009 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 13:44:41 2017 From: report at bugs.python.org (Joey DiGiorgio) Date: Mon, 31 Jul 2017 17:44:41 +0000 Subject: [issue31056] Import Module Not Working According To Documentation Python 3.6.2 In-Reply-To: <1501167395.04.0.978474352938.issue31056@psf.upfronthosting.co.za> Message-ID: <1501523081.7.0.0234147808607.issue31056@psf.upfronthosting.co.za> Joey DiGiorgio added the comment: Ok I have downloaded an installed via the Windows installer and the test I run works as expected. I also tried the embedded package without the ._pth and it also works according to the embedded documentation. Sorry for the confusion as I did not specify the embedded package from what I can tell. Thank you all for working with me on resolving this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 13:52:48 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 31 Jul 2017 17:52:48 +0000 Subject: [issue29519] weakref spewing exceptions during finalization when combined with multiprocessing In-Reply-To: <1486701306.85.0.363188055849.issue29519@psf.upfronthosting.co.za> Message-ID: <1501523568.59.0.250633783343.issue29519@psf.upfronthosting.co.za> ?ukasz Langa added the comment: New changeset 3e37f4a11547a226c3c2f8bd612510465db397b9 by ?ukasz Langa (INADA Naoki) in branch '2.7': bpo-29519: weakref spewing exceptions during interp finalization (#2958) https://github.com/python/cpython/commit/3e37f4a11547a226c3c2f8bd612510465db397b9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 13:56:24 2017 From: report at bugs.python.org (Paul Moore) Date: Mon, 31 Jul 2017 17:56:24 +0000 Subject: [issue31056] Import Module Not Working According To Documentation Python 3.6.2 In-Reply-To: <1501167395.04.0.978474352938.issue31056@psf.upfronthosting.co.za> Message-ID: <1501523784.19.0.100691843184.issue31056@psf.upfronthosting.co.za> Paul Moore added the comment: No problem - glad it's all clear now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 14:15:52 2017 From: report at bugs.python.org (Alexander Mohr) Date: Mon, 31 Jul 2017 18:15:52 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501524952.0.0.295411199032.issue31061@psf.upfronthosting.co.za> Alexander Mohr added the comment: oh, so this is looking like an asyncio issue, the "gc" that is causing the crash is: (gdb) print *FROM_GC(gc)->ob_type $8 = {ob_base = {ob_base = {_ob_next = 0x7f80c8aafc88, _ob_prev = 0x7f80c8aafd00, ob_refcnt = 7, ob_type = 0x7f80cd8c86e0 }, ob_size = 0}, tp_name = 0x7f80c8aa5c38 "_GatheringFuture", tp_basicsize = 104, tp_itemsize = 0, tp_dealloc = 0x7f80cd41bee7 , tp_print = 0x0, tp_getattr = 0x0, tp_setattr = 0x0, tp_as_async = 0x556ba4342d58, tp_repr = 0x7f80c8870a9b , tp_as_number = 0x556ba4342d70, tp_as_sequence = 0x556ba4342ea8, tp_as_mapping = 0x556ba4342e90, tp_hash = 0x7f80cd54c995 <_Py_HashPointer>, tp_call = 0x0, tp_str = 0x7f80cd423d05 , tp_getattro = 0x7f80cd3fec8b , tp_setattro = 0x7f80cd3ff0b5 , tp_as_buffer = 0x556ba4342ef8, tp_flags = 808449, tp_doc = 0x7f80c8cd7380 "Helper for gather().\n\n This overrides cancel() to cancel all the children and act more\n like Task.cancel(), which doesn't immediately mark itself as\n cancelled.\n ", tp_traverse = 0x7f80cd41baae , tp_clear = 0x7f80cd41bd5c , tp_richcompare = 0x7f80cd423d42 , tp_weaklistoffset = 96, tp_iter = 0x7f80c8871d4f , tp_iternext = 0x7f80cd3fe6d6 <_PyObject_NextNotImplemented>, tp_methods = 0x0, tp_members = 0x556ba4342f28, tp_getset = 0x0, tp_base = 0x7f80c8a7b3c0 , tp_dict = 0x7f80c8aafc88, tp_descr_get = 0x0, tp_descr_set = 0x0, tp_dictoffset = 88, tp_init = 0x7f80cd431000 , tp_alloc = 0x7f80cd41b7f8 , tp_new = 0x7f80cd41b9c6 , tp_free = 0x7f80cd583d8b , tp_is_gc = 0x0, tp_bases = 0x7f80c8ab20c0, tp_mro = 0x7f80c8aafd00, tp_cache = 0x0, tp_subclasses = 0x0, tp_weaklist = 0x7f80c8aae5d8, tp_del = 0x0, tp_version_tag = 791, tp_finalize = 0x7f80c8870ddb } note: it's a _GatheringFuture. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 14:16:17 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 31 Jul 2017 18:16:17 +0000 Subject: [issue25910] Fixing links in documentation In-Reply-To: <1450530544.1.0.9187941337.issue25910@psf.upfronthosting.co.za> Message-ID: <1501524977.22.0.0487352722961.issue25910@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 8474d87165593bac2bc231287f42c4cff3fd6aaf by Mariatta in branch 'master': bpo-25910: Update LICENSE (GH-2873) https://github.com/python/cpython/commit/8474d87165593bac2bc231287f42c4cff3fd6aaf ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 14:34:50 2017 From: report at bugs.python.org (Alexander Mohr) Date: Mon, 31 Jul 2017 18:34:50 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1501526090.36.0.540182515645.issue26617@psf.upfronthosting.co.za> Alexander Mohr added the comment: so I just discovered that the object that has the zero refcount has the same tp_dealloc: (gdb) print *FROM_GC(gc)->ob_type $8 = {ob_base = {ob_base = {_ob_next = 0x7f80c8aafc88, _ob_prev = 0x7f80c8aafd00, ob_refcnt = 7, ob_type = 0x7f80cd8c86e0 }, ob_size = 0}, tp_name = 0x7f80c8aa5c38 "_GatheringFuture", tp_basicsize = 104, tp_itemsize = 0, tp_dealloc = 0x7f80cd41bee7 , tp_print = 0x0, tp_getattr = 0x0, tp_setattr = 0x0, tp_as_async = 0x556ba4342d58, tp_repr = 0x7f80c8870a9b , tp_as_number = 0x556ba4342d70, tp_as_sequence = 0x556ba4342ea8, tp_as_mapping = 0x556ba4342e90, tp_hash = 0x7f80cd54c995 <_Py_HashPointer>, tp_call = 0x0, tp_str = 0x7f80cd423d05 , tp_getattro = 0x7f80cd3fec8b , tp_setattro = 0x7f80cd3ff0b5 , tp_as_buffer = 0x556ba4342ef8, tp_flags = 808449, tp_doc = 0x7f80c8cd7380 "Helper for gather().\n\n This overrides cancel() to cancel all the children and act more\n like Task.cancel(), which doesn't immediately mark itself as\n cancelled.\n ", tp_traverse = 0x7f80cd41baae , tp_clear = 0x7f80cd41bd5c , tp_richcompare = 0x7f80cd423d42 , tp_weaklistoffset = 96, tp_iter = 0x7f80c8871d4f , tp_iternext = 0x7f80cd3fe6d6 <_PyObject_NextNotImplemented>, tp_methods = 0x0, tp_members = 0x556ba4342f28, tp_getset = 0x0, tp_base = 0x7f80c8a7b3c0 , tp_dict = 0x7f80c8aafc88, tp_descr_get = 0x0, tp_descr_set = 0x0, tp_dictoffset = 88, tp_init = 0x7f80cd431000 , tp_alloc = 0x7f80cd41b7f8 , tp_new = 0x7f80cd41b9c6 , tp_free = 0x7f80cd583d8b , tp_is_gc = 0x0, tp_bases = 0x7f80c8ab20c0, tp_mro = 0x7f80c8aafd00, tp_cache = 0x0, tp_subclasses = 0x0, tp_weaklist = 0x7f80c8aae5d8, tp_del = 0x0, tp_version_tag = 791, tp_finalize = 0x7f80c8870ddb } This is for a GatheringFuture, something tells me perhaps there is more to this function that needs to be resolved? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 14:44:54 2017 From: report at bugs.python.org (Yaron de Leeuw) Date: Mon, 31 Jul 2017 18:44:54 +0000 Subject: [issue26440] tarfile._FileInFile.seekable is broken in stream mode In-Reply-To: <1456418959.65.0.0948342534374.issue26440@psf.upfronthosting.co.za> Message-ID: <1501526694.74.0.197330456341.issue26440@psf.upfronthosting.co.za> Yaron de Leeuw added the comment: _Stream provides seek, but only positive seeking is allowed. Is that considered seekable? Also, maybe _Stream should inherit from io.BaseIO. WDYT? ---------- nosy: +jarondl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 15:10:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Jul 2017 19:10:16 +0000 Subject: [issue25684] ttk.OptionMenu radiobuttons aren't unique between two instances of OptionMenu In-Reply-To: <1448040288.53.0.198369542776.issue25684@psf.upfronthosting.co.za> Message-ID: <1501528216.18.0.119285991062.issue25684@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2bf1586e60a6639b532cd8e3442ae33064523eb1 by Serhiy Storchaka (csabella) in branch '3.6': [3.6] bpo-25684: ttk.OptionMenu radiobuttons weren't unique (GH-2276) (#2959) https://github.com/python/cpython/commit/2bf1586e60a6639b532cd8e3442ae33064523eb1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 15:24:27 2017 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 31 Jul 2017 19:24:27 +0000 Subject: [issue31091] remove dead code in PyErr_GivenExceptionMatches() Message-ID: <1501529067.63.0.557215021907.issue31091@psf.upfronthosting.co.za> New submission from Stefan Behnel: PyObject *exception, *value, *tb; PyErr_Fetch(&exception, &value, &tb); /* PyObject_IsSubclass() can recurse and therefore is not safe (see test_bad_getattr in test.pickletester). */ res = PyType_IsSubtype((PyTypeObject *)err, (PyTypeObject *)exc); /* This function must not fail, so print the error here */ if (res == -1) { PyErr_WriteUnraisable(err); res = 0; } PyErr_Restore(exception, value, tb); According to the comment, there was previously a call to PyObject_IsSubclass() involved which could fail, but since it was replaced with a call to PyType_IsSubtype(), it can no longer fail. See pull request. ---------- components: Interpreter Core messages: 299579 nosy: scoder priority: normal pull_requests: 3010 severity: normal status: open title: remove dead code in PyErr_GivenExceptionMatches() type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 15:40:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Jul 2017 19:40:21 +0000 Subject: [issue31091] remove dead code in PyErr_GivenExceptionMatches() In-Reply-To: <1501529067.63.0.557215021907.issue31091@psf.upfronthosting.co.za> Message-ID: <1501530021.32.0.561043601121.issue31091@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +pitrou, serhiy.storchaka stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 15:56:29 2017 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 31 Jul 2017 19:56:29 +0000 Subject: [issue31091] remove dead code in PyErr_GivenExceptionMatches() In-Reply-To: <1501529067.63.0.557215021907.issue31091@psf.upfronthosting.co.za> Message-ID: <1501530989.31.0.959518730446.issue31091@psf.upfronthosting.co.za> Stefan Behnel added the comment: Looks like the switch from PyObject_IsSubclass() to PyType_IsSubtype() was made during the original Py3 development cycle. It should thus be safe to assume that the semantics are "as designed". :) What about applying the patch also to 3.6 and older? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 16:00:00 2017 From: report at bugs.python.org (Alexander Mohr) Date: Mon, 31 Jul 2017 20:00:00 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501531200.62.0.19441083379.issue31061@psf.upfronthosting.co.za> Alexander Mohr added the comment: another core had a different gc object: $1 = {ob_base = {ob_base = {_ob_next = 0x7f801eac3158, _ob_prev = 0x7f801eab95a0, ob_refcnt = 41, ob_type = 0x7f80238e76e0 }, ob_size = 0}, tp_name = 0x7f801e8967af "_asyncio.Task", tp_basicsize = 128, tp_itemsize = 0, tp_dealloc = 0x7f801e8926e5 , tp_print = 0x0, tp_getattr = 0x0, tp_setattr = 0x0, tp_as_async = 0x7f801ea99720 , tp_repr = 0x7f801e88fa9b , tp_as_number = 0x0, tp_as_sequence = 0x0, tp_as_mapping = 0x0, tp_hash = 0x7f802356b995 <_Py_HashPointer>, tp_call = 0x0, tp_str = 0x7f8023442d05 , tp_getattro = 0x7f802341dc8b , tp_setattro = 0x7f802341e0b5 , tp_as_buffer = 0x0, tp_flags = 807937, tp_doc = 0x7f801ea98bc0 <_asyncio_Task___init____doc__> "Task(coro, *, loop=None)\n--\n\nA coroutine wrapped in a Future.", tp_traverse = 0x7f801e891658 , tp_clear = 0x7f801e89150b , tp_richcompare = 0x7f8023442d42 , tp_weaklistoffset = 96, tp_iter = 0x7f801e890d4f , tp_iternext = 0x0, tp_methods = 0x7f801ea99b20 , tp_members = 0x0, tp_getset = 0x7f801ea99d40 , tp_base = 0x7f801ea9a3c0 , tp_dict = 0x7f801eac2238, tp_descr_get = 0x0, tp_descr_set = 0x0, tp_dictoffset = 88, tp_init = 0x7f801e88d84d <_asyncio_Task___init__>, tp_alloc = 0x7f802343a7f8 , tp_new = 0x7f802343a9c6 , tp_free = 0x7f80235a2d8b , tp_is_gc = 0x0, tp_bases = 0x7f801eab95a0, tp_mro = 0x7f801eabc508, tp_cache = 0x0, tp_subclasses = 0x0, tp_weaklist = 0x7f801eac3458, tp_del = 0x0, tp_version_tag = 4303, tp_finalize = 0x7f801e8922fd } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 16:05:27 2017 From: report at bugs.python.org (Prof Plum) Date: Mon, 31 Jul 2017 20:05:27 +0000 Subject: [issue31092] Potential multiprocessing.Manager() race condition Message-ID: <1501531527.32.0.713819847625.issue31092@psf.upfronthosting.co.za> New submission from Prof Plum: So I was writing code that had multiple write thread and read thread "groups" in a single pool (in a group a few write threads write to a queue that a read thread reads), and I ran into what I think is a race condition with the multiprocessing.Manager() class. It looks managed queues are returned from Manager() before they are actually initialized and safe to use, but it is only noticeable when making many managed queues in quick succession. I've attached a simple demo script to reproduce the bug, the reason I believe this is race condition is because while the sleep(0.5) line is commented out python crashes, but when it's not it doesn't. Also I'm on windows 10 and using 64 bit Python 3.5.2 ---------- files: bug_demo.py messages: 299582 nosy: Prof Plum priority: normal severity: normal status: open title: Potential multiprocessing.Manager() race condition type: crash versions: Python 3.5 Added file: http://bugs.python.org/file47054/bug_demo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 16:19:42 2017 From: report at bugs.python.org (Alexander Mohr) Date: Mon, 31 Jul 2017 20:19:42 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501532382.03.0.168422060356.issue31061@psf.upfronthosting.co.za> Alexander Mohr added the comment: I'm hoping this is the fix: --- Modules/_asynciomodule.c.orig 2017-07-31 12:16:16.000000000 -0700 +++ Modules/_asynciomodule.c 2017-07-31 13:08:52.000000000 -0700 @@ -953,15 +953,18 @@ FutureObj_dealloc(PyObject *self) { FutureObj *fut = (FutureObj *)self; + PyObject_GC_UnTrack(self); if (Future_CheckExact(fut)) { /* When fut is subclass of Future, finalizer is called from * subtype_dealloc. */ + _PyObject_GC_TRACK(self); if (PyObject_CallFinalizerFromDealloc(self) < 0) { // resurrected. return; } + _PyObject_GC_UNTRACK(self); } if (fut->fut_weakreflist != NULL) { @@ -1828,14 +1831,18 @@ { TaskObj *task = (TaskObj *)self; + PyObject_GC_UnTrack(self); + if (Task_CheckExact(self)) { /* When fut is subclass of Task, finalizer is called from * subtype_dealloc. */ + _PyObject_GC_TRACK(self); if (PyObject_CallFinalizerFromDealloc(self) < 0) { // resurrected. return; } + _PyObject_GC_UNTRACK(self); } if (task->task_weakreflist != NULL) { ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 16:26:27 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 31 Jul 2017 20:26:27 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501532787.87.0.506171424549.issue31061@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: resolved -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 16:27:14 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 31 Jul 2017 20:27:14 +0000 Subject: [issue31080] Allow `logging.config.fileConfig` to accept kwargs In-Reply-To: <1501434610.41.0.267137622883.issue31080@psf.upfronthosting.co.za> Message-ID: <1501532834.56.0.961898767888.issue31080@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 16:27:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Jul 2017 20:27:49 +0000 Subject: [issue31091] remove dead code in PyErr_GivenExceptionMatches() In-Reply-To: <1501529067.63.0.557215021907.issue31091@psf.upfronthosting.co.za> Message-ID: <1501532869.68.0.0771661807733.issue31091@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset e4c06bcca358c6dcb6393a75a1589ff6a2d45cde by Serhiy Storchaka (scoder) in branch 'master': bpo-31091: Remove dead code in PyErr_GivenExceptionMatches(). (#2963) https://github.com/python/cpython/commit/e4c06bcca358c6dcb6393a75a1589ff6a2d45cde ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 16:30:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Jul 2017 20:30:21 +0000 Subject: [issue31091] remove dead code in PyErr_GivenExceptionMatches() In-Reply-To: <1501529067.63.0.557215021907.issue31091@psf.upfronthosting.co.za> Message-ID: <1501533021.35.0.794799295507.issue31091@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is just a cleaning up. There is no bug in the old code. Usually such kind of changes are not backported. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 16:37:01 2017 From: report at bugs.python.org (Preston Landers) Date: Mon, 31 Jul 2017 20:37:01 +0000 Subject: [issue31080] Allow `logging.config.fileConfig` to accept kwargs In-Reply-To: <1501434610.41.0.267137622883.issue31080@psf.upfronthosting.co.za> Message-ID: <1501533421.89.0.868267598253.issue31080@psf.upfronthosting.co.za> Preston Landers added the comment: This is the current state of my patch: https://github.com/python/cpython/compare/master...Preston-Landers:bpo-31080-fileconfig It makes both `args` and `kwargs` optional in the config file. (Obviously, the actual handler may require args.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 17:41:05 2017 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 31 Jul 2017 21:41:05 +0000 Subject: [issue30640] NULL + 1 in _PyFunction_FastCallDict(), PyEval_EvalCodeEx() In-Reply-To: <1497278279.18.0.370213389584.issue30640@psf.upfronthosting.co.za> Message-ID: <1501537265.19.0.911887776014.issue30640@psf.upfronthosting.co.za> Changes by Zackery Spytz : ---------- pull_requests: +3011 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 18:19:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 31 Jul 2017 22:19:07 +0000 Subject: [issue31088] regrtest.py: "${test_file_name} skipped" message printed twice for each ${test_file_name} In-Reply-To: <1501505990.76.0.255583071807.issue31088@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: The output is correct. First, regrtest says that the test is running. Then the test is skipped and a message is logged. Finally, the test result is logged: the test was skipped. Using -j0, the output is less surprising ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 18:35:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 31 Jul 2017 22:35:58 +0000 Subject: [issue29654] SimpleHTTPRequestHandler should support browser cache In-Reply-To: <1501491386.47.0.377106243712.issue29654@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: I suppose temp.flush() is a remnant of other (unsuccessful) attempt to fix a race condition. I didn't try only with .flush(). I prefer to explicitly .flush(), just in case :-) Using correctly a file system is complex because of all layers of caching. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 19:19:22 2017 From: report at bugs.python.org (Tom Forbes) Date: Mon, 31 Jul 2017 23:19:22 +0000 Subject: [issue31076] http.server should correctly handle HTTP 1.1 responses without a content-length In-Reply-To: <1501337708.36.0.932974346055.issue31076@psf.upfronthosting.co.za> Message-ID: <1501543162.05.0.318681605673.issue31076@psf.upfronthosting.co.za> Tom Forbes added the comment: Django recently switched to HTTP 1.1 on their development server, and it works fine as long as the middleware is included that generates the content length. Using a 'bare' Django project with no middleware the server will just hang. It sounds like the easiest fix is to disable keepalive support in the development server, which sounds like a reasonable fix (it doesn't have that much benefit locally I think?). It was certainly surprising to find this issue, I know it is documented but that could certainly be improved. It's currently just a plain line of text in quite a text-heavy page, perhaps it should be put in a warning box? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 20:08:24 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 01 Aug 2017 00:08:24 +0000 Subject: [issue31083] IDLE: document new TabPage(Frame) design for configdialog In-Reply-To: <1501451403.71.0.908658123964.issue31083@psf.upfronthosting.co.za> Message-ID: <1501546104.88.0.978378608558.issue31083@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3013 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 20:08:32 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 01 Aug 2017 00:08:32 +0000 Subject: [issue31083] IDLE: document new TabPage(Frame) design for configdialog In-Reply-To: <1501451403.71.0.908658123964.issue31083@psf.upfronthosting.co.za> Message-ID: <1501546112.27.0.00737425267099.issue31083@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3012, 3013 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 20:27:15 2017 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 01 Aug 2017 00:27:15 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501547235.86.0.502284849954.issue31061@psf.upfronthosting.co.za> Yury Selivanov added the comment: Alexander, I think this is it, you found it! Can you open a PR against master with a fix? I'll review & merge it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 21:25:02 2017 From: report at bugs.python.org (Alexander Mohr) Date: Tue, 01 Aug 2017 01:25:02 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501550702.65.0.209921633926.issue31061@psf.upfronthosting.co.za> Alexander Mohr added the comment: ok, created: https://github.com/python/cpython/pull/2966 there are some other deallocs in there, mind verifying the rest? ---------- pull_requests: +3014 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 21:25:12 2017 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 01 Aug 2017 01:25:12 +0000 Subject: [issue30842] pyenv activate for bash and tcsh In-Reply-To: <1499110607.19.0.325548288138.issue30842@psf.upfronthosting.co.za> Message-ID: <1501550712.81.0.170649044409.issue30842@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 22:41:45 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 01 Aug 2017 02:41:45 +0000 Subject: [issue25910] Fixing links in documentation In-Reply-To: <1450530544.1.0.9187941337.issue25910@psf.upfronthosting.co.za> Message-ID: <1501555305.19.0.762865719881.issue25910@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +3015 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 22:43:01 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 01 Aug 2017 02:43:01 +0000 Subject: [issue25910] Fixing links in documentation In-Reply-To: <1450530544.1.0.9187941337.issue25910@psf.upfronthosting.co.za> Message-ID: <1501555381.45.0.377777881762.issue25910@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +3016 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 22:43:15 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 01 Aug 2017 02:43:15 +0000 Subject: [issue25910] Fixing links in documentation In-Reply-To: <1450530544.1.0.9187941337.issue25910@psf.upfronthosting.co.za> Message-ID: <1501555395.08.0.279692695644.issue25910@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +3017 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 22:53:45 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 01 Aug 2017 02:53:45 +0000 Subject: [issue25910] Fixing links in documentation In-Reply-To: <1450530544.1.0.9187941337.issue25910@psf.upfronthosting.co.za> Message-ID: <1501556025.36.0.9841529962.issue25910@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset f6306e737203ac1bf1717bbf62bc58dac24b68db by Mariatta in branch '3.5': bpo-25910: Update LICENSE (GH-2873) (GH-2968) https://github.com/python/cpython/commit/f6306e737203ac1bf1717bbf62bc58dac24b68db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 22:55:22 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 01 Aug 2017 02:55:22 +0000 Subject: [issue25910] Fixing links in documentation In-Reply-To: <1450530544.1.0.9187941337.issue25910@psf.upfronthosting.co.za> Message-ID: <1501556122.5.0.0295140532092.issue25910@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset b3c7d37c5ac8dbba4f1ebcf279bfceb570fb6c19 by Mariatta in branch '2.7': bpo-25910: Update LICENSE (GH-2873) (GH-2969) https://github.com/python/cpython/commit/b3c7d37c5ac8dbba4f1ebcf279bfceb570fb6c19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 22:59:52 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 01 Aug 2017 02:59:52 +0000 Subject: [issue25910] Fixing links in documentation In-Reply-To: <1450530544.1.0.9187941337.issue25910@psf.upfronthosting.co.za> Message-ID: <1501556392.71.0.810015372191.issue25910@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 330cdac5174e3dc6c1deb876bc12a39d7af9af84 by Mariatta in branch '3.6': bpo-25910: Update LICENSE (GH-2873) (GH-2967) https://github.com/python/cpython/commit/330cdac5174e3dc6c1deb876bc12a39d7af9af84 ---------- _______________________________________ Python tracker _______________________________________